2 % Stuff used to draw or set text along a baseline specified by parametric equations
10 /baselinedict 50 dict def
19 counttomark 2 eq {/hoffset exch def} if
36 /leftstring emptystring def
41 /leftstring str reversestring def
42 /rightstring emptystring def
48 /leftstring exch reversestring def
51 gsave currentpoint translate leftstring left t baselineshow grestore
52 gsave currentpoint translate rightstring right t baselineshow grestore
74 hoffset voffset translate
77 /dt ds t f' dup mul t g' dup mul add sqrt res mul div def
80 str right t baselineshow
96 /onecharstring ( ) def
105 t f res mul t g res mul translate
107 t g' t f' atan rotate
109 mode right eq {pop} if
111 onecharstring 0 3 -1 roll put onecharstring stringwidth pop
112 /ds exch mode mul def
113 /dt ds t f' dup mul t g' dup mul add sqrt res mul div def
116 t f res mul t g res mul translate
118 t g' t f' atan rotate
119 mode left eq {pop} if
127 /str2 str1 length string def
129 /n str1 length 1 sub def
132 str1 n get str2 exch i exch put
143 /len str1 stringwidth pop def
147 str1 n get onecharstring exch 0 exch put
148 /s onecharstring stringwidth pop s add def
149 s len 2 div ge {exit} if
152 str1 0 n 1 add getinterval
153 str1 n str1 length n sub getinterval