s-fonts-shapes.mkiv /size: 5468 b    last modification: 2023-12-21 09:45
1%D \module
2%D   [      file=s-fonts-shapes, % s-fnt-29,
3%D        version=2010.09.27,
4%D          title=\CONTEXT\ Style File,
5%D       subtitle=Tracing Shapes,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14%D I will redo this module (using outlines).
15
16\startmodule[fonts-shapes]
17
18\registerctxluafile{s-fonts-shapes}{}
19
20\installmodulecommandluasingle \showfontshapes          {moduledata.fonts.shapes.showlist}
21\installmodulecommandluasingle \showglyphshape          {moduledata.fonts.shapes.showglyphshape}
22\installmodulecommandluatwo    \showlastglyphshapefield {moduledata.fonts.shapes.showlastglyphshapefield}
23\installmodulecommandluasingle \showallglyphshapes      {moduledata.fonts.shapes.showallglypshapes}
24
25\let\modulefontsstartshowglyphshape\gobblethreearguments
26\let\modulefontsstopshowglyphshape \relax
27
28\unprotect
29
30\startsetups module:showallglyphshapes:start
31
32    \unexpanded\def\modulefontsstartshowglyphshape##1##2##3{
33        \startTEXpage[\c!offset=\exheight]% ,\c!frame=\v!on]
34        \edef\lastshownglyphshapefieldunicode{##1}%
35        \edef\lastshownglyphshapefieldname   {##2}%
36        \edef\lastshownglyphshapefieldindex  {##3}%
37        \raggedcenter
38    }
39
40    \unexpanded\def\modulefontsstopshowglyphshape {
41        \par
42        \doifsomething {\lastshownglyphshapefieldunicode} {
43            \begingroup
44                \dontleavehmode
45                \tttf
46                \setstrut
47                \strut
48                0x\uchexnumbers\lastshownglyphshapefieldunicode
49                \space:\space
50                \lastshownglyphshapefieldname
51                \space:\space
52                \lastshownglyphshapefieldindex
53                \par
54            \endgroup
55        }
56        \stopTEXpage
57    }
58
59\stopsetups
60
61\startsetups module:showallglyphshapes:stop
62
63    % nothing
64
65\stopsetups
66
67\unexpanded\def\modulefontsstartshowglyphshapes{\setups[module:showallglyphshapes:start]}
68\unexpanded\def\modulefontsstopshowglyphshapes {\setups[module:showallglyphshapes:stop]}
69
70\protect
71
72% downward compatibility:
73
74\unexpanded\def\ShowGlyphShape#1#2#3% name size glyph
75  {\ctxlua{moduledata.fonts.shapes.showglyphshape { name = "#1", size = "#2", character = "#3" } }}
76
77\stopmodule
78
79\continueifinputfile{s-fonts-shapes.mkiv}
80
81\setupbodyfont[dejavu,9pt]
82
83\setuplayout
84  [backspace=1cm,
85   topspace=1cm,
86   footer=1cm,
87   header=0cm,
88   height=middle,
89   width=middle]
90
91\setupfootertexts
92  []
93  [\saveddefinedfontname\quad\pagenumber]
94
95\starttext
96
97%     \savedefinedfont[Bold*default]
98%     \showfontshapes[number=\saveddefinedfontid]
99%     \page
100
101%     \showfontshapes[name=BoldItalic*default]
102%     \page
103
104    % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0x62A}       \stopTEXpage
105    % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0x2004}      \stopTEXpage
106    % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0xF0299}     \stopTEXpage
107    % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{NameMe.1190} \stopTEXpage
108
109%     \startTEXpage[offset=0pt]\ShowGlyphShape{file:stixtwomath-regular.otf}{20bp}{0x1D44A}\stopTEXpage
110%     \startTEXpage[offset=0pt]\ShowGlyphShape{file:stixtwomath-regular.otf}{20bp}{0x1D44C}\stopTEXpage
111
112% \definefontfeature[tg][goodies=pagella-math]
113% \startTEXpage[offset=0pt]\ShowGlyphShape{file:texgyrepagella-math.otf*tg}{20bp}{0x002F}\stopTEXpage
114
115%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x00066}\stopTEXpage
116%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x1D453}\stopTEXpage
117%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x1D43F}\stopTEXpage
118%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D444}\stopTEXpage
119%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D447}\stopTEXpage
120%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x02112}\stopTEXpage
121%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D432}\stopTEXpage
122%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D43D}\stopTEXpage
123%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D44A}\stopTEXpage
124%     \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D45D}\stopTEXpage
125%     \page
126
127% \startTEXpage[offset=0pt]\ShowGlyphShape{file:husayninotebold.ttf}{50bp}{0xF034A}\stopTEXpage
128% \startTEXpage[offset=0pt]\ShowGlyphShape{file:husayninotebold.ttf}{50bp}{0x006DD}\stopTEXpage
129% \startTEXpage[offset=0pt]\ShowGlyphShape{file:husayninotebold.ttf}{50bp}{0x006DD}\stopTEXpage
130% \startTEXpage[offset=0pt]\ShowGlyphShape{file:arabtype.ttf}{50bp}{0x0FCA1}\stopTEXpage
131
132\showallglyphshapes[name=name:cambria-math,size=100bp,kerns=bottomright]
133% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{100bp}{0x1D6FD}\stopTEXpage
134
135% \showallglyphshapes[name=file:lucidabrightmathot,size=100bp,kerns=all]
136% \showallglyphshapes[name=file:garamondmath,size=100bp,kerns=bottomright]
137
138% \showallglyphshapes[name=name:arabtype,size=100bp]
139% \showallglyphshapes[name=file:husayninotebold.ttf,size=100bp]
140% \showallglyphshapes[name=name:dejavuserif,size=100bp]
141
142% \showallglyphshapes[name=file:brill.otf,size=100bp]
143% \showallglyphshapes[name=file:minionmath-regular.otf,size=100bp]
144
145\stoptext
146