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