| 1 |
|
| 2 |
%% serifs.mf |
| 3 |
%% Copyright 2005 Laurie Field |
| 4 |
% |
| 5 |
% This work is LFB, version 1.0. |
| 6 |
% |
| 7 |
% This work may be distributed and/or modified under the |
| 8 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 9 |
% of this license or (at your option) any later version. |
| 10 |
% The latest version of this license is in |
| 11 |
% http://www.latex-project.org/lppl.txt |
| 12 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 13 |
% version 2003/12/01 or later. |
| 14 |
% |
| 15 |
% This work has the LPPL maintenance status "maintained". |
| 16 |
% |
| 17 |
% This Current Maintainer of this work is Laurie Field. |
| 18 |
% |
| 19 |
% This work consists of the files: |
| 20 |
% |
| 21 |
% example.tex |
| 22 |
% lfbacc.tex |
| 23 |
% |
| 24 |
% accents.mf |
| 25 |
% alpha.mf |
| 26 |
% beta.mf |
| 27 |
% capitals.mf |
| 28 |
% charmap.mf |
| 29 |
% delta.mf |
| 30 |
% epsilon.mf |
| 31 |
% eta.mf |
| 32 |
% gamma.mf |
| 33 |
% iota.mf |
| 34 |
% kappa.mf |
| 35 |
% khi.mf |
| 36 |
% lambda.mf |
| 37 |
% lfb.mf |
| 38 |
% lfb5.mf |
| 39 |
% lfb6.mf |
| 40 |
% lfb7.mf |
| 41 |
% lfb8.mf |
| 42 |
% lfb9.mf |
| 43 |
% lfb10.mf |
| 44 |
% lfb11.mf |
| 45 |
% lfb12.mf |
| 46 |
% lfbb5.mf |
| 47 |
% lfbb6.mf |
| 48 |
% lfbb7.mf |
| 49 |
% lfbb8.mf |
| 50 |
% lfbb9.mf |
| 51 |
% lfbb10.mf |
| 52 |
% lfbb11.mf |
| 53 |
% lfbb12.mf |
| 54 |
% ligature.mf |
| 55 |
% mu.mf |
| 56 |
% nu.mf |
| 57 |
% omega.mf |
| 58 |
% omikron.mf |
| 59 |
% others.mf |
| 60 |
% phi.mf |
| 61 |
% pi.mf |
| 62 |
% psi.mf |
| 63 |
% rho.mf |
| 64 |
% serifs.mf |
| 65 |
% sigma.mf |
| 66 |
% sigmafin.mf |
| 67 |
% tau.mf |
| 68 |
% theta.mf |
| 69 |
% upsilon.mf |
| 70 |
% xi.mf |
| 71 |
% zeta.mf |
| 72 |
% |
| 73 |
% and the derived files: |
| 74 |
% |
| 75 |
% lfb5.tfm |
| 76 |
% lfb6.tfm |
| 77 |
% lfb7.tfm |
| 78 |
% lfb8.tfm |
| 79 |
% lfb9.tfm |
| 80 |
% lfb10.tfm |
| 81 |
% lfb11.tfm |
| 82 |
% lfb12.tfm |
| 83 |
% lfbb5.tfm |
| 84 |
% lfbb6.tfm |
| 85 |
% lfbb7.tfm |
| 86 |
% lfbb8.tfm |
| 87 |
% lfbb9.tfm |
| 88 |
% lfbb10.tfm |
| 89 |
% lfbb11.tfm |
| 90 |
% lfbb12.tfm |
| 91 |
% |
| 92 |
% lfb5.600pk |
| 93 |
% lfb6.600pk |
| 94 |
% lfb7.600pk |
| 95 |
% lfb8.600pk |
| 96 |
% lfb9.600pk |
| 97 |
% lfb10.600pk |
| 98 |
% lfb11.600pk |
| 99 |
% lfb12.600pk |
| 100 |
% lfbb5.600pk |
| 101 |
% lfbb6.600pk |
| 102 |
% lfbb7.600pk |
| 103 |
% lfbb8.600pk |
| 104 |
% lfbb9.600pk |
| 105 |
% lfbb10.600pk |
| 106 |
% lfbb11.600pk |
| 107 |
% lfbb12.600pk |
| 108 |
% |
| 109 |
|
| 110 |
def stem |
| 111 |
(suffix stop, sbot, stoplft, stoprt, stopdish, sbotlft, sbotrt, sbotdish) |
| 112 |
(expr thetop, thebot, toptilt, bottilt, breadth, slabwidth, jut) |
| 113 |
= numeric stemangle; |
| 114 |
stemangle=angle(thetop-thebot); |
| 115 |
numeric endinset; |
| 116 |
endinset=3/4jut; |
| 117 |
penpos stop(breadth, stemangle-90); |
| 118 |
penpos sbot(breadth, stemangle-90); |
| 119 |
penpos stoplft(slabwidth, stemangle+toptilt); |
| 120 |
penpos stoprt(slabwidth, stemangle+toptilt); |
| 121 |
penpos sbotlft(slabwidth, stemangle+bottilt); |
| 122 |
penpos sbotrt(slabwidth, stemangle+bottilt); |
| 123 |
z[stoplft].r=thetop+(1/2breadth+jut)*dir(stemangle+toptilt+90); |
| 124 |
z[stoprt].r=thetop+(1/2breadth+jut)*dir(stemangle+toptilt-90); |
| 125 |
z[stopdish]=thetop+dishdepth*dir(stemangle+toptilt+180); |
| 126 |
z[sbotlft].l=thebot+(1/2breadth+jut)*dir(stemangle+bottilt+90); |
| 127 |
z[sbotrt].l=thebot+(1/2breadth+jut)*dir(stemangle+bottilt-90); |
| 128 |
z[sbotdish]=thebot+dishdepth*dir(stemangle+bottilt); |
| 129 |
z[stop]=thetop+whatever*dir(stemangle+180); |
| 130 |
if toptilt>0: |
| 131 |
z[stop].l=thetop+whatever*dir(stemangle+toptilt+90) |
| 132 |
+endinset*dir(stemangle+toptilt+180); |
| 133 |
else: |
| 134 |
z[stop].r=thetop+whatever*dir(stemangle+toptilt-90) |
| 135 |
+endinset*dir(stemangle+toptilt+180); |
| 136 |
fi; |
| 137 |
z[sbot]=thebot+whatever*dir(stemangle); |
| 138 |
if bottilt>0: |
| 139 |
z[sbot].r=thebot+whatever*dir(stemangle+bottilt-90) |
| 140 |
+endinset*dir(stemangle+bottilt); |
| 141 |
else: |
| 142 |
z[sbot].l=thebot+whatever*dir(stemangle+bottilt+90) |
| 143 |
+endinset*dir(stemangle+bottilt); |
| 144 |
fi; |
| 145 |
fill z[stop].l---z[sbot].l..{dir(stemangle+bottilt+90)}z[sbotlft].r |
| 146 |
--z[sbotlft].l..z[sbotdish]..z[sbotrt].l--z[sbotrt].r |
| 147 |
{dir(stemangle+bottilt+90)}..z[sbot].r---z[stop].r |
| 148 |
..{dir(stemangle+toptilt-90)}z[stoprt].l--z[stoprt].r |
| 149 |
..z[stopdish]..z[stoplft].r--z[stoplft].l{dir(stemangle+toptilt-90)} |
| 150 |
..cycle; |
| 151 |
fill z[stoplft].r--z[stoprt].r |
| 152 |
--z[stoprt].l+((0,0) rotated(stemangle+toptilt-90)) |
| 153 |
--z[stoplft].l+((0,0) rotated(stemangle+toptilt-90))--cycle; |
| 154 |
fill z[sbotlft].l--z[sbotrt].l |
| 155 |
--z[sbotrt].r+((0,0) rotated(stemangle+bottilt-90)) |
| 156 |
--z[sbotlft].r+((0,0) rotated(stemangle+bottilt-90))--cycle; |
| 157 |
enddef; |
| 158 |
|
| 159 |
|
| 160 |
def singlestem % bottom only has serif |
| 161 |
(suffix stop, sbot, sbotlft, sbotrt, sbotdish) |
| 162 |
(expr thetop, thebot, bottilt, breadth, slabwidth, jut) |
| 163 |
= numeric stemangle; |
| 164 |
stemangle=angle(thetop-thebot); |
| 165 |
numeric endinset; |
| 166 |
endinset=3/4jut; |
| 167 |
penpos stop(breadth, stemangle-90); |
| 168 |
penpos sbot(breadth, stemangle-90); |
| 169 |
penpos sbotlft(slabwidth, stemangle+bottilt); |
| 170 |
penpos sbotrt(slabwidth, stemangle+bottilt); |
| 171 |
z[stop]=thetop; |
| 172 |
z[sbotlft].l=thebot+(1/2breadth+jut)*dir(stemangle+bottilt+90); |
| 173 |
z[sbotrt].l=thebot+(1/2breadth+jut)*dir(stemangle+bottilt-90); |
| 174 |
z[sbotdish]=thebot+dishdepth*dir(stemangle+bottilt); |
| 175 |
z[sbot]=thebot+whatever*dir(stemangle); |
| 176 |
if bottilt>0: |
| 177 |
z[sbot].r=thebot+whatever*dir(stemangle+bottilt-90) |
| 178 |
+endinset*dir(stemangle+bottilt); |
| 179 |
else: |
| 180 |
z[sbot].l=thebot+whatever*dir(stemangle+bottilt+90) |
| 181 |
+endinset*dir(stemangle+bottilt); |
| 182 |
fi; |
| 183 |
fill z[stop].l---z[sbot].l..{dir(stemangle+bottilt+90)}z[sbotlft].r |
| 184 |
--z[sbotlft].l..z[sbotdish]..z[sbotrt].l--z[sbotrt].r |
| 185 |
{dir(stemangle+bottilt+90)}..z[sbot].r---z[stop].r--cycle; |
| 186 |
fill z[sbotlft].l--z[sbotrt].l |
| 187 |
--z[sbotrt].r+((0,0) rotated(stemangle+bottilt-90)) |
| 188 |
--z[sbotlft].r+((0,0) rotated(stemangle+bottilt-90))--cycle; |
| 189 |
enddef; |
| 190 |
|
| 191 |
|
| 192 |
def oneandlefthalfstem |
| 193 |
(suffix stop, sbot, stoplft, stoprt, stopdish, sbotlft, sbotrt, sbotdish) |
| 194 |
(expr thetop, thebot, toptilt, bottilt, breadth, slabwidth, jut) |
| 195 |
= numeric stemangle; |
| 196 |
stemangle=angle(thetop-thebot); |
| 197 |
numeric endinset; |
| 198 |
endinset=3/4jut; |
| 199 |
penpos stop(breadth, stemangle-90); |
| 200 |
penpos sbot(breadth, stemangle-90); |
| 201 |
penpos stoplft(slabwidth, stemangle+toptilt); |
| 202 |
penpos stoprt(slabwidth, stemangle); |
| 203 |
penpos sbotlft(slabwidth, stemangle+bottilt); |
| 204 |
penpos sbotrt(slabwidth, stemangle+bottilt); |
| 205 |
z[stoplft].r=thetop+(1/2breadth+jut)*dir(stemangle+toptilt+90); |
| 206 |
z[stoprt].r=thetop+(1/2breadth)*dir(stemangle+toptilt-90); |
| 207 |
z[stopdish]=thetop+dishdepth*dir(stemangle+toptilt+180); |
| 208 |
z[sbotlft].l=thebot+(1/2breadth+jut)*dir(stemangle+bottilt+90); |
| 209 |
z[sbotrt].l=thebot+(1/2breadth+jut)*dir(stemangle+bottilt-90); |
| 210 |
z[sbotdish]=thebot+dishdepth*dir(stemangle+bottilt); |
| 211 |
z[stop]=thetop+whatever*dir(stemangle+180); |
| 212 |
if toptilt>0: |
| 213 |
z[stop].l=thetop+whatever*dir(stemangle+toptilt+90) |
| 214 |
+endinset*dir(stemangle+toptilt+180); |
| 215 |
else: |
| 216 |
z[stop].r=thetop+whatever*dir(stemangle+toptilt-90) |
| 217 |
+endinset*dir(stemangle+toptilt+180); |
| 218 |
fi; |
| 219 |
z[sbot]=thebot+whatever*dir(stemangle); |
| 220 |
if bottilt>0: |
| 221 |
z[sbot].r=thebot+whatever*dir(stemangle+bottilt-90) |
| 222 |
+endinset*dir(stemangle+bottilt); |
| 223 |
else: |
| 224 |
z[sbot].l=thebot+whatever*dir(stemangle+bottilt+90) |
| 225 |
+endinset*dir(stemangle+bottilt); |
| 226 |
fi; |
| 227 |
fill z[stop].l---z[sbot].l..{dir(stemangle+bottilt+90)}z[sbotlft].r |
| 228 |
--z[sbotlft].l..z[sbotdish]..z[sbotrt].l--z[sbotrt].r |
| 229 |
{dir(stemangle+bottilt+90)}..z[sbot].r---z[stoprt].r |
| 230 |
--z[stoplft].r--z[stoplft].l{dir(stemangle+toptilt-90)} |
| 231 |
..cycle; |
| 232 |
fill z[sbotlft].l--z[sbotrt].l |
| 233 |
--z[sbotrt].r+((0,0) rotated(stemangle+bottilt-90)) |
| 234 |
--z[sbotlft].r+((0,0) rotated(stemangle+bottilt-90))--cycle; |
| 235 |
enddef; |
| 236 |
|
| 237 |
|
| 238 |
def oneandrighthalfstem |
| 239 |
(suffix stop, sbot, stoplft, stoprt, stopdish, sbotlft, sbotrt, sbotdish) |
| 240 |
(expr thetop, thebot, toptilt, bottilt, breadth, slabwidth, jut) |
| 241 |
= numeric stemangle; |
| 242 |
stemangle=angle(thetop-thebot); |
| 243 |
numeric endinset; |
| 244 |
endinset=3/4jut; |
| 245 |
penpos stop(breadth, stemangle-90); |
| 246 |
penpos sbot(breadth, stemangle-90); |
| 247 |
penpos stoplft(slabwidth, stemangle); |
| 248 |
penpos stoprt(slabwidth, stemangle+toptilt); |
| 249 |
penpos sbotlft(slabwidth, stemangle+bottilt); |
| 250 |
penpos sbotrt(slabwidth, stemangle+bottilt); |
| 251 |
z[stoplft].r=thetop+(1/2breadth)*dir(stemangle+toptilt+90); |
| 252 |
z[stoprt].r=thetop+(1/2breadth+jut)*dir(stemangle+toptilt-90); |
| 253 |
z[stopdish]=thetop+dishdepth*dir(stemangle+toptilt+180); |
| 254 |
z[sbotlft].l=thebot+(1/2breadth+jut)*dir(stemangle+bottilt+90); |
| 255 |
z[sbotrt].l=thebot+(1/2breadth+jut)*dir(stemangle+bottilt-90); |
| 256 |
z[sbotdish]=thebot+dishdepth*dir(stemangle+bottilt); |
| 257 |
z[stop]=thetop+whatever*dir(stemangle+180); |
| 258 |
if toptilt>0: |
| 259 |
z[stop].l=thetop+whatever*dir(stemangle+toptilt+90) |
| 260 |
+endinset*dir(stemangle+toptilt+180); |
| 261 |
else: |
| 262 |
z[stop].r=thetop+whatever*dir(stemangle+toptilt-90) |
| 263 |
+endinset*dir(stemangle+toptilt+180); |
| 264 |
fi; |
| 265 |
z[sbot]=thebot+whatever*dir(stemangle); |
| 266 |
if bottilt>0: |
| 267 |
z[sbot].r=thebot+whatever*dir(stemangle+bottilt-90) |
| 268 |
+endinset*dir(stemangle+bottilt); |
| 269 |
else: |
| 270 |
z[sbot].l=thebot+whatever*dir(stemangle+bottilt+90) |
| 271 |
+endinset*dir(stemangle+bottilt); |
| 272 |
fi; |
| 273 |
fill z[stoplft].r---z[sbot].l..{dir(stemangle+bottilt+90)}z[sbotlft].r |
| 274 |
--z[sbotlft].l..z[sbotdish]..z[sbotrt].l--z[sbotrt].r |
| 275 |
{dir(stemangle+bottilt+90)}..z[sbot].r---z[stop].r |
| 276 |
..{dir(stemangle+toptilt-90)}z[stoprt].l--z[stoprt].r--cycle; |
| 277 |
fill z[sbotlft].l--z[sbotrt].l |
| 278 |
--z[sbotrt].r+((0,0) rotated(stemangle+bottilt-90)) |
| 279 |
--z[sbotlft].r+((0,0) rotated(stemangle+bottilt-90))--cycle; |
| 280 |
enddef; |
| 281 |
|
| 282 |
|
| 283 |
def barrightserif |
| 284 |
(suffix shoulder, elbow, wrist, hand) |
| 285 |
(expr thestart, theend, breadth, serifwidth, jut, indent) |
| 286 |
= numeric thebarangle; |
| 287 |
thebarangle=angle(theend-thestart); |
| 288 |
numeric forearm; |
| 289 |
forearm=3/4jut; |
| 290 |
penpos shoulder(breadth, thebarangle+90); |
| 291 |
penpos elbow(breadth, thebarangle+90); |
| 292 |
penpos wrist(breadth, thebarangle+90); |
| 293 |
penpos hand(serifwidth, thebarangle); |
| 294 |
z[shoulder].r=thestart; |
| 295 |
z[elbow].r=z[wrist].r+forearm*dir(thebarangle-180); |
| 296 |
z[wrist].r=theend+indent*dir(thebarangle-180); |
| 297 |
z[hand].r=theend+(breadth+jut)*dir(thebarangle-90); |
| 298 |
numeric serifangle; |
| 299 |
serifangle=angle(z[wrist].r-z[hand].r); |
| 300 |
fill z[shoulder].l---z[elbow].l..{dir(serifangle-180)}z[hand].l |
| 301 |
--z[hand].r--z[wrist].r--z[shoulder].r--cycle; |
| 302 |
enddef; |
| 303 |
|
| 304 |
|
| 305 |
def barleftserif |
| 306 |
(suffix shoulder, elbow, wrist, hand) |
| 307 |
(expr thestart, theend, breadth, serifwidth, jut, indent) |
| 308 |
= numeric thebarangle; |
| 309 |
thebarangle=angle(theend-thestart); |
| 310 |
numeric forearm; |
| 311 |
forearm=3/4jut; |
| 312 |
penpos shoulder(breadth, thebarangle-90); |
| 313 |
penpos elbow(breadth, thebarangle-90); |
| 314 |
penpos wrist(breadth, thebarangle-90); |
| 315 |
penpos hand(serifwidth, thebarangle); |
| 316 |
z[shoulder].r=thestart; |
| 317 |
z[elbow].r=z[wrist].r+forearm*dir(thebarangle-180); |
| 318 |
z[wrist].r=theend+indent*dir(thebarangle-180); |
| 319 |
z[hand].r=theend+(breadth+jut)*dir(thebarangle+90); |
| 320 |
numeric serifangle; |
| 321 |
serifangle=angle(z[wrist].r-z[hand].r); |
| 322 |
fill z[shoulder].l---z[elbow].l..{dir(serifangle-180)}z[hand].l |
| 323 |
--z[hand].r--z[wrist].r--z[shoulder].r--cycle; |
| 324 |
enddef; |