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
|
\usemodule[simplefonts][size=10pt]
\setmainfont[DejaVu Serif]
\setsansfont[DejaVu Sans]
\setmonofont[DejaVu Sans Mono]
\starttext
\startbodymatter
\title{The {\em simplefonts} module}
Writing typescripts for \ConTeXt\ can be a tedious job, …
\starttyping
\simplefont[<font>][..,..=..,..]
\stoptyping
\startlines
{\simplefont[TeX Gyre Pagella]TeX Gyre Pagella}
{\simplefont[TeX Gyre Termes]TeX Gyre Termes}
{\simplefont[TeX Gyre Heros]TeX Gyre Heros}
{\simplefont[TeX Gyre Bonum]TeX Gyre Bonum}
{\simplefont[TeX Gyre Schola]TeX Gyre Schola}
{\simplefont[TeX Gyre Adventor]TeX Gyre Adventor}
{\simplefont[TeX Gyre Cursor]TeX Gyre Cursor}
{\simplefont[TeX Gyre Chorus]TeX Gyre Chorus}
\stoplines
\stopbodymatter
\startappendices
\section[sec:features]{Features}
\startluacode
tex.sprint("\\starttabulate[|l|p|p|]")
for k, v in next, fonts.otf.tables.features do
tex.sprint(string.format("\\NC %s\\NC %s\\NC %s\\NC\\NR",k,string.gsub(v,"#","\\letterhash"),string.lower(string.gsub(v,"[^a-zA-Z0-9]",""))))
end
tex.sprint("\\stoptabulate")
\stopluacode
\section[sec:scripts]{Scripts}
\startluacode
tex.sprint("\\starttabulate[|l|p|p|]")
for k, v in next, fonts.otf.tables.scripts do
tex.sprint(string.format("\\NC %s\\NC %s\\NC %s\\NC\\NR",k,string.gsub(v,"#","\\letterhash"),string.lower(string.gsub(v,"[^a-zA-Z0-9]",""))))
end
tex.sprint("\\stoptabulate")
\stopluacode
\section[sec:languages]{Languages}
\startluacode
tex.sprint("\\starttabulate[|l|p|p|]")
for k, v in next, fonts.otf.tables.languages do
tex.sprint(string.format("\\NC %s\\NC %s\\NC %s\\NC\\NR",k,string.gsub(v,"#","\\letterhash"),string.lower(string.gsub(v,"[^a-zA-Z0-9]",""))))
end
tex.sprint("\\stoptabulate")
\stopluacode
\stopappendices
\stoptext
|