• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# OpenType Feature File specification, section 5.f.ii, example 4
2# "Specifying exceptions to the Chain Sub rule"
3# http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html
4
5@LETTER = [A - Z a - z];
6
7feature cswh {
8
9    # --- Glyph classes used in this feature:
10    @BEGINNINGS = [A - N P - Z T_h m];
11    @BEGINNINGS_SWASH = [A.swash - N.swash P.swash - Z.swash T_h.swash m.begin];
12    @ENDINGS = [a e z];
13    @ENDINGS_SWASH = [a.end e.end z.end];
14
15    # --- Beginning-of-word swashes:
16    ignore sub @LETTER @BEGINNINGS';
17    sub @BEGINNINGS' by @BEGINNINGS_SWASH;
18
19    # --- End-of-word swashes:
20    ignore sub @ENDINGS' @LETTER;
21    sub @ENDINGS' by @ENDINGS_SWASH;
22
23} cswh;
24