gfx/skia/trunk/src/sfnt/SkOTTable_OS_2_V3.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

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

mercurial