• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  *
3  * afstyles.h
4  *
5  *   Auto-fitter styles (specification only).
6  *
7  * Copyright (C) 2013-2020 by
8  * David Turner, Robert Wilhelm, and Werner Lemberg.
9  *
10  * This file is part of the FreeType project, and may only be used,
11  * modified, and distributed under the terms of the FreeType project
12  * license, LICENSE.TXT.  By continuing to use, modify, or distribute
13  * this file you indicate that you have read the license and
14  * understand and accept it fully.
15  *
16  */
17 
18 
19   /* The following part can be included multiple times. */
20   /* Define `STYLE' as needed.                          */
21 
22 
23   /* Add new styles here.  The first and second arguments are the  */
24   /* style name in lowercase and uppercase, respectively, followed */
25   /* by a description string.  The next arguments are the          */
26   /* corresponding writing system, script, blue stringset, and     */
27   /* coverage.                                                     */
28   /*                                                               */
29   /* Note that styles using `AF_COVERAGE_DEFAULT' should always    */
30   /* come after styles with other coverages.  Also note that       */
31   /* fallback scripts only use `AF_COVERAGE_DEFAULT' for its       */
32   /* style.                                                        */
33   /*                                                               */
34   /* Example:                                                      */
35   /*                                                               */
36   /*   STYLE( cyrl_dflt, CYRL_DFLT,                                */
37   /*          "Cyrillic default style",                            */
38   /*          AF_WRITING_SYSTEM_LATIN,                             */
39   /*          AF_SCRIPT_CYRL,                                      */
40   /*          AF_BLUE_STRINGSET_CYRL,                              */
41   /*          AF_COVERAGE_DEFAULT )                                */
42 
43 #undef  STYLE_LATIN
44 #define STYLE_LATIN( s, S, f, F, ds, df, C ) \
45           STYLE( s ## _ ## f, S ## _ ## F,   \
46                  ds " " df " style",         \
47                  AF_WRITING_SYSTEM_LATIN,    \
48                  AF_SCRIPT_ ## S,            \
49                  AF_BLUE_STRINGSET_ ## S,    \
50                  AF_COVERAGE_ ## C )
51 
52 #undef  META_STYLE_LATIN
53 #define META_STYLE_LATIN( s, S, ds )                     \
54           STYLE_LATIN( s, S, c2cp, C2CP, ds,             \
55                        "petite capitals from capitals", \
56                        PETITE_CAPITALS_FROM_CAPITALS )   \
57           STYLE_LATIN( s, S, c2sc, C2SC, ds,             \
58                        "small capitals from capitals",  \
59                        SMALL_CAPITALS_FROM_CAPITALS )    \
60           STYLE_LATIN( s, S, ordn, ORDN, ds,             \
61                        "ordinals",                       \
62                        ORDINALS )                        \
63           STYLE_LATIN( s, S, pcap, PCAP, ds,             \
64                        "petite capitals",                \
65                        PETITE_CAPITALS )                 \
66           STYLE_LATIN( s, S, sinf, SINF, ds,             \
67                        "scientific inferiors",           \
68                        SCIENTIFIC_INFERIORS )            \
69           STYLE_LATIN( s, S, smcp, SMCP, ds,             \
70                        "small capitals",                 \
71                        SMALL_CAPITALS )                  \
72           STYLE_LATIN( s, S, subs, SUBS, ds,             \
73                        "subscript",                      \
74                        SUBSCRIPT )                       \
75           STYLE_LATIN( s, S, sups, SUPS, ds,             \
76                        "superscript",                    \
77                        SUPERSCRIPT )                     \
78           STYLE_LATIN( s, S, titl, TITL, ds,             \
79                        "titling",                        \
80                        TITLING )                         \
81           STYLE_LATIN( s, S, dflt, DFLT, ds,             \
82                        "default",                        \
83                        DEFAULT )
84 
85 
86   STYLE( adlm_dflt, ADLM_DFLT,
87          "Adlam default style",
88          AF_WRITING_SYSTEM_LATIN,
89          AF_SCRIPT_ADLM,
90          AF_BLUE_STRINGSET_ADLM,
91          AF_COVERAGE_DEFAULT )
92 
93   STYLE( arab_dflt, ARAB_DFLT,
94          "Arabic default style",
95          AF_WRITING_SYSTEM_LATIN,
96          AF_SCRIPT_ARAB,
97          AF_BLUE_STRINGSET_ARAB,
98          AF_COVERAGE_DEFAULT )
99 
100   STYLE( armn_dflt, ARMN_DFLT,
101          "Armenian default style",
102          AF_WRITING_SYSTEM_LATIN,
103          AF_SCRIPT_ARMN,
104          AF_BLUE_STRINGSET_ARMN,
105          AF_COVERAGE_DEFAULT )
106 
107   STYLE( avst_dflt, AVST_DFLT,
108          "Avestan default style",
109          AF_WRITING_SYSTEM_LATIN,
110          AF_SCRIPT_AVST,
111          AF_BLUE_STRINGSET_AVST,
112          AF_COVERAGE_DEFAULT )
113 
114   STYLE( bamu_dflt, BAMU_DFLT,
115          "Bamum default style",
116          AF_WRITING_SYSTEM_LATIN,
117          AF_SCRIPT_BAMU,
118          AF_BLUE_STRINGSET_BAMU,
119          AF_COVERAGE_DEFAULT )
120 
121   STYLE( beng_dflt, BENG_DFLT,
122          "Bengali default style",
123          AF_WRITING_SYSTEM_LATIN,
124          AF_SCRIPT_BENG,
125          AF_BLUE_STRINGSET_BENG,
126          AF_COVERAGE_DEFAULT )
127 
128   STYLE( buhd_dflt, BUHD_DFLT,
129          "Buhid default style",
130          AF_WRITING_SYSTEM_LATIN,
131          AF_SCRIPT_BUHD,
132          AF_BLUE_STRINGSET_BUHD,
133          AF_COVERAGE_DEFAULT )
134 
135   STYLE( cakm_dflt, CAKM_DFLT,
136          "Chakma default style",
137          AF_WRITING_SYSTEM_LATIN,
138          AF_SCRIPT_CAKM,
139          AF_BLUE_STRINGSET_CAKM,
140          AF_COVERAGE_DEFAULT )
141 
142   STYLE( cans_dflt, CANS_DFLT,
143          "Canadian Syllabics default style",
144          AF_WRITING_SYSTEM_LATIN,
145          AF_SCRIPT_CANS,
146          AF_BLUE_STRINGSET_CANS,
147          AF_COVERAGE_DEFAULT )
148 
149   STYLE( cari_dflt, CARI_DFLT,
150          "Carian default style",
151          AF_WRITING_SYSTEM_LATIN,
152          AF_SCRIPT_CARI,
153          AF_BLUE_STRINGSET_CARI,
154          AF_COVERAGE_DEFAULT )
155 
156   STYLE( cher_dflt, CHER_DFLT,
157          "Cherokee default style",
158          AF_WRITING_SYSTEM_LATIN,
159          AF_SCRIPT_CHER,
160          AF_BLUE_STRINGSET_CHER,
161          AF_COVERAGE_DEFAULT )
162 
163   STYLE( copt_dflt, COPT_DFLT,
164          "Coptic default style",
165          AF_WRITING_SYSTEM_LATIN,
166          AF_SCRIPT_COPT,
167          AF_BLUE_STRINGSET_COPT,
168          AF_COVERAGE_DEFAULT )
169 
170   STYLE( cprt_dflt, CPRT_DFLT,
171          "Cypriot default style",
172          AF_WRITING_SYSTEM_LATIN,
173          AF_SCRIPT_CPRT,
174          AF_BLUE_STRINGSET_CPRT,
175          AF_COVERAGE_DEFAULT )
176 
177   META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" )
178 
179   STYLE( deva_dflt, DEVA_DFLT,
180          "Devanagari default style",
181          AF_WRITING_SYSTEM_LATIN,
182          AF_SCRIPT_DEVA,
183          AF_BLUE_STRINGSET_DEVA,
184          AF_COVERAGE_DEFAULT )
185 
186   STYLE( dsrt_dflt, DSRT_DFLT,
187          "Deseret default style",
188          AF_WRITING_SYSTEM_LATIN,
189          AF_SCRIPT_DSRT,
190          AF_BLUE_STRINGSET_DSRT,
191          AF_COVERAGE_DEFAULT )
192 
193   STYLE( ethi_dflt, ETHI_DFLT,
194          "Ethiopic default style",
195          AF_WRITING_SYSTEM_LATIN,
196          AF_SCRIPT_ETHI,
197          AF_BLUE_STRINGSET_ETHI,
198          AF_COVERAGE_DEFAULT )
199 
200   STYLE( geor_dflt, GEOR_DFLT,
201          "Georgian (Mkhedruli) default style",
202          AF_WRITING_SYSTEM_LATIN,
203          AF_SCRIPT_GEOR,
204          AF_BLUE_STRINGSET_GEOR,
205          AF_COVERAGE_DEFAULT )
206 
207   STYLE( geok_dflt, GEOK_DFLT,
208          "Georgian (Khutsuri) default style",
209          AF_WRITING_SYSTEM_LATIN,
210          AF_SCRIPT_GEOK,
211          AF_BLUE_STRINGSET_GEOK,
212          AF_COVERAGE_DEFAULT )
213 
214   STYLE( glag_dflt, GLAG_DFLT,
215          "Glagolitic default style",
216          AF_WRITING_SYSTEM_LATIN,
217          AF_SCRIPT_GLAG,
218          AF_BLUE_STRINGSET_GLAG,
219          AF_COVERAGE_DEFAULT )
220 
221   STYLE( goth_dflt, GOTH_DFLT,
222          "Gothic default style",
223          AF_WRITING_SYSTEM_LATIN,
224          AF_SCRIPT_GOTH,
225          AF_BLUE_STRINGSET_GOTH,
226          AF_COVERAGE_DEFAULT )
227 
228   META_STYLE_LATIN( grek, GREK, "Greek" )
229 
230   STYLE( gujr_dflt, GUJR_DFLT,
231          "Gujarati default style",
232          AF_WRITING_SYSTEM_LATIN,
233          AF_SCRIPT_GUJR,
234          AF_BLUE_STRINGSET_GUJR,
235          AF_COVERAGE_DEFAULT )
236 
237   STYLE( guru_dflt, GURU_DFLT,
238          "Gurmukhi default style",
239          AF_WRITING_SYSTEM_LATIN,
240          AF_SCRIPT_GURU,
241          AF_BLUE_STRINGSET_GURU,
242          AF_COVERAGE_DEFAULT )
243 
244   STYLE( hebr_dflt, HEBR_DFLT,
245          "Hebrew default style",
246          AF_WRITING_SYSTEM_LATIN,
247          AF_SCRIPT_HEBR,
248          AF_BLUE_STRINGSET_HEBR,
249          AF_COVERAGE_DEFAULT )
250 
251   STYLE( kali_dflt, KALI_DFLT,
252          "Kayah Li default style",
253          AF_WRITING_SYSTEM_LATIN,
254          AF_SCRIPT_KALI,
255          AF_BLUE_STRINGSET_KALI,
256          AF_COVERAGE_DEFAULT )
257 
258   STYLE( khmr_dflt, KHMR_DFLT,
259          "Khmer default style",
260          AF_WRITING_SYSTEM_LATIN,
261          AF_SCRIPT_KHMR,
262          AF_BLUE_STRINGSET_KHMR,
263          AF_COVERAGE_DEFAULT )
264 
265   STYLE( khms_dflt, KHMS_DFLT,
266          "Khmer Symbols default style",
267          AF_WRITING_SYSTEM_LATIN,
268          AF_SCRIPT_KHMS,
269          AF_BLUE_STRINGSET_KHMS,
270          AF_COVERAGE_DEFAULT )
271 
272   STYLE( knda_dflt, KNDA_DFLT,
273          "Kannada default style",
274          AF_WRITING_SYSTEM_LATIN,
275          AF_SCRIPT_KNDA,
276          AF_BLUE_STRINGSET_KNDA,
277          AF_COVERAGE_DEFAULT )
278 
279   STYLE( lao_dflt, LAO_DFLT,
280          "Lao default style",
281          AF_WRITING_SYSTEM_LATIN,
282          AF_SCRIPT_LAO,
283          AF_BLUE_STRINGSET_LAO,
284          AF_COVERAGE_DEFAULT )
285 
286   META_STYLE_LATIN( latn, LATN, "Latin" )
287 
288   STYLE( latb_dflt, LATB_DFLT,
289          "Latin subscript fallback default style",
290          AF_WRITING_SYSTEM_LATIN,
291          AF_SCRIPT_LATB,
292          AF_BLUE_STRINGSET_LATB,
293          AF_COVERAGE_DEFAULT )
294 
295   STYLE( latp_dflt, LATP_DFLT,
296          "Latin superscript fallback default style",
297          AF_WRITING_SYSTEM_LATIN,
298          AF_SCRIPT_LATP,
299          AF_BLUE_STRINGSET_LATP,
300          AF_COVERAGE_DEFAULT )
301 
302 #ifdef FT_OPTION_AUTOFIT2
303   STYLE( ltn2_dflt, LTN2_DFLT,
304          "Latin 2 default style",
305          AF_WRITING_SYSTEM_LATIN2,
306          AF_SCRIPT_LATN,
307          AF_BLUE_STRINGSET_LATN,
308          AF_COVERAGE_DEFAULT )
309 #endif
310 
311   STYLE( lisu_dflt, LISU_DFLT,
312          "Lisu default style",
313          AF_WRITING_SYSTEM_LATIN,
314          AF_SCRIPT_LISU,
315          AF_BLUE_STRINGSET_LISU,
316          AF_COVERAGE_DEFAULT )
317 
318   STYLE( mlym_dflt, MLYM_DFLT,
319          "Malayalam default style",
320          AF_WRITING_SYSTEM_LATIN,
321          AF_SCRIPT_MLYM,
322          AF_BLUE_STRINGSET_MLYM,
323          AF_COVERAGE_DEFAULT )
324 
325   STYLE( medf_dflt, MEDF_DFLT,
326          "Medefaidrin default style",
327          AF_WRITING_SYSTEM_LATIN,
328          AF_SCRIPT_MEDF,
329          AF_BLUE_STRINGSET_MEDF,
330          AF_COVERAGE_DEFAULT )
331 
332   STYLE( mong_dflt, MONG_DFLT,
333          "Mongolian default style",
334          AF_WRITING_SYSTEM_LATIN,
335          AF_SCRIPT_MONG,
336          AF_BLUE_STRINGSET_MONG,
337          AF_COVERAGE_DEFAULT )
338 
339   STYLE( mymr_dflt, MYMR_DFLT,
340          "Myanmar default style",
341          AF_WRITING_SYSTEM_LATIN,
342          AF_SCRIPT_MYMR,
343          AF_BLUE_STRINGSET_MYMR,
344          AF_COVERAGE_DEFAULT )
345 
346   STYLE( nkoo_dflt, NKOO_DFLT,
347          "N'Ko default style",
348          AF_WRITING_SYSTEM_LATIN,
349          AF_SCRIPT_NKOO,
350          AF_BLUE_STRINGSET_NKOO,
351          AF_COVERAGE_DEFAULT )
352 
353   STYLE( none_dflt, NONE_DFLT,
354          "no style",
355          AF_WRITING_SYSTEM_DUMMY,
356          AF_SCRIPT_NONE,
357          AF_BLUE_STRINGSET_NONE,
358          AF_COVERAGE_DEFAULT )
359 
360   STYLE( olck_dflt, OLCK_DFLT,
361          "Ol Chiki default style",
362          AF_WRITING_SYSTEM_LATIN,
363          AF_SCRIPT_OLCK,
364          AF_BLUE_STRINGSET_OLCK,
365          AF_COVERAGE_DEFAULT )
366 
367   STYLE( orkh_dflt, ORKH_DFLT,
368          "Old Turkic default style",
369          AF_WRITING_SYSTEM_LATIN,
370          AF_SCRIPT_ORKH,
371          AF_BLUE_STRINGSET_ORKH,
372          AF_COVERAGE_DEFAULT )
373 
374   STYLE( osge_dflt, OSGE_DFLT,
375          "Osage default style",
376          AF_WRITING_SYSTEM_LATIN,
377          AF_SCRIPT_OSGE,
378          AF_BLUE_STRINGSET_OSGE,
379          AF_COVERAGE_DEFAULT )
380 
381   STYLE( osma_dflt, OSMA_DFLT,
382          "Osmanya default style",
383          AF_WRITING_SYSTEM_LATIN,
384          AF_SCRIPT_OSMA,
385          AF_BLUE_STRINGSET_OSMA,
386          AF_COVERAGE_DEFAULT )
387 
388   STYLE( rohg_dflt, ROHG_DFLT,
389          "Hanifi Rohingya default style",
390          AF_WRITING_SYSTEM_LATIN,
391          AF_SCRIPT_ROHG,
392          AF_BLUE_STRINGSET_ROHG,
393          AF_COVERAGE_DEFAULT )
394 
395   STYLE( saur_dflt, SAUR_DFLT,
396          "Saurashtra default style",
397          AF_WRITING_SYSTEM_LATIN,
398          AF_SCRIPT_SAUR,
399          AF_BLUE_STRINGSET_SAUR,
400          AF_COVERAGE_DEFAULT )
401 
402   STYLE( shaw_dflt, SHAW_DFLT,
403          "Shavian default style",
404          AF_WRITING_SYSTEM_LATIN,
405          AF_SCRIPT_SHAW,
406          AF_BLUE_STRINGSET_SHAW,
407          AF_COVERAGE_DEFAULT )
408 
409   STYLE( sinh_dflt, SINH_DFLT,
410          "Sinhala default style",
411          AF_WRITING_SYSTEM_LATIN,
412          AF_SCRIPT_SINH,
413          AF_BLUE_STRINGSET_SINH,
414          AF_COVERAGE_DEFAULT )
415 
416   STYLE( sund_dflt, SUND_DFLT,
417          "Sundanese default style",
418          AF_WRITING_SYSTEM_LATIN,
419          AF_SCRIPT_SUND,
420          AF_BLUE_STRINGSET_SUND,
421          AF_COVERAGE_DEFAULT )
422 
423   STYLE( taml_dflt, TAML_DFLT,
424          "Tamil default style",
425          AF_WRITING_SYSTEM_LATIN,
426          AF_SCRIPT_TAML,
427          AF_BLUE_STRINGSET_TAML,
428          AF_COVERAGE_DEFAULT )
429 
430   STYLE( tavt_dflt, TAVT_DFLT,
431          "Tai Viet default style",
432          AF_WRITING_SYSTEM_LATIN,
433          AF_SCRIPT_TAVT,
434          AF_BLUE_STRINGSET_TAVT,
435          AF_COVERAGE_DEFAULT )
436 
437   STYLE( telu_dflt, TELU_DFLT,
438          "Telugu default style",
439          AF_WRITING_SYSTEM_LATIN,
440          AF_SCRIPT_TELU,
441          AF_BLUE_STRINGSET_TELU,
442          AF_COVERAGE_DEFAULT )
443 
444   STYLE( tfng_dflt, TFNG_DFLT,
445          "Tifinagh default style",
446          AF_WRITING_SYSTEM_LATIN,
447          AF_SCRIPT_TFNG,
448          AF_BLUE_STRINGSET_TFNG,
449          AF_COVERAGE_DEFAULT )
450 
451   STYLE( thai_dflt, THAI_DFLT,
452          "Thai default style",
453          AF_WRITING_SYSTEM_LATIN,
454          AF_SCRIPT_THAI,
455          AF_BLUE_STRINGSET_THAI,
456          AF_COVERAGE_DEFAULT )
457 
458   STYLE( vaii_dflt, VAII_DFLT,
459          "Vai default style",
460          AF_WRITING_SYSTEM_LATIN,
461          AF_SCRIPT_VAII,
462          AF_BLUE_STRINGSET_VAII,
463          AF_COVERAGE_DEFAULT )
464 
465 #ifdef AF_CONFIG_OPTION_INDIC
466 
467   /* no blue stringset support for the Indic writing system yet */
468 #undef  STYLE_DEFAULT_INDIC
469 #define STYLE_DEFAULT_INDIC( s, S, d )    \
470           STYLE( s ## _dflt, S ## _DFLT,  \
471                  d " default style",      \
472                  AF_WRITING_SYSTEM_INDIC, \
473                  AF_SCRIPT_ ## S,         \
474                  (AF_Blue_Stringset)0,    \
475                  AF_COVERAGE_DEFAULT )
476 
477   STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" )
478   STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" )
479   STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" )
480   STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" )
481 
482 #endif /* AF_CONFIG_OPTION_INDIC */
483 
484 #ifdef AF_CONFIG_OPTION_CJK
485 
486   STYLE( hani_dflt, HANI_DFLT,
487          "CJKV ideographs default style",
488          AF_WRITING_SYSTEM_CJK,
489          AF_SCRIPT_HANI,
490          AF_BLUE_STRINGSET_HANI,
491          AF_COVERAGE_DEFAULT )
492 
493 #endif /* AF_CONFIG_OPTION_CJK */
494 
495 
496 /* END */
497