]> git.donarmstrong.com Git - lilypond.git/blob - tex/dimen.tex
patch::: 0.0.75.jcn6: pats
[lilypond.git] / tex / dimen.tex
1 %
2 % A tex file to help determine dims.
3 %
4
5 \font\musicfont=musix16
6 \font\slurfont=xslu16
7 \font\specfont=musixspx
8 % \def\thefont{\musicfont}
9 \def\thefont{\specfont}
10
11 \def\mb#1{{\thefont\char#1}}
12
13 \newdimen\wid
14 \newdimen\inc
15 \newdimen\here
16 \def\hruler#1{%
17         \wid=#1pt
18         \inc=\wid
19         \divide\inc by #1
20         \divide\wid by 2
21         \here=-\wid
22         \loop\ifdim\here<\wid\advance\here by\inc
23                 \hbox to0pt{\kern\here\vrule width0.05pt height 4pt\hss}%
24         \repeat%
25 }
26
27 \def\vruler#1{%
28         \wid=#1pt
29         \inc=\wid
30         \divide\inc by #1
31         \divide\wid by 2
32         \here=-\wid
33         \loop\ifdim\here<\wid\advance\here by\inc
34                 \vbox to0pt{\vskip\here\vrule width2pt height 0.05pt\vss}%
35         \repeat%
36 }
37 \def\twhrul{\hbox to 0pt{\hbox{\hruler{20}\vrule
38         width0.1pt height 3ptdepth 1pt}}}
39 \def\twvrul{\hbox{\vbox to 20pt{\vruler{20}\vrule
40         width3pt height 0.1pt}}}
41  
42 \def\doitem#1{
43         #1 %
44          %\twvrul%doesn't work
45         \hbox to 50pt{\qquad\twhrul\mb{#1}\hss}\setbox0=\hbox{\mb{#1}} width \the\wd0\ depth \the\dp0 \ height \the\ht0}
46
47 \newcount\n
48 \def\charn{\n=-1
49         \loop\ifnum\n<255\advance\n by1
50         \doitem{\number\n}\endgraf\repeat}
51
52
53         \charn
54
55 \bye