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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
%D \module
%D [ file=s-fnt-20,
%D version=2009.01.10,
%D title=\CONTEXT\ Style File,
%D subtitle=Tracing Feature Application (1),
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D This file is used by Idris and me in the process of getting the
%D best arabic fonts getting rendered best. As such it might change.
% \setvariables
% [otftracker]
% [title=Reverse Chaining,
% figure=test-003-volt.pdf,
% font=husayni,
% sample={ببب بببب ببببب بببببب}]
\def\checkedotftrackerfeature #1{otftracker-\ifnum\featureattribute{otftracker-#1}=\zerocount default\else#1\fi}
\def\checkedotftrackerdirection#1{\csname otftracker-direction-\ifcsname otftracker-direction-#1\endcsname#1\else default\fi\endcsname}
% we can consider adding a dir key to features
\definefontfeature
[otftracker-default]
[default]
[mode=node]
\definefontfeature
[otftracker-arabtype]
[mode=node,analyze=yes,
language=dflt,script=arab,ccmp=yes,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]
% \definefontfeature
% [otftracker-husayni]
% [analyze=yes,mode=node,
% language=dflt,script=arab,ccmp=yes,
% init=yes,medi=yes,fina=yes,isol=yes,
% calt=yes,
% mark=yes,mkmk=yes,kern=yes,curs=yes]
\definefontfeature
[otftracker-husayni]
[analyze=yes,mode=node,
language=dflt,script=arab,
init=yes,medi=yes,fina=yes,
rlig=yes,
ccmp=yes,
ss01=yes, % full Allah, Muhammad, Allahumma
ss05=yes, % full Jiim stacking
ss09=yes, % full Haa stacking
ss10=yes, % partial dipped Miim
ss13=yes, % full stacked Miim
ss15=yes, % full stacked Laam-on-Miim
ss17=yes, % full stacked Ayn-on-Miim
ss19=yes, % LM_im
ss24=yes, % BX specials
ss25=yes, % LH_im specials
ss26=yes, % full Yaa.final specials
ss27=yes, % partial thin Miim.final
ss31=yes, % partial Raa.final contexts
ss34=yes, % partial Raa.final contexts
ss35=yes, % full Kaaf contexts
ss36=yes, % full Laam contexts
ss37=yes, % Miim-Miim contexts
ss38=yes, % fancy thin Haa.medial-Miim.final
ss39=yes, % high and low Baa strings
ss40=yes, % diagonal entry
ss41=yes, % initial alternates
mark=yes,mkmk=yes,kern=yes,curs=yes]
\definefontfeature
[otftracker-simplenaskhi]
[analyze=yes,mode=node,
language=dflt,script=arab,
init=yes,medi=yes,fina=yes,calt=yes,
rlig=yes,liga=yes,dlig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]
\setvalue{otftracker-direction-arabtype}{r2l}
\setvalue{otftracker-direction-husayni}{r2l}
\setvalue{otftracker-direction-simplenaskhi}{r2l}
\setvalue{otftracker-direction-default}{}
\setvariables
[otftracker]
[font=Serif,
features=\checkedotftrackerfeature{\getvariable{otftracker}{font}},
direction=\checkedotftrackerdirection{\getvariable{otftracker}{font}},
size=48pt,
figure=,
title=Feature Check,
sample=no sample,
set=\setups{otftracker}]
\setuplayout
[topspace=1.5cm,
backspace=1.5cm,
width=middle,
height=middle,
header=1.5cm,
footer=1.5cm]
\setuphead
[chapter]
[header=high,
number=no]
\setupfootertexts
[chapter]
\setupalign
[flushleft]
\setupcolors
[state=start]
\startsetups otftracker
\setupbodyfont[tt,10pt]
\starttext
\normalexpanded{\startchapter[title={\getvariable{otftracker}{title}}]}
\doifsomething {\getvariable{otftracker}{figure}} {
\startlinecorrection
\externalfigure[\getvariable{otftracker}{figure}][maxwidth=\hsize,frame=on]
\stoplinecorrection
}
\showotfcomposition
{\getvariable{otftracker}{font}*\getvariable{otftracker}{features} at \getvariable{otftracker}{size}}
{\getvariable{otftracker}{direction}}
{\getvariable{otftracker}{sample}}
\stopchapter
\stoptext
\stopsetups
\continueifinputfile{s-fnt-20.mkiv}
\usemodule[art-01]
\setupbodyfont
% [cambria]
[dejavu]
\starttext
\setvariables
[otftracker]
[font=Serif,
size=48pt,
figure=,
title=Feature Check,
sample={affiliation}]
\stoptext
|