lilypond-0.1.27
[lilypond.git] / tex / fetdefs.tex
blob854441bb680e47e3bf11252aa8477f87f6d340fa
1 % fetdefs.tex
2 % encapsulating tex backend for auto-generated font-en-tja definitions
4 \def\fetsixteendefs{
5 \font\fontentja=feta16
6 \font\vetfont=feta-beams16
7 \font\fetanummer=feta-nummer8
9 \def\fettwentydefs{
10 \font\fontentja=feta20
11 \font\vetfont=feta-beams20
12 \font\fetanummer=feta-nummer10
15 % \def\fetdef#1#2{\def#1{\fetchar{#2}}}
16 % ugh, linewidth, ugh, tablexx.ly balldims not used!
17 \def\fetdef#1#2{%
18 % what the fuck is this?
19 \def#1{\lower.3884\staffrulethickness
20 \hbox{\fetchar{#2}}}}
22 \def\fetchar#1{\fontentja\char#1}
24 %\input feta16
25 \input feta20
27 \def\beamslope#1#2{{\count0=#2\advance\count0 by#1
28 \advance\count0by128
29 {\vetfont\char\count0}}}
31 % stacked numbers; overrules def in lilyponddefs
32 % oeps: \meter 12/8;
33 \def\generalmeter#1#2{%
34 \vbox to 0pt{\vss%
35 \hbox to0.42\balkheight{\hss\fetanummer #1\hss}%
36 \nointerlineskip%
37 \hbox to0.42\balkheight{\hss\fetanummer #2\hss}%
38 \vss}}
40 \newcount\embedcount\embedcount=0
41 \newwrite\checkexists
42 \newwrite\embedfile
43 \def\inputifexists#1{%
44 \openin\checkexists #1
45 \ifeof\checkexists
46 \closein\checkexists
47 \relax
48 \else
49 \closein\checkexists
50 \input #1
51 \fi
53 \def\embedcountid{feta-embed}
54 \inputifexists{\embedcountid.aux}
56 % let's not overwrite -- and be sure to create new
57 \def\storeembedcount{%
58 \immediate\openout\embedfile=\embedcountid.aux
59 \immediate\write\embedfile{\embedcount=\the\embedcount}
60 \immediate\closeout\embedfile
62 \def\turnOnExperimentalFeatures{
64 % yeah. By far not finished yet.
65 % Don't do this by default. gs takes a long time to start in xdvi
67 \special{ps: /drawslur {
68 currentpoint /texoriginy exch def
69 /texoriginx exch def
70 /dir exch def
71 /lift 30 def
72 /desty exch def
73 /destx exch def
74 /slurfactor .4 def
75 destx slurfactor mul
76 texoriginx add
77 desty slurfactor mul
78 texoriginy add
79 lift dir mul add
80 destx 1 slurfactor sub mul
81 texoriginx add
82 desty 1 slurfactor sub mul
83 texoriginy add
84 lift dir mul add
85 destx
86 texoriginx add
87 desty
88 texoriginy add
89 curveto
90 stroke
91 } def
95 \def\embeddedps#1{
96 \special{ps: #1}
98 \def\embeddedmf#1{
99 \edef\embedid{feta-sleur-\number\embedcount}
100 \immediate\openout\embedfile=\embedid.mf
101 \global\advance\embedcount by 1
102 \immediate\write\embedfile{#1}
103 \immediate\closeout\embedfile
104 \font\expandafter\embedid\expandafter=\embedid
105 \hbox{\embedid\char0}
108 \def\nopostscript{\def\embeddedps##1{}}
109 \def\nometafont{\def\embeddedmf##1{}}
111 \nometafont
113 \def\EndLilyPondOutput{
114 \storeembedcount
115 \csname bye\endcsname