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