bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 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; |
bungeman@google.com | a544f29 | 2012-11-20 18:52:23 +0000 | [diff] [blame] | 21 | static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(4); |
skia.committer@gmail.com | b0a327e | 2012-11-21 02:02:25 +0000 | [diff] [blame] | 22 | |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 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 { |
bungeman@google.com | 562b2e6 | 2014-03-12 21:41:06 +0000 | [diff] [blame] | 77 | static const SK_OT_USHORT Installable = 0; |
| 78 | static const SK_OT_USHORT RestrictedMask = SkOTSetUSHORTBit<1>::value; |
| 79 | static const SK_OT_USHORT PreviewPrintMask = SkOTSetUSHORTBit<2>::value; |
| 80 | static const SK_OT_USHORT EditableMask = SkOTSetUSHORTBit<3>::value; |
| 81 | static const SK_OT_USHORT NoSubsettingMask = SkOTSetUSHORTBit<8>::value; |
| 82 | static const SK_OT_USHORT BitmapMask = SkOTSetUSHORTBit<9>::value; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 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 { |
bungeman@google.com | 562b2e6 | 2014-03-12 21:41:06 +0000 | [diff] [blame] | 266 | static const SK_OT_ULONG BasicLatinMask = SkOTSetULONGBit<0>::value; |
| 267 | static const SK_OT_ULONG Latin1SupplementMask = SkOTSetULONGBit<1>::value; |
| 268 | static const SK_OT_ULONG LatinExtendedAMask = SkOTSetULONGBit<2>::value; |
| 269 | static const SK_OT_ULONG LatinExtendedBMask = SkOTSetULONGBit<3>::value; |
| 270 | static const SK_OT_ULONG IPAExtensionsMask = SkOTSetULONGBit<4>::value; |
| 271 | static const SK_OT_ULONG SpacingModifierLettersMask = SkOTSetULONGBit<5>::value; |
| 272 | static const SK_OT_ULONG CombiningDiacriticalMarksMask = SkOTSetULONGBit<6>::value; |
| 273 | static const SK_OT_ULONG GreekAndCopticMask = SkOTSetULONGBit<7>::value; |
| 274 | static const SK_OT_ULONG CopticMask = SkOTSetULONGBit<8>::value; |
| 275 | static const SK_OT_ULONG CyrillicMask = SkOTSetULONGBit<9>::value; |
| 276 | static const SK_OT_ULONG ArmenianMask = SkOTSetULONGBit<10>::value; |
| 277 | static const SK_OT_ULONG HebrewMask = SkOTSetULONGBit<11>::value; |
| 278 | static const SK_OT_ULONG VaiMask = SkOTSetULONGBit<12>::value; |
| 279 | static const SK_OT_ULONG ArabicMask = SkOTSetULONGBit<13>::value; |
| 280 | static const SK_OT_ULONG NKoMask = SkOTSetULONGBit<14>::value; |
| 281 | static const SK_OT_ULONG DevanagariMask = SkOTSetULONGBit<15>::value; |
| 282 | static const SK_OT_ULONG BengaliMask = SkOTSetULONGBit<16>::value; |
| 283 | static const SK_OT_ULONG GurmukhiMask = SkOTSetULONGBit<17>::value; |
| 284 | static const SK_OT_ULONG GujaratiMask = SkOTSetULONGBit<18>::value; |
| 285 | static const SK_OT_ULONG OriyaMask = SkOTSetULONGBit<19>::value; |
| 286 | static const SK_OT_ULONG TamilMask = SkOTSetULONGBit<20>::value; |
| 287 | static const SK_OT_ULONG TeluguMask = SkOTSetULONGBit<21>::value; |
| 288 | static const SK_OT_ULONG KannadaMask = SkOTSetULONGBit<22>::value; |
| 289 | static const SK_OT_ULONG MalayalamMask = SkOTSetULONGBit<23>::value; |
| 290 | static const SK_OT_ULONG ThaiMask = SkOTSetULONGBit<24>::value; |
| 291 | static const SK_OT_ULONG LaoMask = SkOTSetULONGBit<25>::value; |
| 292 | static const SK_OT_ULONG GeorgianMask = SkOTSetULONGBit<26>::value; |
| 293 | static const SK_OT_ULONG BalineseMask = SkOTSetULONGBit<27>::value; |
| 294 | static const SK_OT_ULONG HangulJamoMask = SkOTSetULONGBit<28>::value; |
| 295 | static const SK_OT_ULONG LatinExtendedAdditionalMask = SkOTSetULONGBit<29>::value; |
| 296 | static const SK_OT_ULONG GreekExtendedMask = SkOTSetULONGBit<30>::value; |
| 297 | static const SK_OT_ULONG GeneralPunctuationMask = SkOTSetULONGBit<31>::value; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 298 | }; |
| 299 | struct l1 { |
bungeman@google.com | 562b2e6 | 2014-03-12 21:41:06 +0000 | [diff] [blame] | 300 | static const SK_OT_ULONG SuperscriptsAndSubscriptsMask = SkOTSetULONGBit<32 - 32>::value; |
| 301 | static const SK_OT_ULONG CurrencySymbolsMask = SkOTSetULONGBit<33 - 32>::value; |
| 302 | static const SK_OT_ULONG CombiningDiacriticalMarksForSymbolsMask = SkOTSetULONGBit<34 - 32>::value; |
| 303 | static const SK_OT_ULONG LetterlikeSymbolsMask = SkOTSetULONGBit<35 - 32>::value; |
| 304 | static const SK_OT_ULONG NumberFormsMask = SkOTSetULONGBit<36 - 32>::value; |
| 305 | static const SK_OT_ULONG ArrowsMask = SkOTSetULONGBit<37 - 32>::value; |
| 306 | static const SK_OT_ULONG MathematicalOperatorsMask = SkOTSetULONGBit<38 - 32>::value; |
| 307 | static const SK_OT_ULONG MiscellaneousTechnicalMask = SkOTSetULONGBit<39 - 32>::value; |
| 308 | static const SK_OT_ULONG ControlPicturesMask = SkOTSetULONGBit<40 - 32>::value; |
| 309 | static const SK_OT_ULONG OpticalCharacterRecognitionMask = SkOTSetULONGBit<41 - 32>::value; |
| 310 | static const SK_OT_ULONG EnclosedAlphanumericsMask = SkOTSetULONGBit<42 - 32>::value; |
| 311 | static const SK_OT_ULONG BoxDrawingMask = SkOTSetULONGBit<43 - 32>::value; |
| 312 | static const SK_OT_ULONG BlockElementsMask = SkOTSetULONGBit<44 - 32>::value; |
| 313 | static const SK_OT_ULONG GeometricShapesMask = SkOTSetULONGBit<45 - 32>::value; |
| 314 | static const SK_OT_ULONG MiscellaneousSymbolsMask = SkOTSetULONGBit<46 - 32>::value; |
| 315 | static const SK_OT_ULONG DingbatsMask = SkOTSetULONGBit<47 - 32>::value; |
| 316 | static const SK_OT_ULONG CJKSymbolsAndPunctuationMask = SkOTSetULONGBit<48 - 32>::value; |
| 317 | static const SK_OT_ULONG HiraganaMask = SkOTSetULONGBit<49 - 32>::value; |
| 318 | static const SK_OT_ULONG KatakanaMask = SkOTSetULONGBit<50 - 32>::value; |
| 319 | static const SK_OT_ULONG BopomofoMask = SkOTSetULONGBit<51 - 32>::value; |
| 320 | static const SK_OT_ULONG HangulCompatibilityJamoMask = SkOTSetULONGBit<52 - 32>::value; |
| 321 | static const SK_OT_ULONG PhagsPaMask = SkOTSetULONGBit<53 - 32>::value; |
| 322 | static const SK_OT_ULONG EnclosedCJKLettersAndMonthsMask = SkOTSetULONGBit<54 - 32>::value; |
| 323 | static const SK_OT_ULONG CJKCompatibilityMask = SkOTSetULONGBit<55 - 32>::value; |
| 324 | static const SK_OT_ULONG HangulMask = SkOTSetULONGBit<56 - 32>::value; |
| 325 | static const SK_OT_ULONG NonPlane0Mask = SkOTSetULONGBit<57 - 32>::value; |
| 326 | static const SK_OT_ULONG PhoenicianMask = SkOTSetULONGBit<58 - 32>::value; |
| 327 | static const SK_OT_ULONG CJKUnifiedIdeographsMask = SkOTSetULONGBit<59 - 32>::value; |
| 328 | static const SK_OT_ULONG PrivateUseAreaMask = SkOTSetULONGBit<60 - 32>::value; |
| 329 | static const SK_OT_ULONG CJKCompatibilityIdeographsMask = SkOTSetULONGBit<61 - 32>::value; |
| 330 | static const SK_OT_ULONG AlphabeticPresentationFormsMask = SkOTSetULONGBit<62 - 32>::value; |
| 331 | static const SK_OT_ULONG ArabicPresentationFormsAMask = SkOTSetULONGBit<63 - 32>::value; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 332 | }; |
| 333 | struct l2 { |
bungeman@google.com | 562b2e6 | 2014-03-12 21:41:06 +0000 | [diff] [blame] | 334 | static const SK_OT_ULONG CombiningHalfMarksMask = SkOTSetULONGBit<64 - 64>::value; |
| 335 | static const SK_OT_ULONG CJKCompatibilityFormsMask = SkOTSetULONGBit<65 - 64>::value; |
| 336 | static const SK_OT_ULONG SmallFormVariantsMask = SkOTSetULONGBit<66 - 64>::value; |
| 337 | static const SK_OT_ULONG ArabicPresentationFormsBMask = SkOTSetULONGBit<67 - 64>::value; |
| 338 | static const SK_OT_ULONG HalfwidthAndFullwidthFormsMask = SkOTSetULONGBit<68 - 64>::value; |
| 339 | static const SK_OT_ULONG SpecialsMask = SkOTSetULONGBit<69 - 64>::value; |
| 340 | static const SK_OT_ULONG TibetanMask = SkOTSetULONGBit<70 - 64>::value; |
| 341 | static const SK_OT_ULONG SyriacMask = SkOTSetULONGBit<71 - 64>::value; |
| 342 | static const SK_OT_ULONG ThaanaMask = SkOTSetULONGBit<72 - 64>::value; |
| 343 | static const SK_OT_ULONG SinhalaMask = SkOTSetULONGBit<73 - 64>::value; |
| 344 | static const SK_OT_ULONG MyanmarMask = SkOTSetULONGBit<74 - 64>::value; |
| 345 | static const SK_OT_ULONG EthiopicMask = SkOTSetULONGBit<75 - 64>::value; |
| 346 | static const SK_OT_ULONG CherokeeMask = SkOTSetULONGBit<76 - 64>::value; |
| 347 | static const SK_OT_ULONG UnifiedCanadianSyllabicsMask = SkOTSetULONGBit<77 - 64>::value; |
| 348 | static const SK_OT_ULONG OghamMask = SkOTSetULONGBit<78 - 64>::value; |
| 349 | static const SK_OT_ULONG RunicMask = SkOTSetULONGBit<79 - 64>::value; |
| 350 | static const SK_OT_ULONG KhmerMask = SkOTSetULONGBit<80 - 64>::value; |
| 351 | static const SK_OT_ULONG MongolianMask = SkOTSetULONGBit<81 - 64>::value; |
| 352 | static const SK_OT_ULONG BrailleMask = SkOTSetULONGBit<82 - 64>::value; |
| 353 | static const SK_OT_ULONG YiMask = SkOTSetULONGBit<83 - 64>::value; |
| 354 | static const SK_OT_ULONG Tagalog_Hanunoo_Buhid_TagbanwaMask = SkOTSetULONGBit<84 - 64>::value; |
| 355 | static const SK_OT_ULONG OldItalicMask = SkOTSetULONGBit<85 - 64>::value; |
| 356 | static const SK_OT_ULONG GothicMask = SkOTSetULONGBit<86 - 64>::value; |
| 357 | static const SK_OT_ULONG DeseretMask = SkOTSetULONGBit<87 - 64>::value; |
| 358 | static const SK_OT_ULONG MusicalSymbolsMask = SkOTSetULONGBit<88 - 64>::value; |
| 359 | static const SK_OT_ULONG MathematicalAlphanumericSymbolsMask = SkOTSetULONGBit<89 - 64>::value; |
| 360 | static const SK_OT_ULONG PrivateUseMask = SkOTSetULONGBit<90 - 64>::value; |
| 361 | static const SK_OT_ULONG VariationSelectorsMask = SkOTSetULONGBit<91 - 64>::value; |
| 362 | static const SK_OT_ULONG TagsMask = SkOTSetULONGBit<92 - 64>::value; |
| 363 | static const SK_OT_ULONG LimbuMask = SkOTSetULONGBit<93 - 64>::value; |
| 364 | static const SK_OT_ULONG TaiLeMask = SkOTSetULONGBit<94 - 64>::value; |
| 365 | static const SK_OT_ULONG NewTaiLueMask = SkOTSetULONGBit<95 - 64>::value; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 366 | }; |
| 367 | struct l3 { |
bungeman@google.com | 562b2e6 | 2014-03-12 21:41:06 +0000 | [diff] [blame] | 368 | static const SK_OT_ULONG BugineseMask = SkOTSetULONGBit<96 - 96>::value; |
| 369 | static const SK_OT_ULONG GlagoliticMask = SkOTSetULONGBit<97 - 96>::value; |
| 370 | static const SK_OT_ULONG TifinaghMask = SkOTSetULONGBit<98 - 96>::value; |
| 371 | static const SK_OT_ULONG YijingHexagramSymbolsMask = SkOTSetULONGBit<99 - 96>::value; |
| 372 | static const SK_OT_ULONG SylotiNagriMask = SkOTSetULONGBit<100 - 96>::value; |
| 373 | static const SK_OT_ULONG LinearB_AegeanNumbersMask = SkOTSetULONGBit<101 - 96>::value; |
| 374 | static const SK_OT_ULONG AncientGreekNumbersMask = SkOTSetULONGBit<102 - 96>::value; |
| 375 | static const SK_OT_ULONG UgariticMask = SkOTSetULONGBit<103 - 96>::value; |
| 376 | static const SK_OT_ULONG OldPersianMask = SkOTSetULONGBit<104 - 96>::value; |
| 377 | static const SK_OT_ULONG ShavianMask = SkOTSetULONGBit<105 - 96>::value; |
| 378 | static const SK_OT_ULONG OsmanyaMask = SkOTSetULONGBit<106 - 96>::value; |
| 379 | static const SK_OT_ULONG CypriotSyllabaryMask = SkOTSetULONGBit<107 - 96>::value; |
| 380 | static const SK_OT_ULONG KharoshthiMask = SkOTSetULONGBit<108 - 96>::value; |
| 381 | static const SK_OT_ULONG TaiXuanJingSymbolsMask = SkOTSetULONGBit<109 - 96>::value; |
| 382 | static const SK_OT_ULONG CuneiformMask = SkOTSetULONGBit<110 - 96>::value; |
| 383 | static const SK_OT_ULONG CountingRodNumeralsMask = SkOTSetULONGBit<111 - 96>::value; |
| 384 | static const SK_OT_ULONG SundaneseMask = SkOTSetULONGBit<112 - 96>::value; |
| 385 | static const SK_OT_ULONG LepchaMask = SkOTSetULONGBit<113 - 96>::value; |
| 386 | static const SK_OT_ULONG OlChikiMask = SkOTSetULONGBit<114 - 96>::value; |
| 387 | static const SK_OT_ULONG SaurashtraMask = SkOTSetULONGBit<115 - 96>::value; |
| 388 | static const SK_OT_ULONG KayahLiMask = SkOTSetULONGBit<116 - 96>::value; |
| 389 | static const SK_OT_ULONG RejangMask = SkOTSetULONGBit<117 - 96>::value; |
| 390 | static const SK_OT_ULONG ChamMask = SkOTSetULONGBit<118 - 96>::value; |
| 391 | static const SK_OT_ULONG AncientSymbolsMask = SkOTSetULONGBit<119 - 96>::value; |
| 392 | static const SK_OT_ULONG PhaistosDiscMask = SkOTSetULONGBit<120 - 96>::value; |
| 393 | static const SK_OT_ULONG Carian_Lycian_LydianMask = SkOTSetULONGBit<121 - 96>::value; |
| 394 | static const SK_OT_ULONG DominoTiles_MahjongTilesMask = SkOTSetULONGBit<122 - 96>::value; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 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 { |
bungeman@google.com | 562b2e6 | 2014-03-12 21:41:06 +0000 | [diff] [blame] | 424 | static const SK_OT_USHORT ItalicMask = SkOTSetUSHORTBit<0>::value; |
| 425 | static const SK_OT_USHORT UnderscoreMask = SkOTSetUSHORTBit<1>::value; |
| 426 | static const SK_OT_USHORT NegativeMask = SkOTSetUSHORTBit<2>::value; |
| 427 | static const SK_OT_USHORT OutlinedMask = SkOTSetUSHORTBit<3>::value; |
| 428 | static const SK_OT_USHORT StrikeoutMask = SkOTSetUSHORTBit<4>::value; |
| 429 | static const SK_OT_USHORT BoldMask = SkOTSetUSHORTBit<5>::value; |
| 430 | static const SK_OT_USHORT RegularMask = SkOTSetUSHORTBit<6>::value; |
| 431 | static const SK_OT_USHORT UseTypoMetricsMask = SkOTSetUSHORTBit<7>::value; |
| 432 | static const SK_OT_USHORT WWSMask = SkOTSetUSHORTBit<8>::value; |
| 433 | static const SK_OT_USHORT ObliqueMask = SkOTSetUSHORTBit<9>::value; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 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 { |
bungeman@google.com | 562b2e6 | 2014-03-12 21:41:06 +0000 | [diff] [blame] | 532 | static const SK_OT_ULONG Latin1_1252Mask = SkOTSetULONGBit<0>::value; |
| 533 | static const SK_OT_ULONG Latin2EasternEurope_1250Mask = SkOTSetULONGBit<1>::value; |
| 534 | static const SK_OT_ULONG Cyrillic_1251Mask = SkOTSetULONGBit<2>::value; |
| 535 | static const SK_OT_ULONG Greek_1253Mask = SkOTSetULONGBit<3>::value; |
| 536 | static const SK_OT_ULONG Turkish_1254Mask = SkOTSetULONGBit<4>::value; |
| 537 | static const SK_OT_ULONG Hebrew_1255Mask = SkOTSetULONGBit<5>::value; |
| 538 | static const SK_OT_ULONG Arabic_1256Mask = SkOTSetULONGBit<6>::value; |
| 539 | static const SK_OT_ULONG WindowsBaltic_1257Mask = SkOTSetULONGBit<7>::value; |
| 540 | static const SK_OT_ULONG Vietnamese_1258Mask = SkOTSetULONGBit<8>::value; |
| 541 | static const SK_OT_ULONG Thai_874Mask = SkOTSetULONGBit<16>::value; |
| 542 | static const SK_OT_ULONG JISJapan_932Mask = SkOTSetULONGBit<17>::value; |
| 543 | static const SK_OT_ULONG ChineseSimplified_936Mask = SkOTSetULONGBit<18>::value; |
| 544 | static const SK_OT_ULONG KoreanWansung_949Mask = SkOTSetULONGBit<19>::value; |
| 545 | static const SK_OT_ULONG ChineseTraditional_950Mask = SkOTSetULONGBit<20>::value; |
| 546 | static const SK_OT_ULONG KoreanJohab_1361Mask = SkOTSetULONGBit<21>::value; |
| 547 | static const SK_OT_ULONG MacintoshCharacterSetMask = SkOTSetULONGBit<29>::value; |
| 548 | static const SK_OT_ULONG OEMCharacterSetMask = SkOTSetULONGBit<30>::value; |
| 549 | static const SK_OT_ULONG SymbolCharacterSetMask = SkOTSetULONGBit<31>::value; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 550 | }; |
| 551 | struct l1 { |
bungeman@google.com | 562b2e6 | 2014-03-12 21:41:06 +0000 | [diff] [blame] | 552 | static const SK_OT_ULONG IBMGreek_869Mask = SkOTSetULONGBit<48 - 32>::value; |
| 553 | static const SK_OT_ULONG MSDOSRussian_866Mask = SkOTSetULONGBit<49 - 32>::value; |
| 554 | static const SK_OT_ULONG MSDOSNordic_865Mask = SkOTSetULONGBit<50 - 32>::value; |
| 555 | static const SK_OT_ULONG Arabic_864Mask = SkOTSetULONGBit<51 - 32>::value; |
| 556 | static const SK_OT_ULONG MSDOSCanadianFrench_863Mask = SkOTSetULONGBit<52 - 32>::value; |
| 557 | static const SK_OT_ULONG Hebrew_862Mask = SkOTSetULONGBit<53 - 32>::value; |
| 558 | static const SK_OT_ULONG MSDOSIcelandic_861Mask = SkOTSetULONGBit<54 - 32>::value; |
| 559 | static const SK_OT_ULONG MSDOSPortuguese_860Mask = SkOTSetULONGBit<55 - 32>::value; |
| 560 | static const SK_OT_ULONG IBMTurkish_857Mask = SkOTSetULONGBit<56 - 32>::value; |
| 561 | static const SK_OT_ULONG IBMCyrillic_855Mask = SkOTSetULONGBit<57 - 32>::value; |
| 562 | static const SK_OT_ULONG Latin2_852Mask = SkOTSetULONGBit<58 - 32>::value; |
| 563 | static const SK_OT_ULONG MSDOSBaltic_775Mask = SkOTSetULONGBit<59 - 32>::value; |
| 564 | static const SK_OT_ULONG Greek_737Mask = SkOTSetULONGBit<60 - 32>::value; |
| 565 | static const SK_OT_ULONG Arabic_708Mask = SkOTSetULONGBit<61 - 32>::value; |
| 566 | static const SK_OT_ULONG WELatin1_850Mask = SkOTSetULONGBit<62 - 32>::value; |
| 567 | static const SK_OT_ULONG US_437Mask = SkOTSetULONGBit<63 - 32>::value; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 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 | |
bungeman | 99fe822 | 2015-08-20 07:57:51 -0700 | [diff] [blame] | 583 | static_assert(sizeof(SkOTTableOS2_V4) == 96, "sizeof_SkOTTableOS2_V4_not_96"); |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 584 | |
| 585 | #endif |