1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright 2012 Google Inc. 3cb93a386Sopenharmony_ci * 4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci * found in the LICENSE file. 6cb93a386Sopenharmony_ci */ 7cb93a386Sopenharmony_ci 8cb93a386Sopenharmony_ci#ifndef SkOTTable_OS_2_V1_DEFINED 9cb93a386Sopenharmony_ci#define SkOTTable_OS_2_V1_DEFINED 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ci#include "src/core/SkEndian.h" 12cb93a386Sopenharmony_ci#include "src/sfnt/SkIBMFamilyClass.h" 13cb93a386Sopenharmony_ci#include "src/sfnt/SkOTTableTypes.h" 14cb93a386Sopenharmony_ci#include "src/sfnt/SkPanose.h" 15cb93a386Sopenharmony_ci 16cb93a386Sopenharmony_ci#pragma pack(push, 1) 17cb93a386Sopenharmony_ci 18cb93a386Sopenharmony_cistruct SkOTTableOS2_V1 { 19cb93a386Sopenharmony_ci SK_OT_USHORT version; 20cb93a386Sopenharmony_ci static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(1); 21cb93a386Sopenharmony_ci 22cb93a386Sopenharmony_ci SK_OT_SHORT xAvgCharWidth; 23cb93a386Sopenharmony_ci struct WeightClass { 24cb93a386Sopenharmony_ci enum Value : SK_OT_USHORT { 25cb93a386Sopenharmony_ci Thin = SkTEndian_SwapBE16(100), 26cb93a386Sopenharmony_ci ExtraLight = SkTEndian_SwapBE16(200), 27cb93a386Sopenharmony_ci Light = SkTEndian_SwapBE16(300), 28cb93a386Sopenharmony_ci Normal = SkTEndian_SwapBE16(400), 29cb93a386Sopenharmony_ci Medium = SkTEndian_SwapBE16(500), 30cb93a386Sopenharmony_ci SemiBold = SkTEndian_SwapBE16(600), 31cb93a386Sopenharmony_ci Bold = SkTEndian_SwapBE16(700), 32cb93a386Sopenharmony_ci ExtraBold = SkTEndian_SwapBE16(800), 33cb93a386Sopenharmony_ci Black = SkTEndian_SwapBE16(900), 34cb93a386Sopenharmony_ci }; 35cb93a386Sopenharmony_ci SK_OT_USHORT value; 36cb93a386Sopenharmony_ci } usWeightClass; 37cb93a386Sopenharmony_ci struct WidthClass { 38cb93a386Sopenharmony_ci enum Value : SK_OT_USHORT { 39cb93a386Sopenharmony_ci UltraCondensed = SkTEndian_SwapBE16(1), 40cb93a386Sopenharmony_ci ExtraCondensed = SkTEndian_SwapBE16(2), 41cb93a386Sopenharmony_ci Condensed = SkTEndian_SwapBE16(3), 42cb93a386Sopenharmony_ci SemiCondensed = SkTEndian_SwapBE16(4), 43cb93a386Sopenharmony_ci Medium = SkTEndian_SwapBE16(5), 44cb93a386Sopenharmony_ci SemiExpanded = SkTEndian_SwapBE16(6), 45cb93a386Sopenharmony_ci Expanded = SkTEndian_SwapBE16(7), 46cb93a386Sopenharmony_ci ExtraExpanded = SkTEndian_SwapBE16(8), 47cb93a386Sopenharmony_ci UltraExpanded = SkTEndian_SwapBE16(9), 48cb93a386Sopenharmony_ci } value; 49cb93a386Sopenharmony_ci } usWidthClass; 50cb93a386Sopenharmony_ci union Type { 51cb93a386Sopenharmony_ci struct Field { 52cb93a386Sopenharmony_ci //8-15 53cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 54cb93a386Sopenharmony_ci Reserved08, 55cb93a386Sopenharmony_ci Reserved09, 56cb93a386Sopenharmony_ci Reserved10, 57cb93a386Sopenharmony_ci Reserved11, 58cb93a386Sopenharmony_ci Reserved12, 59cb93a386Sopenharmony_ci Reserved13, 60cb93a386Sopenharmony_ci Reserved14, 61cb93a386Sopenharmony_ci Reserved15) 62cb93a386Sopenharmony_ci //0-7 63cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 64cb93a386Sopenharmony_ci Reserved00, 65cb93a386Sopenharmony_ci Restricted, 66cb93a386Sopenharmony_ci PreviewPrint, 67cb93a386Sopenharmony_ci Editable, 68cb93a386Sopenharmony_ci Reserved04, 69cb93a386Sopenharmony_ci Reserved05, 70cb93a386Sopenharmony_ci Reserved06, 71cb93a386Sopenharmony_ci Reserved07) 72cb93a386Sopenharmony_ci } field; 73cb93a386Sopenharmony_ci struct Raw { 74cb93a386Sopenharmony_ci static const SK_OT_USHORT Installable = 0; 75cb93a386Sopenharmony_ci static const SK_OT_USHORT RestrictedMask = SkOTSetUSHORTBit<1>::value; 76cb93a386Sopenharmony_ci static const SK_OT_USHORT PreviewPrintMask = SkOTSetUSHORTBit<2>::value; 77cb93a386Sopenharmony_ci static const SK_OT_USHORT EditableMask = SkOTSetUSHORTBit<3>::value; 78cb93a386Sopenharmony_ci SK_OT_USHORT value; 79cb93a386Sopenharmony_ci } raw; 80cb93a386Sopenharmony_ci } fsType; 81cb93a386Sopenharmony_ci SK_OT_SHORT ySubscriptXSize; 82cb93a386Sopenharmony_ci SK_OT_SHORT ySubscriptYSize; 83cb93a386Sopenharmony_ci SK_OT_SHORT ySubscriptXOffset; 84cb93a386Sopenharmony_ci SK_OT_SHORT ySubscriptYOffset; 85cb93a386Sopenharmony_ci SK_OT_SHORT ySuperscriptXSize; 86cb93a386Sopenharmony_ci SK_OT_SHORT ySuperscriptYSize; 87cb93a386Sopenharmony_ci SK_OT_SHORT ySuperscriptXOffset; 88cb93a386Sopenharmony_ci SK_OT_SHORT ySuperscriptYOffset; 89cb93a386Sopenharmony_ci SK_OT_SHORT yStrikeoutSize; 90cb93a386Sopenharmony_ci SK_OT_SHORT yStrikeoutPosition; 91cb93a386Sopenharmony_ci SkIBMFamilyClass sFamilyClass; 92cb93a386Sopenharmony_ci SkPanose panose; 93cb93a386Sopenharmony_ci union UnicodeRange { 94cb93a386Sopenharmony_ci struct Field { 95cb93a386Sopenharmony_ci //l0 24-31 96cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 97cb93a386Sopenharmony_ci Thai, 98cb93a386Sopenharmony_ci Lao, 99cb93a386Sopenharmony_ci BasicGeorgian, 100cb93a386Sopenharmony_ci GeorgianExtended, 101cb93a386Sopenharmony_ci HangulJamo, 102cb93a386Sopenharmony_ci LatinExtendedAdditional, 103cb93a386Sopenharmony_ci GreekExtended, 104cb93a386Sopenharmony_ci GeneralPunctuation) 105cb93a386Sopenharmony_ci //l0 16-23 106cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 107cb93a386Sopenharmony_ci Bengali, 108cb93a386Sopenharmony_ci Gurmukhi, 109cb93a386Sopenharmony_ci Gujarati, 110cb93a386Sopenharmony_ci Oriya, 111cb93a386Sopenharmony_ci Tamil, 112cb93a386Sopenharmony_ci Telugu, 113cb93a386Sopenharmony_ci Kannada, 114cb93a386Sopenharmony_ci Malayalam) 115cb93a386Sopenharmony_ci //l0 8-15 116cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 117cb93a386Sopenharmony_ci GreekSymbolsAndCoptic, 118cb93a386Sopenharmony_ci Cyrillic, 119cb93a386Sopenharmony_ci Armenian, 120cb93a386Sopenharmony_ci BasicHebrew, 121cb93a386Sopenharmony_ci HebrewExtendedAB, 122cb93a386Sopenharmony_ci BasicArabic, 123cb93a386Sopenharmony_ci ArabicExtended, 124cb93a386Sopenharmony_ci Devanagari) 125cb93a386Sopenharmony_ci //l0 0-7 126cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 127cb93a386Sopenharmony_ci BasicLatin, 128cb93a386Sopenharmony_ci Latin1Supplement, 129cb93a386Sopenharmony_ci LatinExtendedA, 130cb93a386Sopenharmony_ci LatinExtendedB, 131cb93a386Sopenharmony_ci IPAExtensions, 132cb93a386Sopenharmony_ci SpacingModifierLetters, 133cb93a386Sopenharmony_ci CombiningDiacriticalMarks, 134cb93a386Sopenharmony_ci BasicGreek) 135cb93a386Sopenharmony_ci 136cb93a386Sopenharmony_ci //l1 24-31 137cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 138cb93a386Sopenharmony_ci Hangul, 139cb93a386Sopenharmony_ci Reserved057, 140cb93a386Sopenharmony_ci Reserved058, 141cb93a386Sopenharmony_ci CJKUnifiedIdeographs, 142cb93a386Sopenharmony_ci PrivateUseArea, 143cb93a386Sopenharmony_ci CJKCompatibilityIdeographs, 144cb93a386Sopenharmony_ci AlphabeticPresentationForms, 145cb93a386Sopenharmony_ci ArabicPresentationFormsA) 146cb93a386Sopenharmony_ci //l1 16-23 147cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 148cb93a386Sopenharmony_ci CJKSymbolsAndPunctuation, 149cb93a386Sopenharmony_ci Hiragana, 150cb93a386Sopenharmony_ci Katakana, 151cb93a386Sopenharmony_ci Bopomofo, 152cb93a386Sopenharmony_ci HangulCompatibilityJamo, 153cb93a386Sopenharmony_ci CJKMiscellaneous, 154cb93a386Sopenharmony_ci EnclosedCJKLettersAndMonths, 155cb93a386Sopenharmony_ci CJKCompatibility) 156cb93a386Sopenharmony_ci //l1 8-15 157cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 158cb93a386Sopenharmony_ci ControlPictures, 159cb93a386Sopenharmony_ci OpticalCharacterRecognition, 160cb93a386Sopenharmony_ci EnclosedAlphanumerics, 161cb93a386Sopenharmony_ci BoxDrawing, 162cb93a386Sopenharmony_ci BlockElements, 163cb93a386Sopenharmony_ci GeometricShapes, 164cb93a386Sopenharmony_ci MiscellaneousSymbols, 165cb93a386Sopenharmony_ci Dingbats) 166cb93a386Sopenharmony_ci //l1 0-7 167cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 168cb93a386Sopenharmony_ci SuperscriptsAndSubscripts, 169cb93a386Sopenharmony_ci CurrencySymbols, 170cb93a386Sopenharmony_ci CombiningDiacriticalMarksForSymbols, 171cb93a386Sopenharmony_ci LetterlikeSymbols, 172cb93a386Sopenharmony_ci NumberForms, 173cb93a386Sopenharmony_ci Arrows, 174cb93a386Sopenharmony_ci MathematicalOperators, 175cb93a386Sopenharmony_ci MiscellaneousTechnical) 176cb93a386Sopenharmony_ci 177cb93a386Sopenharmony_ci //l2 24-31 178cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 179cb93a386Sopenharmony_ci Reserved088, 180cb93a386Sopenharmony_ci Reserved089, 181cb93a386Sopenharmony_ci Reserved090, 182cb93a386Sopenharmony_ci Reserved091, 183cb93a386Sopenharmony_ci Reserved092, 184cb93a386Sopenharmony_ci Reserved093, 185cb93a386Sopenharmony_ci Reserved094, 186cb93a386Sopenharmony_ci Reserved095) 187cb93a386Sopenharmony_ci //l2 16-23 188cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 189cb93a386Sopenharmony_ci Reserved080, 190cb93a386Sopenharmony_ci Reserved081, 191cb93a386Sopenharmony_ci Reserved082, 192cb93a386Sopenharmony_ci Reserved083, 193cb93a386Sopenharmony_ci Reserved084, 194cb93a386Sopenharmony_ci Reserved085, 195cb93a386Sopenharmony_ci Reserved086, 196cb93a386Sopenharmony_ci Reserved087) 197cb93a386Sopenharmony_ci //l2 8-15 198cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 199cb93a386Sopenharmony_ci Reserved072, 200cb93a386Sopenharmony_ci Reserved073, 201cb93a386Sopenharmony_ci Reserved074, 202cb93a386Sopenharmony_ci Reserved075, 203cb93a386Sopenharmony_ci Reserved076, 204cb93a386Sopenharmony_ci Reserved077, 205cb93a386Sopenharmony_ci Reserved078, 206cb93a386Sopenharmony_ci Reserved079) 207cb93a386Sopenharmony_ci //l2 0-7 208cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 209cb93a386Sopenharmony_ci CombiningHalfMarks, 210cb93a386Sopenharmony_ci CJKCompatibilityForms, 211cb93a386Sopenharmony_ci SmallFormVariants, 212cb93a386Sopenharmony_ci ArabicPresentationFormsB, 213cb93a386Sopenharmony_ci HalfwidthAndFullwidthForms, 214cb93a386Sopenharmony_ci Specials, 215cb93a386Sopenharmony_ci Reserved70, 216cb93a386Sopenharmony_ci Reserved71) 217cb93a386Sopenharmony_ci 218cb93a386Sopenharmony_ci //l3 24-31 219cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 220cb93a386Sopenharmony_ci Reserved120, 221cb93a386Sopenharmony_ci Reserved121, 222cb93a386Sopenharmony_ci Reserved122, 223cb93a386Sopenharmony_ci Reserved123, 224cb93a386Sopenharmony_ci Reserved124, 225cb93a386Sopenharmony_ci Reserved125, 226cb93a386Sopenharmony_ci Reserved126, 227cb93a386Sopenharmony_ci Reserved127) 228cb93a386Sopenharmony_ci //l3 16-23 229cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 230cb93a386Sopenharmony_ci Reserved112, 231cb93a386Sopenharmony_ci Reserved113, 232cb93a386Sopenharmony_ci Reserved114, 233cb93a386Sopenharmony_ci Reserved115, 234cb93a386Sopenharmony_ci Reserved116, 235cb93a386Sopenharmony_ci Reserved117, 236cb93a386Sopenharmony_ci Reserved118, 237cb93a386Sopenharmony_ci Reserved119) 238cb93a386Sopenharmony_ci //l3 8-15 239cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 240cb93a386Sopenharmony_ci Reserved104, 241cb93a386Sopenharmony_ci Reserved105, 242cb93a386Sopenharmony_ci Reserved106, 243cb93a386Sopenharmony_ci Reserved107, 244cb93a386Sopenharmony_ci Reserved108, 245cb93a386Sopenharmony_ci Reserved109, 246cb93a386Sopenharmony_ci Reserved110, 247cb93a386Sopenharmony_ci Reserved111) 248cb93a386Sopenharmony_ci //l3 0-7 249cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 250cb93a386Sopenharmony_ci Reserved096, 251cb93a386Sopenharmony_ci Reserved097, 252cb93a386Sopenharmony_ci Reserved098, 253cb93a386Sopenharmony_ci Reserved099, 254cb93a386Sopenharmony_ci Reserved100, 255cb93a386Sopenharmony_ci Reserved101, 256cb93a386Sopenharmony_ci Reserved102, 257cb93a386Sopenharmony_ci Reserved103) 258cb93a386Sopenharmony_ci } field; 259cb93a386Sopenharmony_ci struct Raw { 260cb93a386Sopenharmony_ci struct l0 { 261cb93a386Sopenharmony_ci static const SK_OT_ULONG BasicLatinMask = SkOTSetULONGBit<0>::value; 262cb93a386Sopenharmony_ci static const SK_OT_ULONG Latin1SupplementMask = SkOTSetULONGBit<1>::value; 263cb93a386Sopenharmony_ci static const SK_OT_ULONG LatinExtendedAMask = SkOTSetULONGBit<2>::value; 264cb93a386Sopenharmony_ci static const SK_OT_ULONG LatinExtendedBMask = SkOTSetULONGBit<3>::value; 265cb93a386Sopenharmony_ci static const SK_OT_ULONG IPAExtensionsMask = SkOTSetULONGBit<4>::value; 266cb93a386Sopenharmony_ci static const SK_OT_ULONG SpacingModifierLettersMask = SkOTSetULONGBit<5>::value; 267cb93a386Sopenharmony_ci static const SK_OT_ULONG CombiningDiacriticalMarksMask = SkOTSetULONGBit<6>::value; 268cb93a386Sopenharmony_ci static const SK_OT_ULONG BasicGreekMask = SkOTSetULONGBit<7>::value; 269cb93a386Sopenharmony_ci static const SK_OT_ULONG GreekSymbolsAndCCopticMask = SkOTSetULONGBit<8>::value; 270cb93a386Sopenharmony_ci static const SK_OT_ULONG CyrillicMask = SkOTSetULONGBit<9>::value; 271cb93a386Sopenharmony_ci static const SK_OT_ULONG ArmenianMask = SkOTSetULONGBit<10>::value; 272cb93a386Sopenharmony_ci static const SK_OT_ULONG BasicHebrewMask = SkOTSetULONGBit<11>::value; 273cb93a386Sopenharmony_ci static const SK_OT_ULONG HebrewExtendedABMask = SkOTSetULONGBit<12>::value; 274cb93a386Sopenharmony_ci static const SK_OT_ULONG BasicArabicMask = SkOTSetULONGBit<13>::value; 275cb93a386Sopenharmony_ci static const SK_OT_ULONG ArabicExtendedMask = SkOTSetULONGBit<14>::value; 276cb93a386Sopenharmony_ci static const SK_OT_ULONG DevanagariMask = SkOTSetULONGBit<15>::value; 277cb93a386Sopenharmony_ci static const SK_OT_ULONG BengaliMask = SkOTSetULONGBit<16>::value; 278cb93a386Sopenharmony_ci static const SK_OT_ULONG GurmukhiMask = SkOTSetULONGBit<17>::value; 279cb93a386Sopenharmony_ci static const SK_OT_ULONG GujaratiMask = SkOTSetULONGBit<18>::value; 280cb93a386Sopenharmony_ci static const SK_OT_ULONG OriyaMask = SkOTSetULONGBit<19>::value; 281cb93a386Sopenharmony_ci static const SK_OT_ULONG TamilMask = SkOTSetULONGBit<20>::value; 282cb93a386Sopenharmony_ci static const SK_OT_ULONG TeluguMask = SkOTSetULONGBit<21>::value; 283cb93a386Sopenharmony_ci static const SK_OT_ULONG KannadaMask = SkOTSetULONGBit<22>::value; 284cb93a386Sopenharmony_ci static const SK_OT_ULONG MalayalamMask = SkOTSetULONGBit<23>::value; 285cb93a386Sopenharmony_ci static const SK_OT_ULONG ThaiMask = SkOTSetULONGBit<24>::value; 286cb93a386Sopenharmony_ci static const SK_OT_ULONG LaoMask = SkOTSetULONGBit<25>::value; 287cb93a386Sopenharmony_ci static const SK_OT_ULONG BasicGeorgianMask = SkOTSetULONGBit<26>::value; 288cb93a386Sopenharmony_ci static const SK_OT_ULONG GeorgianExtendedMask = SkOTSetULONGBit<27>::value; 289cb93a386Sopenharmony_ci static const SK_OT_ULONG HangulJamoMask = SkOTSetULONGBit<28>::value; 290cb93a386Sopenharmony_ci static const SK_OT_ULONG LatinExtendedAdditionalMask = SkOTSetULONGBit<29>::value; 291cb93a386Sopenharmony_ci static const SK_OT_ULONG GreekExtendedMask = SkOTSetULONGBit<30>::value; 292cb93a386Sopenharmony_ci static const SK_OT_ULONG GeneralPunctuationMask = SkOTSetULONGBit<31>::value; 293cb93a386Sopenharmony_ci }; 294cb93a386Sopenharmony_ci struct l1 { 295cb93a386Sopenharmony_ci static const SK_OT_ULONG SuperscriptsAndSubscriptsMask = SkOTSetULONGBit<32 - 32>::value; 296cb93a386Sopenharmony_ci static const SK_OT_ULONG CurrencySymbolsMask = SkOTSetULONGBit<33 - 32>::value; 297cb93a386Sopenharmony_ci static const SK_OT_ULONG CombiningDiacriticalMarksForSymbolsMask = SkOTSetULONGBit<34 - 32>::value; 298cb93a386Sopenharmony_ci static const SK_OT_ULONG LetterlikeSymbolsMask = SkOTSetULONGBit<35 - 32>::value; 299cb93a386Sopenharmony_ci static const SK_OT_ULONG NumberFormsMask = SkOTSetULONGBit<36 - 32>::value; 300cb93a386Sopenharmony_ci static const SK_OT_ULONG ArrowsMask = SkOTSetULONGBit<37 - 32>::value; 301cb93a386Sopenharmony_ci static const SK_OT_ULONG MathematicalOperatorsMask = SkOTSetULONGBit<38 - 32>::value; 302cb93a386Sopenharmony_ci static const SK_OT_ULONG MiscellaneousTechnicalMask = SkOTSetULONGBit<39 - 32>::value; 303cb93a386Sopenharmony_ci static const SK_OT_ULONG ControlPicturesMask = SkOTSetULONGBit<40 - 32>::value; 304cb93a386Sopenharmony_ci static const SK_OT_ULONG OpticalCharacterRecognitionMask = SkOTSetULONGBit<41 - 32>::value; 305cb93a386Sopenharmony_ci static const SK_OT_ULONG EnclosedAlphanumericsMask = SkOTSetULONGBit<42 - 32>::value; 306cb93a386Sopenharmony_ci static const SK_OT_ULONG BoxDrawingMask = SkOTSetULONGBit<43 - 32>::value; 307cb93a386Sopenharmony_ci static const SK_OT_ULONG BlockElementsMask = SkOTSetULONGBit<44 - 32>::value; 308cb93a386Sopenharmony_ci static const SK_OT_ULONG GeometricShapesMask = SkOTSetULONGBit<45 - 32>::value; 309cb93a386Sopenharmony_ci static const SK_OT_ULONG MiscellaneousSymbolsMask = SkOTSetULONGBit<46 - 32>::value; 310cb93a386Sopenharmony_ci static const SK_OT_ULONG DingbatsMask = SkOTSetULONGBit<47 - 32>::value; 311cb93a386Sopenharmony_ci static const SK_OT_ULONG CJKSymbolsAndPunctuationMask = SkOTSetULONGBit<48 - 32>::value; 312cb93a386Sopenharmony_ci static const SK_OT_ULONG HiraganaMask = SkOTSetULONGBit<49 - 32>::value; 313cb93a386Sopenharmony_ci static const SK_OT_ULONG KatakanaMask = SkOTSetULONGBit<50 - 32>::value; 314cb93a386Sopenharmony_ci static const SK_OT_ULONG BopomofoMask = SkOTSetULONGBit<51 - 32>::value; 315cb93a386Sopenharmony_ci static const SK_OT_ULONG HangulCompatibilityJamoMask = SkOTSetULONGBit<52 - 32>::value; 316cb93a386Sopenharmony_ci static const SK_OT_ULONG CJKMiscellaneousMask = SkOTSetULONGBit<53 - 32>::value; 317cb93a386Sopenharmony_ci static const SK_OT_ULONG EnclosedCJKLettersAndMonthsMask = SkOTSetULONGBit<54 - 32>::value; 318cb93a386Sopenharmony_ci static const SK_OT_ULONG CJKCompatibilityMask = SkOTSetULONGBit<55 - 32>::value; 319cb93a386Sopenharmony_ci static const SK_OT_ULONG HangulMask = SkOTSetULONGBit<56 - 32>::value; 320cb93a386Sopenharmony_ci //Reserved 321cb93a386Sopenharmony_ci //Reserved 322cb93a386Sopenharmony_ci static const SK_OT_ULONG CJKUnifiedIdeographsMask = SkOTSetULONGBit<59 - 32>::value; 323cb93a386Sopenharmony_ci static const SK_OT_ULONG PrivateUseAreaMask = SkOTSetULONGBit<60 - 32>::value; 324cb93a386Sopenharmony_ci static const SK_OT_ULONG CJKCompatibilityIdeographsMask = SkOTSetULONGBit<61 - 32>::value; 325cb93a386Sopenharmony_ci static const SK_OT_ULONG AlphabeticPresentationFormsMask = SkOTSetULONGBit<62 - 32>::value; 326cb93a386Sopenharmony_ci static const SK_OT_ULONG ArabicPresentationFormsAMask = SkOTSetULONGBit<63 - 32>::value; 327cb93a386Sopenharmony_ci }; 328cb93a386Sopenharmony_ci struct l2 { 329cb93a386Sopenharmony_ci static const SK_OT_ULONG CombiningHalfMarksMask = SkOTSetULONGBit<64 - 64>::value; 330cb93a386Sopenharmony_ci static const SK_OT_ULONG CJKCompatibilityFormsMask = SkOTSetULONGBit<65 - 64>::value; 331cb93a386Sopenharmony_ci static const SK_OT_ULONG SmallFormVariantsMask = SkOTSetULONGBit<66 - 64>::value; 332cb93a386Sopenharmony_ci static const SK_OT_ULONG ArabicPresentationFormsBMask = SkOTSetULONGBit<67 - 64>::value; 333cb93a386Sopenharmony_ci static const SK_OT_ULONG HalfwidthAndFullwidthFormsMask = SkOTSetULONGBit<68 - 64>::value; 334cb93a386Sopenharmony_ci static const SK_OT_ULONG SpecialsMask = SkOTSetULONGBit<69 - 64>::value; 335cb93a386Sopenharmony_ci }; 336cb93a386Sopenharmony_ci SK_OT_ULONG value[4]; 337cb93a386Sopenharmony_ci } raw; 338cb93a386Sopenharmony_ci } ulUnicodeRange; 339cb93a386Sopenharmony_ci SK_OT_CHAR achVendID[4]; 340cb93a386Sopenharmony_ci union Selection { 341cb93a386Sopenharmony_ci struct Field { 342cb93a386Sopenharmony_ci //8-15 343cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 344cb93a386Sopenharmony_ci Reserved08, 345cb93a386Sopenharmony_ci Reserved09, 346cb93a386Sopenharmony_ci Reserved10, 347cb93a386Sopenharmony_ci Reserved11, 348cb93a386Sopenharmony_ci Reserved12, 349cb93a386Sopenharmony_ci Reserved13, 350cb93a386Sopenharmony_ci Reserved14, 351cb93a386Sopenharmony_ci Reserved15) 352cb93a386Sopenharmony_ci //0-7 353cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 354cb93a386Sopenharmony_ci Italic, 355cb93a386Sopenharmony_ci Underscore, 356cb93a386Sopenharmony_ci Negative, 357cb93a386Sopenharmony_ci Outlined, 358cb93a386Sopenharmony_ci Strikeout, 359cb93a386Sopenharmony_ci Bold, 360cb93a386Sopenharmony_ci Regular, 361cb93a386Sopenharmony_ci Reserved07) 362cb93a386Sopenharmony_ci } field; 363cb93a386Sopenharmony_ci struct Raw { 364cb93a386Sopenharmony_ci static const SK_OT_USHORT ItalicMask = SkOTSetUSHORTBit<0>::value; 365cb93a386Sopenharmony_ci static const SK_OT_USHORT UnderscoreMask = SkOTSetUSHORTBit<1>::value; 366cb93a386Sopenharmony_ci static const SK_OT_USHORT NegativeMask = SkOTSetUSHORTBit<2>::value; 367cb93a386Sopenharmony_ci static const SK_OT_USHORT OutlinedMask = SkOTSetUSHORTBit<3>::value; 368cb93a386Sopenharmony_ci static const SK_OT_USHORT StrikeoutMask = SkOTSetUSHORTBit<4>::value; 369cb93a386Sopenharmony_ci static const SK_OT_USHORT BoldMask = SkOTSetUSHORTBit<5>::value; 370cb93a386Sopenharmony_ci static const SK_OT_USHORT RegularMask = SkOTSetUSHORTBit<6>::value; 371cb93a386Sopenharmony_ci SK_OT_USHORT value; 372cb93a386Sopenharmony_ci } raw; 373cb93a386Sopenharmony_ci } fsSelection; 374cb93a386Sopenharmony_ci SK_OT_USHORT usFirstCharIndex; 375cb93a386Sopenharmony_ci SK_OT_USHORT usLastCharIndex; 376cb93a386Sopenharmony_ci //version0 377cb93a386Sopenharmony_ci SK_OT_SHORT sTypoAscender; 378cb93a386Sopenharmony_ci SK_OT_SHORT sTypoDescender; 379cb93a386Sopenharmony_ci SK_OT_SHORT sTypoLineGap; 380cb93a386Sopenharmony_ci SK_OT_USHORT usWinAscent; 381cb93a386Sopenharmony_ci SK_OT_USHORT usWinDescent; 382cb93a386Sopenharmony_ci //version1 383cb93a386Sopenharmony_ci union CodePageRange { 384cb93a386Sopenharmony_ci struct Field { 385cb93a386Sopenharmony_ci //l0 24-31 386cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 387cb93a386Sopenharmony_ci Reserved24, 388cb93a386Sopenharmony_ci Reserved25, 389cb93a386Sopenharmony_ci Reserved26, 390cb93a386Sopenharmony_ci Reserved27, 391cb93a386Sopenharmony_ci Reserved28, 392cb93a386Sopenharmony_ci MacintoshCharacterSet, 393cb93a386Sopenharmony_ci OEMCharacterSet, 394cb93a386Sopenharmony_ci SymbolCharacterSet) 395cb93a386Sopenharmony_ci //l0 16-23 396cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 397cb93a386Sopenharmony_ci Thai_874, 398cb93a386Sopenharmony_ci JISJapan_932, 399cb93a386Sopenharmony_ci ChineseSimplified_936, 400cb93a386Sopenharmony_ci KoreanWansung_949, 401cb93a386Sopenharmony_ci ChineseTraditional_950, 402cb93a386Sopenharmony_ci KoreanJohab_1361, 403cb93a386Sopenharmony_ci Reserved22, 404cb93a386Sopenharmony_ci Reserved23) 405cb93a386Sopenharmony_ci //l0 8-15 406cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 407cb93a386Sopenharmony_ci Reserved08, 408cb93a386Sopenharmony_ci Reserved09, 409cb93a386Sopenharmony_ci Reserved10, 410cb93a386Sopenharmony_ci Reserved11, 411cb93a386Sopenharmony_ci Reserved12, 412cb93a386Sopenharmony_ci Reserved13, 413cb93a386Sopenharmony_ci Reserved14, 414cb93a386Sopenharmony_ci Reserved15) 415cb93a386Sopenharmony_ci //l0 0-7 416cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 417cb93a386Sopenharmony_ci Latin1_1252, 418cb93a386Sopenharmony_ci Latin2EasternEurope_1250, 419cb93a386Sopenharmony_ci Cyrillic_1251, 420cb93a386Sopenharmony_ci Greek_1253, 421cb93a386Sopenharmony_ci Turkish_1254, 422cb93a386Sopenharmony_ci Hebrew_1255, 423cb93a386Sopenharmony_ci Arabic_1256, 424cb93a386Sopenharmony_ci WindowsBaltic_1257) 425cb93a386Sopenharmony_ci 426cb93a386Sopenharmony_ci //l1 24-31 427cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 428cb93a386Sopenharmony_ci IBMTurkish_857, 429cb93a386Sopenharmony_ci IBMCyrillic_855, 430cb93a386Sopenharmony_ci Latin2_852, 431cb93a386Sopenharmony_ci MSDOSBaltic_775, 432cb93a386Sopenharmony_ci Greek_737, 433cb93a386Sopenharmony_ci Arabic_708, 434cb93a386Sopenharmony_ci WELatin1_850, 435cb93a386Sopenharmony_ci US_437) 436cb93a386Sopenharmony_ci //l1 16-23 437cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 438cb93a386Sopenharmony_ci IBMGreek_869, 439cb93a386Sopenharmony_ci MSDOSRussian_866, 440cb93a386Sopenharmony_ci MSDOSNordic_865, 441cb93a386Sopenharmony_ci Arabic_864, 442cb93a386Sopenharmony_ci MSDOSCanadianFrench_863, 443cb93a386Sopenharmony_ci Hebrew_862, 444cb93a386Sopenharmony_ci MSDOSIcelandic_861, 445cb93a386Sopenharmony_ci MSDOSPortuguese_860) 446cb93a386Sopenharmony_ci //l1 8-15 447cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 448cb93a386Sopenharmony_ci Reserved40, 449cb93a386Sopenharmony_ci Reserved41, 450cb93a386Sopenharmony_ci Reserved42, 451cb93a386Sopenharmony_ci Reserved43, 452cb93a386Sopenharmony_ci Reserved44, 453cb93a386Sopenharmony_ci Reserved45, 454cb93a386Sopenharmony_ci Reserved46, 455cb93a386Sopenharmony_ci Reserved47) 456cb93a386Sopenharmony_ci //l1 0-7 457cb93a386Sopenharmony_ci SK_OT_BYTE_BITFIELD( 458cb93a386Sopenharmony_ci Reserved32, 459cb93a386Sopenharmony_ci Reserved33, 460cb93a386Sopenharmony_ci Reserved34, 461cb93a386Sopenharmony_ci Reserved35, 462cb93a386Sopenharmony_ci Reserved36, 463cb93a386Sopenharmony_ci Reserved37, 464cb93a386Sopenharmony_ci Reserved38, 465cb93a386Sopenharmony_ci Reserved39) 466cb93a386Sopenharmony_ci } field; 467cb93a386Sopenharmony_ci struct Raw { 468cb93a386Sopenharmony_ci struct l0 { 469cb93a386Sopenharmony_ci static const SK_OT_ULONG Latin1_1252Mask = SkOTSetULONGBit<0>::value; 470cb93a386Sopenharmony_ci static const SK_OT_ULONG Latin2EasternEurope_1250Mask = SkOTSetULONGBit<1>::value; 471cb93a386Sopenharmony_ci static const SK_OT_ULONG Cyrillic_1251Mask = SkOTSetULONGBit<2>::value; 472cb93a386Sopenharmony_ci static const SK_OT_ULONG Greek_1253Mask = SkOTSetULONGBit<3>::value; 473cb93a386Sopenharmony_ci static const SK_OT_ULONG Turkish_1254Mask = SkOTSetULONGBit<4>::value; 474cb93a386Sopenharmony_ci static const SK_OT_ULONG Hebrew_1255Mask = SkOTSetULONGBit<5>::value; 475cb93a386Sopenharmony_ci static const SK_OT_ULONG Arabic_1256Mask = SkOTSetULONGBit<6>::value; 476cb93a386Sopenharmony_ci static const SK_OT_ULONG WindowsBaltic_1257Mask = SkOTSetULONGBit<7>::value; 477cb93a386Sopenharmony_ci static const SK_OT_ULONG Thai_874Mask = SkOTSetULONGBit<16>::value; 478cb93a386Sopenharmony_ci static const SK_OT_ULONG JISJapan_932Mask = SkOTSetULONGBit<17>::value; 479cb93a386Sopenharmony_ci static const SK_OT_ULONG ChineseSimplified_936Mask = SkOTSetULONGBit<18>::value; 480cb93a386Sopenharmony_ci static const SK_OT_ULONG KoreanWansung_949Mask = SkOTSetULONGBit<19>::value; 481cb93a386Sopenharmony_ci static const SK_OT_ULONG ChineseTraditional_950Mask = SkOTSetULONGBit<20>::value; 482cb93a386Sopenharmony_ci static const SK_OT_ULONG KoreanJohab_1361Mask = SkOTSetULONGBit<21>::value; 483cb93a386Sopenharmony_ci static const SK_OT_ULONG MacintoshCharacterSetMask = SkOTSetULONGBit<29>::value; 484cb93a386Sopenharmony_ci static const SK_OT_ULONG OEMCharacterSetMask = SkOTSetULONGBit<30>::value; 485cb93a386Sopenharmony_ci static const SK_OT_ULONG SymbolCharacterSetMask = SkOTSetULONGBit<31>::value; 486cb93a386Sopenharmony_ci }; 487cb93a386Sopenharmony_ci struct l1 { 488cb93a386Sopenharmony_ci static const SK_OT_ULONG IBMGreek_869Mask = SkOTSetULONGBit<48 - 32>::value; 489cb93a386Sopenharmony_ci static const SK_OT_ULONG MSDOSRussian_866Mask = SkOTSetULONGBit<49 - 32>::value; 490cb93a386Sopenharmony_ci static const SK_OT_ULONG MSDOSNordic_865Mask = SkOTSetULONGBit<50 - 32>::value; 491cb93a386Sopenharmony_ci static const SK_OT_ULONG Arabic_864Mask = SkOTSetULONGBit<51 - 32>::value; 492cb93a386Sopenharmony_ci static const SK_OT_ULONG MSDOSCanadianFrench_863Mask = SkOTSetULONGBit<52 - 32>::value; 493cb93a386Sopenharmony_ci static const SK_OT_ULONG Hebrew_862Mask = SkOTSetULONGBit<53 - 32>::value; 494cb93a386Sopenharmony_ci static const SK_OT_ULONG MSDOSIcelandic_861Mask = SkOTSetULONGBit<54 - 32>::value; 495cb93a386Sopenharmony_ci static const SK_OT_ULONG MSDOSPortuguese_860Mask = SkOTSetULONGBit<55 - 32>::value; 496cb93a386Sopenharmony_ci static const SK_OT_ULONG IBMTurkish_857Mask = SkOTSetULONGBit<56 - 32>::value; 497cb93a386Sopenharmony_ci static const SK_OT_ULONG IBMCyrillic_855Mask = SkOTSetULONGBit<57 - 32>::value; 498cb93a386Sopenharmony_ci static const SK_OT_ULONG Latin2_852Mask = SkOTSetULONGBit<58 - 32>::value; 499cb93a386Sopenharmony_ci static const SK_OT_ULONG MSDOSBaltic_775Mask = SkOTSetULONGBit<59 - 32>::value; 500cb93a386Sopenharmony_ci static const SK_OT_ULONG Greek_737Mask = SkOTSetULONGBit<60 - 32>::value; 501cb93a386Sopenharmony_ci static const SK_OT_ULONG Arabic_708Mask = SkOTSetULONGBit<61 - 32>::value; 502cb93a386Sopenharmony_ci static const SK_OT_ULONG WELatin1_850Mask = SkOTSetULONGBit<62 - 32>::value; 503cb93a386Sopenharmony_ci static const SK_OT_ULONG US_437Mask = SkOTSetULONGBit<63 - 32>::value; 504cb93a386Sopenharmony_ci }; 505cb93a386Sopenharmony_ci SK_OT_ULONG value[2]; 506cb93a386Sopenharmony_ci } raw; 507cb93a386Sopenharmony_ci } ulCodePageRange; 508cb93a386Sopenharmony_ci}; 509cb93a386Sopenharmony_ci 510cb93a386Sopenharmony_ci#pragma pack(pop) 511cb93a386Sopenharmony_ci 512cb93a386Sopenharmony_ci 513cb93a386Sopenharmony_cistatic_assert(sizeof(SkOTTableOS2_V1) == 86, "sizeof_SkOTTableOS2_V1_not_86"); 514cb93a386Sopenharmony_ci 515cb93a386Sopenharmony_ci#endif 516