1
2
3
4
5
6
7
8
9
10
11
12
13
14\startmodule[fontsfeatures]
15
16\registerctxluafile{sfontsfeatures}{}
17
18\installmodulecommandluasingle \showusedfeatures {moduledata.fonts.features.showused}
19\installmodulecommandluasingle \showallkerns {moduledata.fonts.features.showallkerns}
20\installmodulecommandluasingle \showbasekerns {moduledata.fonts.features.showbasekerns}
21\installmodulecommandluasingle \showallligatures {moduledata.fonts.features.showallligatures}
22\installmodulecommandluasingle \showfeatureset {moduledata.fonts.features.showfeatureset}
23\installmodulecommandluasingle \showallfeatures {moduledata.fonts.features.showallfeatures}
24\installmodulecommandluasingle \showsubstitutions {moduledata.fonts.features.showsubstitutions}
25
26\unexpanded\def\showfontidchar#1#2{\glyph id #1 #2\relax}
27
28\def\kernpairheight{.8\strutht}
29\def\kernpairdepth {.8\strutdp}
30\def\kernpairwidth {\onepoint}
31
32\unexpanded\def\showkernpair#1#2#3
33 {\dontleavehmode
34 \hbox \bgroup
35 \scratchdimen#2\scaledpoint
36 \kern\fontcharwd\font#1\relax
37 \ifdim\scratchdimen>\zeropoint
38 \bgroup
39 \darkgreen
40 \vrule width \scratchdimen height \kernpairheight depth \kernpairdepth
41 \egroup
42 \kern\scratchdimen
43 \else\ifdim\scratchdimen<\zeropoint
44 \kern\scratchdimen
45 \bgroup
46 \darkred
47 \vrule width \scratchdimen height \kernpairheight depth \kernpairdepth
48 \egroup
49 \else
50 \kern.5\dimexpr\kernpairwidth\relax
51 \bgroup
52 \darkblue
53 \vrule width \kernpairwidth height \kernpairheight depth \kernpairdepth
54 \egroup
55 \kern.5\dimexpr\kernpairwidth\relax
56 \fi\fi
57 \kern\fontcharwd\font#1\relax
58 \char#1\relax
59 \char#3\relax
60 \egroup
61 \space}
62
63\stopmodule
64
65\continueifinputfile{sfontsfeatures.mkiv}
66
67\usemodule
68 [art01]
69
70\starttext
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88 \showsubstitutions
89 [name=xchartermath.otf,
90 feature=*,
91 script=math,
92 language=dflt]
93
94\stoptext
95 |