31e9862783b200359d6e4345b72fbc5ebb14b967
[ttfautohint.git] / lib / tastyles.h
blob31e9862783b200359d6e4345b72fbc5ebb14b967
1 /* tastyles.h */
3 /*
4 * Copyright (C) 2014-2015 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.
35 * Example:
37 * STYLE(cyrl_dflt, CYRL_DFLT,
38 * "Cyrillic default style",
39 * TA_WRITING_SYSTEM_LATIN,
40 * TA_SCRIPT_CYRL,
41 * TA_BLUE_STRINGSET_CYRL,
42 * TA_COVERAGE_DEFAULT)
45 #undef STYLE_LATIN
46 #define STYLE_LATIN(s, S, f, F, ds, df, C) \
47 STYLE(s ## _ ## f, S ## _ ## F, \
48 ds " " df " style", \
49 TA_WRITING_SYSTEM_LATIN, \
50 TA_SCRIPT_ ## S, \
51 TA_BLUE_STRINGSET_ ## S, \
52 TA_COVERAGE_ ## C)
54 #undef META_STYLE_LATIN
55 #define META_STYLE_LATIN(s, S, ds) \
56 STYLE_LATIN(s, S, c2cp, C2CP, ds, \
57 "petite capticals from capitals", \
58 PETITE_CAPITALS_FROM_CAPITALS) \
59 STYLE_LATIN(s, S, c2sc, C2SC, ds, \
60 "small capticals from capitals", \
61 SMALL_CAPITALS_FROM_CAPITALS) \
62 STYLE_LATIN(s, S, ordn, ORDN, ds, \
63 "ordinals", \
64 ORDINALS) \
65 STYLE_LATIN(s, S, pcap, PCAP, ds, \
66 "petite capitals", \
67 PETITE_CAPITALS) \
68 STYLE_LATIN(s, S, sinf, SINF, ds, \
69 "scientific inferiors", \
70 SCIENTIFIC_INFERIORS) \
71 STYLE_LATIN(s, S, smcp, SMCP, ds, \
72 "small capitals", \
73 SMALL_CAPITALS) \
74 STYLE_LATIN(s, S, subs, SUBS, ds, \
75 "subscript", \
76 SUBSCRIPT) \
77 STYLE_LATIN(s, S, sups, SUPS, ds, \
78 "superscript", \
79 SUPERSCRIPT) \
80 STYLE_LATIN(s, S, titl, TITL, ds, \
81 "titling", \
82 TITLING) \
83 STYLE_LATIN(s, S, dflt, DFLT, ds, \
84 "default", \
85 DEFAULT)
88 STYLE(arab_dflt, ARAB_DFLT,
89 "Arabic default style",
90 TA_WRITING_SYSTEM_LATIN,
91 TA_SCRIPT_ARAB,
92 TA_BLUE_STRINGSET_ARAB,
93 TA_COVERAGE_DEFAULT)
95 META_STYLE_LATIN(cyrl, CYRL, "Cyrillic")
97 STYLE(deva_dflt, DEVA_DFLT,
98 "Devanagari default style",
99 TA_WRITING_SYSTEM_LATIN,
100 TA_SCRIPT_DEVA,
101 TA_BLUE_STRINGSET_DEVA,
102 TA_COVERAGE_DEFAULT)
104 META_STYLE_LATIN(grek, GREK, "Greek")
106 STYLE(hebr_dflt, HEBR_DFLT,
107 "Hebrew default style",
108 TA_WRITING_SYSTEM_LATIN,
109 TA_SCRIPT_HEBR,
110 TA_BLUE_STRINGSET_HEBR,
111 TA_COVERAGE_DEFAULT)
113 META_STYLE_LATIN(latn, LATN, "Latin")
115 #ifdef FT_OPTION_AUTOFIT2
116 STYLE(ltn2_dflt, LTN2_DFLT,
117 "Latin 2 default style",
118 TA_WRITING_SYSTEM_LATIN2,
119 TA_SCRIPT_LATN,
120 TA_BLUE_STRINGSET_LATN,
121 TA_COVERAGE_DEFAULT)
122 #endif
124 STYLE(telu_dflt, TELU_DFLT,
125 "Telugu default style",
126 TA_WRITING_SYSTEM_LATIN,
127 TA_SCRIPT_TELU,
128 TA_BLUE_STRINGSET_TELU,
129 TA_COVERAGE_DEFAULT)
131 STYLE(thai_dflt, THAI_DFLT,
132 "Thai default style",
133 TA_WRITING_SYSTEM_LATIN,
134 TA_SCRIPT_THAI,
135 TA_BLUE_STRINGSET_THAI,
136 TA_COVERAGE_DEFAULT)
138 STYLE(none_dflt, NONE_DFLT,
139 "no style",
140 TA_WRITING_SYSTEM_DUMMY,
141 TA_SCRIPT_NONE,
142 (TA_Blue_Stringset)0,
143 TA_COVERAGE_DEFAULT)
145 /* end of tastyles.h */