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-01-12 17:15:07 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-12 17:15:07 +0100
commit8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch)
tree94286bc131ef7d994f9432febaf03fe23d10eef8 /tex/context/modules/mkiv/s-fonts-shapes.mkiv
parentf5aed2e51223c36c84c5f25a6cad238b2af59087 (diff)
downloadcontext-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz
2016-01-12 16:26: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