1/*
2 * Copyright © 2018 Google, Inc.
3 *
4 * This is part of HarfBuzz, a text shaping library.
5 *
6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software.
11 *
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16 * DAMAGE.
17 *
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23 *
24 * Google Author(s): Behdad Esfahbod
25 */
26
27#ifndef HB_OT_NAME_LANGUAGE_STATIC_HH
28#define HB_OT_NAME_LANGUAGE_STATIC_HH
29
30#include "hb-ot-name-language.hh"
31
32/* Following two tables were generated by joining FreeType, FontConfig,
33 * and OpenType specification language lists, then filled in missing
34 * entries using:
35 * https://docs.microsoft.com/en-us/windows/desktop/intl/language-identifier-constants-and-strings
36 */
37
38struct hb_ot_language_map_t
39{
40 int cmp (unsigned int key) const
41 { return key < code ? -1 : key > code ? +1 : 0; }
42
43 uint16_t code;
44 char lang[6];
45};
46
47static const hb_ot_language_map_t
48_hb_ms_language_map[] =
49{
50 {0x0001, "ar"}, /* ??? */
51 {0x0004, "zh"}, /* ??? */
52 {0x0009, "en"}, /* ??? */
53 {0x0401, "ar"}, /* Arabic (Saudi Arabia) */
54 {0x0402, "bg"}, /* Bulgarian (Bulgaria) */
55 {0x0403, "ca"}, /* Catalan (Catalan) */
56 {0x0404, "zh-tw"}, /* Chinese (Taiwan) */
57 {0x0405, "cs"}, /* Czech (Czech Republic) */
58 {0x0406, "da"}, /* Danish (Denmark) */
59 {0x0407, "de"}, /* German (Germany) */
60 {0x0408, "el"}, /* Greek (Greece) */
61 {0x0409, "en"}, /* English (United States) */
62 {0x040A, "es"}, /* Spanish (Traditional Sort) (Spain) */
63 {0x040B, "fi"}, /* Finnish (Finland) */
64 {0x040C, "fr"}, /* French (France) */
65 {0x040D, "he"}, /* Hebrew (Israel) */
66 {0x040E, "hu"}, /* Hungarian (Hungary) */
67 {0x040F, "is"}, /* Icelandic (Iceland) */
68 {0x0410, "it"}, /* Italian (Italy) */
69 {0x0411, "ja"}, /* Japanese (Japan) */
70 {0x0412, "ko"}, /* Korean (Korea) */
71 {0x0413, "nl"}, /* Dutch (Netherlands) */
72 {0x0414, "no"}, /* Norwegian (Bokmal) (Norway) */
73 {0x0415, "pl"}, /* Polish (Poland) */
74 {0x0416, "pt"}, /* Portuguese (Brazil) */
75 {0x0417, "rm"}, /* Romansh (Switzerland) */
76 {0x0418, "ro"}, /* Romanian (Romania) */
77 {0x0419, "ru"}, /* Russian (Russia) */
78 {0x041A, "hr"}, /* Croatian (Croatia) */
79 {0x041B, "sk"}, /* Slovak (Slovakia) */
80 {0x041C, "sq"}, /* Albanian (Albania) */
81 {0x041D, "sv"}, /* Swedish (Sweden) */
82 {0x041E, "th"}, /* Thai (Thailand) */
83 {0x041F, "tr"}, /* Turkish (Turkey) */
84 {0x0420, "ur"}, /* Urdu (Islamic Republic of Pakistan) */
85 {0x0421, "id"}, /* Indonesian (Indonesia) */
86 {0x0422, "uk"}, /* Ukrainian (Ukraine) */
87 {0x0423, "be"}, /* Belarusian (Belarus) */
88 {0x0424, "sl"}, /* Slovenian (Slovenia) */
89 {0x0425, "et"}, /* Estonian (Estonia) */
90 {0x0426, "lv"}, /* Latvian (Latvia) */
91 {0x0427, "lt"}, /* Lithuanian (Lithuania) */
92 {0x0428, "tg"}, /* Tajik (Cyrillic) (Tajikistan) */
93 {0x0429, "fa"}, /* Persian (Iran) */
94 {0x042A, "vi"}, /* Vietnamese (Vietnam) */
95 {0x042B, "hy"}, /* Armenian (Armenia) */
96 {0x042C, "az"}, /* Azeri (Latin) (Azerbaijan) */
97 {0x042D, "eu"}, /* Basque (Basque) */
98 {0x042E, "hsb"}, /* Upper Sorbian (Germany) */
99 {0x042F, "mk"}, /* Macedonian (FYROM) (Former Yugoslav Republic of Macedonia) */
100 {0x0430, "st"}, /* ??? */
101 {0x0431, "ts"}, /* ??? */
102 {0x0432, "tn"}, /* Setswana (South Africa) */
103 {0x0433, "ven"}, /* ??? */
104 {0x0434, "xh"}, /* isiXhosa (South Africa) */
105 {0x0435, "zu"}, /* isiZulu (South Africa) */
106 {0x0436, "af"}, /* Afrikaans (South Africa) */
107 {0x0437, "ka"}, /* Georgian (Georgia) */
108 {0x0438, "fo"}, /* Faroese (Faroe Islands) */
109 {0x0439, "hi"}, /* Hindi (India) */
110 {0x043A, "mt"}, /* Maltese (Malta) */
111 {0x043B, "se"}, /* Sami (Northern) (Norway) */
112 {0x043C, "ga"}, /* ??? */
113 {0x043D, "yi"}, /* ??? */
114 {0x043E, "ms"}, /* Malay (Malaysia) */
115 {0x043F, "kk"}, /* Kazakh (Kazakhstan) */
116 {0x0440, "ky"}, /* Kyrgyz (Kyrgyzstan) */
117 {0x0441, "sw"}, /* Kiswahili (Kenya) */
118 {0x0442, "tk"}, /* Turkmen (Turkmenistan) */
119 {0x0443, "uz"}, /* Uzbek (Latin) (Uzbekistan) */
120 {0x0444, "tt"}, /* Tatar (Russia) */
121 {0x0445, "bn"}, /* Bengali (India) */
122 {0x0446, "pa"}, /* Punjabi (India) */
123 {0x0447, "gu"}, /* Gujarati (India) */
124 {0x0448, "or"}, /* Odia (formerly Oriya) (India) */
125 {0x0449, "ta"}, /* Tamil (India) */
126 {0x044A, "te"}, /* Telugu (India) */
127 {0x044B, "kn"}, /* Kannada (India) */
128 {0x044C, "ml"}, /* Malayalam (India) */
129 {0x044D, "as"}, /* Assamese (India) */
130 {0x044E, "mr"}, /* Marathi (India) */
131 {0x044F, "sa"}, /* Sanskrit (India) */
132 {0x0450, "mn"}, /* Mongolian (Cyrillic) (Mongolia) */
133 {0x0451, "bo"}, /* Tibetan (PRC) */
134 {0x0452, "cy"}, /* Welsh (United Kingdom) */
135 {0x0453, "km"}, /* Khmer (Cambodia) */
136 {0x0454, "lo"}, /* Lao (Lao P.D.R.) */
137 {0x0455, "my"}, /* ??? */
138 {0x0456, "gl"}, /* Galician (Galician) */
139 {0x0457, "kok"}, /* Konkani (India) */
140 {0x0458, "mni"}, /* ??? */
141 {0x0459, "sd"}, /* ??? */
142 {0x045A, "syr"}, /* Syriac (Syria) */
143 {0x045B, "si"}, /* Sinhala (Sri Lanka) */
144 {0x045C, "chr"}, /* ??? */
145 {0x045D, "iu"}, /* Inuktitut (Canada) */
146 {0x045E, "am"}, /* Amharic (Ethiopia) */
147 {0x0460, "ks"}, /* ??? */
148 {0x0461, "ne"}, /* Nepali (Nepal) */
149 {0x0462, "fy"}, /* Frisian (Netherlands) */
150 {0x0463, "ps"}, /* Pashto (Afghanistan) */
151 {0x0464, "phi"}, /* Filipino (Philippines) */
152 {0x0465, "div"}, /* Divehi (Maldives) */
153 {0x0468, "ha"}, /* Hausa (Latin) (Nigeria) */
154 {0x046A, "yo"}, /* Yoruba (Nigeria) */
155 {0x046B, "quz"}, /* Quechua (Bolivia) */
156 {0x046C, "nso"}, /* Sesotho sa Leboa (South Africa) */
157 {0x046D, "ba"}, /* Bashkir (Russia) */
158 {0x046E, "lb"}, /* Luxembourgish (Luxembourg) */
159 {0x046F, "kl"}, /* Greenlandic (Greenland) */
160 {0x0470, "ibo"}, /* Igbo (Nigeria) */
161 {0x0471, "kau"}, /* ??? */
162 {0x0472, "om"}, /* ??? */
163 {0x0473, "ti"}, /* ??? */
164 {0x0474, "gn"}, /* ??? */
165 {0x0475, "haw"}, /* ??? */
166 {0x0476, "la"}, /* ??? */
167 {0x0477, "so"}, /* ??? */
168 {0x0478, "ii"}, /* Yi (PRC) */
169 {0x0479, "pap"}, /* ??? */
170 {0x047A, "arn"}, /* Mapudungun (Chile) */
171 {0x047C, "moh"}, /* Mohawk (Mohawk) */
172 {0x047E, "br"}, /* Breton (France) */
173 {0x0480, "ug"}, /* Uighur (PRC) */
174 {0x0481, "mi"}, /* Maori (New Zealand) */
175 {0x0482, "oc"}, /* Occitan (France) */
176 {0x0483, "co"}, /* Corsican (France) */
177 {0x0484, "gsw"}, /* Alsatian (France) */
178 {0x0485, "sah"}, /* Yakut (Russia) */
179 {0x0486, "qut"}, /* K'iche (Guatemala) */
180 {0x0487, "rw"}, /* Kinyarwanda (Rwanda) */
181 {0x0488, "wo"}, /* Wolof (Senegal) */
182 {0x048C, "fa"}, /* Dari (Afghanistan) */
183 {0x0801, "ar"}, /* Arabic (Iraq) */
184 {0x0804, "zh-cn"}, /* Chinese (People’s Republic of China) */
185 {0x0807, "de"}, /* German (Switzerland) */
186 {0x0809, "en"}, /* English (United Kingdom) */
187 {0x080A, "es"}, /* Spanish (Mexico) */
188 {0x080C, "fr"}, /* French (Belgium) */
189 {0x0810, "it"}, /* Italian (Switzerland) */
190 {0x0812, "ko"}, /* ??? */
191 {0x0813, "nl"}, /* Dutch (Belgium) */
192 {0x0814, "nn"}, /* Norwegian (Nynorsk) (Norway) */
193 {0x0816, "pt"}, /* Portuguese (Portugal) */
194 {0x0818, "mo"}, /* ??? */
195 {0x0819, "ru"}, /* ??? */
196 {0x081A, "sr"}, /* Serbian (Latin) (Serbia) */
197 {0x081D, "sv"}, /* Sweden (Finland) */
198 {0x0820, "ur"}, /* ??? */
199 {0x0827, "lt"}, /* ??? */
200 {0x082C, "az"}, /* Azeri (Cyrillic) (Azerbaijan) */
201 {0x082E, "dsb"}, /* Lower Sorbian (Germany) */
202//{0x083B, ""}, /* Sami (Northern) (Sweden) */
203 {0x083C, "gd"}, /* Irish (Ireland) */
204 {0x083E, "ms"}, /* Malay (Brunei Darussalam) */
205 {0x0843, "uz"}, /* Uzbek (Cyrillic) (Uzbekistan) */
206 {0x0845, "bn"}, /* Bengali (Bangladesh) */
207 {0x0846, "ar"}, /* ??? */
208 {0x0850, "mn"}, /* Mongolian (Traditional) (People’s Republic of China) */
209 {0x0851, "dz"}, /* ??? */
210 {0x085D, "iu"}, /* Inuktitut (Latin) (Canada) */
211 {0x085F, "tzm"}, /* Tamazight (Latin) (Algeria) */
212 {0x0861, "ne"}, /* ??? */
213//{0x086B, ""}, /* Quechua (Ecuador) */
214 {0x0873, "ti"}, /* ??? */
215 {0x0C01, "ar"}, /* Arabic (Egypt) */
216 {0x0C04, "zh-hk"}, /* Chinese (Hong Kong S.A.R.) */
217 {0x0C07, "de"}, /* German (Austria) */
218 {0x0C09, "en"}, /* English (Australia) */
219 {0x0C0A, "es"}, /* Spanish (Modern Sort) (Spain) */
220 {0x0C0C, "fr"}, /* French (Canada) */
221 {0x0C1A, "sr"}, /* Serbian (Cyrillic) (Serbia) */
222 {0x0C3B, "se"}, /* Sami (Northern) (Finland) */
223//{0x0C6B, ""}, /* Quechua (Peru) */
224 {0x1001, "ar"}, /* Arabic (Libya) */
225 {0x1004, "zh-sg"}, /* Chinese (Singapore) */
226 {0x1007, "de"}, /* German (Luxembourg) */
227 {0x1009, "en"}, /* English (Canada) */
228 {0x100A, "es"}, /* Spanish (Guatemala) */
229 {0x100C, "fr"}, /* French (Switzerland) */
230 {0x101A, "hr"}, /* Croatian (Latin) (Bosnia and Herzegovina) */
231 {0x103B, "smj"}, /* Sami (Lule) (Norway) */
232 {0x1401, "ar"}, /* Arabic (Algeria) */
233//{0x1404, ""}, /* Chinese (Macao S.A.R.) */
234 {0x1407, "de"}, /* German (Liechtenstein) */
235 {0x1409, "en"}, /* English (New Zealand) */
236 {0x140A, "es"}, /* Spanish (Costa Rica) */
237 {0x140C, "fr"}, /* French (Luxembourg) */
238 {0x141A, "bs"}, /* Bosnian (Latin) (Bosnia and Herzegovina) */
239//{0x143B, ""}, /* Sami (Lule) (Sweden) */
240 {0x1801, "ar"}, /* Arabic (Morocco) */
241 {0x1809, "en"}, /* English (Ireland) */
242 {0x180A, "es"}, /* Spanish (Panama) */
243 {0x180C, "fr"}, /* French (Principality of Monaco) */
244//{0x181A, ""}, /* Serbian (Latin) (Bosnia and Herzegovina) */
245 {0x183B, "sma"}, /* Sami (Southern) (Norway) */
246 {0x1C01, "ar"}, /* Arabic (Tunisia) */
247 {0x1C09, "en"}, /* English (South Africa) */
248 {0x1C0A, "es"}, /* Spanish (Dominican Republic) */
249 {0x1C0C, "fr"}, /* ??? */
250//{0x1C1A, ""}, /* Serbian (Cyrillic) (Bosnia and Herzegovina) */
251//{0x1C3B, ""}, /* Sami (Southern) (Sweden) */
252 {0x2001, "ar"}, /* Arabic (Oman) */
253 {0x2009, "en"}, /* English (Jamaica) */
254 {0x200A, "es"}, /* Spanish (Venezuela) */
255 {0x200C, "fr"}, /* ??? */
256 {0x201A, "bs"}, /* Bosnian (Cyrillic) (Bosnia and Herzegovina) */
257 {0x203B, "sms"}, /* Sami (Skolt) (Finland) */
258 {0x2401, "ar"}, /* Arabic (Yemen) */
259 {0x2409, "en"}, /* English (Caribbean) */
260 {0x240A, "es"}, /* Spanish (Colombia) */
261 {0x240C, "fr"}, /* ??? */
262 {0x243B, "smn"}, /* Sami (Inari) (Finland) */
263 {0x2801, "ar"}, /* Arabic (Syria) */
264 {0x2809, "en"}, /* English (Belize) */
265 {0x280A, "es"}, /* Spanish (Peru) */
266 {0x280C, "fr"}, /* ??? */
267 {0x2C01, "ar"}, /* Arabic (Jordan) */
268 {0x2C09, "en"}, /* English (Trinidad and Tobago) */
269 {0x2C0A, "es"}, /* Spanish (Argentina) */
270 {0x2C0C, "fr"}, /* ??? */
271 {0x3001, "ar"}, /* Arabic (Lebanon) */
272 {0x3009, "en"}, /* English (Zimbabwe) */
273 {0x300A, "es"}, /* Spanish (Ecuador) */
274 {0x300C, "fr"}, /* ??? */
275 {0x3401, "ar"}, /* Arabic (Kuwait) */
276 {0x3409, "en"}, /* English (Republic of the Philippines) */
277 {0x340A, "es"}, /* Spanish (Chile) */
278 {0x340C, "fr"}, /* ??? */
279 {0x3801, "ar"}, /* Arabic (U.A.E.) */
280 {0x380A, "es"}, /* Spanish (Uruguay) */
281 {0x380C, "fr"}, /* ??? */
282 {0x3C01, "ar"}, /* Arabic (Bahrain) */
283 {0x3C09, "en"}, /* ??? */
284 {0x3C0A, "es"}, /* Spanish (Paraguay) */
285 {0x3C0C, "fr"}, /* ??? */
286 {0x4001, "ar"}, /* Arabic (Qatar) */
287 {0x4009, "en"}, /* English (India) */
288 {0x400A, "es"}, /* Spanish (Bolivia) */
289 {0x4409, "en"}, /* English (Malaysia) */
290 {0x440A, "es"}, /* Spanish (El Salvador) */
291 {0x4809, "en"}, /* English (Singapore) */
292 {0x480A, "es"}, /* Spanish (Honduras) */
293 {0x4C0A, "es"}, /* Spanish (Nicaragua) */
294 {0x500A, "es"}, /* Spanish (Puerto Rico) */
295 {0x540A, "es"}, /* Spanish (United States) */
296 {0xE40A, "es"}, /* ??? */
297 {0xE40C, "fr"}, /* ??? */
298};
299
300static const hb_ot_language_map_t
301_hb_mac_language_map[] =
302{
303 { 0, "en"}, /* English */
304 { 1, "fr"}, /* French */
305 { 2, "de"}, /* German */
306 { 3, "it"}, /* Italian */
307 { 4, "nl"}, /* Dutch */
308 { 5, "sv"}, /* Swedish */
309 { 6, "es"}, /* Spanish */
310 { 7, "da"}, /* Danish */
311 { 8, "pt"}, /* Portuguese */
312 { 9, "no"}, /* Norwegian */
313 { 10, "he"}, /* Hebrew */
314 { 11, "ja"}, /* Japanese */
315 { 12, "ar"}, /* Arabic */
316 { 13, "fi"}, /* Finnish */
317 { 14, "el"}, /* Greek */
318 { 15, "is"}, /* Icelandic */
319 { 16, "mt"}, /* Maltese */
320 { 17, "tr"}, /* Turkish */
321 { 18, "hr"}, /* Croatian */
322 { 19, "zh-tw"}, /* Chinese (Traditional) */
323 { 20, "ur"}, /* Urdu */
324 { 21, "hi"}, /* Hindi */
325 { 22, "th"}, /* Thai */
326 { 23, "ko"}, /* Korean */
327 { 24, "lt"}, /* Lithuanian */
328 { 25, "pl"}, /* Polish */
329 { 26, "hu"}, /* Hungarian */
330 { 27, "et"}, /* Estonian */
331 { 28, "lv"}, /* Latvian */
332//{ 29, ""}, /* Sami */
333 { 30, "fo"}, /* Faroese */
334 { 31, "fa"}, /* Farsi/Persian */
335 { 32, "ru"}, /* Russian */
336 { 33, "zh-cn"}, /* Chinese (Simplified) */
337 { 34, "nl"}, /* Flemish */
338 { 35, "ga"}, /* Irish Gaelic */
339 { 36, "sq"}, /* Albanian */
340 { 37, "ro"}, /* Romanian */
341 { 38, "cs"}, /* Czech */
342 { 39, "sk"}, /* Slovak */
343 { 40, "sl"}, /* Slovenian */
344 { 41, "yi"}, /* Yiddish */
345 { 42, "sr"}, /* Serbian */
346 { 43, "mk"}, /* Macedonian */
347 { 44, "bg"}, /* Bulgarian */
348 { 45, "uk"}, /* Ukrainian */
349 { 46, "be"}, /* Byelorussian */
350 { 47, "uz"}, /* Uzbek */
351 { 48, "kk"}, /* Kazakh */
352 { 49, "az"}, /* Azerbaijani (Cyrillic script) */
353 { 50, "az"}, /* Azerbaijani (Arabic script) */
354 { 51, "hy"}, /* Armenian */
355 { 52, "ka"}, /* Georgian */
356 { 53, "mo"}, /* Moldavian */
357 { 54, "ky"}, /* Kirghiz */
358 { 55, "tg"}, /* Tajiki */
359 { 56, "tk"}, /* Turkmen */
360 { 57, "mn"}, /* Mongolian (Mongolian script) */
361 { 58, "mn"}, /* Mongolian (Cyrillic script) */
362 { 59, "ps"}, /* Pashto */
363 { 60, "ku"}, /* Kurdish */
364 { 61, "ks"}, /* Kashmiri */
365 { 62, "sd"}, /* Sindhi */
366 { 63, "bo"}, /* Tibetan */
367 { 64, "ne"}, /* Nepali */
368 { 65, "sa"}, /* Sanskrit */
369 { 66, "mr"}, /* Marathi */
370 { 67, "bn"}, /* Bengali */
371 { 68, "as"}, /* Assamese */
372 { 69, "gu"}, /* Gujarati */
373 { 70, "pa"}, /* Punjabi */
374 { 71, "or"}, /* Oriya */
375 { 72, "ml"}, /* Malayalam */
376 { 73, "kn"}, /* Kannada */
377 { 74, "ta"}, /* Tamil */
378 { 75, "te"}, /* Telugu */
379 { 76, "si"}, /* Sinhalese */
380 { 77, "my"}, /* Burmese */
381 { 78, "km"}, /* Khmer */
382 { 79, "lo"}, /* Lao */
383 { 80, "vi"}, /* Vietnamese */
384 { 81, "id"}, /* Indonesian */
385 { 82, "tl"}, /* Tagalog */
386 { 83, "ms"}, /* Malay (Roman script) */
387 { 84, "ms"}, /* Malay (Arabic script) */
388 { 85, "am"}, /* Amharic */
389 { 86, "ti"}, /* Tigrinya */
390 { 87, "om"}, /* Galla */
391 { 88, "so"}, /* Somali */
392 { 89, "sw"}, /* Swahili */
393 { 90, "rw"}, /* Kinyarwanda/Ruanda */
394 { 91, "rn"}, /* Rundi */
395 { 92, "ny"}, /* Nyanja/Chewa */
396 { 93, "mg"}, /* Malagasy */
397 { 94, "eo"}, /* Esperanto */
398 {128, "cy"}, /* Welsh */
399 {129, "eu"}, /* Basque */
400 {130, "ca"}, /* Catalan */
401 {131, "la"}, /* Latin */
402 {132, "qu"}, /* Quechua */
403 {133, "gn"}, /* Guarani */
404 {134, "ay"}, /* Aymara */
405 {135, "tt"}, /* Tatar */
406 {136, "ug"}, /* Uighur */
407 {137, "dz"}, /* Dzongkha */
408 {138, "jw"}, /* Javanese (Roman script) */
409 {139, "su"}, /* Sundanese (Roman script) */
410 {140, "gl"}, /* Galician */
411 {141, "af"}, /* Afrikaans */
412 {142, "br"}, /* Breton */
413 {143, "iu"}, /* Inuktitut */
414 {144, "gd"}, /* Scottish Gaelic */
415 {145, "gv"}, /* Manx Gaelic */
416 {146, "ga"}, /* Irish Gaelic (with dot above) */
417 {147, "to"}, /* Tongan */
418 {148, "el"}, /* Greek (polytonic) */
419 {149, "ik"}, /* Greenlandic */
420 {150, "az"}, /* Azerbaijani (Roman script) */
421};
422
423
424static hb_language_t
425_hb_ot_name_language_for (unsigned int code,
426 const hb_ot_language_map_t *array,
427 unsigned int len)
428{
429#ifdef HB_NO_OT_NAME_LANGUAGE
430 return HB_LANGUAGE_INVALID;
431#endif
432 auto *entry = hb_bsearch (code, array, len);
433
434 if (entry)
435 return hb_language_from_string (entry->lang, -1);
436
437 return HB_LANGUAGE_INVALID;
438}
439
440hb_language_t
441_hb_ot_name_language_for_ms_code (unsigned int code)
442{
443 return _hb_ot_name_language_for (code,
444 _hb_ms_language_map,
445 ARRAY_LENGTH (_hb_ms_language_map));
446}
447
448hb_language_t
449_hb_ot_name_language_for_mac_code (unsigned int code)
450{
451 return _hb_ot_name_language_for (code,
452 _hb_mac_language_map,
453 ARRAY_LENGTH (_hb_mac_language_map));
454}
455
456#endif /* HB_OT_NAME_LANGUAGE_STATIC_HH */
457