diff options
Diffstat (limited to 'Master/texmf-dist/tex/fontinst/misc/glyphbox.mtx')
-rw-r--r-- | Master/texmf-dist/tex/fontinst/misc/glyphbox.mtx | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/fontinst/misc/glyphbox.mtx b/Master/texmf-dist/tex/fontinst/misc/glyphbox.mtx new file mode 100644 index 00000000000..223504d54e1 --- /dev/null +++ b/Master/texmf-dist/tex/fontinst/misc/glyphbox.mtx @@ -0,0 +1,62 @@ +\relax + +\documentclass{article} +\usepackage{fontdoc} + +\begin{document} + +\title{\texttt{glyphbox.mtx}: showing metric boxes of glyphs} +\author{Lars Hellstr\"om} +\date{July 2003} +\maketitle + +\begin{abstract} + This file redefines the \verb|\setscaledrawglyph| command to make a + thin ($5$ AFM units) frame lining the inside of the metric box of + the glyph. This is can be useful when debugging commands for + building glyphs, as it gives graphic account of the glyph metrics. + Use \verb|\oncommand\setscaledrawglyph| or the \texttt{glyphon.mtx} + file to restore the normal command definition. +\end{abstract} + + +\begin{verbatim} + +\metrics + +\needsfontinstversion{1.914} + + +\offcommand\setscaledrawglyph + +\resetcommand\setscaledrawglyph#1#2#3#4#5#6#7#8#9{% + \csname saved-\string\setscaledrawglyph\endcsname + {#1/raw}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}% + \setglyph{#1}% + \push + \moveup{\neg{#8}}% + \glyphrule{5}{\add{#7}{#8}}% + \push + \ifnumber{#9}{>}{0}\then + \moveup{\add{#7}{#8}}% + \glyphrule{\add{\sub{#6}{5}}{#9}}{5}% + \else + \moveup{\add{#7}{#8}}% + \glyphrule{\sub{#6}{10}}{5}% + \fi + \pop + \glyphrule{\sub{#6}{10}}{5}% + \glyphrule{5}{\add{#7}{#8}}% + \pop + \glyph{#1/raw}{1000}% + \endsetglyph +} + + +\endmetrics + + +\end{verbatim} + + +\end{document} |