1/* 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * 4 * This code is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License version 2 only, as 6 * published by the Free Software Foundation. Oracle designates this 7 * particular file as subject to the "Classpath" exception as provided 8 * by Oracle in the LICENSE file that accompanied this code. 9 * 10 * This code is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 * version 2 for more details (a copy is included in the LICENSE file that 14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 * 24 */ 25 26/* 27 * 28 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved 29 * 30 */ 31 32#ifndef __GLYPHDEFINITIONTABLES_H 33#define __GLYPHDEFINITIONTABLES_H 34 35/** 36 * \file 37 * \internal 38 */ 39 40#include "LETypes.h" 41#include "OpenTypeTables.h" 42#include "ClassDefinitionTables.h" 43 44U_NAMESPACE_BEGIN 45 46typedef ClassDefinitionTable GlyphClassDefinitionTable; 47 48enum GlyphClassDefinitions 49{ 50 gcdNoGlyphClass = 0, 51 gcdSimpleGlyph = 1, 52 gcdLigatureGlyph = 2, 53 gcdMarkGlyph = 3, 54 gcdComponentGlyph = 4 55}; 56 57struct AttachmentListTable 58{ 59 Offset coverageTableOffset; 60 le_uint16 glyphCount; 61 Offset attachPointTableOffsetArray[ANY_NUMBER]; 62}; 63LE_VAR_ARRAY(AttachmentListTable, attachPointTableOffsetArray) 64 65struct AttachPointTable 66{ 67 le_uint16 pointCount; 68 le_uint16 pointIndexArray[ANY_NUMBER]; 69}; 70LE_VAR_ARRAY(AttachPointTable, pointIndexArray) 71 72struct LigatureCaretListTable 73{ 74 Offset coverageTableOffset; 75 le_uint16 ligGlyphCount; 76 Offset ligGlyphTableOffsetArray[ANY_NUMBER]; 77}; 78LE_VAR_ARRAY(LigatureCaretListTable, ligGlyphTableOffsetArray) 79 80struct LigatureGlyphTable 81{ 82 le_uint16 caretCount; 83 Offset caretValueTableOffsetArray[ANY_NUMBER]; 84}; 85LE_VAR_ARRAY(LigatureGlyphTable, caretValueTableOffsetArray) 86 87struct CaretValueTable 88{ 89 le_uint16 caretValueFormat; 90}; 91 92struct CaretValueFormat1Table : CaretValueTable 93{ 94 le_int16 coordinate; 95}; 96 97struct CaretValueFormat2Table : CaretValueTable 98{ 99 le_uint16 caretValuePoint; 100}; 101 102struct CaretValueFormat3Table : CaretValueTable 103{ 104 le_int16 coordinate; 105 Offset deviceTableOffset; 106}; 107 108typedef ClassDefinitionTable MarkAttachClassDefinitionTable; 109 110struct GlyphDefinitionTableHeader 111{ 112 fixed32 version; 113 Offset glyphClassDefOffset; 114 Offset attachListOffset; 115 Offset ligCaretListOffset; 116 Offset MarkAttachClassDefOffset; 117 118 const LEReferenceTo<GlyphClassDefinitionTable> 119 getGlyphClassDefinitionTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base, 120 LEErrorCode &success) const; 121 const LEReferenceTo<AttachmentListTable> 122 getAttachmentListTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base, 123 LEErrorCode &success)const ; 124 const LEReferenceTo<LigatureCaretListTable> 125 getLigatureCaretListTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base, 126 LEErrorCode &success) const; 127 const LEReferenceTo<MarkAttachClassDefinitionTable> 128 getMarkAttachClassDefinitionTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base, 129 LEErrorCode &success) const; 130}; 131 132U_NAMESPACE_END 133#endif 134