-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCampaniaGSUB.fea
132 lines (114 loc) · 5.1 KB
/
CampaniaGSUB.fea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Campania
# GSUB definitions
# symbol lookups
lookup liga_symbols {
sub b' b' @roots by doubleflat;
sub b' b' @intervals by doubleflat;
sub @roots b' b' by doubleflatsuperior;
sub @roots @quality b' b' by doubleflatsuperior;
sub @intervalssuperior b' b' by doubleflatsuperior;
sub @intervalssubscript b' b' by doubleflatsuperior;
sub numbersign' numbersign' by doublesharp;
sub x' @roots by doublesharp;
} liga_symbols;
lookup liga_inversions {
sub [ @roots @quality ] seven' five' three' by sevenfivethree;
sub [ @roots @quality ] six' five' three' by sixfivethree;
sub [ @roots @quality ] six' four' three' by sixfourthree;
sub [ @roots @quality ] six' four' two' by sixfourtwo;
} liga_inversions;
lookup escapesequence {
sub backslash' [ backslash @accidentalsraw @intervals equal hyphen o zero asciicircum plus ] by zwsp;
} escapesequence;
lookup leading {
ignore sub zwsp [ @accidentalsraw ]';
sub @accidentalsraw' @roots by @accidentals;
sub slash @accidentalsraw' by @accidentals;
# ignore sub @interior @accidentalsraw';
sub @accidentalsraw' @intervals by @accidentalssuperior;
} leading;
lookup trailing {
ignore sub zwsp [ o zero asciicircum plus ]';
sub @roots o' by diminished;
sub @roots zero' by halfdiminished;
sub @roots asciicircum' by majortriangle;
sub @roots plus' by augmented;
sub [ @quality hyphen ] plus' by plussuperior;
sub [ @quality hyphen ] asciicircum' by trianglesuperior;
} trailing;
# interval and inversion lookups
lookup intervals_1 {
ignore sub zwsp [ @intervals ]';
sub @roots @intervals' by @intervalssuperior; # superscript interval after root
sub @roots @quality @intervals' by @intervalssuperior; # superscript interval after quality
sub @accidentalssuperior @intervals' by @intervalssuperior;
sub [ hyphen equal ] @intervals' by @intervalssuperior;
ignore sub @interior @intervals';
sub @intervals' by @intervalssuperior; # catch-all for leading intervals
} intervals_1;
lookup intervals_2 {
ignore sub zwsp [ @intervals ]';
ignore sub onesuperior onesuperior @intervals'; # do not allow three-digit numbers
sub onesuperior @intervals' by @intervalssuperior; # allow two digit numbers
} intervals_2;
lookup inversion_3 {
ignore sub zwsp [ @intervals ]';
# use @intervalssupersuper rather than GPOS
# sub @intervalssuperior @intervals' @intervals by @intervalssuperior; # set up stack of three intervals (superscript, superscript, subscript)
sub @intervalssuperior' @intervals @intervals by @intervalssupersuper;
sub @intervalssupersuper @intervals' @intervals by @intervalssuperior;
} inversion_3;
lookup inversion_2 {
ignore sub zwsp [ @intervals ]';
sub @intervalssuperior @intervals' by @intervalssubscript; # set up stack of two intervals (superscript, subscript)
sub [ hyphen equal ] @intervals' by @intervalssuperior; # superscript after hyphen
} inversion_2;
# alteration lookups
lookup alterations {
ignore sub zwsp [ @accidentalsraw @intervals ]';
sub @intervalssuperior @accidentalsraw' by @accidentalssuperior;
sub @intervalssubscript @accidentalsraw' by @accidentalssuperior;
sub @accidentalssuperior @intervals' by @intervalssuperior;
sub @roots @accidentalsraw' by @accidentalssuperior;
sub @roots @quality @accidentalsraw' by @accidentalssuperior;
sub [ hyphen equal ] @accidentalsraw' by @accidentalssuperior;
} alterations;
lookup resolutions {
ignore sub zwsp [ hyphen equal @intervals ]';
sub hyphensuperior underscore' by hyphensubscript;
sub equal' underscore by hyphensupersuper hyphensuperior;
sub @intervalssuperior hyphen' by hyphensuperior;
sub @intervalssupersuper @intervalssuperior @intervalssubscript hyphen' by hyphensupersuper hyphensuperior hyphensubscript;
sub @intervalsliga hyphen' by hyphensupersuper hyphensuperior hyphensubscript;
sub @intervalssubscript hyphen' by hyphensuperior hyphensubscript;
sub @intervalssubscript equal' by hyphensuperior hyphensubscript;
sub hyphensuperior @intervals' by @intervalssuperior;
sub hyphensubscript @intervals' by @intervalssuperior;
sub hyphensuperior hyphen' by hyphensuperior;
sub hyphensupersuper hyphensuperior hyphensubscript hyphen' by hyphensupersuper hyphensuperior hyphensubscript;
sub hyphensubscript hyphen' by hyphensuperior hyphensubscript;
sub hyphensubscript equal' by hyphensuperior hyphensubscript;
ignore sub @interior hyphen';
ignore sub @interior equal';
sub hyphen' by hyphensuperior; # catch-all for leading hyphens
sub equal' by hyphensuperior hyphensubscript;
} resolutions;
#lookup inversion_1 {
# sub @accidentalsraw' @intervals by @accidentals;
#} inversion_1;
feature liga {
lookup liga_symbols;
lookup liga_inversions;
} liga;
feature calt {
lookup escapesequence;
lookup leading;
lookup trailing;
lookup intervals_1;
lookup intervals_2;
lookup inversion_3;
lookup inversion_2;
lookup alterations;
lookup resolutions;
# lookup inversion_1;
} calt;