SkOTTable_OS_2_V3.h 23 KB

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