summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/s-fonts-shapes.mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-05-17 19:31:15 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-05-17 19:31:15 +0200
commit2017d30b4ca772c8eeac4fc0eb9b54e547a9a1d8 (patch)
treed96df31f305a095c078ea5fb9f639ca34ac36c12 /tex/context/modules/mkiv/s-fonts-shapes.mkiv
parent53ff76b73cd1f373ecdfb0f7f17df6f352621d6e (diff)
downloadcontext-2017d30b4ca772c8eeac4fc0eb9b54e547a9a1d8.tar.gz
2016-05-17 19:25:00
Diffstat (limited to 'tex/context/modules/mkiv/s-fonts-shapes.mkiv')
-rw-r--r--tex/context/modules/mkiv/s-fonts-shapes.mkiv115
1 files changed, 115 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/s-fonts-shapes.mkiv b/tex/context/modules/mkiv/s-fonts-shapes.mkiv
new file mode 100644
index 000000000..c1e9d61d2
--- /dev/null
+++ b/tex/context/modules/mkiv/s-fonts-shapes.mkiv
@@ -0,0 +1,115 @@
+%D \module
+%D [ file=s-fonts-shapes, % s-fnt-29,
+%D version=2010.09.27,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Tracing Shapes,
+%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.
+
+\startmodule[fonts-shapes]
+
+\registerctxluafile{s-fonts-shapes}{}
+
+\installmodulecommandluasingle \showfontshapes {moduledata.fonts.shapes.showlist}
+\installmodulecommandluasingle \showglyphshape {moduledata.fonts.shapes.showglypshape}
+\installmodulecommandluatwo \showlastglyphshapefield {moduledata.fonts.shapes.showlastglyphshapefield}
+\installmodulecommandluasingle \showallglyphshapes {moduledata.fonts.shapes.showallglypshapes}
+
+\let\modulefontsstartshowglyphshape\gobblethreearguments
+\let\modulefontsstopshowglyphshape \relax
+
+\unprotect
+
+\startsetups module:showallglyphshapes:start
+
+ \unexpanded\def\modulefontsstartshowglyphshape##1##2##3{
+ \startTEXpage[\c!offset=\exheight]
+ \edef\lastshownglyphshapefieldunicode{##1}%
+ \edef\lastshownglyphshapefieldname {##2}%
+ \edef\lastshownglyphshapefieldindex {##3}%
+ \raggedcenter
+ }
+
+ \unexpanded\def\modulefontsstopshowglyphshape {
+ \par
+ \doifsomething {\lastshownglyphshapefieldunicode} {
+ \begingroup
+ \dontleavehmode
+ \tttf
+ \setstrut
+ \strut
+ 0x\uchexnumbers\lastshownglyphshapefieldunicode
+ \space:\space
+ \lastshownglyphshapefieldname
+ \space:\space
+ \lastshownglyphshapefieldindex
+ \par
+ \endgroup
+ }
+ \stopTEXpage
+ }
+
+\stopsetups
+
+\protect
+
+% downward compatibility:
+
+\unexpanded\def\ShowGlyphShape#1#2#3% name size glyph
+ {\ctxlua{moduledata.fonts.shapes.showglyphshape { name = "#1", size = "#2", character = "#3" } }}
+
+\stopmodule
+
+\continueifinputfile{s-fonts-shapes.mkiv}
+
+\setupbodyfont[dejavu,9pt]
+
+\setuplayout
+ [backspace=1cm,
+ topspace=1cm,
+ footer=1cm,
+ header=0cm,
+ height=middle,
+ width=middle]
+
+\setupfootertexts
+ []
+ [\saveddefinedfontname\quad\pagenumber]
+
+\starttext
+
+% \savedefinedfont[Bold*default]
+% \showfontshapes[number=\saveddefinedfontid]
+% \page
+
+% \showfontshapes[name=BoldItalic*default]
+% \page
+
+ % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0x62A} \stopTEXpage
+ % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0x2004} \stopTEXpage
+ % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0xF0299} \stopTEXpage
+ % \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{NameMe.1190} \stopTEXpage
+
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x00066}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x1D453}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x1D43F}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D444}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D447}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x02112}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D432}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D43D}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D44A}\stopTEXpage
+% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{50bp}{0x1D45D}\stopTEXpage
+% \page
+
+ % \showallglyphshapes[name=name:cambria-math,size=100bp]
+% \showallglyphshapes[name=name:dejavuserif,size=100bp]
+
+\showallglyphshapes[name=file:brill.otf,size=100bp]
+
+\stoptext