Debian Codegraph @

texk/ttfdump/include/gsub.h

raw
1 /* gsub.h -- define data structures for Glyph Substitution Table
2 */
3
4 #ifndef __TTF_GSUB_H
5 #define __TTF_GSUB_H
6
7 /* Substitution LookupType Values */
8 #define SubLookup_Single 1
9 #define SubLookup_Multiple 2
10 #define SubLookup_Alternate 3
11 #define SubLookup_Ligature 4
12 #define SubLookup_Context 5
13 #define SubLookup_ChainingContext 6
14 #define SubLookup_ExtensionSubstitution 7
15 #define SubLookup_ReverseChainingContextSingle 8
16 #define SubLookup_Max 8
17
18 typedef struct
19 {
20 USHORT lookupType; /* = 1 */
21 USHORT lookupFormat; /* = 1 */
22 CoveragePtr coverage;
23 SHORT deltaGlyphID;
24 }
25 Sub11, *Sub11Ptr;
26
27 typedef struct
28 {
29 USHORT lookupType; /* = 1 */
30 USHORT lookupFormat; /* = 2 */
31 CoveragePtr coverage;
32 USHORT glyphCount;
33 USHORT *substitute; /* length = glyphCount */
34 }
35 Sub12, *Sub12Ptr;
36
37 typedef struct
38 {
39 USHORT glyphCount;
40 USHORT *substitute; /* length = glyphCount */
41 }
42 Sequence, *SequencePtr;
43
44 typedef struct
45 {
46 USHORT lookupType; /* = 2 */
47 USHORT lookupFormat; /* = 1 */
48 CoveragePtr coverage;
49 USHORT sequenceCount;
50 SequencePtr sequence; /* length = sequenceCount */
51 }
52 Sub21, *Sub21Ptr;
53
54 typedef struct
55 {
56 USHORT glyphCount;
57 USHORT *alternate; /* length = glyphCount */
58 }
59 AlternateSet, *AlternateSetPtr;
60
61 typedef struct
62 {
63 USHORT lookupType; /* = 3 */
64 USHORT lookupFormat; /* = 1 */
65 CoveragePtr coverage;
66 USHORT alternateSetCount;
67 AlternateSetPtr alternateSet; /* length = alternateSetCount */
68 }
69 Sub31, *Sub31Ptr;
70
71 typedef struct
72 {
73 USHORT ligGlyph;
74 USHORT compCount;
75 USHORT *component; /* length = compCount - 1 */
76 }
77 Ligature, *LigaturePtr;
78
79 typedef struct
80 {
81 USHORT ligatureCount;
82 LigaturePtr ligature; /* length = ligatureCount */
83 }
84 LigatureSet, *LigatureSetPtr;
85
86 typedef struct
87 {
88 USHORT lookupType; /* = 4 */
89 USHORT lookupFormat; /* = 1 */
90 CoveragePtr coverage;
91 USHORT ligSetCount;
92 LigatureSetPtr ligatureSet; /* length = ligSetCount */
93 }
94 Sub41, *Sub41Ptr;
95
96 #define Sub51Ptr OtfCtx1Ptr
97 #define Sub52Ptr OtfCtx2Ptr
98 #define Sub53Ptr OtfCtx3Ptr
99 #define Sub61Ptr OtfChn1Ptr
100 #define Sub62Ptr OtfChn2Ptr
101 #define Sub63Ptr OtfChn3Ptr
102
103 typedef struct
104 {
105 USHORT lookupType; /* = 8 */
106 USHORT lookupFormat; /* = 1 */
107 CoveragePtr coverage;
108 USHORT backtrackGlyphCount;
109 CoveragePtr *backtrack; /* length = backtrackGlyphCount */
110 USHORT lookaheadGlyphCount;
111 CoveragePtr *lookahead; /* length = lookaheadGlyphCount */
112 USHORT glyphCount;
113 USHORT *substitute; /* length = glyphCount */
114 }
115 Sub81, *Sub81Ptr;
116
117 typedef union
118 {
119 Sub11Ptr sub11;
120 Sub12Ptr sub12;
121 Sub21Ptr sub21;
122 Sub31Ptr sub31;
123 Sub41Ptr sub41;
124 Sub51Ptr sub51;
125 Sub52Ptr sub52;
126 Sub53Ptr sub53;
127 Sub61Ptr sub61;
128 Sub62Ptr sub62;
129 Sub63Ptr sub63;
130 Sub81Ptr sub81;
131 }
132 SubLookupPtr;
133
134 #endif /* __TTF_SUB_H */