blob: ef45383a01a9e83634e08d6fe7a2d261f8bd5ad9 (
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
|
%D \module
%D [ file=s-fonts-missing,
%D version=2011.10.30,
%D title=\CONTEXT\ Style File,
%D subtitle=Some Missing Character Info,
%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.
\startluacode
moduledata.fonts = moduledata.fonts or { }
moduledata.fonts.tracers = moduledata.fonts.tracers or { }
moduledata.fonts.tracers.missing = moduledata.fonts.tracers.missing or { }
function moduledata.fonts.tracers.missing.legend()
local c = fonts.hashes.identifiers[font.current()]
local p = c.properties.privates
if p then
context.starttabulate { "|Tl|c|c|" }
context.NC()
context.bold("name")
context.NC()
context.bold("character")
context.NC()
context.bold("node")
context.NC()
context.NR()
for k, v in table.sortedhash(p) do
context.NC()
context(k)
context.NC()
context.dontleavehmode()
context.char(v)
context.NC()
context.dontleavehmode()
commands.getprivatechar(k)
context.NC()
context.NR()
end
context.stoptabulate()
end
end
\stopluacode
\def\ModuleFontsTracersMissingLegend
{\ctxlua{moduledata.fonts.tracers.missing.legend()}}
\continueifinputfile{s-fonts-missing.mkiv}
\enabletrackers[fonts.missing=replace] % the sooner, the more efficient
% \usemodule[art-01]
% \definefontfeature[default][default][missing=yes] % automatically when enabled
\starttext
\ModuleFontsTracersMissingLegend
½ ⅓ ¼ ⅕ ⅙ ⅛
\startluacode
for i=1,1000 do
local c = characters.data[i]
if c then
context.char(c.unicodeslot)
context.space()
end
end
\stopluacode
\stoptext
|