Home | History | Annotate | Download | only in sfnt
      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_V3_DEFINED
      9 #define SkOTTable_OS_2_V3_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_V3 {
     20     SK_OT_USHORT version;
     21     static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(3);
     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                 Reserved027,
    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                 Reserved008,
    123                 Cyrillic,
    124                 Armenian,
    125                 Hebrew,
    126                 Reserved012,
    127                 Arabic,
    128                 Reserved014,
    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                 Reserved058,
    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                 Reserved053,
    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                 Reserved093,
    190                 Reserved094,
    191                 Reserved095)
    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                 Reserved120,
    226                 Reserved121,
    227                 Reserved122,
    228                 Reserved123,
    229                 Reserved124,
    230                 Reserved125,
    231                 Reserved126,
    232                 Reserved127)
    233             //l3 16-23
    234             SK_OT_BYTE_BITFIELD(
    235                 Reserved112,
    236                 Reserved113,
    237                 Reserved114,
    238                 Reserved115,
    239                 Reserved116,
    240                 Reserved117,
    241                 Reserved118,
    242                 Reserved119)
    243             //l3 8-15
    244             SK_OT_BYTE_BITFIELD(
    245                 Reserved104,
    246                 Reserved105,
    247                 Reserved106,
    248                 Reserved107,
    249                 Reserved108,
    250                 Reserved109,
    251                 Reserved110,
    252                 Reserved111)
    253             //l3 0-7
    254             SK_OT_BYTE_BITFIELD(
    255                 Reserved096,
    256                 Reserved097,
    257                 Reserved098,
    258                 Reserved099,
    259                 Reserved100,
    260                 Reserved101,
    261                 Reserved102,
    262                 Reserved103)
    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                 //Reserved
    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                 //Reserved
    279                 static const SK_OT_ULONG ArabicMask = SkTEndian_SwapBE32(1 << 13);
    280                 //Reserved
    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                 //Reserved
    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                 //Reserved
    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                 //Reserved
    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             };
    364             SK_OT_ULONG value[4];
    365         } raw;
    366     } ulUnicodeRange;
    367     SK_OT_CHAR achVendID[4];
    368     union Selection {
    369         struct Field {
    370             //8-15
    371             SK_OT_BYTE_BITFIELD(
    372                 Reserved08,
    373                 Reserved09,
    374                 Reserved10,
    375                 Reserved11,
    376                 Reserved12,
    377                 Reserved13,
    378                 Reserved14,
    379                 Reserved15)
    380             //0-7
    381             SK_OT_BYTE_BITFIELD(
    382                 Italic,
    383                 Underscore,
    384                 Negative,
    385                 Outlined,
    386                 Strikeout,
    387                 Bold,
    388                 Regular,
    389                 Reserved07)
    390         } field;
    391         struct Raw {
    392             static const SK_OT_USHORT ItalicMask = SkTEndian_SwapBE16(1 << 0);
    393             static const SK_OT_USHORT UnderscoreMask = SkTEndian_SwapBE16(1 << 1);
    394             static const SK_OT_USHORT NegativeMask = SkTEndian_SwapBE16(1 << 2);
    395             static const SK_OT_USHORT OutlinedMask = SkTEndian_SwapBE16(1 << 3);
    396             static const SK_OT_USHORT StrikeoutMask = SkTEndian_SwapBE16(1 << 4);
    397             static const SK_OT_USHORT BoldMask = SkTEndian_SwapBE16(1 << 5);
    398             static const SK_OT_USHORT RegularMask = SkTEndian_SwapBE16(1 << 6);
    399             SK_OT_USHORT value;
    400         } raw;
    401     } fsSelection;
    402     SK_OT_USHORT usFirstCharIndex;
    403     SK_OT_USHORT usLastCharIndex;
    404     //version0
    405     SK_OT_SHORT sTypoAscender;
    406     SK_OT_SHORT sTypoDescender;
    407     SK_OT_SHORT sTypoLineGap;
    408     SK_OT_USHORT usWinAscent;
    409     SK_OT_USHORT usWinDescent;
    410     //version1
    411     union CodePageRange {
    412         struct Field {
    413             //l0 24-31
    414             SK_OT_BYTE_BITFIELD(
    415                 Reserved24,
    416                 Reserved25,
    417                 Reserved26,
    418                 Reserved27,
    419                 Reserved28,
    420                 MacintoshCharacterSet,
    421                 OEMCharacterSet,
    422                 SymbolCharacterSet)
    423             //l0 16-23
    424             SK_OT_BYTE_BITFIELD(
    425                 Thai_874,
    426                 JISJapan_932,
    427                 ChineseSimplified_936,
    428                 KoreanWansung_949,
    429                 ChineseTraditional_950,
    430                 KoreanJohab_1361,
    431                 Reserved22,
    432                 Reserved23)
    433             //l0 8-15
    434             SK_OT_BYTE_BITFIELD(
    435                 Vietnamese,
    436                 Reserved09,
    437                 Reserved10,
    438                 Reserved11,
    439                 Reserved12,
    440                 Reserved13,
    441                 Reserved14,
    442                 Reserved15)
    443             //l0 0-7
    444             SK_OT_BYTE_BITFIELD(
    445                 Latin1_1252,
    446                 Latin2EasternEurope_1250,
    447                 Cyrillic_1251,
    448                 Greek_1253,
    449                 Turkish_1254,
    450                 Hebrew_1255,
    451                 Arabic_1256,
    452                 WindowsBaltic_1257)
    453 
    454             //l1 24-31
    455             SK_OT_BYTE_BITFIELD(
    456                 IBMTurkish_857,
    457                 IBMCyrillic_855,
    458                 Latin2_852,
    459                 MSDOSBaltic_775,
    460                 Greek_737,
    461                 Arabic_708,
    462                 WELatin1_850,
    463                 US_437)
    464             //l1 16-23
    465             SK_OT_BYTE_BITFIELD(
    466                 IBMGreek_869,
    467                 MSDOSRussian_866,
    468                 MSDOSNordic_865,
    469                 Arabic_864,
    470                 MSDOSCanadianFrench_863,
    471                 Hebrew_862,
    472                 MSDOSIcelandic_861,
    473                 MSDOSPortuguese_860)
    474             //l1 8-15
    475             SK_OT_BYTE_BITFIELD(
    476                 Reserved40,
    477                 Reserved41,
    478                 Reserved42,
    479                 Reserved43,
    480                 Reserved44,
    481                 Reserved45,
    482                 Reserved46,
    483                 Reserved47)
    484             //l1 0-7
    485             SK_OT_BYTE_BITFIELD(
    486                 Reserved32,
    487                 Reserved33,
    488                 Reserved34,
    489                 Reserved35,
    490                 Reserved36,
    491                 Reserved37,
    492                 Reserved38,
    493                 Reserved39)
    494         } field;
    495         struct Raw {
    496             struct l0 {
    497                 static const SK_OT_ULONG Latin1_1252Mask = SkTEndian_SwapBE32(1 << 0);
    498                 static const SK_OT_ULONG Latin2EasternEurope_1250Mask = SkTEndian_SwapBE32(1 << 1);
    499                 static const SK_OT_ULONG Cyrillic_1251Mask = SkTEndian_SwapBE32(1 << 2);
    500                 static const SK_OT_ULONG Greek_1253Mask = SkTEndian_SwapBE32(1 << 3);
    501                 static const SK_OT_ULONG Turkish_1254Mask = SkTEndian_SwapBE32(1 << 4);
    502                 static const SK_OT_ULONG Hebrew_1255Mask = SkTEndian_SwapBE32(1 << 5);
    503                 static const SK_OT_ULONG Arabic_1256Mask = SkTEndian_SwapBE32(1 << 6);
    504                 static const SK_OT_ULONG WindowsBaltic_1257Mask = SkTEndian_SwapBE32(1 << 7);
    505                 static const SK_OT_ULONG Vietnamese_1258Mask = SkTEndian_SwapBE32(1 << 8);
    506                 static const SK_OT_ULONG Thai_874Mask = SkTEndian_SwapBE32(1 << 16);
    507                 static const SK_OT_ULONG JISJapan_932Mask = SkTEndian_SwapBE32(1 << 17);
    508                 static const SK_OT_ULONG ChineseSimplified_936Mask = SkTEndian_SwapBE32(1 << 18);
    509                 static const SK_OT_ULONG KoreanWansung_949Mask = SkTEndian_SwapBE32(1 << 19);
    510                 static const SK_OT_ULONG ChineseTraditional_950Mask = SkTEndian_SwapBE32(1 << 20);
    511                 static const SK_OT_ULONG KoreanJohab_1361Mask = SkTEndian_SwapBE32(1 << 21);
    512                 static const SK_OT_ULONG MacintoshCharacterSetMask = SkTEndian_SwapBE32(1 << 29);
    513                 static const SK_OT_ULONG OEMCharacterSetMask = SkTEndian_SwapBE32(1 << 30);
    514                 static const SK_OT_ULONG SymbolCharacterSetMask = SkTEndian_SwapBE32(1 << 31);
    515             };
    516             struct l1 {
    517                 static const SK_OT_ULONG IBMGreek_869Mask = SkTEndian_SwapBE32(1 << (48 - 32));
    518                 static const SK_OT_ULONG MSDOSRussian_866Mask = SkTEndian_SwapBE32(1 << (49 - 32));
    519                 static const SK_OT_ULONG MSDOSNordic_865Mask = SkTEndian_SwapBE32(1 << (50 - 32));
    520                 static const SK_OT_ULONG Arabic_864Mask = SkTEndian_SwapBE32(1 << (51 - 32));
    521                 static const SK_OT_ULONG MSDOSCanadianFrench_863Mask = SkTEndian_SwapBE32(1 << (52 - 32));
    522                 static const SK_OT_ULONG Hebrew_862Mask = SkTEndian_SwapBE32(1 << (53 - 32));
    523                 static const SK_OT_ULONG MSDOSIcelandic_861Mask = SkTEndian_SwapBE32(1 << (54 - 32));
    524                 static const SK_OT_ULONG MSDOSPortuguese_860Mask = SkTEndian_SwapBE32(1 << (55 - 32));
    525                 static const SK_OT_ULONG IBMTurkish_857Mask = SkTEndian_SwapBE32(1 << (56 - 32));
    526                 static const SK_OT_ULONG IBMCyrillic_855Mask = SkTEndian_SwapBE32(1 << (57 - 32));
    527                 static const SK_OT_ULONG Latin2_852Mask = SkTEndian_SwapBE32(1 << (58 - 32));
    528                 static const SK_OT_ULONG MSDOSBaltic_775Mask = SkTEndian_SwapBE32(1 << (59 - 32));
    529                 static const SK_OT_ULONG Greek_737Mask = SkTEndian_SwapBE32(1 << (60 - 32));
    530                 static const SK_OT_ULONG Arabic_708Mask = SkTEndian_SwapBE32(1 << (61 - 32));
    531                 static const SK_OT_ULONG WELatin1_850Mask = SkTEndian_SwapBE32(1 << (62 - 32));
    532                 static const SK_OT_ULONG US_437Mask = SkTEndian_SwapBE32(1 << (63 - 32));
    533             };
    534             SK_OT_ULONG value[2];
    535         } raw;
    536     } ulCodePageRange;
    537     //version2
    538     SK_OT_SHORT sxHeight;
    539     SK_OT_SHORT sCapHeight;
    540     SK_OT_USHORT usDefaultChar;
    541     SK_OT_USHORT usBreakChar;
    542     SK_OT_USHORT usMaxContext;
    543 };
    544 
    545 #pragma pack(pop)
    546 
    547 
    548 SK_COMPILE_ASSERT(sizeof(SkOTTableOS2_V3) == 96, sizeof_SkOTTableOS2_V3_not_96);
    549 
    550 #endif
    551