OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998-2004 David Turner and Werner Lemberg | 2 * Copyright (C) 1998-2004 David Turner and Werner Lemberg |
3 * Copyright (C) 2006 Behdad Esfahbod | 3 * Copyright (C) 2006 Behdad Esfahbod |
4 * | 4 * |
5 * This is part of HarfBuzz, an OpenType Layout engine library. | 5 * This is part of HarfBuzz, an OpenType Layout engine library. |
6 * | 6 * |
7 * Permission is hereby granted, without written agreement and without | 7 * Permission is hereby granted, without written agreement and without |
8 * license or royalty fees, to use, copy, modify, and distribute this | 8 * license or royalty fees, to use, copy, modify, and distribute this |
9 * software and its documentation for any purpose, provided that the | 9 * software and its documentation for any purpose, provided that the |
10 * above copyright notice and the following two paragraphs appear in | 10 * above copyright notice and the following two paragraphs appear in |
(...skipping 16 matching lines...) Expand all Loading... |
27 #define HARFBUZZ_GDEF_PRIVATE_H | 27 #define HARFBUZZ_GDEF_PRIVATE_H |
28 | 28 |
29 #include "harfbuzz-impl.h" | 29 #include "harfbuzz-impl.h" |
30 #include "harfbuzz-stream-private.h" | 30 #include "harfbuzz-stream-private.h" |
31 #include "harfbuzz-buffer-private.h" | 31 #include "harfbuzz-buffer-private.h" |
32 #include "harfbuzz-gdef.h" | 32 #include "harfbuzz-gdef.h" |
33 | 33 |
34 HB_BEGIN_HEADER | 34 HB_BEGIN_HEADER |
35 | 35 |
36 | 36 |
| 37 #ifdef HB_USE_PACKED_STRUCTS |
| 38 #pragma pack(push, 1) |
| 39 #endif |
| 40 |
37 /* Attachment related structures */ | 41 /* Attachment related structures */ |
38 | 42 |
39 struct HB_AttachPoint_ | 43 struct HB_AttachPoint_ |
40 { | 44 { |
| 45 HB_UShort* PointIndex; /* array of contour points */ |
41 HB_UShort PointCount; /* size of the PointIndex array */ | 46 HB_UShort PointCount; /* size of the PointIndex array */ |
42 HB_UShort* PointIndex; /* array of contour points */ | |
43 }; | 47 }; |
44 | 48 |
45 /* Ligature Caret related structures */ | 49 /* Ligature Caret related structures */ |
46 | 50 |
47 struct HB_CaretValueFormat1_ | 51 struct HB_CaretValueFormat1_ |
48 { | 52 { |
49 HB_Short Coordinate; /* x or y value (in design units) */ | 53 HB_Short Coordinate; /* x or y value (in design units) */ |
50 }; | 54 }; |
51 | 55 |
52 typedef struct HB_CaretValueFormat1_ HB_CaretValueFormat1; | 56 typedef struct HB_CaretValueFormat1_ HB_CaretValueFormat1; |
53 | 57 |
54 | 58 |
55 struct HB_CaretValueFormat2_ | 59 struct HB_CaretValueFormat2_ |
56 { | 60 { |
57 HB_UShort CaretValuePoint; /* contour point index on glyph */ | 61 HB_UShort CaretValuePoint; /* contour point index on glyph */ |
58 }; | 62 }; |
59 | 63 |
60 typedef struct HB_CaretValueFormat2_ HB_CaretValueFormat2; | 64 typedef struct HB_CaretValueFormat2_ HB_CaretValueFormat2; |
61 | 65 |
62 | 66 |
63 struct HB_CaretValueFormat3_ | 67 struct HB_CaretValueFormat3_ |
64 { | 68 { |
| 69 HB_Device* Device; /* Device table for x or y value */ |
65 HB_Short Coordinate; /* x or y value (in design units) */ | 70 HB_Short Coordinate; /* x or y value (in design units) */ |
66 HB_Device Device; /* Device table for x or y value */ | |
67 }; | 71 }; |
68 | 72 |
69 typedef struct HB_CaretValueFormat3_ HB_CaretValueFormat3; | 73 typedef struct HB_CaretValueFormat3_ HB_CaretValueFormat3; |
70 | 74 |
71 | 75 |
| 76 #ifdef HB_SUPPORT_MULTIPLE_MASTER |
72 struct HB_CaretValueFormat4_ | 77 struct HB_CaretValueFormat4_ |
73 { | 78 { |
74 HB_UShort IdCaretValue; /* metric ID */ | 79 HB_UShort IdCaretValue; /* metric ID */ |
75 }; | 80 }; |
76 | 81 |
77 typedef struct HB_CaretValueFormat4_ HB_CaretValueFormat4; | 82 typedef struct HB_CaretValueFormat4_ HB_CaretValueFormat4; |
| 83 #endif |
78 | 84 |
79 | 85 |
80 struct HB_CaretValue_ | 86 struct HB_CaretValue_ |
81 { | 87 { |
82 HB_UShort CaretValueFormat; /* 1, 2, 3, or 4 */ | |
83 | |
84 union | 88 union |
85 { | 89 { |
86 HB_CaretValueFormat1 cvf1; | 90 HB_CaretValueFormat1 cvf1; |
87 HB_CaretValueFormat2 cvf2; | 91 HB_CaretValueFormat2 cvf2; |
88 HB_CaretValueFormat3 cvf3; | 92 HB_CaretValueFormat3 cvf3; |
| 93 #ifdef HB_SUPPORT_MULTIPLE_MASTER |
89 HB_CaretValueFormat4 cvf4; | 94 HB_CaretValueFormat4 cvf4; |
| 95 #endif |
90 } cvf; | 96 } cvf; |
| 97 |
| 98 HB_Byte CaretValueFormat; /* 1, 2, 3, or 4 */ |
91 }; | 99 }; |
92 | 100 |
93 typedef struct HB_CaretValue_ HB_CaretValue; | 101 typedef struct HB_CaretValue_ HB_CaretValue; |
94 | 102 |
95 | 103 |
96 struct HB_LigGlyph_ | 104 struct HB_LigGlyph_ |
97 { | 105 { |
| 106 HB_CaretValue* CaretValue; /* array of caret values */ |
| 107 HB_UShort CaretCount; /* number of caret values */ |
98 HB_Bool loaded; | 108 HB_Bool loaded; |
99 | |
100 HB_UShort CaretCount; /* number of caret values */ | |
101 HB_CaretValue* CaretValue; /* array of caret values */ | |
102 }; | 109 }; |
103 | 110 |
104 | 111 |
105 HB_INTERNAL HB_Error | 112 HB_INTERNAL HB_Error |
106 _HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef, | 113 _HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef, |
107 HB_UShort glyphID, | 114 HB_UShort glyphID, |
108 HB_UShort property ); | 115 HB_UShort property ); |
109 | 116 |
110 HB_INTERNAL HB_Error | 117 HB_INTERNAL HB_Error |
111 _HB_GDEF_Check_Property( HB_GDEFHeader* gdef, | 118 _HB_GDEF_Check_Property( HB_GDEFHeader* gdef, |
112 HB_GlyphItem item, | 119 HB_GlyphItem item, |
113 HB_UShort flags, | 120 HB_UShort flags, |
114 HB_UShort* property ); | 121 HB_UShort* property ); |
115 | 122 |
116 HB_INTERNAL HB_Error | 123 HB_INTERNAL HB_Error |
117 _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef, | 124 _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef, |
118 HB_Stream input, | 125 HB_Stream input, |
119 HB_Lookup* lo, | 126 HB_Lookup* lo, |
120 HB_UShort num_lookups ); | 127 HB_UShort num_lookups ); |
121 | 128 |
| 129 #ifdef HB_USE_PACKED_STRUCTS |
| 130 #pragma pack(pop) |
| 131 #endif |
| 132 |
122 HB_END_HEADER | 133 HB_END_HEADER |
123 | 134 |
124 #endif /* HARFBUZZ_GDEF_PRIVATE_H */ | 135 #endif /* HARFBUZZ_GDEF_PRIVATE_H */ |
OLD | NEW |