• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /***************************************************************************/
2 /*                                                                         */
3 /*  afstyles.h                                                             */
4 /*                                                                         */
5 /*    Auto-fitter styles (specification only).                             */
6 /*                                                                         */
7 /*  Copyright 2013-2018 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( mymr_dflt, MYMR_DFLT,
326          "Myanmar default style",
327          AF_WRITING_SYSTEM_LATIN,
328          AF_SCRIPT_MYMR,
329          AF_BLUE_STRINGSET_MYMR,
330          AF_COVERAGE_DEFAULT )
331 
332   STYLE( nkoo_dflt, NKOO_DFLT,
333          "N'Ko default style",
334          AF_WRITING_SYSTEM_LATIN,
335          AF_SCRIPT_NKOO,
336          AF_BLUE_STRINGSET_NKOO,
337          AF_COVERAGE_DEFAULT )
338 
339   STYLE( none_dflt, NONE_DFLT,
340          "no style",
341          AF_WRITING_SYSTEM_DUMMY,
342          AF_SCRIPT_NONE,
343          AF_BLUE_STRINGSET_NONE,
344          AF_COVERAGE_DEFAULT )
345 
346   STYLE( olck_dflt, OLCK_DFLT,
347          "Ol Chiki default style",
348          AF_WRITING_SYSTEM_LATIN,
349          AF_SCRIPT_OLCK,
350          AF_BLUE_STRINGSET_OLCK,
351          AF_COVERAGE_DEFAULT )
352 
353   STYLE( orkh_dflt, ORKH_DFLT,
354          "Old Turkic default style",
355          AF_WRITING_SYSTEM_LATIN,
356          AF_SCRIPT_ORKH,
357          AF_BLUE_STRINGSET_ORKH,
358          AF_COVERAGE_DEFAULT )
359 
360   STYLE( osge_dflt, OSGE_DFLT,
361          "Osage default style",
362          AF_WRITING_SYSTEM_LATIN,
363          AF_SCRIPT_OSGE,
364          AF_BLUE_STRINGSET_OSGE,
365          AF_COVERAGE_DEFAULT )
366 
367   STYLE( osma_dflt, OSMA_DFLT,
368          "Osmanya default style",
369          AF_WRITING_SYSTEM_LATIN,
370          AF_SCRIPT_OSMA,
371          AF_BLUE_STRINGSET_OSMA,
372          AF_COVERAGE_DEFAULT )
373 
374   STYLE( saur_dflt, SAUR_DFLT,
375          "Saurashtra default style",
376          AF_WRITING_SYSTEM_LATIN,
377          AF_SCRIPT_SAUR,
378          AF_BLUE_STRINGSET_SAUR,
379          AF_COVERAGE_DEFAULT )
380 
381   STYLE( shaw_dflt, SHAW_DFLT,
382          "Shavian default style",
383          AF_WRITING_SYSTEM_LATIN,
384          AF_SCRIPT_SHAW,
385          AF_BLUE_STRINGSET_SHAW,
386          AF_COVERAGE_DEFAULT )
387 
388   STYLE( sinh_dflt, SINH_DFLT,
389          "Sinhala default style",
390          AF_WRITING_SYSTEM_LATIN,
391          AF_SCRIPT_SINH,
392          AF_BLUE_STRINGSET_SINH,
393          AF_COVERAGE_DEFAULT )
394 
395   STYLE( sund_dflt, SUND_DFLT,
396          "Sundanese default style",
397          AF_WRITING_SYSTEM_LATIN,
398          AF_SCRIPT_SUND,
399          AF_BLUE_STRINGSET_SUND,
400          AF_COVERAGE_DEFAULT )
401 
402   STYLE( taml_dflt, TAML_DFLT,
403          "Tamil default style",
404          AF_WRITING_SYSTEM_LATIN,
405          AF_SCRIPT_TAML,
406          AF_BLUE_STRINGSET_TAML,
407          AF_COVERAGE_DEFAULT )
408 
409   STYLE( tavt_dflt, TAVT_DFLT,
410          "Tai Viet default style",
411          AF_WRITING_SYSTEM_LATIN,
412          AF_SCRIPT_TAVT,
413          AF_BLUE_STRINGSET_TAVT,
414          AF_COVERAGE_DEFAULT )
415 
416   STYLE( telu_dflt, TELU_DFLT,
417          "Telugu default style",
418          AF_WRITING_SYSTEM_LATIN,
419          AF_SCRIPT_TELU,
420          AF_BLUE_STRINGSET_TELU,
421          AF_COVERAGE_DEFAULT )
422 
423   STYLE( tfng_dflt, TFNG_DFLT,
424          "Tifinagh default style",
425          AF_WRITING_SYSTEM_LATIN,
426          AF_SCRIPT_TFNG,
427          AF_BLUE_STRINGSET_TFNG,
428          AF_COVERAGE_DEFAULT )
429 
430   STYLE( thai_dflt, THAI_DFLT,
431          "Thai default style",
432          AF_WRITING_SYSTEM_LATIN,
433          AF_SCRIPT_THAI,
434          AF_BLUE_STRINGSET_THAI,
435          AF_COVERAGE_DEFAULT )
436 
437   STYLE( vaii_dflt, VAII_DFLT,
438          "Vai default style",
439          AF_WRITING_SYSTEM_LATIN,
440          AF_SCRIPT_VAII,
441          AF_BLUE_STRINGSET_VAII,
442          AF_COVERAGE_DEFAULT )
443 
444 #ifdef AF_CONFIG_OPTION_INDIC
445 
446   /* no blue stringset support for the Indic writing system yet */
447 #undef  STYLE_DEFAULT_INDIC
448 #define STYLE_DEFAULT_INDIC( s, S, d )    \
449           STYLE( s ## _dflt, S ## _DFLT,  \
450                  d " default style",      \
451                  AF_WRITING_SYSTEM_INDIC, \
452                  AF_SCRIPT_ ## S,         \
453                  (AF_Blue_Stringset)0,    \
454                  AF_COVERAGE_DEFAULT )
455 
456   STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" )
457   STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" )
458   STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" )
459   STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" )
460 
461 #endif /* AF_CONFIG_OPTION_INDIC */
462 
463 #ifdef AF_CONFIG_OPTION_CJK
464 
465   STYLE( hani_dflt, HANI_DFLT,
466          "CJKV ideographs default style",
467          AF_WRITING_SYSTEM_CJK,
468          AF_SCRIPT_HANI,
469          AF_BLUE_STRINGSET_HANI,
470          AF_COVERAGE_DEFAULT )
471 
472 #endif /* AF_CONFIG_OPTION_CJK */
473 
474 
475 /* END */
476