Use `Control_Type' to handle different segment directions.
[ttfautohint.git] / lib / tastyles.h
blob42ce9e2a71f9b95c3ae83410a17e0df6bd4b39aa
1 /* tastyles.h */
3 /*
4 * Copyright (C) 2014 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)
87 META_STYLE_LATIN(cyrl, CYRL, "Cyrillic")
89 STYLE(deva_dflt, DEVA_DFLT,
90 "Devanagari default style",
91 TA_WRITING_SYSTEM_LATIN,
92 TA_SCRIPT_DEVA,
93 TA_BLUE_STRINGSET_DEVA,
94 TA_COVERAGE_DEFAULT)
96 META_STYLE_LATIN(grek, GREK, "Greek")
98 STYLE(hebr_dflt, HEBR_DFLT,
99 "Hebrew default style",
100 TA_WRITING_SYSTEM_LATIN,
101 TA_SCRIPT_HEBR,
102 TA_BLUE_STRINGSET_HEBR,
103 TA_COVERAGE_DEFAULT)
105 META_STYLE_LATIN(latn, LATN, "Latin")
107 #ifdef FT_OPTION_AUTOFIT2
108 STYLE(ltn2_dflt, LTN2_DFLT,
109 "Latin 2 default style",
110 TA_WRITING_SYSTEM_LATIN2,
111 TA_SCRIPT_LATN,
112 TA_BLUE_STRINGSET_LATN,
113 TA_COVERAGE_DEFAULT)
114 #endif
116 STYLE(none_dflt, NONE_DFLT,
117 "no style",
118 TA_WRITING_SYSTEM_DUMMY,
119 TA_SCRIPT_NONE,
120 (TA_Blue_Stringset)0,
121 TA_COVERAGE_DEFAULT)
123 /* end of tastyles.h */