• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# OpenType Feature File specification, section 4.h, example 1.
2# http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html
3
4languagesystem DFLT dflt;
5languagesystem latn dflt;
6languagesystem latn DEU;
7languagesystem latn TRK;
8languagesystem cyrl dflt;
9
10feature smcp {
11    sub [a - z] by [A.sc - Z.sc];
12
13    # Since all the rules in this feature are of the same type, they
14    # will be grouped in a single lookup.  Since no script or language
15    # keyword has been specified yet, the lookup will be registered
16    # for this feature under all the language systems.
17} smcp;
18
19feature liga {
20    sub f f by f_f;
21    sub f i by f_i;
22    sub f l by f_l;
23
24    # Since all the rules in this feature are of the same type, they
25    # will be grouped in a single lookup.  Since no script or language
26    # keyword has been specified yet, the lookup will be registered
27    # for this feature under all the language systems.
28
29    script latn;
30    language dflt;
31    # lookupflag 0;      (implicit)
32    sub c t by c_t;
33    sub c s by c_s;
34
35    # The rules above will be placed in a lookup that is registered
36    # for all the specified languages for the script latn, but not any
37    # other scripts.
38
39    language DEU;
40    # script latn;       (stays the same)
41    # lookupflag 0;      (stays the same)
42    sub c h by c_h;
43    sub c k by c_k;
44
45    # The rules above will be placed in a lookup that is registered
46    # only under the script latn, language DEU.
47
48    language TRK;
49
50    # This will inherit both the top level default rules - the rules
51    # defined before the first 'script' statement, and the
52    # script-level default rules for 'latn': all the lookups of this
53    # feature defined after the 'script latn' statement, and before
54    # the language DEU statement.  If TRK were not named here, it
55    # would not inherit the default rules for the script latn.
56} liga;
57
58# TODO(sascha): Uncomment once we support 'pos' statements.
59# feature kern {
60#     pos a y -150;
61#     # [more pos statements]
62#     # All the rules in this feature will be grouped in a single lookup
63#     # that is is registered under all the language systems.
64# } kern;
65