-
Notifications
You must be signed in to change notification settings - Fork 1
/
數.fea
90 lines (81 loc) · 3.01 KB
/
數.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
languagesystem latn dflt; # Latin default
languagesystem grek dflt; # Greek default
languagesystem hani dflt; # CJK Ideographic default
#
# Global glyph class definitions
#
@SM_V = [snum1 snum2 snum3];
@SM_H = [snum1h snum2h snum3h];
@SM_678 = [snum6 snum7 snum8];
@SM_ALL = [num0 snum1 snum2 snum3 snum4 snum5 snum6 snum7 snum8 snum9];
@CR_V_ALL = [crv0 crv1 crv2 crv3 crv4 crv5 crv6 crv7 crv8 crv9];
@CR_H_ALL = [crh0 crh1 crh2 crh3 crh4 crh5 crh6 crh7 crh8 crh9];
@CR_V_ALH = [crv0 crv1 crv2 crv3 crv4 crv5.hist crv6 crv7 crv8 crv9];
@CR_H_ALH = [crh0 crh1 crh2 crh3 crh4 crh5.hist crh6 crh7 crh8 crh9];
@CR_V_ALLL = [crv0 crv1 crv2 crv3 crv4 crv5 crv6 crv7 crv8 crv9 crv5.hist];
@CR_H_ALLL = [crh0 crh1 crh2 crh3 crh4 crh5 crh6 crh7 crh8 crh9 crh5.hist];
@CR_V_6_9 = [crv6 crv7 crv8 crv9];
@CR_V_0_5 = [crv0 crv1 crv2 crv3 crv4 crv5.hist crv5];
@SM_FW = [num0.fw snum1.fw snum2.fw snum3.fw snum4.fw snum5.fw snum6.fw snum7.fw snum8.fw snum9.fw];
@SM_H_FW = [snum1h.fw snum2h.fw snum3h.fw];
@CR_V_FW = [num0.fw crv1.fw crv2.fw crv3.fw crv4.fw crv5.fw crv6.fw crv7.fw crv8.fw crv9.fw crv5.hist.fw];
@CR_H_FW = [num0.fw crh1.fw crh2.fw crh3.fw crh4.fw crh5.fw crh6.fw crh7.fw crh8.fw crh9.fw crh5.hist.fw];
@ASCII_NUM = [zero-nine];
@DIVINE_NUM = [zero.vrt2-nine.vrt2];
#
# Global lookup definitions
#
lookup SingleSubstitution4 { # GSUB lookup type SingleSubstitution
sub snum6 by snum6_left;
sub snum7 by snum7_left;
sub snum8 by snum8_left;
} SingleSubstitution4;
lookup SingleSubstitution5 { # GSUB lookup type SingleSubstitution
sub @CR_V_ALLL by @CR_H_ALLL;
sub @CR_H_ALLL by @CR_V_ALLL;
} SingleSubstitution5;
lookup SingleSubstitution2 { # GSUB lookup type SingleSubstitution
sub @SM_V by @SM_H;
} SingleSubstitution2;
lookup SingleSubstitution3 { # GSUB lookup type SingleSubstitution
sub snum1 by snum1h;
sub snum2 by snum2h_left;
sub snum3 by snum3h_left;
} SingleSubstitution3;
#
# Feature definitions
#
feature kern { # Kerning
pos @CR_H_ALLL @CR_V_0_5 (wdth=30:-70 wdth=120:-40);
pos @CR_V_0_5 @CR_H_ALLL (wdth=30:-70 wdth=120:-40);
pos @CR_H_ALLL @CR_V_6_9 (wdth=30:-170 wdth=120:-365);
pos @CR_V_6_9 @CR_H_ALLL (wdth=30:-170 wdth=120:-365);
} kern;
feature ss01 { # Stylistic Set 1
sub @SM_ALL by @CR_V_ALL;
sub @ASCII_NUM by @CR_V_ALL;
} ss01;
feature ss02 { # Stylistic Set 2
sub @SM_ALL by @CR_H_ALL;
sub @ASCII_NUM by @CR_H_ALL;
} ss02;
feature hist { # Historical Forms
sub crh5 by crh5.hist;
sub crv5 by crv5.hist;
} hist;
feature calt { # Contextual Alternates
sub @SM_V @SM_V' lookup SingleSubstitution3 @SM_ALL;
sub @SM_V @SM_V' lookup SingleSubstitution2;
sub @SM_678' lookup SingleSubstitution4 @SM_ALL;
sub @CR_V_ALLL @CR_V_ALLL' lookup SingleSubstitution5;
sub @CR_H_ALLL @CR_H_ALLL' lookup SingleSubstitution5;
} calt;
feature fwid { # Full Widths
sub @SM_ALL by @SM_FW;
sub @SM_H by @SM_H_FW;
sub @CR_V_ALLL by @CR_V_FW;
sub @CR_H_ALLL by @CR_H_FW;
} fwid;
feature expt { # Expert Forms
sub @ASCII_NUM by @DIVINE_NUM;
} expt;