summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/amiri/sources/enclosing.fea
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/fonts/amiri/sources/enclosing.fea')
-rw-r--r--Master/texmf-dist/doc/fonts/amiri/sources/enclosing.fea98
1 files changed, 98 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/fonts/amiri/sources/enclosing.fea b/Master/texmf-dist/doc/fonts/amiri/sources/enclosing.fea
new file mode 100644
index 00000000000..f5be98bd85d
--- /dev/null
+++ b/Master/texmf-dist/doc/fonts/amiri/sources/enclosing.fea
@@ -0,0 +1,98 @@
+#
+# 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 @YearSign @NumSign @FootNote @SafhaSign] @Digits' lookup digit2small;
+ sub @Digits.small [@EndOfAyah @YearSign @NumSign @FootNote @SafhaSign] @Digits' lookup digit2small;
+ sub @Digits.small @Digits.small [@EndOfAyah @YearSign @NumSign @SafhaSign] @Digits' lookup digit2small;
+
+ sub @Digits.small @Digits.small @Digits.small @YearSign @Digits' lookup digit2small;
+} 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>;
+} digit2half;
+
+feature kern {
+ pos @EndOfAyah @Digits.small' <-1610 0 -600 0>;
+ pos @NumSign @Digits.small' <-1522 0 -600 0>;
+ pos @YearSign @Digits.small' <-1800 0 -600 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.small' lookup digit2half @Digits.small;
+ 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.small @YearSign @Digits.small' <-1500 0 -600 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.small' lookup digit2half @Digits.small @Digits.small;
+ 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.small @YearSign @Digits.small' lookup digit2half @Digits.small;
+ 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.small @Digits.small @YearSign @Digits.small' <-1200 0 -600 0>;
+ pos @Digits.small @Digits.small @SafhaSign @Digits.small' <-1122 0 -600 0>;
+} kern;
+
+feature kern {
+ pos @YearSign @Digits.small' lookup digit2half @Digits.small @Digits.small @Digits.small;
+} kern;
+
+feature kern {
+ pos @Digits.small @Digits.small @YearSign @Digits.small' lookup digit2half @Digits.small;
+} kern;
+
+feature kern {
+ pos @Digits.small @YearSign @Digits.small' lookup digit2half @Digits.small @Digits.small;
+} kern;
+
+feature kern {
+ pos @Digits.small @Digits.small @Digits.small @YearSign @Digits.small' <-900 0 -600 0>;
+} kern;