blob: ab3441cdfce02ae1c643944d7d3075b338707f28 (
plain)
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
|
#
# digit enclosing signs
#
# first we replace any sequence of digits (up to three places) following a
# digit enclosing sign by smaller alternates
@EndOfAyah = [uni06DD];
@NumSign = [uni0600];
@YearSign = [uni0601];
@FootNote = [uni0602];
@SafhaSign = [uni0603];
lookup digit2small {
sub @Digits by @Digits.small;
} digit2small;
feature calt {
sub [@EndOfAyah @NumSign @FootNote @SafhaSign] @Digits' lookup digit2small;
sub @Digits.small [@EndOfAyah @NumSign @FootNote @SafhaSign] @Digits' lookup digit2small;
sub @Digits.small @Digits.small [@EndOfAyah @NumSign @SafhaSign] @Digits' lookup digit2small;
} calt;
lookup digit2medium {
sub @Digits by @Digits.medium;
} digit2medium;
feature calt {
sub @YearSign @Digits' lookup digit2medium;
sub @Digits.medium @YearSign @Digits' lookup digit2medium;
sub @Digits.medium @Digits.medium @YearSign @Digits' lookup digit2medium;
sub @Digits.medium @Digits.medium @Digits.medium @YearSign @Digits' lookup digit2medium;
} calt;
# now we contextually kern the sign with the digits:
# * one digit: move digit's x by -(sw + dw)/2 and its Δx by -dw
# * two digits: the above, then move 1st digit's x by -dw/2 and 2nd digit's x
# by -sw/2 and its Δx by -dw
# * three digits: the above, then move 1st & 2nd digit's x by -dw/2 and 3rd
# digit's x by -(sw/2 - dw/2) and its Δx by -dw
#
# dw = digit width, sw = sign width
lookup digit2half {
pos @Digits.small <-300 0 0 0>;
pos @Digits.medium <-450 0 0 0>;
} digit2half;
feature kern {
pos @EndOfAyah @Digits.small' <-1610 0 -600 0>;
pos @NumSign @Digits.small' <-1522 0 -600 0>;
pos @YearSign @Digits.medium' <-2275 0 -900 0>;
pos @FootNote @Digits.small' <-1090 0 -600 0>;
pos @SafhaSign @Digits.small' <-1722 0 -600 0>;
} kern;
feature kern {
pos @EndOfAyah @Digits.small' lookup digit2half @Digits.small;
pos @NumSign @Digits.small' lookup digit2half @Digits.small;
pos @YearSign @Digits.medium' lookup digit2half @Digits.medium;
pos @FootNote @Digits.small' lookup digit2half @Digits.small;
pos @SafhaSign @Digits.small' lookup digit2half @Digits.small;
} kern;
feature kern {
pos @Digits.small @EndOfAyah @Digits.small' <-1310 0 -600 0>;
pos @Digits.small @NumSign @Digits.small' <-1222 0 -600 0>;
pos @Digits.medium @YearSign @Digits.medium' <-1825 0 -900 0>;
pos @Digits.small @FootNote @Digits.small' <-790 0 -600 0>;
pos @Digits.small @SafhaSign @Digits.small' <-1422 0 -600 0>;
} kern;
feature kern {
pos @EndOfAyah @Digits.small' lookup digit2half @Digits.small @Digits.small;
pos @NumSign @Digits.small' lookup digit2half @Digits.small @Digits.small;
pos @YearSign @Digits.medium' lookup digit2half @Digits.medium @Digits.medium;
pos @SafhaSign @Digits.small' lookup digit2half @Digits.small @Digits.small;
} kern;
feature kern {
pos @Digits.small @EndOfAyah @Digits.small' lookup digit2half @Digits.small;
pos @Digits.small @NumSign @Digits.small' lookup digit2half @Digits.small;
pos @Digits.medium @YearSign @Digits.medium' lookup digit2half @Digits.medium;
pos @Digits.small @SafhaSign @Digits.small' lookup digit2half @Digits.small;
} kern;
feature kern {
pos @Digits.small @Digits.small @EndOfAyah @Digits.small' <-1010 0 -600 0>;
pos @Digits.small @Digits.small @NumSign @Digits.small' <-922 0 -600 0>;
pos @Digits.medium @Digits.medium @YearSign @Digits.medium' <-1375 0 -900 0>;
pos @Digits.small @Digits.small @SafhaSign @Digits.small' <-1122 0 -600 0>;
} kern;
feature kern {
pos @YearSign @Digits.medium' lookup digit2half @Digits.medium @Digits.medium @Digits.medium;
} kern;
feature kern {
pos @Digits.medium @Digits.medium @YearSign @Digits.medium' lookup digit2half @Digits.medium;
} kern;
feature kern {
pos @Digits.medium @YearSign @Digits.medium' lookup digit2half @Digits.medium @Digits.medium;
} kern;
feature kern {
pos @Digits.medium @Digits.medium @Digits.medium @YearSign @Digits.medium' <-925 0 -900 0>;
} kern;
|