Debian Codegraph @

texmf-dist/tex/fontinst/misc/glyphbox.mtx

raw
1 \relax
2
3 \documentclass{article}
4 \usepackage{fontdoc}
5
6 \begin{document}
7
8 \title{\texttt{glyphbox.mtx}: showing metric boxes of glyphs}
9 \author{Lars Hellstr\"om}
10 \date{July 2003}
11 \maketitle
12
13 \begin{abstract}
14 This file redefines the \verb|\setscaledrawglyph| command to make a
15 thin ($5$ AFM units) frame lining the inside of the metric box of
16 the glyph. This is can be useful when debugging commands for
17 building glyphs, as it gives graphic account of the glyph metrics.
18 Use \verb|\oncommand\setscaledrawglyph| or the \texttt{glyphon.mtx}
19 file to restore the normal command definition.
20 \end{abstract}
21
22
23 \begin{verbatim}
24
25 \metrics
26
27 \needsfontinstversion{1.914}
28
29
30 \offcommand\setscaledrawglyph
31
32 \resetcommand\setscaledrawglyph#1#2#3#4#5#6#7#8#9{%
33 \csname saved-\string\setscaledrawglyph\endcsname
34 {#1/raw}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}%
35 \setglyph{#1}%
36 \push
37 \moveup{\neg{#8}}%
38 \glyphrule{5}{\add{#7}{#8}}%
39 \push
40 \ifnumber{#9}{>}{0}\then
41 \moveup{\add{#7}{#8}}%
42 \glyphrule{\add{\sub{#6}{5}}{#9}}{5}%
43 \else
44 \moveup{\add{#7}{#8}}%
45 \glyphrule{\sub{#6}{10}}{5}%
46 \fi
47 \pop
48 \glyphrule{\sub{#6}{10}}{5}%
49 \glyphrule{5}{\add{#7}{#8}}%
50 \pop
51 \glyph{#1/raw}{1000}%
52 \endsetglyph
53 }
54
55
56 \endmetrics
57
58
59 \end{verbatim}
60
61
62 \end{document}