1 | /* |
2 | * Copyright 2012 Google Inc. |
3 | * |
4 | * Use of this source code is governed by a BSD-style license that can be |
5 | * found in the LICENSE file. |
6 | */ |
7 | |
8 | #ifndef SkOTTable_OS_2_V4_DEFINED |
9 | #define SkOTTable_OS_2_V4_DEFINED |
10 | |
11 | #include "src/core/SkEndian.h" |
12 | #include "src/sfnt/SkIBMFamilyClass.h" |
13 | #include "src/sfnt/SkOTTableTypes.h" |
14 | #include "src/sfnt/SkPanose.h" |
15 | |
16 | #pragma pack(push, 1) |
17 | |
18 | struct SkOTTableOS2_V4 { |
19 | SK_OT_USHORT version; |
20 | static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(4); |
21 | |
22 | SK_OT_SHORT xAvgCharWidth; |
23 | struct WeightClass { |
24 | enum Value : SK_OT_USHORT { |
25 | Thin = SkTEndian_SwapBE16(100), |
26 | = SkTEndian_SwapBE16(200), |
27 | Light = SkTEndian_SwapBE16(300), |
28 | Normal = SkTEndian_SwapBE16(400), |
29 | Medium = SkTEndian_SwapBE16(500), |
30 | SemiBold = SkTEndian_SwapBE16(600), |
31 | Bold = SkTEndian_SwapBE16(700), |
32 | = SkTEndian_SwapBE16(800), |
33 | Black = SkTEndian_SwapBE16(900), |
34 | }; |
35 | SK_OT_USHORT value; |
36 | } usWeightClass; |
37 | struct WidthClass { |
38 | enum Value : SK_OT_USHORT { |
39 | UltraCondensed = SkTEndian_SwapBE16(1), |
40 | = SkTEndian_SwapBE16(2), |
41 | Condensed = SkTEndian_SwapBE16(3), |
42 | SemiCondensed = SkTEndian_SwapBE16(4), |
43 | Medium = SkTEndian_SwapBE16(5), |
44 | SemiExpanded = SkTEndian_SwapBE16(6), |
45 | Expanded = SkTEndian_SwapBE16(7), |
46 | ExtraExpanded = SkTEndian_SwapBE16(8), |
47 | UltraExpanded = SkTEndian_SwapBE16(9), |
48 | } value; |
49 | } usWidthClass; |
50 | union Type { |
51 | struct Field { |
52 | //8-15 |
53 | SK_OT_BYTE_BITFIELD( |
54 | NoSubsetting, |
55 | Bitmap, |
56 | Reserved10, |
57 | Reserved11, |
58 | Reserved12, |
59 | Reserved13, |
60 | Reserved14, |
61 | Reserved15) |
62 | //0-7 |
63 | SK_OT_BYTE_BITFIELD( |
64 | Reserved00, |
65 | Restricted, |
66 | PreviewPrint, |
67 | Editable, |
68 | Reserved04, |
69 | Reserved05, |
70 | Reserved06, |
71 | Reserved07) |
72 | } field; |
73 | struct Raw { |
74 | static const SK_OT_USHORT Installable = 0; |
75 | static const SK_OT_USHORT RestrictedMask = SkOTSetUSHORTBit<1>::value; |
76 | static const SK_OT_USHORT PreviewPrintMask = SkOTSetUSHORTBit<2>::value; |
77 | static const SK_OT_USHORT EditableMask = SkOTSetUSHORTBit<3>::value; |
78 | static const SK_OT_USHORT NoSubsettingMask = SkOTSetUSHORTBit<8>::value; |
79 | static const SK_OT_USHORT BitmapMask = SkOTSetUSHORTBit<9>::value; |
80 | SK_OT_USHORT value; |
81 | } raw; |
82 | } fsType; |
83 | SK_OT_SHORT ySubscriptXSize; |
84 | SK_OT_SHORT ySubscriptYSize; |
85 | SK_OT_SHORT ySubscriptXOffset; |
86 | SK_OT_SHORT ySubscriptYOffset; |
87 | SK_OT_SHORT ySuperscriptXSize; |
88 | SK_OT_SHORT ySuperscriptYSize; |
89 | SK_OT_SHORT ySuperscriptXOffset; |
90 | SK_OT_SHORT ySuperscriptYOffset; |
91 | SK_OT_SHORT yStrikeoutSize; |
92 | SK_OT_SHORT yStrikeoutPosition; |
93 | SkIBMFamilyClass sFamilyClass; |
94 | SkPanose panose; |
95 | union UnicodeRange { |
96 | struct Field { |
97 | //l0 24-31 |
98 | SK_OT_BYTE_BITFIELD( |
99 | Thai, |
100 | Lao, |
101 | Georgian, |
102 | Balinese, |
103 | HangulJamo, |
104 | LatinExtendedAdditional, |
105 | GreekExtended, |
106 | GeneralPunctuation) |
107 | //l0 16-23 |
108 | SK_OT_BYTE_BITFIELD( |
109 | Bengali, |
110 | Gurmukhi, |
111 | Gujarati, |
112 | Oriya, |
113 | Tamil, |
114 | Telugu, |
115 | Kannada, |
116 | Malayalam) |
117 | //l0 8-15 |
118 | SK_OT_BYTE_BITFIELD( |
119 | Coptic, |
120 | Cyrillic, |
121 | Armenian, |
122 | Hebrew, |
123 | Vai, |
124 | Arabic, |
125 | NKo, |
126 | Devanagari) |
127 | //l0 0-7 |
128 | SK_OT_BYTE_BITFIELD( |
129 | BasicLatin, |
130 | Latin1Supplement, |
131 | LatinExtendedA, |
132 | LatinExtendedB, |
133 | IPAExtensions, |
134 | SpacingModifierLetters, |
135 | CombiningDiacriticalMarks, |
136 | GreekAndCoptic) |
137 | |
138 | //l1 24-31 |
139 | SK_OT_BYTE_BITFIELD( |
140 | Hangul, |
141 | NonPlane0, |
142 | Phoenician, |
143 | CJKUnifiedIdeographs, |
144 | PrivateUseArea, |
145 | CJKCompatibilityIdeographs, |
146 | AlphabeticPresentationForms, |
147 | ArabicPresentationFormsA) |
148 | //l1 16-23 |
149 | SK_OT_BYTE_BITFIELD( |
150 | CJKSymbolsAndPunctuation, |
151 | Hiragana, |
152 | Katakana, |
153 | Bopomofo, |
154 | HangulCompatibilityJamo, |
155 | PhagsPa, |
156 | EnclosedCJKLettersAndMonths, |
157 | CJKCompatibility) |
158 | //l1 8-15 |
159 | SK_OT_BYTE_BITFIELD( |
160 | ControlPictures, |
161 | OpticalCharacterRecognition, |
162 | EnclosedAlphanumerics, |
163 | BoxDrawing, |
164 | BlockElements, |
165 | GeometricShapes, |
166 | MiscellaneousSymbols, |
167 | Dingbats) |
168 | //l1 0-7 |
169 | SK_OT_BYTE_BITFIELD( |
170 | SuperscriptsAndSubscripts, |
171 | CurrencySymbols, |
172 | CombiningDiacriticalMarksForSymbols, |
173 | LetterlikeSymbols, |
174 | NumberForms, |
175 | Arrows, |
176 | MathematicalOperators, |
177 | MiscellaneousTechnical) |
178 | |
179 | //l2 24-31 |
180 | SK_OT_BYTE_BITFIELD( |
181 | MusicalSymbols, |
182 | MathematicalAlphanumericSymbols, |
183 | PrivateUse, |
184 | VariationSelectors, |
185 | Tags, |
186 | Limbu, |
187 | TaiLe, |
188 | NewTaiLue) |
189 | //l2 16-23 |
190 | SK_OT_BYTE_BITFIELD( |
191 | Khmer, |
192 | Mongolian, |
193 | Braille, |
194 | Yi, |
195 | Tagalog_Hanunoo_Buhid_Tagbanwa, |
196 | OldItalic, |
197 | Gothic, |
198 | Deseret) |
199 | //l2 8-15 |
200 | SK_OT_BYTE_BITFIELD( |
201 | Thaana, |
202 | Sinhala, |
203 | Myanmar, |
204 | Ethiopic, |
205 | Cherokee, |
206 | UnifiedCanadianSyllabics, |
207 | Ogham, |
208 | Runic) |
209 | //l2 0-7 |
210 | SK_OT_BYTE_BITFIELD( |
211 | CombiningHalfMarks, |
212 | CJKCompatibilityForms, |
213 | SmallFormVariants, |
214 | ArabicPresentationFormsB, |
215 | HalfwidthAndFullwidthForms, |
216 | Specials, |
217 | Tibetan, |
218 | Syriac) |
219 | |
220 | //l3 24-31 |
221 | SK_OT_BYTE_BITFIELD( |
222 | PhaistosDisc, |
223 | Carian_Lycian_Lydian, |
224 | DominoTiles_MahjongTiles, |
225 | Reserved123, |
226 | Reserved124, |
227 | Reserved125, |
228 | Reserved126, |
229 | Reserved127) |
230 | //l3 16-23 |
231 | SK_OT_BYTE_BITFIELD( |
232 | Sundanese, |
233 | Lepcha, |
234 | OlChiki, |
235 | Saurashtra, |
236 | KayahLi, |
237 | Rejang, |
238 | Cham, |
239 | AncientSymbols) |
240 | //l3 8-15 |
241 | SK_OT_BYTE_BITFIELD( |
242 | OldPersian, |
243 | Shavian, |
244 | Osmanya, |
245 | CypriotSyllabary, |
246 | Kharoshthi, |
247 | TaiXuanJingSymbols, |
248 | Cuneiform, |
249 | CountingRodNumerals) |
250 | //l3 0-7 |
251 | SK_OT_BYTE_BITFIELD( |
252 | Buginese, |
253 | Glagolitic, |
254 | Tifinagh, |
255 | YijingHexagramSymbols, |
256 | SylotiNagri, |
257 | LinearB_AegeanNumbers, |
258 | AncientGreekNumbers, |
259 | Ugaritic) |
260 | } field; |
261 | struct Raw { |
262 | struct l0 { |
263 | static const SK_OT_ULONG BasicLatinMask = SkOTSetULONGBit<0>::value; |
264 | static const SK_OT_ULONG Latin1SupplementMask = SkOTSetULONGBit<1>::value; |
265 | static const SK_OT_ULONG LatinExtendedAMask = SkOTSetULONGBit<2>::value; |
266 | static const SK_OT_ULONG LatinExtendedBMask = SkOTSetULONGBit<3>::value; |
267 | static const SK_OT_ULONG IPAExtensionsMask = SkOTSetULONGBit<4>::value; |
268 | static const SK_OT_ULONG SpacingModifierLettersMask = SkOTSetULONGBit<5>::value; |
269 | static const SK_OT_ULONG CombiningDiacriticalMarksMask = SkOTSetULONGBit<6>::value; |
270 | static const SK_OT_ULONG GreekAndCopticMask = SkOTSetULONGBit<7>::value; |
271 | static const SK_OT_ULONG CopticMask = SkOTSetULONGBit<8>::value; |
272 | static const SK_OT_ULONG CyrillicMask = SkOTSetULONGBit<9>::value; |
273 | static const SK_OT_ULONG ArmenianMask = SkOTSetULONGBit<10>::value; |
274 | static const SK_OT_ULONG HebrewMask = SkOTSetULONGBit<11>::value; |
275 | static const SK_OT_ULONG VaiMask = SkOTSetULONGBit<12>::value; |
276 | static const SK_OT_ULONG ArabicMask = SkOTSetULONGBit<13>::value; |
277 | static const SK_OT_ULONG NKoMask = SkOTSetULONGBit<14>::value; |
278 | static const SK_OT_ULONG DevanagariMask = SkOTSetULONGBit<15>::value; |
279 | static const SK_OT_ULONG BengaliMask = SkOTSetULONGBit<16>::value; |
280 | static const SK_OT_ULONG GurmukhiMask = SkOTSetULONGBit<17>::value; |
281 | static const SK_OT_ULONG GujaratiMask = SkOTSetULONGBit<18>::value; |
282 | static const SK_OT_ULONG OriyaMask = SkOTSetULONGBit<19>::value; |
283 | static const SK_OT_ULONG TamilMask = SkOTSetULONGBit<20>::value; |
284 | static const SK_OT_ULONG TeluguMask = SkOTSetULONGBit<21>::value; |
285 | static const SK_OT_ULONG KannadaMask = SkOTSetULONGBit<22>::value; |
286 | static const SK_OT_ULONG MalayalamMask = SkOTSetULONGBit<23>::value; |
287 | static const SK_OT_ULONG ThaiMask = SkOTSetULONGBit<24>::value; |
288 | static const SK_OT_ULONG LaoMask = SkOTSetULONGBit<25>::value; |
289 | static const SK_OT_ULONG GeorgianMask = SkOTSetULONGBit<26>::value; |
290 | static const SK_OT_ULONG BalineseMask = SkOTSetULONGBit<27>::value; |
291 | static const SK_OT_ULONG HangulJamoMask = SkOTSetULONGBit<28>::value; |
292 | static const SK_OT_ULONG LatinExtendedAdditionalMask = SkOTSetULONGBit<29>::value; |
293 | static const SK_OT_ULONG GreekExtendedMask = SkOTSetULONGBit<30>::value; |
294 | static const SK_OT_ULONG GeneralPunctuationMask = SkOTSetULONGBit<31>::value; |
295 | }; |
296 | struct l1 { |
297 | static const SK_OT_ULONG SuperscriptsAndSubscriptsMask = SkOTSetULONGBit<32 - 32>::value; |
298 | static const SK_OT_ULONG CurrencySymbolsMask = SkOTSetULONGBit<33 - 32>::value; |
299 | static const SK_OT_ULONG CombiningDiacriticalMarksForSymbolsMask = SkOTSetULONGBit<34 - 32>::value; |
300 | static const SK_OT_ULONG LetterlikeSymbolsMask = SkOTSetULONGBit<35 - 32>::value; |
301 | static const SK_OT_ULONG NumberFormsMask = SkOTSetULONGBit<36 - 32>::value; |
302 | static const SK_OT_ULONG ArrowsMask = SkOTSetULONGBit<37 - 32>::value; |
303 | static const SK_OT_ULONG MathematicalOperatorsMask = SkOTSetULONGBit<38 - 32>::value; |
304 | static const SK_OT_ULONG MiscellaneousTechnicalMask = SkOTSetULONGBit<39 - 32>::value; |
305 | static const SK_OT_ULONG ControlPicturesMask = SkOTSetULONGBit<40 - 32>::value; |
306 | static const SK_OT_ULONG OpticalCharacterRecognitionMask = SkOTSetULONGBit<41 - 32>::value; |
307 | static const SK_OT_ULONG EnclosedAlphanumericsMask = SkOTSetULONGBit<42 - 32>::value; |
308 | static const SK_OT_ULONG BoxDrawingMask = SkOTSetULONGBit<43 - 32>::value; |
309 | static const SK_OT_ULONG BlockElementsMask = SkOTSetULONGBit<44 - 32>::value; |
310 | static const SK_OT_ULONG GeometricShapesMask = SkOTSetULONGBit<45 - 32>::value; |
311 | static const SK_OT_ULONG MiscellaneousSymbolsMask = SkOTSetULONGBit<46 - 32>::value; |
312 | static const SK_OT_ULONG DingbatsMask = SkOTSetULONGBit<47 - 32>::value; |
313 | static const SK_OT_ULONG CJKSymbolsAndPunctuationMask = SkOTSetULONGBit<48 - 32>::value; |
314 | static const SK_OT_ULONG HiraganaMask = SkOTSetULONGBit<49 - 32>::value; |
315 | static const SK_OT_ULONG KatakanaMask = SkOTSetULONGBit<50 - 32>::value; |
316 | static const SK_OT_ULONG BopomofoMask = SkOTSetULONGBit<51 - 32>::value; |
317 | static const SK_OT_ULONG HangulCompatibilityJamoMask = SkOTSetULONGBit<52 - 32>::value; |
318 | static const SK_OT_ULONG PhagsPaMask = SkOTSetULONGBit<53 - 32>::value; |
319 | static const SK_OT_ULONG EnclosedCJKLettersAndMonthsMask = SkOTSetULONGBit<54 - 32>::value; |
320 | static const SK_OT_ULONG CJKCompatibilityMask = SkOTSetULONGBit<55 - 32>::value; |
321 | static const SK_OT_ULONG HangulMask = SkOTSetULONGBit<56 - 32>::value; |
322 | static const SK_OT_ULONG NonPlane0Mask = SkOTSetULONGBit<57 - 32>::value; |
323 | static const SK_OT_ULONG PhoenicianMask = SkOTSetULONGBit<58 - 32>::value; |
324 | static const SK_OT_ULONG CJKUnifiedIdeographsMask = SkOTSetULONGBit<59 - 32>::value; |
325 | static const SK_OT_ULONG PrivateUseAreaMask = SkOTSetULONGBit<60 - 32>::value; |
326 | static const SK_OT_ULONG CJKCompatibilityIdeographsMask = SkOTSetULONGBit<61 - 32>::value; |
327 | static const SK_OT_ULONG AlphabeticPresentationFormsMask = SkOTSetULONGBit<62 - 32>::value; |
328 | static const SK_OT_ULONG ArabicPresentationFormsAMask = SkOTSetULONGBit<63 - 32>::value; |
329 | }; |
330 | struct l2 { |
331 | static const SK_OT_ULONG CombiningHalfMarksMask = SkOTSetULONGBit<64 - 64>::value; |
332 | static const SK_OT_ULONG CJKCompatibilityFormsMask = SkOTSetULONGBit<65 - 64>::value; |
333 | static const SK_OT_ULONG SmallFormVariantsMask = SkOTSetULONGBit<66 - 64>::value; |
334 | static const SK_OT_ULONG ArabicPresentationFormsBMask = SkOTSetULONGBit<67 - 64>::value; |
335 | static const SK_OT_ULONG HalfwidthAndFullwidthFormsMask = SkOTSetULONGBit<68 - 64>::value; |
336 | static const SK_OT_ULONG SpecialsMask = SkOTSetULONGBit<69 - 64>::value; |
337 | static const SK_OT_ULONG TibetanMask = SkOTSetULONGBit<70 - 64>::value; |
338 | static const SK_OT_ULONG SyriacMask = SkOTSetULONGBit<71 - 64>::value; |
339 | static const SK_OT_ULONG ThaanaMask = SkOTSetULONGBit<72 - 64>::value; |
340 | static const SK_OT_ULONG SinhalaMask = SkOTSetULONGBit<73 - 64>::value; |
341 | static const SK_OT_ULONG MyanmarMask = SkOTSetULONGBit<74 - 64>::value; |
342 | static const SK_OT_ULONG EthiopicMask = SkOTSetULONGBit<75 - 64>::value; |
343 | static const SK_OT_ULONG CherokeeMask = SkOTSetULONGBit<76 - 64>::value; |
344 | static const SK_OT_ULONG UnifiedCanadianSyllabicsMask = SkOTSetULONGBit<77 - 64>::value; |
345 | static const SK_OT_ULONG OghamMask = SkOTSetULONGBit<78 - 64>::value; |
346 | static const SK_OT_ULONG RunicMask = SkOTSetULONGBit<79 - 64>::value; |
347 | static const SK_OT_ULONG KhmerMask = SkOTSetULONGBit<80 - 64>::value; |
348 | static const SK_OT_ULONG MongolianMask = SkOTSetULONGBit<81 - 64>::value; |
349 | static const SK_OT_ULONG BrailleMask = SkOTSetULONGBit<82 - 64>::value; |
350 | static const SK_OT_ULONG YiMask = SkOTSetULONGBit<83 - 64>::value; |
351 | static const SK_OT_ULONG Tagalog_Hanunoo_Buhid_TagbanwaMask = SkOTSetULONGBit<84 - 64>::value; |
352 | static const SK_OT_ULONG OldItalicMask = SkOTSetULONGBit<85 - 64>::value; |
353 | static const SK_OT_ULONG GothicMask = SkOTSetULONGBit<86 - 64>::value; |
354 | static const SK_OT_ULONG DeseretMask = SkOTSetULONGBit<87 - 64>::value; |
355 | static const SK_OT_ULONG MusicalSymbolsMask = SkOTSetULONGBit<88 - 64>::value; |
356 | static const SK_OT_ULONG MathematicalAlphanumericSymbolsMask = SkOTSetULONGBit<89 - 64>::value; |
357 | static const SK_OT_ULONG PrivateUseMask = SkOTSetULONGBit<90 - 64>::value; |
358 | static const SK_OT_ULONG VariationSelectorsMask = SkOTSetULONGBit<91 - 64>::value; |
359 | static const SK_OT_ULONG TagsMask = SkOTSetULONGBit<92 - 64>::value; |
360 | static const SK_OT_ULONG LimbuMask = SkOTSetULONGBit<93 - 64>::value; |
361 | static const SK_OT_ULONG TaiLeMask = SkOTSetULONGBit<94 - 64>::value; |
362 | static const SK_OT_ULONG NewTaiLueMask = SkOTSetULONGBit<95 - 64>::value; |
363 | }; |
364 | struct l3 { |
365 | static const SK_OT_ULONG BugineseMask = SkOTSetULONGBit<96 - 96>::value; |
366 | static const SK_OT_ULONG GlagoliticMask = SkOTSetULONGBit<97 - 96>::value; |
367 | static const SK_OT_ULONG TifinaghMask = SkOTSetULONGBit<98 - 96>::value; |
368 | static const SK_OT_ULONG YijingHexagramSymbolsMask = SkOTSetULONGBit<99 - 96>::value; |
369 | static const SK_OT_ULONG SylotiNagriMask = SkOTSetULONGBit<100 - 96>::value; |
370 | static const SK_OT_ULONG LinearB_AegeanNumbersMask = SkOTSetULONGBit<101 - 96>::value; |
371 | static const SK_OT_ULONG AncientGreekNumbersMask = SkOTSetULONGBit<102 - 96>::value; |
372 | static const SK_OT_ULONG UgariticMask = SkOTSetULONGBit<103 - 96>::value; |
373 | static const SK_OT_ULONG OldPersianMask = SkOTSetULONGBit<104 - 96>::value; |
374 | static const SK_OT_ULONG ShavianMask = SkOTSetULONGBit<105 - 96>::value; |
375 | static const SK_OT_ULONG OsmanyaMask = SkOTSetULONGBit<106 - 96>::value; |
376 | static const SK_OT_ULONG CypriotSyllabaryMask = SkOTSetULONGBit<107 - 96>::value; |
377 | static const SK_OT_ULONG KharoshthiMask = SkOTSetULONGBit<108 - 96>::value; |
378 | static const SK_OT_ULONG TaiXuanJingSymbolsMask = SkOTSetULONGBit<109 - 96>::value; |
379 | static const SK_OT_ULONG CuneiformMask = SkOTSetULONGBit<110 - 96>::value; |
380 | static const SK_OT_ULONG CountingRodNumeralsMask = SkOTSetULONGBit<111 - 96>::value; |
381 | static const SK_OT_ULONG SundaneseMask = SkOTSetULONGBit<112 - 96>::value; |
382 | static const SK_OT_ULONG LepchaMask = SkOTSetULONGBit<113 - 96>::value; |
383 | static const SK_OT_ULONG OlChikiMask = SkOTSetULONGBit<114 - 96>::value; |
384 | static const SK_OT_ULONG SaurashtraMask = SkOTSetULONGBit<115 - 96>::value; |
385 | static const SK_OT_ULONG KayahLiMask = SkOTSetULONGBit<116 - 96>::value; |
386 | static const SK_OT_ULONG RejangMask = SkOTSetULONGBit<117 - 96>::value; |
387 | static const SK_OT_ULONG ChamMask = SkOTSetULONGBit<118 - 96>::value; |
388 | static const SK_OT_ULONG AncientSymbolsMask = SkOTSetULONGBit<119 - 96>::value; |
389 | static const SK_OT_ULONG PhaistosDiscMask = SkOTSetULONGBit<120 - 96>::value; |
390 | static const SK_OT_ULONG Carian_Lycian_LydianMask = SkOTSetULONGBit<121 - 96>::value; |
391 | static const SK_OT_ULONG DominoTiles_MahjongTilesMask = SkOTSetULONGBit<122 - 96>::value; |
392 | }; |
393 | SK_OT_ULONG value[4]; |
394 | } raw; |
395 | } ulUnicodeRange; |
396 | SK_OT_CHAR achVendID[4]; |
397 | union Selection { |
398 | struct Field { |
399 | //8-15 |
400 | SK_OT_BYTE_BITFIELD( |
401 | WWS, |
402 | Oblique, |
403 | Reserved10, |
404 | Reserved11, |
405 | Reserved12, |
406 | Reserved13, |
407 | Reserved14, |
408 | Reserved15) |
409 | //0-7 |
410 | SK_OT_BYTE_BITFIELD( |
411 | Italic, |
412 | Underscore, |
413 | Negative, |
414 | Outlined, |
415 | Strikeout, |
416 | Bold, |
417 | Regular, |
418 | UseTypoMetrics) |
419 | } field; |
420 | struct Raw { |
421 | static const SK_OT_USHORT ItalicMask = SkOTSetUSHORTBit<0>::value; |
422 | static const SK_OT_USHORT UnderscoreMask = SkOTSetUSHORTBit<1>::value; |
423 | static const SK_OT_USHORT NegativeMask = SkOTSetUSHORTBit<2>::value; |
424 | static const SK_OT_USHORT OutlinedMask = SkOTSetUSHORTBit<3>::value; |
425 | static const SK_OT_USHORT StrikeoutMask = SkOTSetUSHORTBit<4>::value; |
426 | static const SK_OT_USHORT BoldMask = SkOTSetUSHORTBit<5>::value; |
427 | static const SK_OT_USHORT RegularMask = SkOTSetUSHORTBit<6>::value; |
428 | static const SK_OT_USHORT UseTypoMetricsMask = SkOTSetUSHORTBit<7>::value; |
429 | static const SK_OT_USHORT WWSMask = SkOTSetUSHORTBit<8>::value; |
430 | static const SK_OT_USHORT ObliqueMask = SkOTSetUSHORTBit<9>::value; |
431 | SK_OT_USHORT value; |
432 | } raw; |
433 | } fsSelection; |
434 | SK_OT_USHORT usFirstCharIndex; |
435 | SK_OT_USHORT usLastCharIndex; |
436 | //version0 |
437 | SK_OT_SHORT sTypoAscender; |
438 | SK_OT_SHORT sTypoDescender; |
439 | SK_OT_SHORT sTypoLineGap; |
440 | SK_OT_USHORT usWinAscent; |
441 | SK_OT_USHORT usWinDescent; |
442 | //version1 |
443 | union { |
444 | struct { |
445 | //l0 24-31 |
446 | SK_OT_BYTE_BITFIELD( |
447 | , |
448 | , |
449 | , |
450 | , |
451 | , |
452 | , |
453 | , |
454 | ) |
455 | //l0 16-23 |
456 | SK_OT_BYTE_BITFIELD( |
457 | , |
458 | , |
459 | , |
460 | , |
461 | , |
462 | , |
463 | , |
464 | ) |
465 | //l0 8-15 |
466 | SK_OT_BYTE_BITFIELD( |
467 | , |
468 | , |
469 | , |
470 | , |
471 | , |
472 | , |
473 | , |
474 | ) |
475 | //l0 0-7 |
476 | SK_OT_BYTE_BITFIELD( |
477 | , |
478 | , |
479 | , |
480 | , |
481 | , |
482 | , |
483 | , |
484 | ) |
485 | |
486 | //l1 24-31 |
487 | SK_OT_BYTE_BITFIELD( |
488 | , |
489 | , |
490 | , |
491 | , |
492 | , |
493 | , |
494 | , |
495 | ) |
496 | //l1 16-23 |
497 | SK_OT_BYTE_BITFIELD( |
498 | , |
499 | , |
500 | , |
501 | , |
502 | , |
503 | , |
504 | MSDOSIcelandic_861, |
505 | ) |
506 | //l1 8-15 |
507 | SK_OT_BYTE_BITFIELD( |
508 | , |
509 | , |
510 | , |
511 | , |
512 | , |
513 | , |
514 | , |
515 | ) |
516 | //l1 0-7 |
517 | SK_OT_BYTE_BITFIELD( |
518 | , |
519 | , |
520 | , |
521 | , |
522 | , |
523 | , |
524 | , |
525 | ) |
526 | } ; |
527 | struct { |
528 | struct { |
529 | static const SK_OT_ULONG = SkOTSetULONGBit<0>::value; |
530 | static const SK_OT_ULONG = SkOTSetULONGBit<1>::value; |
531 | static const SK_OT_ULONG = SkOTSetULONGBit<2>::value; |
532 | static const SK_OT_ULONG = SkOTSetULONGBit<3>::value; |
533 | static const SK_OT_ULONG = SkOTSetULONGBit<4>::value; |
534 | static const SK_OT_ULONG = SkOTSetULONGBit<5>::value; |
535 | static const SK_OT_ULONG = SkOTSetULONGBit<6>::value; |
536 | static const SK_OT_ULONG = SkOTSetULONGBit<7>::value; |
537 | static const SK_OT_ULONG = SkOTSetULONGBit<8>::value; |
538 | static const SK_OT_ULONG = SkOTSetULONGBit<16>::value; |
539 | static const SK_OT_ULONG = SkOTSetULONGBit<17>::value; |
540 | static const SK_OT_ULONG = SkOTSetULONGBit<18>::value; |
541 | static const SK_OT_ULONG = SkOTSetULONGBit<19>::value; |
542 | static const SK_OT_ULONG = SkOTSetULONGBit<20>::value; |
543 | static const SK_OT_ULONG = SkOTSetULONGBit<21>::value; |
544 | static const SK_OT_ULONG = SkOTSetULONGBit<29>::value; |
545 | static const SK_OT_ULONG = SkOTSetULONGBit<30>::value; |
546 | static const SK_OT_ULONG = SkOTSetULONGBit<31>::value; |
547 | }; |
548 | struct { |
549 | static const SK_OT_ULONG = SkOTSetULONGBit<48 - 32>::value; |
550 | static const SK_OT_ULONG = SkOTSetULONGBit<49 - 32>::value; |
551 | static const SK_OT_ULONG = SkOTSetULONGBit<50 - 32>::value; |
552 | static const SK_OT_ULONG = SkOTSetULONGBit<51 - 32>::value; |
553 | static const SK_OT_ULONG = SkOTSetULONGBit<52 - 32>::value; |
554 | static const SK_OT_ULONG = SkOTSetULONGBit<53 - 32>::value; |
555 | static const SK_OT_ULONG MSDOSIcelandic_861Mask = SkOTSetULONGBit<54 - 32>::value; |
556 | static const SK_OT_ULONG = SkOTSetULONGBit<55 - 32>::value; |
557 | static const SK_OT_ULONG = SkOTSetULONGBit<56 - 32>::value; |
558 | static const SK_OT_ULONG = SkOTSetULONGBit<57 - 32>::value; |
559 | static const SK_OT_ULONG = SkOTSetULONGBit<58 - 32>::value; |
560 | static const SK_OT_ULONG = SkOTSetULONGBit<59 - 32>::value; |
561 | static const SK_OT_ULONG = SkOTSetULONGBit<60 - 32>::value; |
562 | static const SK_OT_ULONG = SkOTSetULONGBit<61 - 32>::value; |
563 | static const SK_OT_ULONG = SkOTSetULONGBit<62 - 32>::value; |
564 | static const SK_OT_ULONG = SkOTSetULONGBit<63 - 32>::value; |
565 | }; |
566 | SK_OT_ULONG [2]; |
567 | } ; |
568 | } ; |
569 | //version2 |
570 | SK_OT_SHORT sxHeight; |
571 | SK_OT_SHORT sCapHeight; |
572 | SK_OT_USHORT usDefaultChar; |
573 | SK_OT_USHORT usBreakChar; |
574 | SK_OT_USHORT usMaxContext; |
575 | }; |
576 | |
577 | #pragma pack(pop) |
578 | |
579 | |
580 | static_assert(sizeof(SkOTTableOS2_V4) == 96, "sizeof_SkOTTableOS2_V4_not_96" ); |
581 | |
582 | #endif |
583 | |