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_name_DEFINED 9 #define SkOTTable_name_DEFINED 10 11 #include "SkEndian.h" 12 #include "SkOTTableTypes.h" 13 #include "SkTypedEnum.h" 14 15 #pragma pack(push, 1) 16 17 struct SkOTTableName { 18 static const SK_OT_CHAR TAG0 = 'n'; 19 static const SK_OT_CHAR TAG1 = 'a'; 20 static const SK_OT_CHAR TAG2 = 'm'; 21 static const SK_OT_CHAR TAG3 = 'e'; 22 static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableName>::value; 23 24 SK_OT_USHORT format; 25 static const SK_OT_USHORT format_0 = SkTEndian_SwapBE16(0); 26 static const SK_OT_USHORT format_1 = SkTEndian_SwapBE16(1); 27 SK_OT_USHORT count; 28 SK_OT_USHORT stringOffset; //Offset to start of storage area (from start of table). 29 //SkOTTableNameRecord nameRecord[count]; 30 }; 31 struct SkOTTableNameF1 { 32 SK_OT_USHORT langTagCount; 33 //SkOTTableNameLangTagRecord langTagRecord[langTagCount]; 34 }; 35 36 struct SkOTTableNameLangTagRecord { 37 SK_OT_USHORT length; 38 SK_OT_USHORT offset; //From start of storage area. 39 //The string is always UTF-16BE from IETF specification BCP 47. 40 }; 41 42 struct SkOTTableNameRecord { 43 //The platform ID specifies how to interpret the encoding and language ID. 44 struct PlatformID { 45 SK_TYPED_ENUM(Value, SK_OT_USHORT, 46 ((Unicode, SkTEndian_SwapBE16(0))) 47 ((Macintosh, SkTEndian_SwapBE16(1))) 48 ((ISO, SkTEndian_SwapBE16(2))) //deprecated, use Unicode instead 49 ((Windows, SkTEndian_SwapBE16(3))) 50 ((Custom, SkTEndian_SwapBE16(4))) 51 SK_SEQ_END, 52 (value)SK_SEQ_END) 53 } platformID; 54 union EncodingID { 55 //Always UTF-16BE 56 struct Unicode { 57 SK_TYPED_ENUM(Value, SK_OT_USHORT, 58 ((Unicode10, SkTEndian_SwapBE16(0))) 59 ((Unicode11, SkTEndian_SwapBE16(1))) 60 ((ISO10646, SkTEndian_SwapBE16(2))) //deprecated, use Unicode11 61 ((Unicode20BMP, SkTEndian_SwapBE16(3))) 62 ((Unicode20, SkTEndian_SwapBE16(4))) 63 ((UnicodeVariationSequences, SkTEndian_SwapBE16(5))) 64 ((UnicodeFull, SkTEndian_SwapBE16(6))) 65 SK_SEQ_END, 66 (value)SK_SEQ_END) 67 } unicode; 68 struct Macintosh { 69 SK_TYPED_ENUM(Value, SK_OT_USHORT, 70 ((Roman, SkTEndian_SwapBE16(0))) 71 ((Japanese, SkTEndian_SwapBE16(1))) 72 ((ChineseTraditional, SkTEndian_SwapBE16(2))) 73 ((Korean, SkTEndian_SwapBE16(3))) 74 ((Arabic, SkTEndian_SwapBE16(4))) 75 ((Hebrew, SkTEndian_SwapBE16(5))) 76 ((Greek, SkTEndian_SwapBE16(6))) 77 ((Russian, SkTEndian_SwapBE16(7))) 78 ((RSymbol, SkTEndian_SwapBE16(8))) 79 ((Devanagari, SkTEndian_SwapBE16(9))) 80 ((Gurmukhi, SkTEndian_SwapBE16(10))) 81 ((Gujarati, SkTEndian_SwapBE16(11))) 82 ((Oriya, SkTEndian_SwapBE16(12))) 83 ((Bengali, SkTEndian_SwapBE16(13))) 84 ((Tamil, SkTEndian_SwapBE16(14))) 85 ((Telugu, SkTEndian_SwapBE16(15))) 86 ((Kannada, SkTEndian_SwapBE16(16))) 87 ((Malayalam, SkTEndian_SwapBE16(17))) 88 ((Sinhalese, SkTEndian_SwapBE16(18))) 89 ((Burmese, SkTEndian_SwapBE16(19))) 90 ((Khmer, SkTEndian_SwapBE16(20))) 91 ((Thai, SkTEndian_SwapBE16(21))) 92 ((Laotian, SkTEndian_SwapBE16(22))) 93 ((Georgian, SkTEndian_SwapBE16(23))) 94 ((Armenian, SkTEndian_SwapBE16(24))) 95 ((ChineseSimplified, SkTEndian_SwapBE16(25))) 96 ((Tibetan, SkTEndian_SwapBE16(26))) 97 ((Mongolian, SkTEndian_SwapBE16(27))) 98 ((Geez, SkTEndian_SwapBE16(28))) 99 ((Slavic, SkTEndian_SwapBE16(29))) 100 ((Vietnamese, SkTEndian_SwapBE16(30))) 101 ((Sindhi, SkTEndian_SwapBE16(31))) 102 ((Uninterpreted, SkTEndian_SwapBE16(32))) 103 SK_SEQ_END, 104 (value)SK_SEQ_END) 105 } macintosh; 106 //deprecated, use Unicode instead 107 struct ISO { 108 SK_TYPED_ENUM(Value, SK_OT_USHORT, 109 ((ASCII7, SkTEndian_SwapBE16(0))) 110 ((ISO10646, SkTEndian_SwapBE16(1))) 111 ((ISO88591, SkTEndian_SwapBE16(2))) 112 SK_SEQ_END, 113 (value)SK_SEQ_END) 114 } iso; 115 struct Windows { 116 SK_TYPED_ENUM(Value, SK_OT_USHORT, 117 ((Symbol, SkTEndian_SwapBE16(0))) 118 ((UnicodeBMPUCS2, SkTEndian_SwapBE16(1))) //Windows default 119 ((ShiftJIS, SkTEndian_SwapBE16(2))) 120 ((PRC, SkTEndian_SwapBE16(3))) 121 ((Big5, SkTEndian_SwapBE16(4))) 122 ((Wansung, SkTEndian_SwapBE16(5))) 123 ((Johab, SkTEndian_SwapBE16(6))) 124 ((UnicodeUCS4, SkTEndian_SwapBE16(10))) 125 SK_SEQ_END, 126 (value)SK_SEQ_END) 127 } windows; 128 SK_OT_USHORT custom; 129 } encodingID; 130 union LanguageID { 131 struct Macintosh { 132 SK_TYPED_ENUM(Value, SK_OT_USHORT, 133 ((English, SkTEndian_SwapBE16(0))) 134 ((French, SkTEndian_SwapBE16(1))) 135 ((German, SkTEndian_SwapBE16(2))) 136 ((Italian, SkTEndian_SwapBE16(3))) 137 ((Dutch, SkTEndian_SwapBE16(4))) 138 ((Swedish, SkTEndian_SwapBE16(5))) 139 ((Spanish, SkTEndian_SwapBE16(6))) 140 ((Danish, SkTEndian_SwapBE16(7))) 141 ((Portuguese, SkTEndian_SwapBE16(8))) 142 ((Norwegian, SkTEndian_SwapBE16(9))) 143 ((Hebrew, SkTEndian_SwapBE16(10))) 144 ((Japanese, SkTEndian_SwapBE16(11))) 145 ((Arabic, SkTEndian_SwapBE16(12))) 146 ((Finnish, SkTEndian_SwapBE16(13))) 147 ((Greek, SkTEndian_SwapBE16(14))) 148 ((Icelandic, SkTEndian_SwapBE16(15))) 149 ((Maltese, SkTEndian_SwapBE16(16))) 150 ((Turkish, SkTEndian_SwapBE16(17))) 151 ((Croatian, SkTEndian_SwapBE16(18))) 152 ((ChineseTraditional, SkTEndian_SwapBE16(19))) 153 ((Urdu, SkTEndian_SwapBE16(20))) 154 ((Hindi, SkTEndian_SwapBE16(21))) 155 ((Thai, SkTEndian_SwapBE16(22))) 156 ((Korean, SkTEndian_SwapBE16(23))) 157 ((Lithuanian, SkTEndian_SwapBE16(24))) 158 ((Polish, SkTEndian_SwapBE16(25))) 159 ((Hungarian, SkTEndian_SwapBE16(26))) 160 ((Estonian, SkTEndian_SwapBE16(27))) 161 ((Latvian, SkTEndian_SwapBE16(28))) 162 ((Sami, SkTEndian_SwapBE16(29))) 163 ((Faroese, SkTEndian_SwapBE16(30))) 164 ((Farsi_Persian, SkTEndian_SwapBE16(31))) 165 ((Russian, SkTEndian_SwapBE16(32))) 166 ((ChineseSimplified, SkTEndian_SwapBE16(33))) 167 ((Flemish, SkTEndian_SwapBE16(34))) 168 ((IrishGaelic, SkTEndian_SwapBE16(35))) 169 ((Albanian, SkTEndian_SwapBE16(36))) 170 ((Romanian, SkTEndian_SwapBE16(37))) 171 ((Czech, SkTEndian_SwapBE16(38))) 172 ((Slovak, SkTEndian_SwapBE16(39))) 173 ((Slovenian, SkTEndian_SwapBE16(40))) 174 ((Yiddish, SkTEndian_SwapBE16(41))) 175 ((Serbian, SkTEndian_SwapBE16(42))) 176 ((Macedonian, SkTEndian_SwapBE16(43))) 177 ((Bulgarian, SkTEndian_SwapBE16(44))) 178 ((Ukrainian, SkTEndian_SwapBE16(45))) 179 ((Byelorussian, SkTEndian_SwapBE16(46))) 180 ((Uzbek, SkTEndian_SwapBE16(47))) 181 ((Kazakh, SkTEndian_SwapBE16(48))) 182 ((AzerbaijaniCyrillic, SkTEndian_SwapBE16(49))) 183 ((AzerbaijaniArabic, SkTEndian_SwapBE16(50))) 184 ((Armenian, SkTEndian_SwapBE16(51))) 185 ((Georgian, SkTEndian_SwapBE16(52))) 186 ((Moldavian, SkTEndian_SwapBE16(53))) 187 ((Kirghiz, SkTEndian_SwapBE16(54))) 188 ((Tajiki, SkTEndian_SwapBE16(55))) 189 ((Turkmen, SkTEndian_SwapBE16(56))) 190 ((MongolianTraditional, SkTEndian_SwapBE16(57))) 191 ((MongolianCyrillic, SkTEndian_SwapBE16(58))) 192 ((Pashto, SkTEndian_SwapBE16(59))) 193 ((Kurdish, SkTEndian_SwapBE16(60))) 194 ((Kashmiri, SkTEndian_SwapBE16(61))) 195 ((Sindhi, SkTEndian_SwapBE16(62))) 196 ((Tibetan, SkTEndian_SwapBE16(63))) 197 ((Nepali, SkTEndian_SwapBE16(64))) 198 ((Sanskrit, SkTEndian_SwapBE16(65))) 199 ((Marathi, SkTEndian_SwapBE16(66))) 200 ((Bengali, SkTEndian_SwapBE16(67))) 201 ((Assamese, SkTEndian_SwapBE16(68))) 202 ((Gujarati, SkTEndian_SwapBE16(69))) 203 ((Punjabi, SkTEndian_SwapBE16(70))) 204 ((Oriya, SkTEndian_SwapBE16(71))) 205 ((Malayalam, SkTEndian_SwapBE16(72))) 206 ((Kannada, SkTEndian_SwapBE16(73))) 207 ((Tamil, SkTEndian_SwapBE16(74))) 208 ((Telugu, SkTEndian_SwapBE16(75))) 209 ((Sinhalese, SkTEndian_SwapBE16(76))) 210 ((Burmese, SkTEndian_SwapBE16(77))) 211 ((Khmer, SkTEndian_SwapBE16(78))) 212 ((Lao, SkTEndian_SwapBE16(79))) 213 ((Vietnamese, SkTEndian_SwapBE16(80))) 214 ((Indonesian, SkTEndian_SwapBE16(81))) 215 ((Tagalong, SkTEndian_SwapBE16(82))) 216 ((MalayRoman, SkTEndian_SwapBE16(83))) 217 ((MalayArabic, SkTEndian_SwapBE16(84))) 218 ((Amharic, SkTEndian_SwapBE16(85))) 219 ((Tigrinya, SkTEndian_SwapBE16(86))) 220 ((Galla, SkTEndian_SwapBE16(87))) 221 ((Somali, SkTEndian_SwapBE16(88))) 222 ((Swahili, SkTEndian_SwapBE16(89))) 223 ((Kinyarwanda_Ruanda, SkTEndian_SwapBE16(90))) 224 ((Rundi, SkTEndian_SwapBE16(91))) 225 ((Nyanja_Chewa, SkTEndian_SwapBE16(92))) 226 ((Malagasy, SkTEndian_SwapBE16(93))) 227 ((Esperanto, SkTEndian_SwapBE16(94))) 228 ((Welsh, SkTEndian_SwapBE16(128))) 229 ((Basque, SkTEndian_SwapBE16(129))) 230 ((Catalan, SkTEndian_SwapBE16(130))) 231 ((Latin, SkTEndian_SwapBE16(131))) 232 ((Quenchua, SkTEndian_SwapBE16(132))) 233 ((Guarani, SkTEndian_SwapBE16(133))) 234 ((Aymara, SkTEndian_SwapBE16(134))) 235 ((Tatar, SkTEndian_SwapBE16(135))) 236 ((Uighur, SkTEndian_SwapBE16(136))) 237 ((Dzongkha, SkTEndian_SwapBE16(137))) 238 ((JavaneseRoman, SkTEndian_SwapBE16(138))) 239 ((SundaneseRoman, SkTEndian_SwapBE16(139))) 240 ((Galician, SkTEndian_SwapBE16(140))) 241 ((Afrikaans, SkTEndian_SwapBE16(141))) 242 ((Breton, SkTEndian_SwapBE16(142))) 243 ((Inuktitut, SkTEndian_SwapBE16(143))) 244 ((ScottishGaelic, SkTEndian_SwapBE16(144))) 245 ((ManxGaelic, SkTEndian_SwapBE16(145))) 246 ((IrishGaelicWithLenition, SkTEndian_SwapBE16(146))) 247 ((Tongan, SkTEndian_SwapBE16(147))) 248 ((GreekPolytonic, SkTEndian_SwapBE16(148))) 249 ((Greenlandic, SkTEndian_SwapBE16(149))) 250 ((AzerbaijaniRoman, SkTEndian_SwapBE16(150))) 251 SK_SEQ_END, 252 (value)SK_SEQ_END) 253 } macintosh; 254 struct Windows { 255 SK_TYPED_ENUM(Value, SK_OT_USHORT, 256 ((Afrikaans_SouthAfrica, SkTEndian_SwapBE16(0x0436))) 257 ((Albanian_Albania, SkTEndian_SwapBE16(0x041C))) 258 ((Alsatian_France, SkTEndian_SwapBE16(0x0484))) 259 ((Amharic_Ethiopia, SkTEndian_SwapBE16(0x045E))) 260 ((Arabic_Algeria, SkTEndian_SwapBE16(0x1401))) 261 ((Arabic_Bahrain, SkTEndian_SwapBE16(0x3C01))) 262 ((Arabic_Egypt, SkTEndian_SwapBE16(0x0C01))) 263 ((Arabic_Iraq, SkTEndian_SwapBE16(0x0801))) 264 ((Arabic_Jordan, SkTEndian_SwapBE16(0x2C01))) 265 ((Arabic_Kuwait, SkTEndian_SwapBE16(0x3401))) 266 ((Arabic_Lebanon, SkTEndian_SwapBE16(0x3001))) 267 ((Arabic_Libya, SkTEndian_SwapBE16(0x1001))) 268 ((Arabic_Morocco, SkTEndian_SwapBE16(0x1801))) 269 ((Arabic_Oman, SkTEndian_SwapBE16(0x2001))) 270 ((Arabic_Qatar, SkTEndian_SwapBE16(0x4001))) 271 ((Arabic_SaudiArabia, SkTEndian_SwapBE16(0x0401))) 272 ((Arabic_Syria, SkTEndian_SwapBE16(0x2801))) 273 ((Arabic_Tunisia, SkTEndian_SwapBE16(0x1C01))) 274 ((Arabic_UAE, SkTEndian_SwapBE16(0x3801))) 275 ((Arabic_Yemen, SkTEndian_SwapBE16(0x2401))) 276 ((Armenian_Armenia, SkTEndian_SwapBE16(0x042B))) 277 ((Assamese_India, SkTEndian_SwapBE16(0x044D))) 278 ((AzeriCyrillic_Azerbaijan, SkTEndian_SwapBE16(0x082C))) 279 ((AzeriLatin_Azerbaijan, SkTEndian_SwapBE16(0x042C))) 280 ((Bashkir_Russia, SkTEndian_SwapBE16(0x046D))) 281 ((Basque_Basque, SkTEndian_SwapBE16(0x042D))) 282 ((Belarusian_Belarus, SkTEndian_SwapBE16(0x0423))) 283 ((Bengali_Bangladesh, SkTEndian_SwapBE16(0x0845))) 284 ((Bengali_India, SkTEndian_SwapBE16(0x0445))) 285 ((BosnianCyrillic_BosniaAndHerzegovina, SkTEndian_SwapBE16(0x201A))) 286 ((BosnianLatin_BosniaAndHerzegovina, SkTEndian_SwapBE16(0x141A))) 287 ((Breton_France, SkTEndian_SwapBE16(0x047E))) 288 ((Bulgarian_Bulgaria, SkTEndian_SwapBE16(0x0402))) 289 ((Catalan_Catalan, SkTEndian_SwapBE16(0x0403))) 290 ((Chinese_HongKongSAR, SkTEndian_SwapBE16(0x0C04))) 291 ((Chinese_MacaoSAR, SkTEndian_SwapBE16(0x1404))) 292 ((Chinese_PeoplesRepublicOfChina, SkTEndian_SwapBE16(0x0804))) 293 ((Chinese_Singapore, SkTEndian_SwapBE16(0x1004))) 294 ((Chinese_Taiwan, SkTEndian_SwapBE16(0x0404))) 295 ((Corsican_France, SkTEndian_SwapBE16(0x0483))) 296 ((Croatian_Croatia, SkTEndian_SwapBE16(0x041A))) 297 ((CroatianLatin_BosniaAndHerzegovina, SkTEndian_SwapBE16(0x101A))) 298 ((Czech_CzechRepublic, SkTEndian_SwapBE16(0x0405))) 299 ((Danish_Denmark, SkTEndian_SwapBE16(0x0406))) 300 ((Dari_Afghanistan, SkTEndian_SwapBE16(0x048C))) 301 ((Divehi_Maldives, SkTEndian_SwapBE16(0x0465))) 302 ((Dutch_Belgium, SkTEndian_SwapBE16(0x0813))) 303 ((Dutch_Netherlands, SkTEndian_SwapBE16(0x0413))) 304 ((English_Australia, SkTEndian_SwapBE16(0x0C09))) 305 ((English_Belize, SkTEndian_SwapBE16(0x2809))) 306 ((English_Canada, SkTEndian_SwapBE16(0x1009))) 307 ((English_Caribbean, SkTEndian_SwapBE16(0x2409))) 308 ((English_India, SkTEndian_SwapBE16(0x4009))) 309 ((English_Ireland, SkTEndian_SwapBE16(0x1809))) 310 ((English_Jamaica, SkTEndian_SwapBE16(0x2009))) 311 ((English_Malaysia, SkTEndian_SwapBE16(0x4409))) 312 ((English_NewZealand, SkTEndian_SwapBE16(0x1409))) 313 ((English_RepublicOfThePhilippines, SkTEndian_SwapBE16(0x3409))) 314 ((English_Singapore, SkTEndian_SwapBE16(0x4809))) 315 ((English_SouthAfrica, SkTEndian_SwapBE16(0x1C09))) 316 ((English_TrinidadAndTobago, SkTEndian_SwapBE16(0x2C09))) 317 ((English_UnitedKingdom, SkTEndian_SwapBE16(0x0809))) 318 ((English_UnitedStates, SkTEndian_SwapBE16(0x0409))) 319 ((English_Zimbabwe, SkTEndian_SwapBE16(0x3009))) 320 ((Estonian_Estonia, SkTEndian_SwapBE16(0x0425))) 321 ((Faroese_FaroeIslands, SkTEndian_SwapBE16(0x0438))) 322 ((Filipino_Philippines, SkTEndian_SwapBE16(0x0464))) 323 ((Finnish_Finland, SkTEndian_SwapBE16(0x040B))) 324 ((French_Belgium, SkTEndian_SwapBE16(0x080C))) 325 ((French_Canada, SkTEndian_SwapBE16(0x0C0C))) 326 ((French_France, SkTEndian_SwapBE16(0x040C))) 327 ((French_Luxembourg, SkTEndian_SwapBE16(0x140c))) 328 ((French_PrincipalityOfMonoco, SkTEndian_SwapBE16(0x180C))) 329 ((French_Switzerland, SkTEndian_SwapBE16(0x100C))) 330 ((Frisian_Netherlands, SkTEndian_SwapBE16(0x0462))) 331 ((Galician_Galician, SkTEndian_SwapBE16(0x0456))) 332 ((Georgian_Georgia, SkTEndian_SwapBE16(0x0437))) 333 ((German_Austria, SkTEndian_SwapBE16(0x0C07))) 334 ((German_Germany, SkTEndian_SwapBE16(0x0407))) 335 ((German_Liechtenstein, SkTEndian_SwapBE16(0x1407))) 336 ((German_Luxembourg, SkTEndian_SwapBE16(0x1007))) 337 ((German_Switzerland, SkTEndian_SwapBE16(0x0807))) 338 ((Greek_Greece, SkTEndian_SwapBE16(0x0408))) 339 ((Greenlandic_Greenland, SkTEndian_SwapBE16(0x046F))) 340 ((Gujarati_India, SkTEndian_SwapBE16(0x0447))) 341 ((HausaLatin_Nigeria, SkTEndian_SwapBE16(0x0468))) 342 ((Hebrew_Israel, SkTEndian_SwapBE16(0x040D))) 343 ((Hindi_India, SkTEndian_SwapBE16(0x0439))) 344 ((Hungarian_Hungary, SkTEndian_SwapBE16(0x040E))) 345 ((Icelandic_Iceland, SkTEndian_SwapBE16(0x040F))) 346 ((Igbo_Nigeria, SkTEndian_SwapBE16(0x0470))) 347 ((Indonesian_Indonesia, SkTEndian_SwapBE16(0x0421))) 348 ((Inuktitut_Canada, SkTEndian_SwapBE16(0x045D))) 349 ((InuktitutLatin_Canada, SkTEndian_SwapBE16(0x085D))) 350 ((Irish_Ireland, SkTEndian_SwapBE16(0x083C))) 351 ((isiXhosa_SouthAfrica, SkTEndian_SwapBE16(0x0434))) 352 ((isiZulu_SouthAfrica, SkTEndian_SwapBE16(0x0435))) 353 ((Italian_Italy, SkTEndian_SwapBE16(0x0410))) 354 ((Italian_Switzerland, SkTEndian_SwapBE16(0x0810))) 355 ((Japanese_Japan, SkTEndian_SwapBE16(0x0411))) 356 ((Kannada_India, SkTEndian_SwapBE16(0x044B))) 357 ((Kazakh_Kazakhstan, SkTEndian_SwapBE16(0x043F))) 358 ((Khmer_Cambodia, SkTEndian_SwapBE16(0x0453))) 359 ((Kiche_Guatemala, SkTEndian_SwapBE16(0x0486))) 360 ((Kinyarwanda_Rwanda, SkTEndian_SwapBE16(0x0487))) 361 ((Kiswahili_Kenya, SkTEndian_SwapBE16(0x0441))) 362 ((Konkani_India, SkTEndian_SwapBE16(0x0457))) 363 ((Korean_Korea, SkTEndian_SwapBE16(0x0412))) 364 ((Kyrgyz_Kyrgyzstan, SkTEndian_SwapBE16(0x0440))) 365 ((Lao_LaoPDR, SkTEndian_SwapBE16(0x0454))) 366 ((Latvian_Latvia, SkTEndian_SwapBE16(0x0426))) 367 ((Lithuanian_Lithuania, SkTEndian_SwapBE16(0x0427))) 368 ((LowerSorbian_Germany, SkTEndian_SwapBE16(0x082E))) 369 ((Luxembourgish_Luxembourg, SkTEndian_SwapBE16(0x046E))) 370 ((MacedonianFYROM_FormerYugoslavRepublicOfMacedonia, SkTEndian_SwapBE16(0x042F))) 371 ((Malay_BruneiDarussalam, SkTEndian_SwapBE16(0x083E))) 372 ((Malay_Malaysia, SkTEndian_SwapBE16(0x043E))) 373 ((Malayalam_India, SkTEndian_SwapBE16(0x044C))) 374 ((Maltese_Malta, SkTEndian_SwapBE16(0x043A))) 375 ((Maori_NewZealand, SkTEndian_SwapBE16(0x0481))) 376 ((Mapudungun_Chile, SkTEndian_SwapBE16(0x047A))) 377 ((Marathi_India, SkTEndian_SwapBE16(0x044E))) 378 ((Mohawk_Mohawk, SkTEndian_SwapBE16(0x047C))) 379 ((MongolianCyrillic_Mongolia, SkTEndian_SwapBE16(0x0450))) 380 ((MongolianTraditional_PeoplesRepublicOfChina, SkTEndian_SwapBE16(0x0850))) 381 ((Nepali_Nepal, SkTEndian_SwapBE16(0x0461))) 382 ((NorwegianBokmal_Norway, SkTEndian_SwapBE16(0x0414))) 383 ((NorwegianNynorsk_Norway, SkTEndian_SwapBE16(0x0814))) 384 ((Occitan_France, SkTEndian_SwapBE16(0x0482))) 385 ((Odia_India, SkTEndian_SwapBE16(0x0448))) 386 ((Pashto_Afghanistan, SkTEndian_SwapBE16(0x0463))) 387 ((Polish_Poland, SkTEndian_SwapBE16(0x0415))) 388 ((Portuguese_Brazil, SkTEndian_SwapBE16(0x0416))) 389 ((Portuguese_Portugal, SkTEndian_SwapBE16(0x0816))) 390 ((Punjabi_India, SkTEndian_SwapBE16(0x0446))) 391 ((Quechua_Bolivia, SkTEndian_SwapBE16(0x046B))) 392 ((Quechua_Ecuador, SkTEndian_SwapBE16(0x086B))) 393 ((Quechua_Peru, SkTEndian_SwapBE16(0x0C6B))) 394 ((Romanian_Romania, SkTEndian_SwapBE16(0x0418))) 395 ((Romansh_Switzerland, SkTEndian_SwapBE16(0x0417))) 396 ((Russian_Russia, SkTEndian_SwapBE16(0x0419))) 397 ((SamiInari_Finland, SkTEndian_SwapBE16(0x243B))) 398 ((SamiLule_Norway, SkTEndian_SwapBE16(0x103B))) 399 ((SamiLule_Sweden, SkTEndian_SwapBE16(0x143B))) 400 ((SamiNorthern_Finland, SkTEndian_SwapBE16(0x0C3B))) 401 ((SamiNorthern_Norway, SkTEndian_SwapBE16(0x043B))) 402 ((SamiNorthern_Sweden, SkTEndian_SwapBE16(0x083B))) 403 ((SamiSkolt_Finland, SkTEndian_SwapBE16(0x203B))) 404 ((SamiSouthern_Norway, SkTEndian_SwapBE16(0x183B))) 405 ((SamiSouthern_Sweden, SkTEndian_SwapBE16(0x1C3B))) 406 ((Sanskrit_India, SkTEndian_SwapBE16(0x044F))) 407 ((SerbianCyrillic_BosniaAndHerzegovina, SkTEndian_SwapBE16(0x1C1A))) 408 ((SerbianCyrillic_Serbia, SkTEndian_SwapBE16(0x0C1A))) 409 ((SerbianLatin_BosniaAndHerzegovina, SkTEndian_SwapBE16(0x181A))) 410 ((SerbianLatin_Serbia, SkTEndian_SwapBE16(0x081A))) 411 ((SesothoSaLeboa_SouthAfrica, SkTEndian_SwapBE16(0x046C))) 412 ((Setswana_SouthAfrica, SkTEndian_SwapBE16(0x0432))) 413 ((Sinhala_SriLanka, SkTEndian_SwapBE16(0x045B))) 414 ((Slovak_Slovakia, SkTEndian_SwapBE16(0x041B))) 415 ((Slovenian_Slovenia, SkTEndian_SwapBE16(0x0424))) 416 ((Spanish_Argentina, SkTEndian_SwapBE16(0x2C0A))) 417 ((Spanish_Bolivia, SkTEndian_SwapBE16(0x400A))) 418 ((Spanish_Chile, SkTEndian_SwapBE16(0x340A))) 419 ((Spanish_Colombia, SkTEndian_SwapBE16(0x240A))) 420 ((Spanish_CostaRica, SkTEndian_SwapBE16(0x140A))) 421 ((Spanish_DominicanRepublic, SkTEndian_SwapBE16(0x1C0A))) 422 ((Spanish_Ecuador, SkTEndian_SwapBE16(0x300A))) 423 ((Spanish_ElSalvador, SkTEndian_SwapBE16(0x440A))) 424 ((Spanish_Guatemala, SkTEndian_SwapBE16(0x100A))) 425 ((Spanish_Honduras, SkTEndian_SwapBE16(0x480A))) 426 ((Spanish_Mexico, SkTEndian_SwapBE16(0x080A))) 427 ((Spanish_Nicaragua, SkTEndian_SwapBE16(0x4C0A))) 428 ((Spanish_Panama, SkTEndian_SwapBE16(0x180A))) 429 ((Spanish_Paraguay, SkTEndian_SwapBE16(0x3C0A))) 430 ((Spanish_Peru, SkTEndian_SwapBE16(0x280A))) 431 ((Spanish_PuertoRico, SkTEndian_SwapBE16(0x500A))) 432 ((SpanishModernSort_Spain, SkTEndian_SwapBE16(0x0C0A))) 433 ((SpanishTraditionalSort_Spain, SkTEndian_SwapBE16(0x040A))) 434 ((Spanish_UnitedStates, SkTEndian_SwapBE16(0x540A))) 435 ((Spanish_Uruguay, SkTEndian_SwapBE16(0x380A))) 436 ((Spanish_Venezuela, SkTEndian_SwapBE16(0x200A))) 437 ((Sweden_Finland, SkTEndian_SwapBE16(0x081D))) 438 ((Swedish_Sweden, SkTEndian_SwapBE16(0x041D))) 439 ((Syriac_Syria, SkTEndian_SwapBE16(0x045A))) 440 ((TajikCyrillic_Tajikistan, SkTEndian_SwapBE16(0x0428))) 441 ((TamazightLatin_Algeria, SkTEndian_SwapBE16(0x085F))) 442 ((Tamil_India, SkTEndian_SwapBE16(0x0449))) 443 ((Tatar_Russia, SkTEndian_SwapBE16(0x0444))) 444 ((Telugu_India, SkTEndian_SwapBE16(0x044A))) 445 ((Thai_Thailand, SkTEndian_SwapBE16(0x041E))) 446 ((Tibetan_PRC, SkTEndian_SwapBE16(0x0451))) 447 ((Turkish_Turkey, SkTEndian_SwapBE16(0x041F))) 448 ((Turkmen_Turkmenistan, SkTEndian_SwapBE16(0x0442))) 449 ((Uighur_PRC, SkTEndian_SwapBE16(0x0480))) 450 ((Ukrainian_Ukraine, SkTEndian_SwapBE16(0x0422))) 451 ((UpperSorbian_Germany, SkTEndian_SwapBE16(0x042E))) 452 ((Urdu_IslamicRepublicOfPakistan, SkTEndian_SwapBE16(0x0420))) 453 ((UzbekCyrillic_Uzbekistan, SkTEndian_SwapBE16(0x0843))) 454 ((UzbekLatin_Uzbekistan, SkTEndian_SwapBE16(0x0443))) 455 ((Vietnamese_Vietnam, SkTEndian_SwapBE16(0x042A))) 456 ((Welsh_UnitedKingdom, SkTEndian_SwapBE16(0x0452))) 457 ((Wolof_Senegal, SkTEndian_SwapBE16(0x0488))) 458 ((Yakut_Russia, SkTEndian_SwapBE16(0x0485))) 459 ((Yi_PRC, SkTEndian_SwapBE16(0x0478))) 460 ((Yoruba_Nigeria, SkTEndian_SwapBE16(0x046A))) 461 SK_SEQ_END, 462 (value)SK_SEQ_END) 463 } windows; 464 //languageTagID - 0x8000 is an index into the langTagRecord array. 465 SK_OT_USHORT languageTagID; 466 } languageID; 467 union NameID { 468 struct Predefined { 469 SK_TYPED_ENUM(Value, SK_OT_USHORT, 470 ((CopyrightNotice, SkTEndian_SwapBE16(0))) 471 ((FontFamilyName, SkTEndian_SwapBE16(1))) 472 ((FontSubfamilyName, SkTEndian_SwapBE16(2))) 473 ((UniqueFontIdentifier, SkTEndian_SwapBE16(3))) 474 ((FullFontName, SkTEndian_SwapBE16(4))) 475 ((VersionString, SkTEndian_SwapBE16(5))) //Version <number>.<number> 476 ((PostscriptName, SkTEndian_SwapBE16(6))) //See spec for constraints. 477 ((Trademark, SkTEndian_SwapBE16(7))) 478 ((ManufacturerName, SkTEndian_SwapBE16(8))) 479 ((Designer, SkTEndian_SwapBE16(9))) 480 ((Description, SkTEndian_SwapBE16(10))) 481 ((URLVendor, SkTEndian_SwapBE16(11))) 482 ((URLDesigner, SkTEndian_SwapBE16(12))) 483 ((LicenseDescription, SkTEndian_SwapBE16(13))) 484 ((LicenseInfoURL, SkTEndian_SwapBE16(14))) 485 ((PreferredFamily, SkTEndian_SwapBE16(16))) 486 ((PreferredSubfamily, SkTEndian_SwapBE16(17))) 487 ((CompatibleFullName, SkTEndian_SwapBE16(18))) 488 ((SampleText, SkTEndian_SwapBE16(19))) 489 ((PostscriptCIDFindfontName, SkTEndian_SwapBE16(20))) 490 ((WWSFamilyName, SkTEndian_SwapBE16(21))) 491 ((WWSSubfamilyName, SkTEndian_SwapBE16(22))) 492 SK_SEQ_END, 493 (value)SK_SEQ_END) 494 } predefined; 495 //values > 256 are font specific strings. 496 SK_OT_USHORT fontSpecific; 497 } nameID; 498 SK_OT_USHORT length; 499 SK_OT_USHORT offset; //From start of storage area. 500 }; 501 502 #pragma pack(pop) 503 504 505 SK_COMPILE_ASSERT(sizeof(SkOTTableName) == 6, sizeof_SkOTTableName_not_6); 506 SK_COMPILE_ASSERT(sizeof(SkOTTableNameF1) == 2, sizeof_SkOTTableNameF1_not_2); 507 SK_COMPILE_ASSERT(sizeof(SkOTTableNameLangTagRecord) == 4, sizeof_SkOTTableNameLangTagRecord_not_4); 508 SK_COMPILE_ASSERT(sizeof(SkOTTableNameRecord) == 12, sizeof_SkOTTableNameRecord_not_12); 509 510 #endif 511