6 \newdimen\lily@globalscale
7 \newdimen\lily@localscale
8 \newbox\lily@metricsbox
9 \newwrite\lily@metricsfile
11 \def\lilyglobalscale#1{%
12 \lily@globalscale #1pt
15 \def\lilymetricsfile#1{%
16 \immediate\openout\lily@metricsfile #1\relax
24 \def\lily@rempt##1.##2PT{%
25 ##1\ifnum ##2 > \z@ .##2\fi
29 \expandafter\endgroup\x
32 \expandafter\lily@rempt
35 \long\def\lilygetmetrics#1#2#3#4{%
36 \lily@localscale #3\lily@globalscale
37 % convert pt to 1000*sp (1000/65536)
38 \lily@localscale 0.015259\lily@localscale
39 \font\lily@font = #2 scaled \lily@localscale
40 \setbox\lily@metricsbox\hbox{%
44 \edef\lily@wd{\the\wd\lily@metricsbox}%
45 \edef\lily@ht{\the\ht\lily@metricsbox}%
46 \edef\lily@dp{\the\dp\lily@metricsbox}%
47 \immediate\write\lily@metricsfile{%
48 ("#1" . (\lily@strippt\lily@wd
49 \space\lily@strippt\lily@ht
50 \space\lily@strippt\lily@dp))%