Fix OTS warning about `maxp.maxSizeOfInstructions`.
[ttfautohint.git] / lib / tastyles.h
blobbb4aa2ac3ad0015151e27910b15031fb1d992f16
1 /* tastyles.h */
3 /*
4 * Copyright (C) 2014-2022 by Werner Lemberg.
6 * This file is part of the ttfautohint library, and may only be used,
7 * modified, and distributed under the terms given in `COPYING'. By
8 * continuing to use, modify, or distribute this file you indicate that you
9 * have read `COPYING' and understand and accept it fully.
11 * The file `COPYING' mentioned in the previous paragraph is distributed
12 * with the ttfautohint library.
16 /* originally file `afstyles.h' (2014-Jan-11) from FreeType */
18 /* heavily modified 2014 by Werner Lemberg <wl@gnu.org> */
21 /* The following part can be included multiple times. */
22 /* Define `STYLE' as needed. */
26 * Add new styles here. The first and second arguments are the
27 * style name in lowercase and uppercase, respectively, followed
28 * by a description string. The next arguments are the
29 * corresponding writing system, script, blue stringset, and
30 * coverage.
32 * Note that styles using `TA_COVERAGE_DEFAULT' should always
33 * come after styles with other coverages. Also note that
34 * fallback scripts only use `TA_COVERAGE_DEFAULT' for its
35 * style.
37 * Example:
39 * STYLE(cyrl_dflt, CYRL_DFLT,
40 * "Cyrillic default style",
41 * TA_WRITING_SYSTEM_LATIN,
42 * TA_SCRIPT_CYRL,
43 * TA_BLUE_STRINGSET_CYRL,
44 * TA_COVERAGE_DEFAULT)
47 #undef STYLE_LATIN
48 #define STYLE_LATIN(s, S, f, F, ds, df, C) \
49 STYLE(s ## _ ## f, S ## _ ## F, \
50 ds " " df " style", \
51 TA_WRITING_SYSTEM_LATIN, \
52 TA_SCRIPT_ ## S, \
53 TA_BLUE_STRINGSET_ ## S, \
54 TA_COVERAGE_ ## C)
56 #undef META_STYLE_LATIN
57 #define META_STYLE_LATIN(s, S, ds) \
58 STYLE_LATIN(s, S, c2cp, C2CP, ds, \
59 "petite capitals from capitals", \
60 PETITE_CAPITALS_FROM_CAPITALS) \
61 STYLE_LATIN(s, S, c2sc, C2SC, ds, \
62 "small capitals from capitals", \
63 SMALL_CAPITALS_FROM_CAPITALS) \
64 STYLE_LATIN(s, S, ordn, ORDN, ds, \
65 "ordinals", \
66 ORDINALS) \
67 STYLE_LATIN(s, S, pcap, PCAP, ds, \
68 "petite capitals", \
69 PETITE_CAPITALS) \
70 STYLE_LATIN(s, S, sinf, SINF, ds, \
71 "scientific inferiors", \
72 SCIENTIFIC_INFERIORS) \
73 STYLE_LATIN(s, S, smcp, SMCP, ds, \
74 "small capitals", \
75 SMALL_CAPITALS) \
76 STYLE_LATIN(s, S, subs, SUBS, ds, \
77 "subscript", \
78 SUBSCRIPT) \
79 STYLE_LATIN(s, S, sups, SUPS, ds, \
80 "superscript", \
81 SUPERSCRIPT) \
82 STYLE_LATIN(s, S, titl, TITL, ds, \
83 "titling", \
84 TITLING) \
85 STYLE_LATIN(s, S, dflt, DFLT, ds, \
86 "default", \
87 DEFAULT)
90 STYLE(adlm_dflt, ADLM_DFLT,
91 "Adlam default style",
92 TA_WRITING_SYSTEM_LATIN,
93 TA_SCRIPT_ADLM,
94 TA_BLUE_STRINGSET_ADLM,
95 TA_COVERAGE_DEFAULT)
97 STYLE(arab_dflt, ARAB_DFLT,
98 "Arabic default style",
99 TA_WRITING_SYSTEM_LATIN,
100 TA_SCRIPT_ARAB,
101 TA_BLUE_STRINGSET_ARAB,
102 TA_COVERAGE_DEFAULT)
104 STYLE(armn_dflt, ARMN_DFLT,
105 "Armenian default style",
106 TA_WRITING_SYSTEM_LATIN,
107 TA_SCRIPT_ARMN,
108 TA_BLUE_STRINGSET_ARMN,
109 TA_COVERAGE_DEFAULT)
111 STYLE(avst_dflt, AVST_DFLT,
112 "Avestan default style",
113 TA_WRITING_SYSTEM_LATIN,
114 TA_SCRIPT_AVST,
115 TA_BLUE_STRINGSET_AVST,
116 TA_COVERAGE_DEFAULT)
118 STYLE(bamu_dflt, BAMU_DFLT,
119 "Bamum default style",
120 TA_WRITING_SYSTEM_LATIN,
121 TA_SCRIPT_BAMU,
122 TA_BLUE_STRINGSET_BAMU,
123 TA_COVERAGE_DEFAULT)
125 STYLE(beng_dflt, BENG_DFLT,
126 "Bengali default style",
127 TA_WRITING_SYSTEM_LATIN,
128 TA_SCRIPT_BENG,
129 TA_BLUE_STRINGSET_BENG,
130 TA_COVERAGE_DEFAULT)
132 STYLE(buhd_dflt, BUHD_DFLT,
133 "Buhid default style",
134 TA_WRITING_SYSTEM_LATIN,
135 TA_SCRIPT_BUHD,
136 TA_BLUE_STRINGSET_BUHD,
137 TA_COVERAGE_DEFAULT)
139 STYLE(cakm_dflt, CAKM_DFLT,
140 "Chakma default style",
141 TA_WRITING_SYSTEM_LATIN,
142 TA_SCRIPT_CAKM,
143 TA_BLUE_STRINGSET_CAKM,
144 TA_COVERAGE_DEFAULT)
146 STYLE(cans_dflt, CANS_DFLT,
147 "Canadian Syllabics default style",
148 TA_WRITING_SYSTEM_LATIN,
149 TA_SCRIPT_CANS,
150 TA_BLUE_STRINGSET_CANS,
151 TA_COVERAGE_DEFAULT)
153 STYLE(cari_dflt, CARI_DFLT,
154 "Carian default style",
155 TA_WRITING_SYSTEM_LATIN,
156 TA_SCRIPT_CARI,
157 TA_BLUE_STRINGSET_CARI,
158 TA_COVERAGE_DEFAULT)
160 STYLE(cher_dflt, CHER_DFLT,
161 "Cherokee default style",
162 TA_WRITING_SYSTEM_LATIN,
163 TA_SCRIPT_CHER,
164 TA_BLUE_STRINGSET_CHER,
165 TA_COVERAGE_DEFAULT)
167 STYLE(copt_dflt, COPT_DFLT,
168 "Coptic default style",
169 TA_WRITING_SYSTEM_LATIN,
170 TA_SCRIPT_COPT,
171 TA_BLUE_STRINGSET_COPT,
172 TA_COVERAGE_DEFAULT)
174 STYLE(cprt_dflt, CPRT_DFLT,
175 "Cypriot default style",
176 TA_WRITING_SYSTEM_LATIN,
177 TA_SCRIPT_CPRT,
178 TA_BLUE_STRINGSET_CPRT,
179 TA_COVERAGE_DEFAULT)
181 META_STYLE_LATIN(cyrl, CYRL, "Cyrillic")
183 STYLE(deva_dflt, DEVA_DFLT,
184 "Devanagari default style",
185 TA_WRITING_SYSTEM_LATIN,
186 TA_SCRIPT_DEVA,
187 TA_BLUE_STRINGSET_DEVA,
188 TA_COVERAGE_DEFAULT)
190 STYLE(dsrt_dflt, DSRT_DFLT,
191 "Deseret default style",
192 TA_WRITING_SYSTEM_LATIN,
193 TA_SCRIPT_DSRT,
194 TA_BLUE_STRINGSET_DSRT,
195 TA_COVERAGE_DEFAULT)
197 STYLE(ethi_dflt, ETHI_DFLT,
198 "Ethiopic default style",
199 TA_WRITING_SYSTEM_LATIN,
200 TA_SCRIPT_ETHI,
201 TA_BLUE_STRINGSET_ETHI,
202 TA_COVERAGE_DEFAULT)
204 STYLE(geor_dflt, GEOR_DFLT,
205 "Georgian (Mkhedruli) default style",
206 TA_WRITING_SYSTEM_LATIN,
207 TA_SCRIPT_GEOR,
208 TA_BLUE_STRINGSET_GEOR,
209 TA_COVERAGE_DEFAULT)
211 STYLE(geok_dflt, GEOK_DFLT,
212 "Georgian (Khutsuri) default style",
213 TA_WRITING_SYSTEM_LATIN,
214 TA_SCRIPT_GEOK,
215 TA_BLUE_STRINGSET_GEOK,
216 TA_COVERAGE_DEFAULT)
218 STYLE(glag_dflt, GLAG_DFLT,
219 "Glagolitic default style",
220 TA_WRITING_SYSTEM_LATIN,
221 TA_SCRIPT_GLAG,
222 TA_BLUE_STRINGSET_GLAG,
223 TA_COVERAGE_DEFAULT)
225 STYLE(goth_dflt, GOTH_DFLT,
226 "Gothic default style",
227 TA_WRITING_SYSTEM_LATIN,
228 TA_SCRIPT_GOTH,
229 TA_BLUE_STRINGSET_GOTH,
230 TA_COVERAGE_DEFAULT)
232 META_STYLE_LATIN(grek, GREK, "Greek")
234 STYLE(gujr_dflt, GUJR_DFLT,
235 "Gujarati default style",
236 TA_WRITING_SYSTEM_LATIN,
237 TA_SCRIPT_GUJR,
238 TA_BLUE_STRINGSET_GUJR,
239 TA_COVERAGE_DEFAULT)
241 STYLE(guru_dflt, GURU_DFLT,
242 "Gurmukhi default style",
243 TA_WRITING_SYSTEM_LATIN,
244 TA_SCRIPT_GURU,
245 TA_BLUE_STRINGSET_GURU,
246 TA_COVERAGE_DEFAULT)
248 STYLE(hebr_dflt, HEBR_DFLT,
249 "Hebrew default style",
250 TA_WRITING_SYSTEM_LATIN,
251 TA_SCRIPT_HEBR,
252 TA_BLUE_STRINGSET_HEBR,
253 TA_COVERAGE_DEFAULT)
255 STYLE(hmnp_dflt, HMNP_DFLT,
256 "Nyiakeng Puachue Hmong default style",
257 TA_WRITING_SYSTEM_LATIN,
258 TA_SCRIPT_HMNP,
259 TA_BLUE_STRINGSET_HMNP,
260 TA_COVERAGE_DEFAULT)
262 STYLE(kali_dflt, KALI_DFLT,
263 "Kayah Li default style",
264 TA_WRITING_SYSTEM_LATIN,
265 TA_SCRIPT_KALI,
266 TA_BLUE_STRINGSET_KALI,
267 TA_COVERAGE_DEFAULT)
269 STYLE(khmr_dflt, KHMR_DFLT,
270 "Khmer default style",
271 TA_WRITING_SYSTEM_LATIN,
272 TA_SCRIPT_KHMR,
273 TA_BLUE_STRINGSET_KHMR,
274 TA_COVERAGE_DEFAULT)
276 STYLE(khms_dflt, KHMS_DFLT,
277 "Khmer Symbols default style",
278 TA_WRITING_SYSTEM_LATIN,
279 TA_SCRIPT_KHMS,
280 TA_BLUE_STRINGSET_KHMS,
281 TA_COVERAGE_DEFAULT)
283 STYLE(knda_dflt, KNDA_DFLT,
284 "Kannada default style",
285 TA_WRITING_SYSTEM_LATIN,
286 TA_SCRIPT_KNDA,
287 TA_BLUE_STRINGSET_KNDA,
288 TA_COVERAGE_DEFAULT)
290 STYLE(lao_dflt, LAO_DFLT,
291 "Lao default style",
292 TA_WRITING_SYSTEM_LATIN,
293 TA_SCRIPT_LAO,
294 TA_BLUE_STRINGSET_LAO,
295 TA_COVERAGE_DEFAULT)
297 META_STYLE_LATIN(latn, LATN, "Latin")
299 STYLE(latb_dflt, LATB_DFLT,
300 "Latin subscript fallback default style",
301 TA_WRITING_SYSTEM_LATIN,
302 TA_SCRIPT_LATB,
303 TA_BLUE_STRINGSET_LATB,
304 TA_COVERAGE_DEFAULT)
306 STYLE(latp_dflt, LATP_DFLT,
307 "Latin superscript fallback default style",
308 TA_WRITING_SYSTEM_LATIN,
309 TA_SCRIPT_LATP,
310 TA_BLUE_STRINGSET_LATP,
311 TA_COVERAGE_DEFAULT)
313 #ifdef FT_OPTION_AUTOFIT2
314 STYLE(ltn2_dflt, LTN2_DFLT,
315 "Latin 2 default style",
316 TA_WRITING_SYSTEM_LATIN2,
317 TA_SCRIPT_LATN,
318 TA_BLUE_STRINGSET_LATN,
319 TA_COVERAGE_DEFAULT)
320 #endif
322 STYLE(lisu_dflt, LISU_DFLT,
323 "Lisu default style",
324 TA_WRITING_SYSTEM_LATIN,
325 TA_SCRIPT_LISU,
326 TA_BLUE_STRINGSET_LISU,
327 TA_COVERAGE_DEFAULT)
329 STYLE(mlym_dflt, MLYM_DFLT,
330 "Malayalam default style",
331 TA_WRITING_SYSTEM_LATIN,
332 TA_SCRIPT_MLYM,
333 TA_BLUE_STRINGSET_MLYM,
334 TA_COVERAGE_DEFAULT)
336 STYLE(medf_dflt, MEDF_DFLT,
337 "Medefaidrin default style",
338 TA_WRITING_SYSTEM_LATIN,
339 TA_SCRIPT_MEDF,
340 TA_BLUE_STRINGSET_MEDF,
341 TA_COVERAGE_DEFAULT)
343 STYLE(mong_dflt, MONG_DFLT,
344 "Mongolian default style",
345 TA_WRITING_SYSTEM_LATIN,
346 TA_SCRIPT_MONG,
347 TA_BLUE_STRINGSET_MONG,
348 TA_COVERAGE_DEFAULT)
350 STYLE(mymr_dflt, MYMR_DFLT,
351 "Myanmar default style",
352 TA_WRITING_SYSTEM_LATIN,
353 TA_SCRIPT_MYMR,
354 TA_BLUE_STRINGSET_MYMR,
355 TA_COVERAGE_DEFAULT)
357 STYLE(nkoo_dflt, NKOO_DFLT,
358 "N'Ko default style",
359 TA_WRITING_SYSTEM_LATIN,
360 TA_SCRIPT_NKOO,
361 TA_BLUE_STRINGSET_NKOO,
362 TA_COVERAGE_DEFAULT)
364 STYLE(olck_dflt, OLCK_DFLT,
365 "Ol Chiki default style",
366 TA_WRITING_SYSTEM_LATIN,
367 TA_SCRIPT_OLCK,
368 TA_BLUE_STRINGSET_OLCK,
369 TA_COVERAGE_DEFAULT)
371 STYLE(orkh_dflt, ORKH_DFLT,
372 "Old Turkic default style",
373 TA_WRITING_SYSTEM_LATIN,
374 TA_SCRIPT_ORKH,
375 TA_BLUE_STRINGSET_ORKH,
376 TA_COVERAGE_DEFAULT)
378 STYLE(osge_dflt, OSGE_DFLT,
379 "Osage default style",
380 TA_WRITING_SYSTEM_LATIN,
381 TA_SCRIPT_OSGE,
382 TA_BLUE_STRINGSET_OSGE,
383 TA_COVERAGE_DEFAULT)
385 STYLE(osma_dflt, OSMA_DFLT,
386 "Osmanya default style",
387 TA_WRITING_SYSTEM_LATIN,
388 TA_SCRIPT_OSMA,
389 TA_BLUE_STRINGSET_OSMA,
390 TA_COVERAGE_DEFAULT)
392 STYLE(rohg_dflt, ROHG_DFLT,
393 "Hanifi Rohingya default style",
394 TA_WRITING_SYSTEM_LATIN,
395 TA_SCRIPT_ROHG,
396 TA_BLUE_STRINGSET_ROHG,
397 TA_COVERAGE_DEFAULT)
399 STYLE(saur_dflt, SAUR_DFLT,
400 "Saurashtra default style",
401 TA_WRITING_SYSTEM_LATIN,
402 TA_SCRIPT_SAUR,
403 TA_BLUE_STRINGSET_SAUR,
404 TA_COVERAGE_DEFAULT)
406 STYLE(shaw_dflt, SHAW_DFLT,
407 "Shavian default style",
408 TA_WRITING_SYSTEM_LATIN,
409 TA_SCRIPT_SHAW,
410 TA_BLUE_STRINGSET_SHAW,
411 TA_COVERAGE_DEFAULT)
413 STYLE(sinh_dflt, SINH_DFLT,
414 "Sinhala default style",
415 TA_WRITING_SYSTEM_LATIN,
416 TA_SCRIPT_SINH,
417 TA_BLUE_STRINGSET_SINH,
418 TA_COVERAGE_DEFAULT)
420 STYLE(sund_dflt, SUND_DFLT,
421 "Sundanese default style",
422 TA_WRITING_SYSTEM_LATIN,
423 TA_SCRIPT_SUND,
424 TA_BLUE_STRINGSET_SUND,
425 TA_COVERAGE_DEFAULT)
427 STYLE(taml_dflt, TAML_DFLT,
428 "Tamil default style",
429 TA_WRITING_SYSTEM_LATIN,
430 TA_SCRIPT_TAML,
431 TA_BLUE_STRINGSET_TAML,
432 TA_COVERAGE_DEFAULT)
434 STYLE(tavt_dflt, TAVT_DFLT,
435 "Tai Viet default style",
436 TA_WRITING_SYSTEM_LATIN,
437 TA_SCRIPT_TAVT,
438 TA_BLUE_STRINGSET_TAVT,
439 TA_COVERAGE_DEFAULT)
441 STYLE(telu_dflt, TELU_DFLT,
442 "Telugu default style",
443 TA_WRITING_SYSTEM_LATIN,
444 TA_SCRIPT_TELU,
445 TA_BLUE_STRINGSET_TELU,
446 TA_COVERAGE_DEFAULT)
448 STYLE(tfng_dflt, TFNG_DFLT,
449 "Tifinagh default style",
450 TA_WRITING_SYSTEM_LATIN,
451 TA_SCRIPT_TFNG,
452 TA_BLUE_STRINGSET_TFNG,
453 TA_COVERAGE_DEFAULT)
455 STYLE(thai_dflt, THAI_DFLT,
456 "Thai default style",
457 TA_WRITING_SYSTEM_LATIN,
458 TA_SCRIPT_THAI,
459 TA_BLUE_STRINGSET_THAI,
460 TA_COVERAGE_DEFAULT)
462 STYLE(vaii_dflt, VAII_DFLT,
463 "Vai default style",
464 TA_WRITING_SYSTEM_LATIN,
465 TA_SCRIPT_VAII,
466 TA_BLUE_STRINGSET_VAII,
467 TA_COVERAGE_DEFAULT)
469 STYLE(yezi_dflt, YEZI_DFLT,
470 "Yezidi default style",
471 TA_WRITING_SYSTEM_LATIN,
472 TA_SCRIPT_YEZI,
473 TA_BLUE_STRINGSET_YEZI,
474 TA_COVERAGE_DEFAULT)
476 STYLE(none_dflt, NONE_DFLT,
477 "no style",
478 TA_WRITING_SYSTEM_LATIN,
479 TA_SCRIPT_NONE,
480 TA_BLUE_STRINGSET_NONE,
481 TA_COVERAGE_DEFAULT)
483 /* end of tastyles.h */