| 1 |
%%%% This is the main source for the French Cursive font. |
| 2 |
%%%% (c) Emanuel Beffara, 2001--2011. This work is covered by the LPPL licence. |
| 3 |
%%%% |
| 4 |
%%%% You can get a pretty-printed document with the commented source code (and |
| 5 |
%%%% especially the first page with an explanation of the parameters) by first |
| 6 |
%%%% running "mft frcursive" to get the TeX source and then compiling the |
| 7 |
%%%% driver file "fcsource.tex" (normally shipped with this source file). This |
| 8 |
%%%% compilation needs the standard 10-pt version (driver "frcr10.mf") to be |
| 9 |
%%%% available. The document is 52 pages long. |
| 10 |
%%%% |
| 11 |
%%\title French Cursive, |
| 12 |
%% a cursive handwriting font in \MF \cr |
| 13 |
%% \fc so you can write like this. |
| 14 |
%%{\parindent=2em \parskip=1ex |
| 15 |
%% |
| 16 |
%% The main difficulty in the design of a good cursive font lies in the fact |
| 17 |
%% that words must appear to be written in a single pen stroke. So words will |
| 18 |
%% actually consist in a succession of letter glyphs and link glyphs, and the |
| 19 |
%% shapes of the links will have to be adapted to the surrounding letters. |
| 20 |
%% Here we fully exploit \MF's ligatures system by letting it insert the link |
| 21 |
%% glyphs automatically between letters. |
| 22 |
%% |
| 23 |
%% In the following definitions, the letter glyphs correspond to the |
| 24 |
%% invariable parts of a letter's shape. For instance, in the glyph of a |
| 25 |
%% letter with a high loop like {\def\fs#1{{\fc\smash#1}} \fs b, \fs f, \fs h, |
| 26 |
%% \fs k, or \fs l}, the stroke starts at the top of the loop because the |
| 27 |
%% initial part depends on the height the previous letter starts at. The link |
| 28 |
%% glyphs are located in the range 0--31, which is reserved for accents and |
| 29 |
%% common ligatures in the T1 encoding. |
| 30 |
%% |
| 31 |
%% This file won't generate a font by itself. It is supposed to be read by a |
| 32 |
%% driver file after setting several parameters to control the actual shape of |
| 33 |
%% the font. The required parameters are the following: |
| 34 |
%% \item absolute dimensions: \deflist{% |
| 35 |
%% \\{ex}\SH & the base height (height of small letters like {\fc a})\cr |
| 36 |
%% \\{thin}\SH & the thickness of line ends\cr |
| 37 |
%% \\{med}\SH & the thickness of hairlines\cr |
| 38 |
%% \\{thick}\SH & the thickness of stems\cr |
| 39 |
%% \\{dot\_size}\SH & the diameter of dots\cr} |
| 40 |
%% \item ratios: \deflist{% |
| 41 |
%% \\{base\_width} & base width of the font with respect to \\{ex}\SH{} |
| 42 |
%% (this is the width of an unlinked {\fc a})\cr |
| 43 |
%% \\{slant} & the slant ratio to be applied\cr} |
| 44 |
%% \item widths, relative to \\{base\_width}: \deflist{% |
| 45 |
%% \\{accent\_wd} & base width of accents |
| 46 |
%% (width of acute and grave accents)\cr |
| 47 |
%% \\{link\_width} & the width of inter-letter links\cr} |
| 48 |
%% \item heights, relative to \\{ex}\SH: \deflist{% |
| 49 |
%% \\{straight\_ascend} & height of ascending bars like {\fc t}\cr |
| 50 |
%% \\{loop\_ascend} & height of ascending loops like {\fc\smash l}\cr |
| 51 |
%% \\{uc\_ascend} & height of uppercase letters\cr |
| 52 |
%% \\{straight\_descend} & depth of descending bars like {\fc\smash p}\cr |
| 53 |
%% \\{loop\_descend} & depth of descending loops like {\fc\smash j}\cr |
| 54 |
%% \\{dot\_height} & height of the dot of {\fc i} and {\fc\smash j} |
| 55 |
%% above the base line\cr |
| 56 |
%% \\{accent\_bot} & height of the bottom of accents\cr |
| 57 |
%% \\{accent\_top} & height of the top of accents\cr |
| 58 |
%% \\{cedilla\_dp} & depth of the {\it top} of the cedilla's loop\cr} |
| 59 |
%%} |
| 60 |
%%%% These are MFT formatting definitions: |
| 61 |
%%% length penpos make_accented make_cedilla |
| 62 |
%%% length label penlabels range save_letter |
| 63 |
%%% and thru |
| 64 |
%%% end bye |
| 65 |
%%%% We don't want one-line comments to be right-aligned: |
| 66 |
%%\def\9{$\quad{\eightrm\%}} |
| 67 |
%%%% vim: set foldmethod=marker : |
| 68 |
|
| 69 |
%%\sec Global definitions. %{{{1 |
| 70 |
|
| 71 |
%% Once all parameters are defined, we can compute the non-sharp values of the |
| 72 |
%% absolute dimensions according to the current mode. |
| 73 |
|
| 74 |
define_pixels(ex); |
| 75 |
define_whole_blacker_pixels(med, thin, thick, dot_size); |
| 76 |
|
| 77 |
%% The \cs\fontdimen\ registers are also computed here. The ones for spacing |
| 78 |
%% are kind of arbitrary, but these values look right. |
| 79 |
|
| 80 |
font_slant slant; |
| 81 |
font_normal_space 3/2 * base_width * ex#; |
| 82 |
font_normal_shrink 1/2 * base_width * ex#; |
| 83 |
font_normal_stretch 1/2 * base_width * ex#; |
| 84 |
font_x_height ex#; |
| 85 |
font_quad 2 * base_width * ex#; |
| 86 |
|
| 87 |
%% The following three constants describe the possible types of links. Low |
| 88 |
%% links are horizontal on the base line. High links are horizontal at height |
| 89 |
%% \\{hl\_y} with respect to \\{ex}\SH: |
| 90 |
|
| 91 |
hl_y := 1/2; % the height of high links |
| 92 |
|
| 93 |
%% Medium links are lower and directed upwards. |
| 94 |
|
| 95 |
ml_y := 13/600 / link_width; % the height of medium links |
| 96 |
ml_a := angle(.288675, ml_y); % the angle of medium links |
| 97 |
|
| 98 |
%% We take care of slanted shapes by simply applying a global transformation. |
| 99 |
|
| 100 |
currenttransform := currenttransform slanted slant; |
| 101 |
|
| 102 |
%% Some shapes are defined differently in fixed-thickness mode. |
| 103 |
|
| 104 |
if unknown fixed: |
| 105 |
boolean fixed; fixed := false; |
| 106 |
fi |
| 107 |
|
| 108 |
%% Some letter shapes have to be saved: |
| 109 |
%% \item a, c, e, g, l, n, o, r, t, u, y, z and uppercase letters are normal, |
| 110 |
%% they are used for making accented variants |
| 111 |
%% \item i is dotless, it is kept for making accented versions |
| 112 |
%% \item j is dotless, its shape appears in y, G, J and Y |
| 113 |
%% \item q and s are unlinked on the right (like at the end of words), they |
| 114 |
%% are kept to make linked versions |
| 115 |
%% \item exclamation and interrogation marks are used for the spanish |
| 116 |
%% reversed version |
| 117 |
%% |
| 118 |
%% The \\{save\_letter} macro saves the picture of a given glyph so that it |
| 119 |
%% can be reused (as explained above). The first argument is a suffix that |
| 120 |
%% represents the letter, the second one is the $x$ coordinate where accents |
| 121 |
%% should be placed (i.e. roughly the middle of the letter). |
| 122 |
|
| 123 |
def save_letter (suffix ltr) (expr pos) = |
| 124 |
picture letter.ltr; |
| 125 |
letter.ltr := currentpicture; |
| 126 |
accpos.ltr := cedpos.ltr := pos; |
| 127 |
width.ltr := w; |
| 128 |
height.ltr := h; |
| 129 |
if proofing > 1: proofrule((pos,-d), (pos,h)); fi |
| 130 |
width#.ltr := charwd; % for the accented version's width |
| 131 |
height#.ltr := charht; % for the height of accented uppercase letters |
| 132 |
depth#.ltr := chardp |
| 133 |
enddef; |
| 134 |
|
| 135 |
%% Most characters have absolute widths of the same form: |
| 136 |
|
| 137 |
def ltr_wd(expr fb, fl) = (fb * base_width + fl * link_width) * ex# enddef; |
| 138 |
def ltr_w(expr fact) = ltr_wd(fact, 1) enddef; |
| 139 |
|
| 140 |
%% And some constants are useful: |
| 141 |
|
| 142 |
lnk := link_width / base_width; |
| 143 |
|
| 144 |
height_with_dot := dot_height * ex# + dot_size# / 2; |
| 145 |
|
| 146 |
ml_d := ml_a - 90; % the stroke angle for medium links |
| 147 |
pair ml_dir; ml_dir := dir ml_a; % and the line's direction |
| 148 |
|
| 149 |
%% And these multiplicative factors are simply everywhere: |
| 150 |
|
| 151 |
def u = scaled ex xscaled base_width enddef; |
| 152 |
def uu = xscaled (base_width * ex) |
| 153 |
yscaled (uc_ascend * ex) enddef; |
| 154 |
def ua = xscaled (base_width * accent_wd * ex) |
| 155 |
yscaled ((accent_top - accent_bot) * ex) |
| 156 |
shifted (0, accent_bot * ex) enddef; |
| 157 |
v := base_width * ex; |
| 158 |
|
| 159 |
%% For proof-mode, we define the following macro to mark all useful |
| 160 |
%% information. |
| 161 |
|
| 162 |
def label(expr n) = |
| 163 |
if proofing > 1: |
| 164 |
penlabels(range 1 thru n); |
| 165 |
if h > ex: proofrule((0, ex), (w, ex)); fi |
| 166 |
fi |
| 167 |
enddef; |
| 168 |
|
| 169 |
%% Hinting... |
| 170 |
|
| 171 |
def goodx expr e = |
| 172 |
begingroup save x, y; (x,y) = e; (good.x x, y) endgroup enddef; |
| 173 |
|
| 174 |
def goodxy expr e = |
| 175 |
begingroup save x, y; (x,y) = e; (good.x x, good.y y) endgroup enddef; |
| 176 |
|
| 177 |
pickup pencircle scaled thick; thickpen := savepen; |
| 178 |
pickup pencircle scaled med; medpen := savepen; |
| 179 |
pickup pencircle scaled thin; thinpen := savepen; |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
%% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% |
| 184 |
|
| 185 |
%%\sec Lowercase letters. %{{{1 |
| 186 |
|
| 187 |
a_left := 1/3; % the height of the left end of small loops |
| 188 |
|
| 189 |
"The letter a"; |
| 190 |
beginchar("a", ltr_w(7/6), ex#, 0); |
| 191 |
penpos1(med, 0); x1r = hround (base_width * ex); y1 = 2/3 ex; |
| 192 |
penpos2(med, 90); z2r = (3/5, 1) u; |
| 193 |
penpos3(thick, 180); z3r = (0, a_left) u; |
| 194 |
penpos4(med, 270); z4r = (1/2, 0) u; |
| 195 |
penpos5(med, 0); x5 = x1; y5 = 1/3 ex; |
| 196 |
|
| 197 |
penstroke z1e .. z2e .. tension 1.2 .. z3e .. z4e{right} .. z5e ; |
| 198 |
|
| 199 |
penpos6(thick, 195); z6 = z1 + (1/10, 2/9) u; |
| 200 |
penpos7(thick, 180); z7r = z1l; |
| 201 |
penpos8(thick, 180); z8r = z5l; |
| 202 |
penpos9(med, 270); z9r = (7/6 + lnk, 0) u; |
| 203 |
|
| 204 |
penstroke z6e .. z7e .. tension 2 .. z8e .. {right}z9e ; |
| 205 |
|
| 206 |
label(9); |
| 207 |
|
| 208 |
save_letter(a)(x2); |
| 209 |
cedpos.a := x9; |
| 210 |
endchar; |
| 211 |
|
| 212 |
"The letter b"; |
| 213 |
beginchar("b", ltr_w(1), loop_ascend * ex#, 0); |
| 214 |
penpos2(med, 330); z2 = goodx (3/4, 2/3 * loop_ascend) u ; |
| 215 |
penpos3(med, 100); z3r = (4/10, loop_ascend) u ; |
| 216 |
penpos4(thick, 180); z4r = goodx (0, 3/5 * loop_ascend) u ; |
| 217 |
penpos5(thick, 180); x5 = x4; y5 = ex ; |
| 218 |
penpos6(med, 260); z6r = (1/2, 0) u ; |
| 219 |
penpos7(med, 0); z7 = (v, y10l); |
| 220 |
penpos8(thin, 135); z8 = z7l + (-1, 1) * ex / 6 ; |
| 221 |
penpos9(med, 270); z9l = z7l ; |
| 222 |
penpos10(med, 270); z10 = (1 + lnk, hl_y) u; |
| 223 |
|
| 224 |
penstroke z2e{up} .. tension 1.2 .. z3e |
| 225 |
.. controls (x4e,y3e) and (x4e,2/3[y3e,y4e]) .. z4e |
| 226 |
.. z5e{down} .. z6e .. {up}z7e .. z8e .. {right}z9e .. {right}z10e |
| 227 |
; |
| 228 |
|
| 229 |
label(10); |
| 230 |
endchar ; |
| 231 |
|
| 232 |
"The letter c"; |
| 233 |
beginchar("c", ltr_w(1), ex#, 0); |
| 234 |
penpos1(med, 30); z1r = (1, 3/4) u; |
| 235 |
penpos2(med, 90); z2r = (3/5, 1) u; |
| 236 |
penpos3(thick, 180); z3r = (0, a_left) u; |
| 237 |
penpos4(med, 270); z4r = (1/2, 0) u; |
| 238 |
penpos5(med, ml_d); z5 = (1 + lnk, ml_y) u; |
| 239 |
|
| 240 |
penstroke z1e .. z2e .. tension 1.2 .. z3e .. z4e{right} .. {ml_dir}z5e ; |
| 241 |
|
| 242 |
label(5); |
| 243 |
|
| 244 |
save_letter(c)(3/5 v); |
| 245 |
endchar ; |
| 246 |
|
| 247 |
"The letter d"; |
| 248 |
beginchar("d", ltr_w(7/6), straight_ascend * ex#, 0); |
| 249 |
penpos1(med, 0); x1r = hround (base_width * ex); y1 = 2/3 ex; |
| 250 |
penpos2(med, 90); z2r = (3/5, 1) u; |
| 251 |
penpos3(thick, 180); z3r = (0, a_left) u; |
| 252 |
penpos4(med, 270); z4r = (1/2, 0) u; |
| 253 |
penpos5(med, 0); z5r = (1, 1/3) u; |
| 254 |
|
| 255 |
penstroke z1e .. z2e .. tension 1.2 .. z3e .. z4e{right} .. z5e ; |
| 256 |
|
| 257 |
penpos6(thick, 170); x6r = x1l; y6 = straight_ascend * ex; |
| 258 |
penpos7(thick, 180); x7r = x1l; y7 = 2/3 * straight_ascend * ex; |
| 259 |
penpos8(thick, 180); x8r = x7r; y8 = y5; |
| 260 |
penpos9(med, 270); z9r = (7/6 + lnk, 0) u; |
| 261 |
|
| 262 |
penstroke z6e .. {down}z7e .. {down}z8e .. {right}z9e ; |
| 263 |
|
| 264 |
label(9); |
| 265 |
|
| 266 |
save_letter(d)(x6); |
| 267 |
endchar; |
| 268 |
|
| 269 |
"The letter e"; |
| 270 |
beginchar("e", ltr_w(1), ex#, 0); |
| 271 |
penpos1(med, 270); z1 = (thin, 1/2 * ex) ; |
| 272 |
penpos2(med, 270); z2 = (1/2, 1/2) u; |
| 273 |
penpos3(med, 0); z3r = (1, 3/4) u; |
| 274 |
penpos4(med, 90); z4r = (3/5, 1) u; |
| 275 |
penpos5(thick, 180); z5r = (0, a_left) u; |
| 276 |
penpos6(med, 270); z6r = (1/2, 0) u; |
| 277 |
penpos7(med, ml_d); z7 = (1 + lnk, ml_y) u; |
| 278 |
|
| 279 |
penstroke z1e .. z2e{right} .. tension 1.2 .. {up}z3e |
| 280 |
.. z4e .. tension 1.2 .. z5e .. z6e{right} .. {ml_dir}z7e ; |
| 281 |
|
| 282 |
label(7); |
| 283 |
|
| 284 |
save_letter(e)(3/5 v); |
| 285 |
endchar ; |
| 286 |
|
| 287 |
"The letter f"; |
| 288 |
beginchar("f", ltr_w(5/6), loop_ascend * ex#, loop_descend * ex#); |
| 289 |
penpos2(med, 330); z2 = goodx (3/4, 2/3 * loop_ascend) u ; |
| 290 |
penpos3(med, 100); z3r = (4/10, loop_ascend) u ; |
| 291 |
penpos4(thick, 180); z4r = (0, 3/5 * loop_ascend) u ; |
| 292 |
penpos5(thick, 180); z5r = (0, -1/3 * loop_descend) u ; |
| 293 |
penpos6(med, 270); z6r = (4/10, - loop_descend) u ; |
| 294 |
penpos7(med, 0); z7r = goodx (8/9, -2/5 * loop_descend) u ; |
| 295 |
penpos8(med, 25); z8 = (2/3, 1/6) u ; |
| 296 |
penpos9(thin, 135); z9 = z8 + (-2, 1) * ex / 9 ; |
| 297 |
penpos10(med, 270); z10r = (2/3, 0) u ; |
| 298 |
penpos11(med, ml_d); z11 = (5/6 + lnk, ml_y) u; |
| 299 |
|
| 300 |
penstroke z2e{up} .. tension 1.2 .. z3e |
| 301 |
.. controls (x4e,y3e) and (x4e,2/3[y3e,y4e]) .. z4e .. z5e |
| 302 |
.. controls (x5e,2/3[y6e,y5e]) and (x5e,y6e) .. z6e .. tension 1.2 |
| 303 |
.. z7e {up} .. z8e {z9-z7} .. tension 1.1 |
| 304 |
.. {dir 225} z9e .. tension 1.1 |
| 305 |
.. {right}z10e .. {ml_dir}z11e ; |
| 306 |
|
| 307 |
label(11); |
| 308 |
endchar ; |
| 309 |
|
| 310 |
"The letter g"; |
| 311 |
beginchar("g", ltr_w(9/8), ex#, loop_descend * ex#); |
| 312 |
penpos1(med, 0); x1r = hround (base_width * ex); y1 = 2/3 ex; |
| 313 |
penpos2(med, 90); z2r = (3/5, 1) u; |
| 314 |
penpos3(thick, 180); z3r = (0, a_left) u; |
| 315 |
penpos4(med, 270); z4r = goodx (1/2, 0) u; |
| 316 |
penpos5(med, 0); x5r = x1r; y5 = 1/3 ex; |
| 317 |
|
| 318 |
penstroke z1e .. z2e .. tension 1.2 .. z3e .. z4e .. z5e ; |
| 319 |
|
| 320 |
penpos6(thick, 190); z6 = z1 + (1/10, 2/9) u; |
| 321 |
penpos7(thick, 180); z7r = z1l; |
| 322 |
penpos8(thick, 180); x8r = x5l; y8 = -1/3 * loop_descend * ex; |
| 323 |
penpos9(med, 90); x9 = x4; y9l = vround (-loop_descend * ex); |
| 324 |
penpos10(med, 315); z10l = (1/4, -1/3 * loop_descend) u; |
| 325 |
penpos11(med, ml_d); z11 = (9/8 + lnk, ml_y) u; |
| 326 |
|
| 327 |
penstroke z6e .. z7e{down} .. {down}z8e .. tension 1.1 |
| 328 |
.. z9e .. z10e .. {ml_dir}z11e ; |
| 329 |
|
| 330 |
label(11); |
| 331 |
|
| 332 |
save_letter(g)(x2); |
| 333 |
endchar; |
| 334 |
|
| 335 |
"The letter h"; |
| 336 |
beginchar("h", ltr_w(1), loop_ascend * ex#, 0); |
| 337 |
penpos2(med, 330); z2 = goodx (3/4, 2/3 * loop_ascend) u ; |
| 338 |
penpos3(med, 100); z3r = (4/10, loop_ascend) u ; |
| 339 |
penpos4(thick, 180); z4r = goodx (0, 3/5 * loop_ascend) u ; |
| 340 |
penpos5(thick, 180); z5r = (0, 0) u ; |
| 341 |
|
| 342 |
penstroke z2e{up} .. tension 1.2 .. z3e |
| 343 |
.. controls (x4e,y3e) and (x4e,2/3[y3e,y4e]) .. z4e .. z5e ; |
| 344 |
|
| 345 |
penpos6(thick, 0); z6l = (0, 1/3) u; |
| 346 |
penpos7(med, 270); z7l = (0.55, 1) u; |
| 347 |
penpos8(thick, 180); x8l = hround (base_width * ex); y8 = 1/2 ex; |
| 348 |
penpos9(med, 270); z9r = (1 + lnk, 0) u; |
| 349 |
|
| 350 |
penstroke z6e{up} .. tension 1.4 .. z7e %.. tension 1.1 |
| 351 |
.. {down}z8e .. {right}z9e; |
| 352 |
|
| 353 |
label(9); |
| 354 |
endchar; |
| 355 |
|
| 356 |
"The letter i"; |
| 357 |
beginchar("i", ltr_w(1/2), height_with_dot, 0); |
| 358 |
penpos1(thick, 180); x1r = hround (base_width * ex / 6); y1 = ex; |
| 359 |
penpos2(thick, 180); x2r = x1r; y2r = 2/3 ex; |
| 360 |
penpos3(med, 270); z3r = (1/2 + lnk, 0) u; |
| 361 |
|
| 362 |
penstroke z1e -- z2e{down} .. {right}z3e; |
| 363 |
|
| 364 |
save_letter(i)(x1); |
| 365 |
height.i := ex; height#.i := ex#; % the letter is saved without the dot |
| 366 |
|
| 367 |
pickup pencircle scaled thick; |
| 368 |
x4 = x1; y4 = dot_height * ex; |
| 369 |
pickup pencircle scaled dot_size; |
| 370 |
drawdot z4; |
| 371 |
|
| 372 |
label(4); |
| 373 |
endchar; |
| 374 |
|
| 375 |
"The letter j"; |
| 376 |
beginchar("j", ltr_w(7/8), ex#, loop_descend * ex#); |
| 377 |
penpos1(thick, 180); z1 = good.lft ((3/4, 1) u); |
| 378 |
penpos2(thick, 180); x2 = x1; y2 = -1/3 loop_descend * ex; |
| 379 |
penpos3(med, 90); x3 = x1/3; y3l = vround (-loop_descend * ex); |
| 380 |
penpos4(med, 315); z4 = (0, -1/3 * loop_descend) u; |
| 381 |
penpos5(med, ml_d); z5 = (7/8 + lnk, ml_y) u; |
| 382 |
|
| 383 |
penstroke z1e{down} .. {down}z2e .. tension 1.1 .. z3e .. z4e .. {ml_dir}z5e; |
| 384 |
|
| 385 |
save_letter(j)(x1); |
| 386 |
|
| 387 |
pickup pencircle scaled thick; |
| 388 |
x6 = x1; y6 = dot_height * ex; |
| 389 |
pickup pencircle scaled dot_size; |
| 390 |
drawdot z6; |
| 391 |
|
| 392 |
label(6); |
| 393 |
endchar; |
| 394 |
|
| 395 |
"The letter k"; |
| 396 |
beginchar("k", ltr_w(5/6), loop_ascend * ex#, 0); |
| 397 |
penpos2(med, 330); z2 = goodx (3/4, 2/3 * loop_ascend) u ; |
| 398 |
penpos3(med, 100); z3r = (4/10, loop_ascend) u ; |
| 399 |
penpos4(thick, 180); z4r = (0, 3/5 * loop_ascend) u ; |
| 400 |
penpos5(thick, 180); z5r = (0, 0) u ; |
| 401 |
|
| 402 |
penstroke z2e{up} .. tension 1.2 .. z3e |
| 403 |
.. controls (x4e,y3e) and (x4e,2/3[y3e,y4e]) .. z4e .. z5e ; |
| 404 |
|
| 405 |
penpos6(med, 270); z6 = (thick, 13/16 * ex); |
| 406 |
penpos7(med, 180); z7l = goodx (8/9, 9/16) u; |
| 407 |
penpos8(med, 90); z8 = (1/8, 2/5) u; |
| 408 |
|
| 409 |
penstroke z6e{dir 60} .. {down}z7e .. tension 1.3 .. {dir 140}z8e; |
| 410 |
|
| 411 |
penpos9 (med, 270); z9 = z8; |
| 412 |
penpos10(med, 270); z10r = (5/6 + lnk, 0) u; |
| 413 |
|
| 414 |
penstroke z9e{dir 10} .. tension 0.8 ..{right}z10e; |
| 415 |
|
| 416 |
label(11); |
| 417 |
endchar; |
| 418 |
|
| 419 |
"The letter l"; |
| 420 |
beginchar("l", ltr_w(2/3), loop_ascend * ex#, 0); |
| 421 |
penpos2(med, 330); z2 = goodx (3/4, 2/3 * loop_ascend) u; |
| 422 |
penpos3(med, 100); z3r = (4/10, loop_ascend) u; |
| 423 |
penpos4(thick, 180); z4r = (0, 3/5 * loop_ascend) u; |
| 424 |
penpos5(thick, 180); z5r = (0, 1) u; |
| 425 |
penpos6(med, 260); z6r = (1/2, 0) u; |
| 426 |
penpos7(med, ml_d); z7 = (2/3 + lnk, ml_y) u; |
| 427 |
|
| 428 |
penstroke z2e{up} .. tension 1.2 .. z3e |
| 429 |
.. controls (x4e,y3e) and (x4e,2/3[y3e,y4e]) .. z4e -- z5e |
| 430 |
.. controls (x5e,1/2[y5e,y6e]) and (x5e,y6e) .. z6e .. {ml_dir}z7e ; |
| 431 |
|
| 432 |
label(7); |
| 433 |
|
| 434 |
save_letter(l)(x3); |
| 435 |
endchar ; |
| 436 |
|
| 437 |
"The letter m"; |
| 438 |
beginchar("m", ltr_w(13/6), ex#, 0); |
| 439 |
pickup thickpen; |
| 440 |
penpos1(med, 270); z1l = (1/3, 1) u; |
| 441 |
penpos2(thick, 180); z2 = good.lft ((2/3, 1/3) u); |
| 442 |
penpos3(thick, 180); x3 = x2; y3 = 0; |
| 443 |
|
| 444 |
penstroke z1e{right} .. {down}z2e -- z3e; |
| 445 |
|
| 446 |
penpos4(thick, 0); z4 = z2; |
| 447 |
penpos5(med, 270); z5l = (1, 1) u; |
| 448 |
penpos6(thick, 180); z6 = good.lft ((4/3, 1/3) u); |
| 449 |
penpos7(thick, 180); x7 = x6; y7 = 0; |
| 450 |
|
| 451 |
penstroke z4e{up} .. {right}z5e .. {down}z6e -- z7e; |
| 452 |
|
| 453 |
penpos8 (thick, 0); z8 = z6; |
| 454 |
penpos9 (med, 270); z9l = (5/3, 1) u; |
| 455 |
penpos10(thick, 180); x10 - x6 = x6 - x2; y10 = 2/5 ex; |
| 456 |
penpos11(med, 270); z11r = (13/6 + lnk, 0) u; |
| 457 |
|
| 458 |
penstroke z8e{up} .. {right}z9e .. {down}z10e .. {right}z11e; |
| 459 |
|
| 460 |
label(11); |
| 461 |
endchar; |
| 462 |
|
| 463 |
"The letter n"; |
| 464 |
beginchar("n", ltr_w(3/2), ex#, 0); |
| 465 |
pickup thickpen; |
| 466 |
penpos1(med, 270); z1l = (1/3, 1) u; |
| 467 |
penpos2(thick, 180); z2 = good.lft ((2/3, 1/3) u); |
| 468 |
penpos3(thick, 180); z3 = (2/3, 0) u; |
| 469 |
|
| 470 |
penstroke z1e{right} .. {down}z2e -- z3e; |
| 471 |
|
| 472 |
penpos4(thick, 0); z4 = z2; |
| 473 |
penpos5(med, 270); z5l = (1, 1) u; |
| 474 |
penpos6(thick, 180); z6 = good.lft ((4/3, 2/5) u); |
| 475 |
penpos7(med, 270); z7r = (3/2 + lnk, 0) u; |
| 476 |
|
| 477 |
penstroke z4e{up} .. {right}z5e .. {down}z6e .. {right} z7e; |
| 478 |
|
| 479 |
label(7); |
| 480 |
|
| 481 |
save_letter(n)(x2); |
| 482 |
endchar; |
| 483 |
|
| 484 |
"The letter o"; |
| 485 |
beginchar("o", ltr_w(9/8), ex#, 0); |
| 486 |
penpos1(med, 330); z1r = (1, 7/10) u; |
| 487 |
penpos2(med, 90); z2r = (1/2, 1) u; |
| 488 |
penpos3(thick, 180); z3r = (0, a_left) u; |
| 489 |
penpos4(med, 270); z4r = (3/5, 0) u; |
| 490 |
penpos5(med, 0); z5r = (9/8, 1/2) u; |
| 491 |
penpos6(med, 60); z6 = (7/8, 8/10) u; |
| 492 |
penpos7(med, 220); z7 = (5/8, 3/5) u; |
| 493 |
penpos8(med, 270); z8 = (9/8 + lnk, hl_y) u; |
| 494 |
|
| 495 |
penstroke z1e .. z2e .. tension 1.1 .. z3e .. z4e |
| 496 |
.. {up}z5e .. {dir 150}z6e .. {dir 310}z7e .. {right}z8e; |
| 497 |
|
| 498 |
label(8); |
| 499 |
|
| 500 |
save_letter(o)(1/2[x3r,x5r]); |
| 501 |
endchar ; |
| 502 |
|
| 503 |
"The letter p"; |
| 504 |
beginchar("p", ltr_w(7/4), ex#, straight_descend * ex#); |
| 505 |
pickup thickpen; |
| 506 |
penpos1(thick, 180); z1 = good.lft ((3/4, 1) u); |
| 507 |
penpos2(thick, 180); x2 = x1; y2 = vround (-straight_descend * ex); |
| 508 |
|
| 509 |
penstroke z1e -- z2e; |
| 510 |
|
| 511 |
penpos3(med, 0); z3r = (x1l, 0); |
| 512 |
penpos4(med, 270); z4l = (5/4, 1) u; |
| 513 |
penpos5(thick, 180); |
| 514 |
penpos6(med, 270); z6r = (7/4 + lnk, 0) u; |
| 515 |
z5 = good.lft ((1/2[x4,x6], 1/2 * ex)); |
| 516 |
|
| 517 |
penstroke z3e{up} .. tension 1.2 .. {right}z4e .. z5e .. {right}z6e; |
| 518 |
|
| 519 |
label(6); |
| 520 |
endchar; |
| 521 |
|
| 522 |
"The letter q with no link"; |
| 523 |
beginchar("q", ltr_wd(1, 0) + thick# - med#, ex#, straight_descend * ex#); |
| 524 |
penpos1(med, 0); x1r = hround (base_width * ex); y1 = 2/3 ex; |
| 525 |
penpos2(med, 90); z2r = (3/5, 1) u; |
| 526 |
penpos3(thick, 180); z3r = (0, a_left) u; |
| 527 |
penpos4(med, 270); z4r = (1/2, 0) u; |
| 528 |
penpos5(med, 0); x5 = x1; y5 = 1/3 ex; |
| 529 |
|
| 530 |
penstroke z1e .. z2e .. tension 1.2 .. z3e .. z4e{right} .. z5e ; |
| 531 |
|
| 532 |
penpos6(thick, 195); z6 = z1 + (1/10, 2/9) u; |
| 533 |
penpos7(thick, 180); z7r = z1l; |
| 534 |
penpos8(thick, 180); x8r = x5l; y8 = vround (-straight_descend * ex); |
| 535 |
|
| 536 |
penstroke z6e .. z7e --- z8e; |
| 537 |
|
| 538 |
picture letter.q; |
| 539 |
letter.q := currentpicture; % We keep the glyph for the linked version. |
| 540 |
|
| 541 |
label(8); |
| 542 |
endchar; |
| 543 |
|
| 544 |
"The letter r"; |
| 545 |
beginchar("r", ltr_w(5/4), 6/5 ex#, 0); |
| 546 |
penpos1(med, 0); z1l = (1/6, 1) u; |
| 547 |
penpos2(med, 90); z2r = z1l + (-1/3,1)/5 u; |
| 548 |
penpos3(med, 270); z3l = z1l; |
| 549 |
penpos4(med, 220); %z4l = (1, 1) u; |
| 550 |
%z4l = (x5l,y3l); |
| 551 |
z4r = (x5r,y3r); |
| 552 |
penpos5(thick, 180); z5l = (9/8, 2/5) u; |
| 553 |
penpos6(med, 270); z6r = (5/4 + lnk, 0) u; |
| 554 |
|
| 555 |
penstroke z1e{up} .. z2e .. z3e .. tension 1.4 .. z4e |
| 556 |
.. tension 1.3 .. {down}z5e .. {right}z6e; |
| 557 |
|
| 558 |
label(6); |
| 559 |
|
| 560 |
save_letter(r)(1/2[x1,x4]); |
| 561 |
height.r := ex; |
| 562 |
height#.r := ex#; |
| 563 |
endchar; |
| 564 |
|
| 565 |
"The letter s with no link"; |
| 566 |
beginchar("s", ltr_wd(5/4, 0), 7/6 ex#, 0); |
| 567 |
penpos0(thick, 0); z0 = good.rt ((3/4, 1) u); |
| 568 |
penpos1(med, 0); z1l = z0l; |
| 569 |
penpos2(med, 90); z2r = z1l + (0, 1/6) u; |
| 570 |
penpos3(med, 210); z3l = z1l; |
| 571 |
penpos4(thick, 180); z4l = (5/4, 1/3) u; |
| 572 |
penpos5(med, 90); z5l = (5/8, 0) u; |
| 573 |
penpos6(med, 300); z6 = (1/2, 2/5) u; |
| 574 |
|
| 575 |
penstroke z1e{dir 60} .. z2e .. z3e{dir 315} .. tension 1.2 .. z4e |
| 576 |
.. {left}z5e .. {dir 30}z6e; |
| 577 |
|
| 578 |
picture letter.s; |
| 579 |
letter.s := currentpicture; % Same trick as for the q. |
| 580 |
|
| 581 |
label(6); |
| 582 |
|
| 583 |
save_letter(s)(x5); |
| 584 |
height.s := ex; |
| 585 |
height#.s := ex#; |
| 586 |
endchar; |
| 587 |
|
| 588 |
"The letter t"; |
| 589 |
beginchar("t", ltr_w(7/8), straight_ascend * ex#, 0); |
| 590 |
penpos1(thick, 180); z1r = goodx (1/6, straight_ascend) u; |
| 591 |
penpos2(thick, 180); z2r = goodx (1/6, 2/3) u; |
| 592 |
penpos3(med, 270); z3r = (2/3, 0) u; |
| 593 |
penpos4(med, ml_d); z4 = (7/8 + lnk, ml_y) u; |
| 594 |
|
| 595 |
penstroke z1e -- z2e{down} .. {right}z3e .. {ml_dir}z4e; |
| 596 |
|
| 597 |
penpos5(med, 270); z5l = goodxy (1/6 * v + med, 2/3 * straight_ascend * ex); |
| 598 |
penpos6(med, 270); z6l = goodxy (1, 2/3 * straight_ascend) u; |
| 599 |
|
| 600 |
penstroke z5e -- z6e; |
| 601 |
|
| 602 |
label(6); |
| 603 |
|
| 604 |
save_letter(t)(x3); |
| 605 |
endchar; |
| 606 |
|
| 607 |
"The letter u"; |
| 608 |
beginchar("u", ltr_w(4/3), ex#, 0); |
| 609 |
penpos1(thick, 180); z1r = goodx (1/6, 1) u; |
| 610 |
penpos2(thick, 180); x2 = x1 ; y2 = 1/2 ex; |
| 611 |
penpos3(med, 270); x3 = 1/2[x2,x4]; y3r = 0; |
| 612 |
pickup thickpen; |
| 613 |
penpos4(thick, 0); z4 = good.lft ((7/6, 1/2) u); |
| 614 |
penpos5(thick, 0); x5 = x4 ; y5 = ex ; |
| 615 |
|
| 616 |
penstroke z1e -- z2e{down} .. {right}z3e .. {up}z4e -- z5e; |
| 617 |
|
| 618 |
penpos6(thick, 180); z6 = z4; |
| 619 |
penpos7(med, 270); z7r = (4/3 + lnk, 0) u; |
| 620 |
|
| 621 |
penstroke z6e{down}.. {right}z7e; |
| 622 |
|
| 623 |
label(7); |
| 624 |
|
| 625 |
begingroup save u; |
| 626 |
save_letter(u)(1/2[x1,x5]); |
| 627 |
endgroup |
| 628 |
endchar; |
| 629 |
|
| 630 |
"The letter v"; |
| 631 |
beginchar("v", ltr_w(10/6), ex#, 0); |
| 632 |
pickup thickpen; |
| 633 |
penpos1(med, 270); z1l = (1/3, 1) u; |
| 634 |
penpos2(thick, 180); z2 = good.lft ((1/2, 1/2) u); |
| 635 |
penpos3(med, 270); z3r = (1, 0) u; |
| 636 |
penpos4(med, 0); z4 = goodx (3/2, 5/8) u; |
| 637 |
penpos5(med, 150); z5r = (7/6, 15/16) u; |
| 638 |
penpos6(med, 270); z6 = (10/6 + lnk, hl_y) u; |
| 639 |
|
| 640 |
penstroke z1e{right} .. tension 1.2 |
| 641 |
.. {down} z2e .. {right}z3e .. {up}z4e |
| 642 |
.. tension 0.8 .. {dir 240}z5e .. {right}z6e; |
| 643 |
|
| 644 |
label(6); |
| 645 |
endchar; |
| 646 |
|
| 647 |
"The letter w"; |
| 648 |
beginchar("w", ltr_w(13/6), ex#, 0); |
| 649 |
pickup thickpen; |
| 650 |
penpos1(med, 270); z1l = (1/3, 1) u; |
| 651 |
penpos2(thick, 180); z2 = good.lft ((1/2, 1/2) u); |
| 652 |
penpos3(med, 270); z3r = (7/8, 0) u; |
| 653 |
penpos5(thick, 180); z5 = good.lft ((9/8, 7/8) u); |
| 654 |
penpos4(med, 0); z4l = z5r; |
| 655 |
|
| 656 |
penstroke z1e{right} .. tension 1.2 .. {down}z2e |
| 657 |
.. {right}z3e .. tension 1.3 .. {up}z4e; |
| 658 |
|
| 659 |
penpos6(med, 270); z6r = (13/8, 0) u; |
| 660 |
penpos7(med, 0); z7 = goodx (2, 5/8) u; |
| 661 |
penpos8(med, 150); z8r = (5/3, 15/16) u; |
| 662 |
penpos9(med, 270); z9 = (13/6 + lnk, hl_y) u; |
| 663 |
|
| 664 |
penstroke z5e{down} .. tension 1.3 .. {right}z6e |
| 665 |
.. {up}z7e .. tension 0.8 .. {dir 240}z8e .. {right}z9e; |
| 666 |
|
| 667 |
label(9); |
| 668 |
endchar; |
| 669 |
|
| 670 |
"The letter x"; |
| 671 |
beginchar("x", ltr_w(8/5), ex#, 0); |
| 672 |
penpos0(med, 300); z0 = (-1/5, 5/6) u; |
| 673 |
penpos1(med, 270); z1l = (1/3, 1) u; |
| 674 |
penpos2(thick, 180); z2 = (4/5, 1/2) u; |
| 675 |
penpos3(med, 90); z3l = (1/3, 0) u; |
| 676 |
penpos4(med, 45); z4 = (0, 1/8) u; |
| 677 |
|
| 678 |
penstroke z1e{right} .. {dir 270}z2e .. {left}z3e .. {dir 135}z4e; |
| 679 |
|
| 680 |
penpos5(med, 45); z2 = 1/2 [z4, z5]; |
| 681 |
penpos6(med, 270); z2 = 1/2 [z1, z6]; |
| 682 |
penpos7(med, ml_d); z7 = (8/5 + lnk, ml_y) u; |
| 683 |
|
| 684 |
penstroke z5e{dir 135} .. {dir 270}z2e .. {right}z6e .. {ml_dir}z7e; |
| 685 |
|
| 686 |
label(7); |
| 687 |
endchar; |
| 688 |
|
| 689 |
"The letter y"; |
| 690 |
beginchar("y", width#.j + (3v/2 - accpos.j + lnk) / ex * ex#, |
| 691 |
ex#, loop_descend * ex#); |
| 692 |
pickup thickpen; |
| 693 |
penpos1(med, 270); z1l = (1/3, 1) u; |
| 694 |
penpos2(thick, 180); z2 = good.lft ((1/2, 1/2) u); |
| 695 |
penpos3(med, 270); z3r = (1/2[x2,x4], 0); |
| 696 |
penpos4(med, 0); z4l = z5r; |
| 697 |
penpos5(thick, 180); z5 = (3/2, 1) u; |
| 698 |
penstroke z1e{right} .. {down}z2e .. {right}z3e .. {up}z4e; |
| 699 |
|
| 700 |
addto currentpicture also letter.j shifted (x5 - accpos.j, 0); |
| 701 |
|
| 702 |
label(4); |
| 703 |
|
| 704 |
save_letter(y)(x3); |
| 705 |
endchar; |
| 706 |
|
| 707 |
"The letter z"; |
| 708 |
beginchar("z", ltr_w(11/6), 6/5 * ex#, loop_descend * ex#); |
| 709 |
penpos1(med, 0); z1l = (1/6, 1) u; |
| 710 |
penpos2(med, 90); z2r = z1l + (-1/3,1)/5 u; |
| 711 |
penpos3(med, 270); z3l = z1l; |
| 712 |
penpos4(thick, 210); z4l = (9/8, 1) u; |
| 713 |
penpos5(med, 135); z5 = (2/3, 0) u; |
| 714 |
|
| 715 |
penstroke z1e{up} .. z2e .. z3e .. z4e .. {dir 225}z5e; |
| 716 |
|
| 717 |
penpos6(med, 315); z6 = z5; |
| 718 |
penpos7(thick, 220); z7 = (5/4, 1/5) u; |
| 719 |
penpos8(thick, 155); z8 = (7/4, -4/9 * loop_descend) u; |
| 720 |
penpos9(med, 90); z9l = (1, -loop_descend) u; |
| 721 |
penpos10(med, 315); z10 = (7/8, -1/3 * loop_descend) u; |
| 722 |
penpos11(med, ml_d); z11 = (11/6 + lnk, ml_y) u; |
| 723 |
|
| 724 |
penstroke z6e{dir 45} .. z7e .. z8e .. tension 1.3 |
| 725 |
.. z9e .. z10e .. tension 1.4 .. {ml_dir}z11e; |
| 726 |
|
| 727 |
label(8); |
| 728 |
|
| 729 |
save_letter(z)(1/2[x1,x4]); |
| 730 |
height.z := ex; |
| 731 |
height#.z := ex#; |
| 732 |
endchar; |
| 733 |
|
| 734 |
"The ligature oe"; |
| 735 |
beginchar(247, ltr_w(2), ex#, 0) |
| 736 |
addto currentpicture also letter.o; |
| 737 |
addto currentpicture also letter.e shifted ((1,0) u); |
| 738 |
endchar; |
| 739 |
|
| 740 |
%% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% |
| 741 |
|
| 742 |
%%\sec Uppercase letters. %{{{1 |
| 743 |
|
| 744 |
hgt := uc_ascend * ex#; |
| 745 |
|
| 746 |
%% The small loop at the beginning of H, I, J and K is the same. |
| 747 |
|
| 748 |
picture small_loop; |
| 749 |
|
| 750 |
|
| 751 |
"The letter A"; |
| 752 |
beginchar("A", ltr_wd(3,0), hgt, 0); |
| 753 |
|
| 754 |
%% The left bar: |
| 755 |
|
| 756 |
penpos1(thin, 0); z1 = (3/5, 2/9) uu; |
| 757 |
penpos2(med, 90); z2l = (2/5, 1/3) uu; |
| 758 |
penpos3(med, 180); z3r = (0, 1/6) uu; |
| 759 |
penpos4(med, 280); z4r = (2/5, 0) uu; |
| 760 |
penpos5(med, 0); z5 = (7/6, 1/2) uu; |
| 761 |
penpos6(med, 320); z6 = (3/2, 1) uu; |
| 762 |
|
| 763 |
penstroke z1e .. {left}z2e .. z3e |
| 764 |
.. z4e .. {up}z5e .. z6e; |
| 765 |
|
| 766 |
%% The right bar: |
| 767 |
|
| 768 |
penpos7(med, 145); z7 = z6; |
| 769 |
penpos8(thick, 180); z8l = (3/2, 5/12) uu; |
| 770 |
penpos9(med, 270); z9r = (6/3, 0) uu; |
| 771 |
penpos10(med, 0); z10r = (3, 1/3) uu; |
| 772 |
penpos11(med, 90); z11 = (5/2, 2/3) uu; |
| 773 |
penpos12(thin, 240); z12 = (17/8, 1/3) uu; |
| 774 |
|
| 775 |
penstroke z7e .. z8e{down} .. z9e .. z10e |
| 776 |
.. tension 1.2 .. {left}z11e .. {dir 290}z12e; |
| 777 |
|
| 778 |
%% The horizontal bar: |
| 779 |
|
| 780 |
penpos13(thin, 330); z13 = (7/8, 6/12) uu; |
| 781 |
penpos14(med, 270); z14 = (13/8, 1/2) uu; |
| 782 |
penpos15(thin, 0); z15 = (11/6, 4/6) uu; |
| 783 |
|
| 784 |
penstroke z13e{dir 105} .. {right}z14e .. {dir 110}z15e; |
| 785 |
|
| 786 |
label(15); |
| 787 |
|
| 788 |
save_letter(A)(x6l); |
| 789 |
cedpos.A := x9; |
| 790 |
endchar; |
| 791 |
|
| 792 |
|
| 793 |
"The letter B"; |
| 794 |
beginchar("B", ltr_wd(5/2,0), hgt, 0); |
| 795 |
|
| 796 |
%% The vertical bar: |
| 797 |
|
| 798 |
penpos1(med, 135); z1 = (1, 1) uu; |
| 799 |
penpos2(thick, 180); z2 = (1, 2/5) uu; |
| 800 |
penpos3(med, 90); z3l = (3/5, 0) uu; |
| 801 |
penpos4(med, 330); z4l = (1/5, 1/6) uu; |
| 802 |
|
| 803 |
penstroke z1e{dir 255} .. z2e .. {left}z3e .. z4e; |
| 804 |
|
| 805 |
%% The two loops: |
| 806 |
|
| 807 |
penpos5(thin, 180); z5 = (3/5, 3/5) uu; |
| 808 |
penpos6(med, 90); z6 = (3/10, 1/3) uu; |
| 809 |
penpos7(med, 0); z7l = (0, 3/5) uu; |
| 810 |
penpos8(med, 270); z8l = (1, 1) uu; |
| 811 |
penpos9(thick, 180); z9 = (2, 7/9) uu; |
| 812 |
penpos10(med, 345); z10 = (9/8, 3/5) uu; |
| 813 |
penpos11(thick, 180); z11l = (5/2, 2/9) uu; |
| 814 |
penpos12(med, 90); z12l = (7/4, 0) uu; |
| 815 |
penpos13(med, 0); z13 = (5/4, 1/6) uu; |
| 816 |
penpos14(thin, 340); z14 = (3/2, 3/10) uu; |
| 817 |
|
| 818 |
penstroke z5e{down} .. tension 1.2 .. z6e .. tension 1.3 .. {up}z7e |
| 819 |
.. {right}z8e .. {down}z9e .. tension 1.4 .. {up}z10e .. tension 1.5 |
| 820 |
.. {down}z11e .. {left}z12e .. tension 1.0 .. z13e .. z14e; |
| 821 |
|
| 822 |
label(14); |
| 823 |
endchar; |
| 824 |
|
| 825 |
|
| 826 |
"The letter C"; |
| 827 |
beginchar("C", ltr_wd(2,0), hgt, 0); |
| 828 |
penpos1(thin, 180); z1 = (2/5, 1) uu; |
| 829 |
penpos2(med, 180); z2r = (0, 2/3) uu; |
| 830 |
penpos3(med, 270); z3 = (1, 1/2) uu; |
| 831 |
penpos4(med, 0); z4r = (2, 5/6) uu; |
| 832 |
penpos5(med, 90); z5r = (8/5, 1) uu; |
| 833 |
penpos6(thick, 180); z6r = (2/5, 2/5) uu; |
| 834 |
penpos7(med, 270); z7r = (4/3, 0) uu; |
| 835 |
penpos8(med, 0); z8 = (9/5, 1/4) u; |
| 836 |
penpos9(thin, 130); z9 = (7/5, 1/3) uu; |
| 837 |
|
| 838 |
penstroke z1e .. {down}z2e .. z3e .. z4e .. z5e |
| 839 |
.. {down}z6e .. z7e .. z8e .. z9e; |
| 840 |
|
| 841 |
label(9); |
| 842 |
|
| 843 |
save_letter(C)(x7); |
| 844 |
endchar; |
| 845 |
|
| 846 |
|
| 847 |
"The letter D"; |
| 848 |
beginchar("D", ltr_wd(13/6,0), hgt, 0); |
| 849 |
penpos1(thin, 180); z1 = (4/3, 1) uu; |
| 850 |
penpos2(thick, 180); z2 = (1, 1/2) uu; |
| 851 |
penpos3(med, 90); z3l = (1/3, 0) uu; |
| 852 |
penpos4(med, 0); z4l = (0, 1/6) uu; |
| 853 |
penpos5(med, 270); z5 = (4/5, 1/6) uu; |
| 854 |
penpos6(med, 270); z6r = (3/2, 0) uu; |
| 855 |
penpos7(thick, 0); z7r = (13/6, 1/3) uu; |
| 856 |
penpos8(med, 90); z8r = (6/7, 1) uu; |
| 857 |
penpos9(med, 180); z9r = (0, 3/4) uu; |
| 858 |
penpos10(thin, 240); z10 = (2/5, 1/2) uu; |
| 859 |
penpos11(thin, 0); z11 = (2/3, 2/3) uu; |
| 860 |
|
| 861 |
penstroke z1e .. z2e .. z3e .. z4e{up} .. z5e |
| 862 |
.. z6e .. z7e .. z8e .. z9e .. z10e .. {up}z11e; |
| 863 |
|
| 864 |
label(11); |
| 865 |
|
| 866 |
save_letter(D)(1/2[x1,x2]); |
| 867 |
endchar; |
| 868 |
|
| 869 |
|
| 870 |
"The letter E"; |
| 871 |
beginchar("E", ltr_wd(2,0), hgt, 0); |
| 872 |
penpos1(thin, 180); z1 = (1/3, 1) uu; |
| 873 |
penpos2(med, 270); z2 = (1/5, 3/4) uu; |
| 874 |
penpos3(med, 0); z3 = (8/5, 7/8) uu; |
| 875 |
penpos4(med, 90); z4r = (4/3, 1) uu; |
| 876 |
penpos5(thick, 180); z5 = (2/3, 7/10) uu; |
| 877 |
penpos6(thin, 270); z6l = (4/3, 12/20) uu; |
| 878 |
|
| 879 |
penstroke z1e .. z2e .. tension 1.3 .. z3e .. z4e .. z5e .. {right}z6e; |
| 880 |
|
| 881 |
penpos7(med, 90); z7r = z6l; |
| 882 |
penpos8(thick, 180); z8r = (1/6, 1/6) uu; |
| 883 |
penpos9(med, 270); z9r = (1, 0) uu; |
| 884 |
penpos10(med, 0); z10r = (2, 1/4) uu; |
| 885 |
penpos11(thin, 130); z11 = (7/6, 1/4) uu; |
| 886 |
|
| 887 |
penstroke z7e{left} .. z8e .. z9e .. z10e{up} .. z11e; |
| 888 |
|
| 889 |
label(11); |
| 890 |
|
| 891 |
save_letter(E)(1/2[x3,x5]); |
| 892 |
endchar; |
| 893 |
|
| 894 |
|
| 895 |
"The letter F"; |
| 896 |
beginchar("F", ltr_wd(9/4,0), hgt, 0); |
| 897 |
|
| 898 |
%% The vertical bar: |
| 899 |
|
| 900 |
penpos1(thin, 135); z1 = (6/4, 1) uu; |
| 901 |
penpos2(thick, 180); z2 = (5/4, 1/2) uu; |
| 902 |
penpos3(med, 90); z3l = (2/3, 0) uu; |
| 903 |
penpos4(thin, 330); z4 = (1/3, 1/6) uu; |
| 904 |
|
| 905 |
penstroke z1e .. {down}z2e .. z3e .. z4e; |
| 906 |
|
| 907 |
%% The upper horizontal bar: |
| 908 |
|
| 909 |
penpos5(thin, 180); z5 = (3/4, 2/3) uu; |
| 910 |
penpos6(med, 90); z6 = (1/2, 1/3) uu; |
| 911 |
penpos7(med, 0); z7l = (0, 1/2) uu; |
| 912 |
penpos8(med, 270); z8l = (4/5, 1) uu; |
| 913 |
penpos9(med, 270); z9 = (2, 5/6) uu; |
| 914 |
penpos10(thin, 90); z10r = (2, 1) uu; |
| 915 |
|
| 916 |
penstroke z5e .. tension 1.2 .. z6e .. z7e |
| 917 |
.. tension 1.2 .. z8e{right} .. {right}z9e .. z10e; |
| 918 |
|
| 919 |
%% The middle bar: |
| 920 |
|
| 921 |
penpos11(med, 270); z11 = z2r - (1/10, 0) uu; |
| 922 |
penpos12(med, 270); z12 = z2r + (2/3, 0) uu; |
| 923 |
penpos13(med, 110); z13 = z2r + (2/3, 1/12) uu; |
| 924 |
penpos14(thin, 180); z14 = z2r + (1/2, -1/6) uu; |
| 925 |
|
| 926 |
penstroke z11e .. z12e{right} .. z13e .. {down}z14e; |
| 927 |
|
| 928 |
label(14); |
| 929 |
endchar; |
| 930 |
|
| 931 |
|
| 932 |
"The letter G"; |
| 933 |
beginchar("G", ltr_w(2), hgt, loop_descend * ex#); |
| 934 |
penpos1(thin, 180); z1 = (1/2, 1) uu; |
| 935 |
penpos2(med, 200); z2r = (0, 2/3) uu; |
| 936 |
penpos3(med, 0); z3r = (2, 5/6) uu; |
| 937 |
penpos4(med, 90); z4r = (5/3, 1) uu; |
| 938 |
penpos5(thick, 180); z5r = (1/3, 1/3) uu; |
| 939 |
penpos6(med, 270); z6r = (1, 0) uu; |
| 940 |
penpos7(thick, 0); z7 = good.rt ((15/8, 1) u); |
| 941 |
|
| 942 |
penstroke z1e .. {down}z2e .. tension 1.2 .. z3e .. z4e |
| 943 |
.. tension 1.2 .. z5e .. z6e .. {up}z7e; |
| 944 |
|
| 945 |
penpos0(thick, 180); z0 = good.lft ((3/4, 1) u); |
| 946 |
addto currentpicture also letter.j shifted (z7 - z0); |
| 947 |
|
| 948 |
label(7); |
| 949 |
|
| 950 |
save_letter(G)(1/4[x4,x5]); |
| 951 |
endchar; |
| 952 |
|
| 953 |
|
| 954 |
"The letter H"; |
| 955 |
beginchar("H", ltr_wd(5/2,0), hgt, 0); |
| 956 |
|
| 957 |
%% The loop before the vertical bar: |
| 958 |
|
| 959 |
penpos1(thin, 270); z1l = (0, 7/12) uu; |
| 960 |
penpos2(med, 20); z2 = (1/6, 1) uu; |
| 961 |
penpos3(med, 250); z3l = (1/10, 29/30) uu; |
| 962 |
penpos4(thick, 0); z4 = (1, 1) uu; |
| 963 |
|
| 964 |
penstroke z1e .. {dir 110}z2e .. {dir 340}z3e .. z4e; |
| 965 |
|
| 966 |
small_loop := currentpicture; |
| 967 |
|
| 968 |
%% The letter's shape: |
| 969 |
|
| 970 |
penpos5(thick, 180); z5 = z4; |
| 971 |
penpos6(thick, 180); z6 = (1, 1/3) uu; |
| 972 |
penpos7(med, 90); z7l = (1/2, 0) uu; |
| 973 |
penpos8(med, 0); z8l = (0, 1/6) uu; |
| 974 |
penpos9(med, 315); z9 = (5/4, 1/2) uu; |
| 975 |
penpos10(med, 0); z9 = 1/2[z8, z10]; |
| 976 |
penpos11(med, 90); z9 = 1/2[z7, z11]; |
| 977 |
penpos12(thick, 180); z9 = 1/2[z6, z12]; |
| 978 |
penpos13(thick, 180); z13 = (3/2, 1/3) uu; |
| 979 |
penpos14(med, 270); z14r = (2, 0) uu; |
| 980 |
penpos15(thin, 90); z15 = (2, 1/3) uu; |
| 981 |
|
| 982 |
penstroke z5e .. z6e .. z7e .. z8e .. z9e .. z10e .. z11e .. z12e .. z13e |
| 983 |
.. z14e .. {dir 190}z15e; |
| 984 |
|
| 985 |
%% The small vertical bar in the middle: |
| 986 |
|
| 987 |
penpos16(thin, 180); z16 = z9 + (0, 1/8) uu; |
| 988 |
penpos17(thin, 180); z9 = 1/2[z16, z17]; |
| 989 |
|
| 990 |
penstroke z16e .. z17e; |
| 991 |
|
| 992 |
label(18); |
| 993 |
endchar; |
| 994 |
|
| 995 |
|
| 996 |
"The letter I"; |
| 997 |
beginchar("I", ltr_wd(1,0) + thick#/2, hgt, 0); |
| 998 |
|
| 999 |
addto currentpicture also small_loop; |
| 1000 |
|
| 1001 |
penpos1(thick, 180); z1 = (1, 1) uu; |
| 1002 |
penpos2(thick, 180); z2 = (1, 1/3) uu; |
| 1003 |
penpos3(med, 90); z3l = (3/5, 0) uu; |
| 1004 |
penpos4(med, 0); z4l = (0, 1/6) uu; |
| 1005 |
penpos5(thin, 270); z5 = (1/3, 1/3) uu; |
| 1006 |
|
| 1007 |
penstroke z1e .. {down}z2e .. z3e .. z4e .. {right}z5e; |
| 1008 |
|
| 1009 |
label(5); |
| 1010 |
|
| 1011 |
save_letter(I)(x3); |
| 1012 |
endchar; |
| 1013 |
|
| 1014 |
|
| 1015 |
"The letter J"; |
| 1016 |
beginchar("J", ltr_w(9/8), hgt, loop_descend * ex#); |
| 1017 |
addto currentpicture also small_loop; |
| 1018 |
|
| 1019 |
z0 = good.lft ((3/4, 1) uu); |
| 1020 |
penpos1(thick, 180); z1 = (1, 1) uu; |
| 1021 |
penpos2(thick, 180); z2 = (1, 0) uu; |
| 1022 |
|
| 1023 |
penstroke z1e .. z2e; |
| 1024 |
|
| 1025 |
addto currentpicture also letter.j shifted (z1 - z0); |
| 1026 |
|
| 1027 |
label(2); |
| 1028 |
endchar; |
| 1029 |
|
| 1030 |
|
| 1031 |
"The letter K"; |
| 1032 |
beginchar("K", ltr_wd(7/3,0), hgt, 0); |
| 1033 |
|
| 1034 |
%% We get back the I's vertical bar: |
| 1035 |
|
| 1036 |
addto currentpicture also letter.I; |
| 1037 |
|
| 1038 |
%% And we add the oblique bars: |
| 1039 |
|
| 1040 |
penpos1(thin, 0); z1r = (7/3, 9/10) uu; |
| 1041 |
penpos2(med, 90); z2r = (2, 1) uu; |
| 1042 |
penpos3(thick, 180); z3 = 1/2[z2, z4]; |
| 1043 |
penpos4(med, 90); z4 = (7/6, 5/12) uu; |
| 1044 |
penpos5(med, 0); z5 = (5/6, 11/24) uu; |
| 1045 |
penpos6(med, 270); z6 = (7/6, 1/2) uu; |
| 1046 |
penpos7(thick, 180); z7 = 1/2[z6, z8]; |
| 1047 |
penpos8(med, 290); z8r = (2, 0) uu; |
| 1048 |
penpos9(med, 0); z9r = (7/3, 1/6) uu; |
| 1049 |
penpos10(thin, 90); z10 = (2, 1/3) uu; |
| 1050 |
|
| 1051 |
penstroke z1e .. z2e .. z3e .. z4e .. z5e .. z6e .. z7e .. z8e |
| 1052 |
.. z9e .. z10e; |
| 1053 |
|
| 1054 |
label(10); |
| 1055 |
endchar; |
| 1056 |
|
| 1057 |
|
| 1058 |
"The letter L"; |
| 1059 |
beginchar("L", ltr_wd(7/3,0), hgt, 0); |
| 1060 |
penpos1(thin, 180); z1r = (0, 1) uu; |
| 1061 |
penpos2(med, 270); z2 = (7/6, 1/2) uu; |
| 1062 |
penpos3(med, 0); z3r = (7/3, 5/6) uu; |
| 1063 |
penpos4(med, 110); z4r = (2, 1) uu; |
| 1064 |
penpos5(thick, 150); z5 = (7/6, 1/2) uu; |
| 1065 |
penpos6(med, 110); z6l = (1/2, 0) uu; |
| 1066 |
penpos7(med, 0); z7l = (0, 1/6) uu; |
| 1067 |
penpos8(med, 240); z8 = (2/3, 1/4) uu; |
| 1068 |
penpos9(med, 270); z9r = (5/3, 0) uu; |
| 1069 |
penpos10(med, 0); z10r = (7/3, 1/6) uu; |
| 1070 |
penpos11(thin, 180); z11 = (7/4, 1/4) uu; |
| 1071 |
|
| 1072 |
penstroke z1e{down} .. z2e .. z3e .. z4e .. z5e .. z6e |
| 1073 |
.. z7e .. {dir -50}z8e .. {right}z9e .. z10e .. {down}z11e; |
| 1074 |
|
| 1075 |
label(11); |
| 1076 |
|
| 1077 |
save_letter(L)(x9); |
| 1078 |
endchar; |
| 1079 |
|
| 1080 |
|
| 1081 |
"The letter M"; |
| 1082 |
beginchar("M", ltr_wd(10/3,0), hgt, 0); |
| 1083 |
|
| 1084 |
%% The left bar: |
| 1085 |
|
| 1086 |
penpos1(thin, 0); z1 = (1/2, 1/4) uu; |
| 1087 |
penpos2(med, 180); z2r = (0, 1/5) uu; |
| 1088 |
penpos3(med, 300); z3r = (1/2, 0) uu; |
| 1089 |
penpos4(med, 0); z4l = (1, 1) uu; |
| 1090 |
|
| 1091 |
penstroke z1e{up} .. {down}z2e .. z3e .. tension 1.6 .. {up}z4e; |
| 1092 |
|
| 1093 |
%% The first middle bar: |
| 1094 |
|
| 1095 |
penpos5(thick, 180); z5r = z4l; |
| 1096 |
penpos6(thick, 180); z6 = (4/3, 0) uu; |
| 1097 |
|
| 1098 |
penstroke z5e .. z6e; |
| 1099 |
|
| 1100 |
%% The second middle bar: |
| 1101 |
|
| 1102 |
penpos7(med, 0); z7r = z6l; |
| 1103 |
penpos8(med, 0); z8l = (2, 1) uu; |
| 1104 |
|
| 1105 |
penstroke z7e .. {dir 70}z8e; |
| 1106 |
|
| 1107 |
%% The right bar: |
| 1108 |
|
| 1109 |
penpos9(thick, 180); z9r = z8l; |
| 1110 |
penpos10(med, 270); z10r = (5/2, 0) uu; |
| 1111 |
penpos11(med, 0); z11r = (10/3, 1/3) uu; |
| 1112 |
penpos12(med, 90); z12 = (8/3, 2/3) uu; |
| 1113 |
penpos13(thin, 180); z13 = (7/3, 1/3) uu; |
| 1114 |
|
| 1115 |
penstroke z9e{dir 250} .. tension 1.5 .. {right}z10e .. z11e |
| 1116 |
.. z12e .. {down}z13e; |
| 1117 |
|
| 1118 |
label(13); |
| 1119 |
endchar; |
| 1120 |
|
| 1121 |
|
| 1122 |
"The letter N"; |
| 1123 |
beginchar("N", ltr_wd(3,0), hgt, 0); |
| 1124 |
|
| 1125 |
%% The left bar: |
| 1126 |
|
| 1127 |
penpos1(thin, 0); z1 = (1/2, 1/4) uu; |
| 1128 |
penpos2(med, 180); z2r = (0, 1/5) uu; |
| 1129 |
penpos3(med, 300); z3r = (1/2, 0) uu; |
| 1130 |
penpos4(med, 0); z4l = (1, 1) uu; |
| 1131 |
|
| 1132 |
penstroke z1e{up} .. {down}z2e .. z3e .. tension 1.6 .. {up}z4e; |
| 1133 |
|
| 1134 |
%% The middle bar: |
| 1135 |
|
| 1136 |
penpos5(med, 180); z5r = z4l; |
| 1137 |
penpos6(thick, 180); z6 = (3/2, 0) uu; |
| 1138 |
|
| 1139 |
penstroke z5e .. z6e; |
| 1140 |
|
| 1141 |
%% The right bar: |
| 1142 |
|
| 1143 |
penpos7(med, 0); z7r = z6l; |
| 1144 |
penpos8(med, 290); z8l = (7/3, 1) uu; |
| 1145 |
penpos9(med, 180); z9l = (3, 2/3) uu; |
| 1146 |
penpos10(med, 90); z10 = (5/2, 1/3) uu; |
| 1147 |
penpos11(thin, 0); z11 = (2, 2/3) uu; |
| 1148 |
|
| 1149 |
penstroke z7e{up} .. tension 1.2 .. z8e .. {down}z9e .. z10e |
| 1150 |
.. {dir 70}z11e; |
| 1151 |
|
| 1152 |
label(11); |
| 1153 |
|
| 1154 |
save_letter(N)(x6); |
| 1155 |
endchar; |
| 1156 |
|
| 1157 |
|
| 1158 |
"The letter O"; |
| 1159 |
beginchar("O", ltr_wd(2,0), hgt, 0); |
| 1160 |
penpos1(thin, 90); z1r = (9/8, 1) uu; |
| 1161 |
penpos2(thick, 180); z2r = (0, 1/2) uu; |
| 1162 |
penpos3(med, 270); z3r = (1, 0) uu; |
| 1163 |
penpos4(thick, 0); z4r = (2, 1/2) uu; |
| 1164 |
penpos5(med, 90); z5r = (6/5, 19/20) uu; |
| 1165 |
penpos6(thin, 180); z6 = (1/2, 1/3) uu; |
| 1166 |
|
| 1167 |
penstroke z1e{left} .. z2e .. z3e .. z4e .. z5e .. {dir 300}z6e; |
| 1168 |
|
| 1169 |
label(6); |
| 1170 |
|
| 1171 |
save_letter(O)(x3); |
| 1172 |
endchar; |
| 1173 |
|
| 1174 |
|
| 1175 |
"The letter P"; |
| 1176 |
beginchar("P", ltr_wd(5/2,0), hgt, 0); |
| 1177 |
penpos1(thin, 180); z1r = (3/2, 1) uu; |
| 1178 |
penpos2(thick, 180); z2 = (3/2, 1/2) uu; |
| 1179 |
penpos3(med, 90); z3l = (1, 0) uu; |
| 1180 |
penpos4(thin, 0); z4 = (1/2, 1/4) uu; |
| 1181 |
|
| 1182 |
penstroke z1e .. z2e .. z3e .. z4e; |
| 1183 |
|
| 1184 |
penpos5(thin, 180); z5 = (1, 2/3) uu; |
| 1185 |
penpos6(med, 90); z6 = (1/2, 1/3) uu; |
| 1186 |
penpos7(med, 0); z7l = (0, 1/2) uu; |
| 1187 |
penpos8(med, 270); z8l = (4/3, 1) uu; |
| 1188 |
penpos9(thick, 180); z9l = (5/2, 3/4) uu; |
| 1189 |
penpos10(thin, 0); z10 = (5/3, 3/4) uu; |
| 1190 |
|
| 1191 |
penstroke z5e .. z6e .. z7e{up} .. z8e .. z9e{down} .. z10e; |
| 1192 |
|
| 1193 |
label(10); |
| 1194 |
endchar; |
| 1195 |
|
| 1196 |
|
| 1197 |
"The letter Q"; |
| 1198 |
beginchar("Q", ltr_wd(5/2,0), hgt, thick#/2); |
| 1199 |
addto currentpicture also letter.O; |
| 1200 |
|
| 1201 |
penpos1(thin, 270); z1 = (4/5, 1/6) uu; |
| 1202 |
penpos2(thick, 270); z2 = (2, 0) uu; |
| 1203 |
penpos3(med, 0); z3r = (5/2, 1/8) uu; |
| 1204 |
penpos4(thin, 90); z4 = (13/6, 1/4) uu; |
| 1205 |
|
| 1206 |
penstroke z1e{dir 20} .. z2e .. z3e .. z4e; |
| 1207 |
|
| 1208 |
label(4); |
| 1209 |
endchar; |
| 1210 |
|
| 1211 |
|
| 1212 |
"The letter R"; |
| 1213 |
beginchar("R", ltr_wd(13/4,0), hgt, 0); |
| 1214 |
penpos1(thin, 180); z1r = (3/2, 1) uu; |
| 1215 |
penpos2(thick, 180); z2 = (3/2, 1/2) uu; |
| 1216 |
penpos3(med, 90); z3l = (1, 0) uu; |
| 1217 |
penpos4(thin, 0); z4 = (1/2, 1/4) uu; |
| 1218 |
|
| 1219 |
penstroke z1e .. z2e .. z3e .. z4e; |
| 1220 |
|
| 1221 |
penpos5(thin, 180); z5 = (1, 2/3) uu; |
| 1222 |
penpos6(med, 90); z6 = (1/2, 1/3) uu; |
| 1223 |
penpos7(med, 0); z7l = (0, 1/2) uu; |
| 1224 |
penpos8(med, 270); z8l = (4/3, 1) uu; |
| 1225 |
penpos9(thick, 180); z9 = (5/2, 3/4) uu; |
| 1226 |
penpos10(med, 345); z10 = (5/3, 3/5) uu; |
| 1227 |
penpos11(thick, 180); z11 = (7/3, 1/3) uu; |
| 1228 |
penpos12(med, 270); z12r = (11/4, 0) uu; |
| 1229 |
penpos13(med, 0); z13r = (13/4, 1/6) uu; |
| 1230 |
penpos14(thin, 90); z14 = (11/4, 1/3) uu; |
| 1231 |
|
| 1232 |
penstroke z5e .. z6e .. z7e{up} .. z8e .. z9e .. tension 1.2 .. z10e{up} |
| 1233 |
.. tension 1.4 .. z11e .. z12e .. z13e .. z14e; |
| 1234 |
|
| 1235 |
label(14); |
| 1236 |
|
| 1237 |
save_letter(R)(x10); |
| 1238 |
endchar; |
| 1239 |
|
| 1240 |
|
| 1241 |
"The letter S"; |
| 1242 |
beginchar("S", ltr_wd(2,0), hgt, 0); |
| 1243 |
penpos1(thin, 180); z1 = (2/5, 1) uu; |
| 1244 |
penpos2(med, 180); z2r = (0, 2/3) uu; |
| 1245 |
penpos3(med, 270); z3 = (1, 1/2) uu; |
| 1246 |
penpos4(med, 0); z4r = (2, 5/6) uu; |
| 1247 |
penpos5(med, 90); z5r = (8/5, 1) uu; |
| 1248 |
penpos6(thick, 210); z6r = (1, 1/3) uu; |
| 1249 |
penpos7(med, 90); z7l = (1, 0) uu; |
| 1250 |
penpos8(med, 70); z8 = (2/5, 1/4) u; |
| 1251 |
penpos9(thin, 180); z9r = (0, 0) uu; |
| 1252 |
|
| 1253 |
penstroke z1e .. {down}z2e .. z3e .. z4e .. z5e |
| 1254 |
.. z6e .. z7e .. z8e .. {dir 250}z9e; |
| 1255 |
|
| 1256 |
label(9); |
| 1257 |
|
| 1258 |
save_letter(S)(1/2[x3,x5]); |
| 1259 |
cedpos.S := x7; |
| 1260 |
endchar; |
| 1261 |
|
| 1262 |
|
| 1263 |
"The letter T"; |
| 1264 |
beginchar("T", ltr_wd(11/4,0), hgt, 0); |
| 1265 |
penpos1(thin, 180); z1 = (1, 2/3) uu; |
| 1266 |
penpos2(med, 0); z2l = (0, 7/10) uu; |
| 1267 |
penpos3(med, 270); z3l = (2/3, 1) uu; |
| 1268 |
penpos4(thick, 200); z4 = (13/8, 2/3) uu; |
| 1269 |
penpos5(med, 0); z5r = (11/4, 3/4) uu; |
| 1270 |
penpos6(med, 90); z6r = (17/8, 1) uu; |
| 1271 |
penpos7(thick, 180); z7 = (9/8, 2/5) uu; |
| 1272 |
penpos8(med, 270); z8r = (2, 0) uu; |
| 1273 |
penpos9(med, 0); z9r = (5/2, 1/6) uu; |
| 1274 |
penpos10(thin, 180); z10 = (7/4, 1/4) uu; |
| 1275 |
|
| 1276 |
penstroke z1e{down} .. {up}z2e .. z3e .. {dir 300}z4e .. z5e |
| 1277 |
.. {left}z6e .. tension 1.2 .. z7e .. {right}z8e .. z9e .. z10e; |
| 1278 |
|
| 1279 |
label(10); |
| 1280 |
|
| 1281 |
save_letter(T)(1/2[x3,x6]); |
| 1282 |
cedpos.T := x8; |
| 1283 |
endchar; |
| 1284 |
|
| 1285 |
|
| 1286 |
"The letter U"; |
| 1287 |
beginchar("U", ltr_wd(3,0), hgt, 0); |
| 1288 |
penpos1(thin, 180); z1 = (3/4, 3/5) uu; |
| 1289 |
penpos2(med, 0); z2l = (0, 2/3) uu; |
| 1290 |
penpos3(med, 250); z3l = (3/5, 1) uu; |
| 1291 |
penpos4(thick, 180); z4 = (1, 1/4) uu; |
| 1292 |
penpos5(med, 270); z5r = (3/2, 0) uu; |
| 1293 |
penpos6(med, 0); z6 = (2, 1/6) uu; |
| 1294 |
|
| 1295 |
penstroke z1e{down} .. z2e{up} .. z3e .. tension 1.1 .. z4e .. z5e .. z6e; |
| 1296 |
|
| 1297 |
penpos7(med, 180); z7 = (2, 1) uu; |
| 1298 |
penpos8(thick, 180); z8 = z6; |
| 1299 |
penpos9(med, 270); z9r = (5/2, 0) uu; |
| 1300 |
penpos10(med, 0); z10r = (3, 1/6) uu; |
| 1301 |
penpos11(thin, 90); z11 = (12/5, 1/3) uu; |
| 1302 |
|
| 1303 |
penstroke z7e{down} .. z8e{dir 280} .. z9e .. z10e .. z11e; |
| 1304 |
|
| 1305 |
label(11); |
| 1306 |
|
| 1307 |
save_letter(U)(1/2[x4,x7]); |
| 1308 |
endchar; |
| 1309 |
|
| 1310 |
|
| 1311 |
"The letter V"; |
| 1312 |
beginchar("V", ltr_wd(8/3,0), hgt, 0); |
| 1313 |
penpos1(thin, 180); z1 = (3/4, 3/5) uu; |
| 1314 |
penpos2(med, 0); z2l = (0, 2/3) uu; |
| 1315 |
penpos3(med, 250); z3l = (3/5, 1) uu; |
| 1316 |
penpos4(thick, 180); z4 = (1, 1/4) uu; |
| 1317 |
penpos5(med, 270); z5r = (3/2, 0) uu; |
| 1318 |
penpos6(med, 0); z6 = (9/4, 1/2) uu; |
| 1319 |
penpos7(med, 90); z7r = (11/6, 1) uu; |
| 1320 |
penpos8(med, 270); z8 = (2, 2/3) uu; |
| 1321 |
penpos9(thin, 0); z9r = (8/3, 1) uu; |
| 1322 |
|
| 1323 |
penstroke z1e{down} .. z2e{up} .. z3e .. tension 1.1 .. z4e .. z5e |
| 1324 |
.. {up}z6e .. tension 1.3 .. z7e{left} .. {right}z8e .. {up}z9e; |
| 1325 |
|
| 1326 |
label(9); |
| 1327 |
endchar; |
| 1328 |
|
| 1329 |
|
| 1330 |
"The letter W"; |
| 1331 |
beginchar("W", ltr_wd(11/3,0), hgt, 0); |
| 1332 |
penpos1(thin, 180); z1 = (3/4, 3/5) uu; |
| 1333 |
penpos2(med, 0); z2l = (0, 2/3) uu; |
| 1334 |
penpos3(med, 250); z3l = (3/5, 1) uu; |
| 1335 |
penpos4(thick, 180); z4 = (1, 1/4) uu; |
| 1336 |
penpos5(med, 270); z5r = (3/2, 0) uu; |
| 1337 |
penpos6(med, 0); z6 = (2, 1/6) uu; |
| 1338 |
|
| 1339 |
penstroke z1e{down} .. z2e{up} .. z3e .. tension 1.1 .. z4e .. z5e .. z6e; |
| 1340 |
|
| 1341 |
penpos7(med, 180); z7 = (15/8, 7/8) uu; |
| 1342 |
penpos8(thick, 180); z8 = z6; |
| 1343 |
penpos9(med, 270); z9r = (5/2, 0) uu; |
| 1344 |
penpos10(med, 0); z10 = (13/4, 1/2) uu; |
| 1345 |
penpos11(med, 90); z11r = (17/6, 1) uu; |
| 1346 |
penpos12(med, 270); z12 = (3, 2/3) uu; |
| 1347 |
penpos13(thin, 0); z13r = (11/3, 1) uu; |
| 1348 |
|
| 1349 |
penstroke z7e{down} .. z8e{dir 280} .. z9e .. {up}z10e .. tension 1.3 |
| 1350 |
.. z11e{left} .. {right}z12e .. {up}z13e; |
| 1351 |
|
| 1352 |
label(13); |
| 1353 |
endchar; |
| 1354 |
|
| 1355 |
|
| 1356 |
"The letter X"; |
| 1357 |
beginchar("X", ltr_wd(8/3,0), hgt, 0); |
| 1358 |
penpos1(thin, 90); z1 = (2/3, 2/3) uu; |
| 1359 |
penpos2(med, 0); z2l = (0, 5/6) uu; |
| 1360 |
penpos3(med, 270); z3l = (2/3, 1) uu; |
| 1361 |
penpos4(thick, 180); z4 = (4/3, 1/2) uu; |
| 1362 |
penpos5(med, 90); z5l = (1/2, 0) uu; |
| 1363 |
penpos6(med, 0); z6l = (0, 1/6) uu; |
| 1364 |
penpos7(thin, 270); z7 = (1/3, 1/3) uu; |
| 1365 |
|
| 1366 |
penstroke z1e .. z2e .. z3e .. z4e .. z5e .. z6e .. z7e; |
| 1367 |
|
| 1368 |
penpos8(thin, 270); z8 = (2, 1/3) uu; |
| 1369 |
penpos9(med, 180); z9l = (8/3, 1/6) uu; |
| 1370 |
penpos10(med, 90); z10l = (2, 0) uu; |
| 1371 |
penpos11(thick, 0); z11 = (4/3, 1/2) uu; |
| 1372 |
penpos12(med, 270); z12l = (13/6, 1) uu; |
| 1373 |
penpos13(med, 180); z13l = (8/3, 5/6) uu; |
| 1374 |
penpos14(thin, 90); z14 = (7/3, 2/3) uu; |
| 1375 |
|
| 1376 |
penstroke z8e .. z9e .. z10e .. z11e .. z12e .. z13e .. z14e; |
| 1377 |
|
| 1378 |
label(14); |
| 1379 |
endchar; |
| 1380 |
|
| 1381 |
|
| 1382 |
"The letter Y"; |
| 1383 |
beginchar("Y", ltr_w(19/8), hgt, loop_descend * ex#); |
| 1384 |
penpos1(thin, 180); z1 = (3/4, 3/5) uu; |
| 1385 |
penpos2(med, 0); z2l = (0, 2/3) uu; |
| 1386 |
penpos3(med, 250); z3l = (3/5, 1) uu; |
| 1387 |
penpos4(thick, 180); z4 = (1, 3/8) uu; |
| 1388 |
penpos5(med, 270); z5r = (3/2, 1/8) uu; |
| 1389 |
penpos6(med, 0); z6l = z8r; |
| 1390 |
|
| 1391 |
penpos7(thick, 180); x7 = x8; y7 = uc_ascend * ex; |
| 1392 |
penpos8(thick, 180); z8 = good.rt ((9/4, 1) u); |
| 1393 |
|
| 1394 |
penstroke z1e{down} .. z2e{up} .. z3e .. tension 1.1 .. z4e |
| 1395 |
.. z5e .. {up}z6e; |
| 1396 |
penstroke z7e .. z8e; |
| 1397 |
|
| 1398 |
addto currentpicture also letter.j shifted (3/2 * v, 0); |
| 1399 |
|
| 1400 |
label(8); |
| 1401 |
|
| 1402 |
save_letter(Y)(1/2[x4,x7]); |
| 1403 |
endchar; |
| 1404 |
|
| 1405 |
|
| 1406 |
"The letter Z"; |
| 1407 |
beginchar("Z", ltr_wd(3,0), hgt, 0); |
| 1408 |
penpos1(thin, 180); z1 = (3/4, 5/6) uu; |
| 1409 |
penpos2(med, 0); z2l = (0, 3/4) uu; |
| 1410 |
penpos3(med, 270); z3l = (1/2, 1) uu; |
| 1411 |
penpos4(med, 270); z4 = (5/2, 3/4) uu; |
| 1412 |
penpos5(med, 0); z5r = (3, 7/8) uu; |
| 1413 |
penpos6(med, 90); z6r = (8/3, 1) uu; |
| 1414 |
penpos7(thick, 165); z7 = (6/4, 1/2) uu; |
| 1415 |
penpos8(med, 90); z7 = 1/2[z6, z8]; |
| 1416 |
penpos9(med, 0); z7 = 1/2[z5, z9]; |
| 1417 |
penpos10(med, 270); z7 = 1/2[z4, z10]; |
| 1418 |
penpos11(med, 270); z7 = 1/2[z3, z11]; |
| 1419 |
penpos12(med, 0); z7 = 1/2[z2, z12]; |
| 1420 |
penpos13(thin, 180); z7 = 1/2[z1, z13]; |
| 1421 |
|
| 1422 |
penstroke z1e .. z2e{up} .. z3e{right} .. z4e .. z5e{up} .. z6e{left} |
| 1423 |
.. z7e .. {left}z8e .. z9e .. z10e .. {right}z11e .. z12e{up} .. z13e; |
| 1424 |
|
| 1425 |
penpos14(thin, 270); z14 = z7 - (1/2, 0) uu; |
| 1426 |
penpos15(med, 270); z15 = z7; |
| 1427 |
penpos16(thin, 270); z16 = z7 + (1/2, 0) uu; |
| 1428 |
|
| 1429 |
penstroke z14e{dir 30} .. z15e .. {dir 30}z16e; |
| 1430 |
|
| 1431 |
label(16); |
| 1432 |
|
| 1433 |
save_letter(Z)(x15); |
| 1434 |
endchar; |
| 1435 |
|
| 1436 |
|
| 1437 |
%% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% |
| 1438 |
|
| 1439 |
%%\sec Inter-letter links. %{{{1 |
| 1440 |
|
| 1441 |
%% The constants below define the position of the link glyphs in the font. |
| 1442 |
%% the names have the form ``{\it lnk.right.left}'' where {\it right} is the |
| 1443 |
%% shape of the letter on the right and {\it left} is the kind of link at the |
| 1444 |
%% end of the letter on the left. |
| 1445 |
|
| 1446 |
%% Since we are limited to 256 positions, we have to use some codes that are |
| 1447 |
%% defined in the T1 encoding for other purposes. The accent glyphs may be |
| 1448 |
%% used for that, since constructed accented letters are unusable in this font |
| 1449 |
%% (because they don't link to surrounding letters). The ``f'' ligatures are |
| 1450 |
%% also usable since they are irrelevant here. |
| 1451 |
|
| 1452 |
lnk.small.low = 0; lnk.small.med = 1; lnk.small.high = 2; |
| 1453 |
lnk.loop.low = 3; lnk.loop.med = 4; lnk.loop.high = 5; |
| 1454 |
lnk.vert.low = 6; lnk.vert.med = 7; lnk.vert.high = 8; |
| 1455 |
lnk.far.low = 9; lnk.far.med = 10; lnk.far.high = 11; |
| 1456 |
lnk.hloop.low = 12; lnk.hloop.med = 13; |
| 1457 |
lnk.mn.low = 14; lnk.mn.med = 15; lnk.mn.high = 16; lnk.mn.beg = 17; |
| 1458 |
lnk.x.low = 24; lnk.x.med = 27; |
| 1459 |
lnk.sq = 28; |
| 1460 |
lnk.high = 29; lnk.low = 30; lnk.lowmed = 31; |
| 1461 |
|
| 1462 |
%% There is a special trick we use in all links: the initial $x$ coordinante |
| 1463 |
%% is not 0 as would be expected but $-1$. This makes links begin one pixel to |
| 1464 |
%% the left of their box, ensuring that they actually join with the letter |
| 1465 |
%% before them. |
| 1466 |
|
| 1467 |
lw := link_width * ex#; |
| 1468 |
|
| 1469 |
%%\subsec For small letters (a, c, d, e, g, o, q). %{{{2 |
| 1470 |
|
| 1471 |
"Low link for small letters"; |
| 1472 |
beginchar(lnk.small.low, lw, 0, 0); |
| 1473 |
penpos1(med, 270); z1r = (-1, 0); |
| 1474 |
penpos2(med, 0); z2l = (lnk, 1/3) u; |
| 1475 |
penstroke z1e{right} .. {up}z2e; |
| 1476 |
label(2); |
| 1477 |
endchar ; |
| 1478 |
|
| 1479 |
"Medium link for small letters"; |
| 1480 |
beginchar(lnk.small.med, lw, 0, 0); |
| 1481 |
penpos1(med, ml_d); z1 = (-1, ml_y * ex); |
| 1482 |
penpos2(med, ml_d); z2l = (lnk, 1/3) u; |
| 1483 |
penstroke z1e{ml_dir} .. tension 3 .. {up}z2e; |
| 1484 |
label(2); |
| 1485 |
endchar ; |
| 1486 |
|
| 1487 |
"High link for small letters"; |
| 1488 |
beginchar(lnk.small.high, lw, 0, 0); |
| 1489 |
penpos1(med, 270); z1 = (-1, hl_y * ex); |
| 1490 |
penpos2(thin, 270); z2l = (3/5 + lnk, 1) u; |
| 1491 |
penstroke z1e{right} .. {right}z2e ; |
| 1492 |
label(2); |
| 1493 |
endchar ; |
| 1494 |
|
| 1495 |
%%\subsec For loops (b, f, h, l). %{{{2 |
| 1496 |
|
| 1497 |
"Low link for large loops"; |
| 1498 |
beginchar(lnk.loop.low, lw, loop_ascend*ex#, 0); |
| 1499 |
if proofing > 1: proofrule ((lnk,0) u, (lnk,loop_ascend)u); fi |
| 1500 |
penpos1(med, 270); z1r = (-1, 0); |
| 1501 |
penpos2(med, 330); z2 = (3/4 + lnk, 2/3 * loop_ascend) u + (0,0); |
| 1502 |
penstroke z1e{right} .. tension 2 .. {up}z2e ; |
| 1503 |
label(2); |
| 1504 |
endchar; |
| 1505 |
|
| 1506 |
"Medium link for large loops"; |
| 1507 |
beginchar(lnk.loop.med, lw, loop_ascend*ex#, 0); |
| 1508 |
if proofing > 1: proofrule ((lnk,0) u, (lnk,loop_ascend)u); fi |
| 1509 |
penpos1(med, ml_d); z1 = (-1, ml_y * ex); |
| 1510 |
penpos2(med, 330); z2 = (3/4 + lnk, 2/3 * loop_ascend) u + (0,0); |
| 1511 |
penstroke z1e{ml_dir} .. tension 1.2 .. {up}z2e ; |
| 1512 |
label(2); |
| 1513 |
endchar; |
| 1514 |
|
| 1515 |
"High link for large loops"; |
| 1516 |
beginchar(lnk.loop.high, lw, loop_ascend*ex#, 0); |
| 1517 |
if proofing > 1: proofrule ((lnk,0) u, (lnk,loop_ascend)u); fi |
| 1518 |
penpos1(med, 270); z1 = (-1, hl_y * ex); |
| 1519 |
penpos2(med, 330); z2 = (3/4 + lnk, 2/3 * loop_ascend) u + (0,0); |
| 1520 |
penstroke z1e{right} .. tension 1.4 .. {up}z2e ; |
| 1521 |
label(2); |
| 1522 |
endchar; |
| 1523 |
|
| 1524 |
"Low to medium transition"; |
| 1525 |
beginchar(lnk.lowmed, ltr_w(1/6), 0, 0); |
| 1526 |
penpos1(med, 270); z1r = (-1, 0); |
| 1527 |
penpos2(med, ml_d); z2 = (1/6 + lnk, ml_y) u; |
| 1528 |
penstroke z1e{right} .. {ml_dir}z2e ; |
| 1529 |
label(2); |
| 1530 |
endchar; |
| 1531 |
|
| 1532 |
%%\subsec For those vertical on the left (i, u). %{{{2 |
| 1533 |
|
| 1534 |
"Low link for verticals"; |
| 1535 |
beginchar(lnk.vert.low, lw, 0, 0); |
| 1536 |
penpos1(med, 270); z1r = (-1, 0); |
| 1537 |
penpos2(med, 0); z2l = (1/6 + lnk, 2/3) u; |
| 1538 |
penpos3(med, 0); z3l = (1/6 + lnk, 1) u; |
| 1539 |
penstroke z1e{right} .. {up}z2e -- z3e; |
| 1540 |
label(3); |
| 1541 |
endchar; |
| 1542 |
|
| 1543 |
"Medium link for verticals"; |
| 1544 |
beginchar(lnk.vert.med, lw, 0, 0); |
| 1545 |
penpos1(med, ml_d); z1 = (-1, ml_y * ex); |
| 1546 |
penpos2(med, 0); z2l = (1/6 + lnk, 1) u; |
| 1547 |
penstroke z1e{ml_dir} .. tension 1.2 .. {up}z2e; |
| 1548 |
label(2); |
| 1549 |
endchar; |
| 1550 |
|
| 1551 |
"High link for verticals"; |
| 1552 |
beginchar(lnk.vert.high, lw, 0, 0); |
| 1553 |
penpos1(med, 270); z1 = (-1, hl_y * ex); |
| 1554 |
penpos2(med, 0); z2l = (1/6 + lnk, 1) u; |
| 1555 |
penstroke z1e{right} .. {up}z2e; |
| 1556 |
label(2); |
| 1557 |
endchar; |
| 1558 |
|
| 1559 |
%%\subsec For the far verticals (j, p). %{{{2 |
| 1560 |
|
| 1561 |
"Low link for far verticals"; |
| 1562 |
beginchar(lnk.far.low, lw, 0, 0); |
| 1563 |
penpos1(med, 270); z1r = (-1, 0); |
| 1564 |
penpos2(med, 0); z2l = z3l; |
| 1565 |
pickup thickpen; |
| 1566 |
penpos3(thick, 0); z3 = good.rt ((3/4 + lnk, 1) u); |
| 1567 |
penstroke z1e{right} .. tension 1.2 .. {dir 60}z2e; |
| 1568 |
label(2); |
| 1569 |
endchar; |
| 1570 |
|
| 1571 |
"Medium link for far verticals"; |
| 1572 |
beginchar(lnk.far.med, ltr_w(-1/4), 0, 0); |
| 1573 |
penpos1(med, ml_d); z1 = (-1, ml_y * ex); |
| 1574 |
penpos2(med, 0); z2l = z3l; |
| 1575 |
penpos3(thick, 0); z3 = good.rt ((1/2 + lnk, 1) u); |
| 1576 |
penstroke z1e{ml_dir} .. tension 1.3 .. {dir 60}z2e; |
| 1577 |
label(2); |
| 1578 |
endchar; |
| 1579 |
|
| 1580 |
"High link for far verticals"; |
| 1581 |
beginchar(lnk.far.high, ltr_w(-1/4), 0, 0); |
| 1582 |
penpos1(med, 270); z1 = (-1, hl_y * ex); |
| 1583 |
penpos2(med, 0); z2l = z3l; |
| 1584 |
penpos3(thick, 0); z3 = good.rt ((1/2 + lnk, 1) u); |
| 1585 |
penstroke z1e{right} .. {dir 50}z2e; |
| 1586 |
label(2); |
| 1587 |
endchar; |
| 1588 |
|
| 1589 |
%%\subsec For high loops (h, k). %{{{2 |
| 1590 |
|
| 1591 |
"Low link for high loops"; |
| 1592 |
beginchar(lnk.hloop.low, ltr_w(1/6), 0, 0) |
| 1593 |
penpos1(med, 270); z1r = (-1, 0); |
| 1594 |
penpos2(med, 0); z2l = (1/6 + lnk, 6/8) u; |
| 1595 |
|
| 1596 |
penstroke z1e{right} .. {up}z2e; |
| 1597 |
|
| 1598 |
penpos3(med, 270); z3l = z2l; |
| 1599 |
penpos4(med, 330); z4 = (11/12 + lnk, 2/3 * loop_ascend) u + (0,0); |
| 1600 |
|
| 1601 |
penstroke z3e .. tension 1.2 .. {up}z4e; |
| 1602 |
|
| 1603 |
label(4); |
| 1604 |
endchar; |
| 1605 |
|
| 1606 |
"Medium link for high loops"; |
| 1607 |
beginchar(lnk.hloop.med, lw, 0, 0) |
| 1608 |
penpos1(med, ml_d); z1 = (-1, ml_y * ex); |
| 1609 |
penpos2(med, 0); z2l = (lnk, 6/8) u; |
| 1610 |
|
| 1611 |
penstroke z1e{ml_dir} .. {up}z2e; |
| 1612 |
|
| 1613 |
penpos3(med, 270); z3l = z2l; |
| 1614 |
penpos4(med, 330); z4 = (3/4 + lnk, 2/3 * loop_ascend) u + (0,0); |
| 1615 |
|
| 1616 |
penstroke z3e .. tension 1.2 .. {up}z4e; |
| 1617 |
|
| 1618 |
label(4); |
| 1619 |
endchar; |
| 1620 |
|
| 1621 |
%%\subsec For m, n, v, and w. %{{{2 |
| 1622 |
|
| 1623 |
"Low link for m and n"; |
| 1624 |
beginchar(lnk.mn.low, ltr_w(1/6), 0, 0) |
| 1625 |
penpos1(med, 270); z1r = (-1, 0); |
| 1626 |
penpos2(med, 0); z2l = (1/12 + lnk, 1/2) u; |
| 1627 |
penpos3(med, 270); z3l = (1/2 + lnk, 1) u + (1,0); |
| 1628 |
penstroke z1e{right} .. tension 1.4 .. {up}z2e .. {right}z3e; |
| 1629 |
label(3); |
| 1630 |
endchar; |
| 1631 |
|
| 1632 |
"Medium link for m and n"; |
| 1633 |
beginchar(lnk.mn.med, ltr_w(1/12), 0, 0) |
| 1634 |
penpos1(med, ml_d); z1 = (-1, ml_y * ex); |
| 1635 |
penpos2(med, 0); z2l = ((1/24 + lnk) * v, 1/2 [y1, y3]); |
| 1636 |
penpos3(med, 270); z3l = (5/12 + lnk, 1) u + (1,0); |
| 1637 |
penstroke z1e{ml_dir} .. {up}z2e .. tension 1.1 .. {right}z3e; |
| 1638 |
label(3); |
| 1639 |
endchar; |
| 1640 |
|
| 1641 |
"High link for m and n"; |
| 1642 |
beginchar(lnk.mn.high, ltr_w(1/6), 0, 0) |
| 1643 |
penpos1(med, 270); z1 = (-1, hl_y * ex); |
| 1644 |
penpos2(med, 330); z2 = 1/2 [z1, z3]; |
| 1645 |
penpos3(med, 270); z3l = (1/2 + lnk, 1) u + (1,0); |
| 1646 |
penstroke z1e{right} .. z2e .. {right}z3e; |
| 1647 |
label(3); |
| 1648 |
endchar; |
| 1649 |
|
| 1650 |
"Beginning for m and n"; |
| 1651 |
beginchar(lnk.mn.beg, 0, 0, 0) |
| 1652 |
penpos1(med, 320); z1 = (-1, 2/5 * ex); |
| 1653 |
penpos2(med, 270); z2l = (1/3, 1) u + (1,0); |
| 1654 |
penstroke z1e{up} .. {right} z2e; |
| 1655 |
label(3); |
| 1656 |
endchar; |
| 1657 |
|
| 1658 |
%%\subsec For the x. %{{{2 |
| 1659 |
|
| 1660 |
"Low link for x"; |
| 1661 |
beginchar(lnk.x.low, ltr_w(1/2), 0, 0) |
| 1662 |
penpos1(med, 270); z1r = (-1, 0); |
| 1663 |
penpos2(med, 0); z2 = 1/2[z1,z3]; |
| 1664 |
penpos3(med, 270); z3l = (5/6 + lnk, 1) u + (1,0); |
| 1665 |
penstroke z1e{right} .. {dir 80}z2e .. {right}z3e; |
| 1666 |
label(3); |
| 1667 |
endchar; |
| 1668 |
|
| 1669 |
"Medium link for x"; |
| 1670 |
beginchar(lnk.x.med, ltr_w(1/4), 0, 0) |
| 1671 |
penpos1(med, ml_d); z1 = (-1, ml_y * ex); |
| 1672 |
penpos2(med, 0); z2 = 1/2[z1,z3]; |
| 1673 |
penpos3(med, 270); z3l = (7/12 + lnk, 1) u + (1,0); |
| 1674 |
penstroke z1e{ml_dir} .. {dir 80}z2e .. {right}z3e; |
| 1675 |
label(3); |
| 1676 |
endchar; |
| 1677 |
|
| 1678 |
%%\subsec Special links. %{{{2 |
| 1679 |
|
| 1680 |
%% The letters {\fc s} and {\fc q} have final forms without a link on the |
| 1681 |
%% right, which is the actual glyph. Inside words, they need an extra link. |
| 1682 |
|
| 1683 |
"Right link for s and q"; |
| 1684 |
beginchar(lnk.sq, lw, ex#/3, 0); |
| 1685 |
penpos1(med, 180); z1l = (0, 1/3) u; |
| 1686 |
penpos2(med, 270); z2r = (lnk, 0) u; |
| 1687 |
penstroke z1e {down} .. {right}z2e; |
| 1688 |
label(2); |
| 1689 |
endchar; |
| 1690 |
|
| 1691 |
%% \chardef\HL=131 |
| 1692 |
%% This link has to be inserted by hand between the letters {\fc o} and |
| 1693 |
%% {\fc e}, in order to produce ``{\fc o\HL e}'', which is different |
| 1694 |
%% from the (fake) ligature ``{\fc oe}'' that is produced by typing |
| 1695 |
%% ``{\tt oe}''. |
| 1696 |
|
| 1697 |
"High horizontal link"; |
| 1698 |
beginchar(lnk.high, lw, 0, 0); |
| 1699 |
penpos1(med, 270); z1 = (-1, hl_y * ex); |
| 1700 |
penpos2(med, 270); z2 = (lnk, 1/2) u + (1,0); |
| 1701 |
penstroke z1e{right} .. {right}z2e ; |
| 1702 |
label(2); |
| 1703 |
endchar ; |
| 1704 |
|
| 1705 |
%% This one is the equivalent but at the level of the baseline. It is |
| 1706 |
%% introduced for coherence. |
| 1707 |
%% \par\nobreak |
| 1708 |
|
| 1709 |
"Low horizontal link"; |
| 1710 |
beginchar(lnk.low, lw, 0, 0); |
| 1711 |
penpos1(med, 270); z1r = (-1, 0); |
| 1712 |
penpos2(med, 270); z2r = (lnk * v + 1, 0); |
| 1713 |
penstroke z1e{right} .. {right}z2e ; |
| 1714 |
label(2); |
| 1715 |
endchar ; |
| 1716 |
|
| 1717 |
|
| 1718 |
|
| 1719 |
%% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% |
| 1720 |
|
| 1721 |
%%\sec Accents and accented letters. %{{{1 |
| 1722 |
|
| 1723 |
%% These constants are reference dimensions for all accents: |
| 1724 |
|
| 1725 |
a_wd := accent_wd * base_width * ex#; |
| 1726 |
a_ht := accent_top * ex#; |
| 1727 |
|
| 1728 |
%%\subsec The glyphs for the accents. %{{{2 |
| 1729 |
|
| 1730 |
%% When \TeX\ builds an accented character out of an unaccented one and an |
| 1731 |
%% accent glyph, the resulting object is not subject to ligatures. Therefore |
| 1732 |
%% the accent glyphs are rather useless in this font, which has the pleasant |
| 1733 |
%% effect of freeing a good number of character positions. The glyphs below |
| 1734 |
%% are thus drawn, but not saved (except for some of them that correspond to |
| 1735 |
%% proper characters, like tilde or circumflex). We use the following macros |
| 1736 |
%% to save an accent's picture and dimensions in order to use it later when |
| 1737 |
%% building accented characters: |
| 1738 |
%%% beginchar beginaccent |
| 1739 |
%%% endchar endaccent |
| 1740 |
|
| 1741 |
ignored = 0; |
| 1742 |
|
| 1743 |
def beginaccent (expr code, wd, ht, dp) = |
| 1744 |
beginchar(code, wd, ht, dp); |
| 1745 |
enddef; |
| 1746 |
|
| 1747 |
def endaccent (suffix acc) = |
| 1748 |
picture accent.acc; |
| 1749 |
accent.acc := currentpicture; |
| 1750 |
acc_wd.acc := w; |
| 1751 |
acc_ht#.acc := charht; |
| 1752 |
acc_dp#.acc := chardp; |
| 1753 |
|
| 1754 |
if charcode = ignored: |
| 1755 |
save shipit; let shipit = relax; |
| 1756 |
fi |
| 1757 |
endchar |
| 1758 |
enddef; |
| 1759 |
|
| 1760 |
athin := 2/3 [thin, med]; |
| 1761 |
athick := 2/3 [med, thick]; |
| 1762 |
|
| 1763 |
"Grave accent"; |
| 1764 |
beginaccent(ignored, a_wd, a_ht, 0); |
| 1765 |
penpos1(athick, 225); z1 = (0, 1) ua; |
| 1766 |
penpos2(athin, 270); z2 = (1, 0) ua; |
| 1767 |
penstroke z1e .. tension 1.4 .. {right}z2e; |
| 1768 |
label(2); |
| 1769 |
endaccent(grave); |
| 1770 |
|
| 1771 |
"Acute accent"; |
| 1772 |
beginaccent(ignored, a_wd, a_ht, 0); |
| 1773 |
penpos1(athick, 135); z1 = (1, 1) ua; |
| 1774 |
penpos2(athin, 90); z2 = (0, 0) ua; |
| 1775 |
penstroke z1e .. tension 1.4 .. {left}z2e; |
| 1776 |
label(2); |
| 1777 |
endaccent(acute); |
| 1778 |
|
| 1779 |
"Circumflex"; |
| 1780 |
beginaccent("^", 3/2 * a_wd, a_ht, 0); |
| 1781 |
penpos1(athin, 270); z1 = (0, 0) ua; |
| 1782 |
penpos2(athick, 0); z2 = (3/4, 1) ua; |
| 1783 |
penstroke z1e{right} .. z2e; |
| 1784 |
penpos3(athick, 180); z3 = z2; |
| 1785 |
penpos4(athin, 270); z4 = (3/2, 0) ua; |
| 1786 |
penstroke z3e .. {right}z4e; |
| 1787 |
label(4); |
| 1788 |
endaccent(circum); |
| 1789 |
|
| 1790 |
"Tilde"; |
| 1791 |
beginaccent("~", 3/2 * a_wd, (2 accent_top + accent_bot)/3 * ex#, 0); |
| 1792 |
penpos1(athin, 310); z1 = (0, 1/3) ua; |
| 1793 |
penpos2(med, 210); z2l = (3/4, 1/2) ua; |
| 1794 |
penpos4(athick, 310); (x4, y4l) = (3/2, 2/3) ua; |
| 1795 |
penstroke z1e .. z2e{dir 315} .. z4e; |
| 1796 |
label(4); |
| 1797 |
endaccent(tilde); |
| 1798 |
|
| 1799 |
"Double acute"; |
| 1800 |
beginaccent(34, 4/3 a_wd, a_ht, 0); |
| 1801 |
penpos1(athick, 135); z1 = (2/3, 1) ua; |
| 1802 |
penpos2(athin, 135); z2 = (0, 0) ua; |
| 1803 |
penstroke z1e .. z2e; |
| 1804 |
z3 = (4/3, 1) ua; |
| 1805 |
addto currentpicture also currentpicture shifted (z3 - z1); |
| 1806 |
label(2); |
| 1807 |
endaccent(dblacute); |
| 1808 |
|
| 1809 |
"Umlaut"; |
| 1810 |
beginaccent(ignored, a_wd, height_with_dot, 0); |
| 1811 |
pickup pencircle scaled dot_size; |
| 1812 |
lft z1 = (0, dot_height) u; |
| 1813 |
rt z2 = (accent_wd, dot_height) u; |
| 1814 |
drawdot z1; drawdot z2; |
| 1815 |
label(2); |
| 1816 |
endaccent(umlaut); |
| 1817 |
|
| 1818 |
"Ring"; |
| 1819 |
beginaccent(ignored, 3/4 a_wd, a_ht, 0); |
| 1820 |
penpos1(med, 90); z1r = (3/8, 1) ua; |
| 1821 |
penpos2(med, 180); z2r = (0, 1/2) ua; |
| 1822 |
penpos3(med, 270); z3r = (3/8, 0) ua; |
| 1823 |
penpos4(med, 0); z4r = (3/4, 1/2) ua; |
| 1824 |
penstroke z1e .. z2e .. z3e .. z4e .. cycle; |
| 1825 |
label(4); |
| 1826 |
endaccent(ring); |
| 1827 |
|
| 1828 |
"Hachek"; |
| 1829 |
beginaccent(ignored, 3/2 * a_wd, a_ht, 0); |
| 1830 |
penpos1(athin, 270); z1l = (0, 1) ua; |
| 1831 |
penpos2(athick, 270); z2r = (3/4, 0) ua; |
| 1832 |
penpos3(athin, 270); z3l = (3/2, 1) ua; |
| 1833 |
penstroke z1e -- z2e -- z3e; |
| 1834 |
label(3); |
| 1835 |
endaccent(hachek); |
| 1836 |
|
| 1837 |
"Breve"; |
| 1838 |
beginaccent(ignored, 3/2 * a_wd, a_ht, 0); |
| 1839 |
penpos1(athin, 180); z1r = (0, 1) ua; |
| 1840 |
penpos2(med, 270); z2r = (3/4, 0) ua; |
| 1841 |
penpos3(athin, 0); z3r = (3/2, 1) ua; |
| 1842 |
penstroke z1e .. z2e .. z3e; |
| 1843 |
label(3); |
| 1844 |
endaccent(breve); |
| 1845 |
|
| 1846 |
"Cedilla"; |
| 1847 |
beginaccent(ignored, ltr_wd(3/4,0), 0, (cedilla_dp + 1/3) * ex#); |
| 1848 |
penpos1(thick, 180); z1 = (3/8, 0) u; |
| 1849 |
penpos2(thick, 180); z2 = (3/8, -cedilla_dp) u; |
| 1850 |
penstroke z1e .. z2e; |
| 1851 |
penpos3(med, 270); z3r = z2l; |
| 1852 |
penpos4(athick, 180); x4l = 3/4 base_width * ex; y4 = 1/2[y3,y5]; |
| 1853 |
penpos5(med, 90); z5l = (3/8, -cedilla_dp - 1/3) u; |
| 1854 |
penpos6(athin, 0); x6l = 0; y6 = y4; |
| 1855 |
penstroke z3e .. z4e .. z5e{left} .. z6e; |
| 1856 |
label(6); |
| 1857 |
endaccent(cedilla); |
| 1858 |
|
| 1859 |
"Ogonek"; |
| 1860 |
beginaccent(ignored, ltr_wd(3/4,0), 0, 2 * cedilla_dp * ex#); |
| 1861 |
penpos1(med, 90); z1l = (3/8, 0) u; |
| 1862 |
penpos2(athick, 180); z2r = (0, -cedilla_dp) u; |
| 1863 |
penpos3(med, 270); z3r = (3/8, -2 cedilla_dp) u; |
| 1864 |
penpos4(athin, -45); z4 = (0.7, -cedilla_dp) u; |
| 1865 |
penstroke z1e {left} .. z2e .. z3e .. z4e; |
| 1866 |
label(4); |
| 1867 |
endaccent(ogonek); |
| 1868 |
|
| 1869 |
|
| 1870 |
%%\subsec The accented characters. %{{{2 |
| 1871 |
|
| 1872 |
%% The definition of `make\_accented' produces characters with the same height |
| 1873 |
%% as their unaccented version, so that the accented uppercase are not too |
| 1874 |
%% high (otherwise it would force to space out successive lines too much). |
| 1875 |
%% The macro `make\_cedilla' is used to put something (a cedilla or an |
| 1876 |
%% ogonek) under a letter, and this one does modify the depth of the original |
| 1877 |
%% letter. The macro `make\_caron' adds a caron (same shape as an apostrophe) |
| 1878 |
%% to a glyph, without changing the glyph width, so that linking is not |
| 1879 |
%% influenced. |
| 1880 |
|
| 1881 |
def make_accented(expr name, chr)(text base, acc) = |
| 1882 |
begingroup save base; |
| 1883 |
name; |
| 1884 |
beginchar(chr, width#.base, height#.base, depth#.base) |
| 1885 |
addto currentpicture also letter.base; |
| 1886 |
addto currentpicture also accent.acc |
| 1887 |
shifted ((accpos.base - acc_wd.acc/2, height.base - ex) slanted slant); |
| 1888 |
endchar |
| 1889 |
endgroup |
| 1890 |
enddef; |
| 1891 |
|
| 1892 |
def make_cedilla(expr name, chr)(text base, acc) = |
| 1893 |
begingroup save base; |
| 1894 |
name; |
| 1895 |
beginchar(chr, width#.base, height#.base, max(depth#.base, acc_dp#.acc)) |
| 1896 |
addto currentpicture also letter.base; |
| 1897 |
addto currentpicture also accent.acc |
| 1898 |
shifted (cedpos.base - acc_wd.acc/2, 0); |
| 1899 |
endchar |
| 1900 |
endgroup |
| 1901 |
enddef; |
| 1902 |
|
| 1903 |
def make_caron(expr name, chr)(text base, pos) = |
| 1904 |
begingroup save base; |
| 1905 |
name; |
| 1906 |
beginchar(chr, width#.base, height#.base, depth#.base) |
| 1907 |
addto currentpicture also letter.base; |
| 1908 |
penpos1(athick, 180); |
| 1909 |
penpos2(athin, 90); |
| 1910 |
y1 = h; x2 = pos; |
| 1911 |
z1 - z2 = (accent_wd/2, 1/2) u; |
| 1912 |
penstroke z1e {down} .. z2e; |
| 1913 |
label(2); |
| 1914 |
endchar |
| 1915 |
endgroup |
| 1916 |
enddef; |
| 1917 |
|
| 1918 |
make_accented("The letter a with breve", 160)(a)(breve); |
| 1919 |
make_cedilla ("The letter a with ogonek", 161)(a)(ogonek); |
| 1920 |
make_accented("The letter a with gravis", 224)(a)(grave); |
| 1921 |
make_accented("The letter a with acute", 225)(a)(acute); |
| 1922 |
make_accented("The letter a with circumflex", 226)(a)(circum); |
| 1923 |
make_accented("The letter a with tilde", 227)(a)(tilde); |
| 1924 |
make_accented("The letter a with umlaut", 228)(a)(umlaut); |
| 1925 |
make_accented("The letter a with ring", 229)(a)(ring); |
| 1926 |
|
| 1927 |
make_accented("The letter c with acute", 162)(c)(acute); |
| 1928 |
make_accented("The letter c with hachek", 163)(c)(hachek); |
| 1929 |
make_cedilla ("The letter c with cedilla", 231)(c)(cedilla); |
| 1930 |
|
| 1931 |
make_caron("The letter d with caron", 164)(d)(accpos.d + thick*base_width); |
| 1932 |
|
| 1933 |
make_accented("The letter e with hachek", 165)(e)(hachek); |
| 1934 |
make_cedilla ("The letter e with ogonek", 166)(e)(ogonek); |
| 1935 |
make_accented("The letter e with gravis", 232)(e)(grave); |
| 1936 |
make_accented("The letter e with acute", 233)(e)(acute); |
| 1937 |
make_accented("The letter e with circumflex", 234)(e)(circum); |
| 1938 |
make_accented("The letter e with umlaut", 235)(e)(umlaut); |
| 1939 |
|
| 1940 |
make_accented("The letter g with breve", 167)(g)(breve); |
| 1941 |
|
| 1942 |
make_accented("The letter i with gravis", 236)(i)(grave); |
| 1943 |
make_accented("The letter i with acute", 237)(i)(acute); |
| 1944 |
make_accented("The letter i with circumflex", 238)(i)(circum); |
| 1945 |
make_accented("The letter i with umlaut", 239)(i)(umlaut); |
| 1946 |
|
| 1947 |
make_accented("The letter l with acute", 168)(l)(acute); |
| 1948 |
make_caron ("The letter l with caron", 169)(l)(w); |
| 1949 |
|
| 1950 |
"The letter l slash"; |
| 1951 |
beginchar(170, width#.l, height#.l, depth#.l) |
| 1952 |
addto currentpicture also letter.l; |
| 1953 |
penpos1(med, 270); |
| 1954 |
penpos2(med, 270); |
| 1955 |
penpos3(thick, 0); z3l = (0, loop_ascend/2) u; |
| 1956 |
1/2[z2,z1] = z3; |
| 1957 |
z2 - z1 = (2/3, 1/6) u; |
| 1958 |
penstroke z1e .. z2e; |
| 1959 |
label(2); |
| 1960 |
endchar; |
| 1961 |
|
| 1962 |
make_accented("The letter n with acute", 171)(n)(acute); |
| 1963 |
make_accented("The letter n with hachek", 172)(n)(hachek); |
| 1964 |
make_accented("The letter n with tilde", 241)(n)(tilde); |
| 1965 |
|
| 1966 |
make_accented("The letter o with double acute", 174)(o)(dblacute); |
| 1967 |
make_accented("The letter o with gravis", 242)(o)(grave); |
| 1968 |
make_accented("The letter o with acute", 243)(o)(acute); |
| 1969 |
make_accented("The letter o with circumflex", 244)(o)(circum); |
| 1970 |
make_accented("The letter o with tilde", 245)(o)(tilde); |
| 1971 |
make_accented("The letter o with umlaut", 246)(o)(umlaut); |
| 1972 |
|
| 1973 |
"Scandinavian letter o slash"; |
| 1974 |
beginchar(248, width#.o, 7/6 ex#, 1/6 ex#) |
| 1975 |
addto currentpicture also letter.o; |
| 1976 |
penpos1(med, 150); z1l = (w, 7/6 ex); |
| 1977 |
penpos2(med, 150); z2r = (0, -1/6 ex); |
| 1978 |
penstroke z1e .. z2e; |
| 1979 |
label(2); |
| 1980 |
endchar; |
| 1981 |
|
| 1982 |
make_accented("The letter r with acute", 175)(r)(acute); |
| 1983 |
make_accented("The letter r with hachek", 176)(r)(hachek); |
| 1984 |
|
| 1985 |
make_accented("The letter s with acute", 177)(s)(acute); |
| 1986 |
make_accented("The letter s with hachek", 178)(s)(hachek); |
| 1987 |
make_cedilla ("The letter s with cedilla", 179)(s)(cedilla); |
| 1988 |
|
| 1989 |
make_caron ("The letter t with caron", 180)(t)(accpos.t); |
| 1990 |
make_cedilla ("The letter t with cedilla", 181)(t)(cedilla); |
| 1991 |
|
| 1992 |
make_accented("The letter u with double acute", 182)(u)(dblacute); |
| 1993 |
make_accented("The letter u with ring", 183)(u)(ring); |
| 1994 |
make_accented("The letter u with gravis", 249)(u)(grave); |
| 1995 |
make_accented("The letter u with acute", 250)(u)(acute); |
| 1996 |
make_accented("The letter u with circumflex", 251)(u)(circum); |
| 1997 |
make_accented("The letter u with umlaut", 252)(u)(umlaut); |
| 1998 |
|
| 1999 |
make_accented("The letter y with umlaut", 184)(y)(umlaut); |
| 2000 |
make_accented("The letter y with acute", 253)(y)(acute); |
| 2001 |
|
| 2002 |
make_accented("The letter z with acute", 185)(z)(acute); |
| 2003 |
make_accented("The letter z with hachek", 186)(z)(hachek); |
| 2004 |
|
| 2005 |
"The letter z with dot above"; |
| 2006 |
beginchar(187, width#.z, height#.z, depth#.z) |
| 2007 |
addto currentpicture also letter.z; |
| 2008 |
pickup pencircle scaled dot_size; |
| 2009 |
drawdot (accpos.z, 1/2[accent_bot, accent_top] * ex); |
| 2010 |
endchar; |
| 2011 |
|
| 2012 |
make_accented("The letter A with breve", 128)(A)(breve); |
| 2013 |
make_cedilla ("The letter A with ogonek", 129)(A)(ogonek); |
| 2014 |
make_accented("The letter A with gravis", 192)(A)(grave); |
| 2015 |
make_accented("The letter A with acute", 193)(A)(acute); |
| 2016 |
make_accented("The letter A with circumflex", 194)(A)(circum); |
| 2017 |
make_accented("The letter A with tilde", 195)(A)(tilde); |
| 2018 |
make_accented("The letter A with umlaut", 196)(A)(umlaut); |
| 2019 |
make_accented("The letter A with ring", 197)(A)(ring); |
| 2020 |
|
| 2021 |
make_accented("The letter C with acute", 130)(C)(acute); |
| 2022 |
make_accented("The letter C with hachek", 131)(C)(hachek); |
| 2023 |
make_cedilla ("The letter C with cedilla", 199)(C)(cedilla); |
| 2024 |
|
| 2025 |
make_accented("The letter D with hachek", 132)(D)(hachek); |
| 2026 |
|
| 2027 |
make_accented("The letter E with hachek", 133)(E)(hachek); |
| 2028 |
make_cedilla ("The letter E with ogonek", 134)(E)(ogonek); |
| 2029 |
make_accented("The letter E with gravis", 200)(E)(grave); |
| 2030 |
make_accented("The letter E with acute", 201)(E)(acute); |
| 2031 |
make_accented("The letter E with circumflex", 202)(E)(circum); |
| 2032 |
make_accented("The letter E with umlaut", 203)(E)(umlaut); |
| 2033 |
|
| 2034 |
make_accented("The letter G with breve", 135)(G)(breve); |
| 2035 |
|
| 2036 |
"The letter I with dot above"; |
| 2037 |
beginchar(157, width#.I, height#.I, depth#.I) |
| 2038 |
addto currentpicture also letter.I; |
| 2039 |
pickup pencircle scaled dot_size; |
| 2040 |
drawdot (accpos.z, (1/2[accent_bot, accent_top] + uc_ascend - 1) * ex); |
| 2041 |
endchar; |
| 2042 |
|
| 2043 |
make_accented("The letter I with gravis", 204)(I)(grave); |
| 2044 |
make_accented("The letter I with acute", 205)(I)(acute); |
| 2045 |
make_accented("The letter I with circumflex", 206)(I)(circum); |
| 2046 |
make_accented("The letter I with umlaut", 207)(I)(umlaut); |
| 2047 |
|
| 2048 |
make_accented("The letter L with acute", 136)(L)(acute); |
| 2049 |
make_caron ("The letter L with caron", 137)(L)(w); |
| 2050 |
|
| 2051 |
"The letter L slash"; |
| 2052 |
beginchar(138, width#.L, height#.L, depth#.L) |
| 2053 |
addto currentpicture also letter.L; |
| 2054 |
penpos1(med, 270); |
| 2055 |
penpos2(med, 270); |
| 2056 |
1/2[z2,z1] = (7/6, 2/5) uu; |
| 2057 |
z2 - z1 = (1, 1/10) u; |
| 2058 |
penstroke z1e .. z2e; |
| 2059 |
label(2); |
| 2060 |
endchar; |
| 2061 |
|
| 2062 |
make_accented("The letter N with acute", 139)(N)(acute); |
| 2063 |
make_accented("The letter N with hachek", 140)(N)(hachek); |
| 2064 |
make_accented("The letter N with tilde", 209)(N)(tilde); |
| 2065 |
|
| 2066 |
make_accented("The letter O with double acute", 142)(O)(dblacute); |
| 2067 |
make_accented("The letter O with gravis", 210)(O)(grave); |
| 2068 |
make_accented("The letter O with acute", 211)(O)(acute); |
| 2069 |
make_accented("The letter O with circumflex", 212)(O)(circum); |
| 2070 |
make_accented("The letter O with tilde", 213)(O)(tilde); |
| 2071 |
make_accented("The letter O with umlaut", 214)(O)(umlaut); |
| 2072 |
|
| 2073 |
"Scandinavian letter O slash"; |
| 2074 |
beginchar(216, width#.O, height#.O, depth#.O) |
| 2075 |
addto currentpicture also letter.O; |
| 2076 |
penpos1(med, 150); z1l = (w - 1/8 v, h); |
| 2077 |
penpos2(med, 150); z2r = (1/8 v, 0); |
| 2078 |
penstroke z1e .. z2e; |
| 2079 |
label(2); |
| 2080 |
endchar; |
| 2081 |
|
| 2082 |
make_accented("The letter R with acute", 143)(R)(acute); |
| 2083 |
make_accented("The letter R with hachek", 144)(R)(hachek); |
| 2084 |
|
| 2085 |
make_accented("The letter S with acute", 145)(S)(acute); |
| 2086 |
make_accented("The letter S with hachek", 146)(S)(hachek); |
| 2087 |
accpos.S := base_width * ex; |
| 2088 |
make_cedilla ("The letter S with cedilla", 147)(S)(cedilla); |
| 2089 |
|
| 2090 |
make_accented("The letter T with hachek", 148)(T)(hachek); |
| 2091 |
accpos.T := 2 base_width * ex; |
| 2092 |
make_cedilla ("The letter T with cedilla", 149)(T)(cedilla); |
| 2093 |
|
| 2094 |
make_accented("The letter U with double acute", 150)(U)(dblacute); |
| 2095 |
make_accented("The letter U with ring", 151)(U)(ring); |
| 2096 |
make_accented("The letter U with gravis", 217)(U)(grave); |
| 2097 |
make_accented("The letter U with acute", 218)(U)(acute); |
| 2098 |
make_accented("The letter U with circumflex", 219)(U)(circum); |
| 2099 |
make_accented("The letter U with umlaut", 220)(U)(umlaut); |
| 2100 |
|
| 2101 |
make_accented("The letter Y with umlaut", 152)(Y)(umlaut); |
| 2102 |
make_accented("The letter Y with acute", 221)(Y)(acute); |
| 2103 |
|
| 2104 |
make_accented("The letter Z with acute", 153)(Z)(acute); |
| 2105 |
make_accented("The letter Z with hachek", 154)(Z)(hachek); |
| 2106 |
|
| 2107 |
"The letter Z with dot above"; |
| 2108 |
beginchar(155, width#.Z, height#.Z, depth#.Z) |
| 2109 |
addto currentpicture also letter.Z; |
| 2110 |
pickup pencircle scaled dot_size; |
| 2111 |
drawdot (accpos.Z, (1/2[accent_bot, accent_top] + uc_ascend - 1) * ex); |
| 2112 |
endchar; |
| 2113 |
|
| 2114 |
"The letter i with no dot"; |
| 2115 |
beginchar(25, width#.i, ex#, 0); |
| 2116 |
addto currentpicture also letter.i; |
| 2117 |
endchar; |
| 2118 |
|
| 2119 |
"The letter j with no dot"; |
| 2120 |
beginchar(26, width#.j, ex#, loop_descend * ex#); |
| 2121 |
addto currentpicture also letter.j; |
| 2122 |
endchar; |
| 2123 |
|
| 2124 |
|
| 2125 |
|
| 2126 |
%% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% |
| 2127 |
|
| 2128 |
%%\sec Digits. %{{{1 |
| 2129 |
|
| 2130 |
%% All digits have the same height, fixed to $\frac3/2\,\\{base\_witdh}$, and |
| 2131 |
%% they contain an extra spacing of $\frac1/6\,\\{base\_width}$ on each side. |
| 2132 |
|
| 2133 |
num_wd := 11/6 * base_width * ex#; |
| 2134 |
num_ht := straight_ascend * ex#; |
| 2135 |
|
| 2136 |
def nu = shifted (1/6,0) u yscaled straight_ascend enddef; |
| 2137 |
|
| 2138 |
"The numeral 0"; |
| 2139 |
beginchar("0", num_wd, num_ht, 0); |
| 2140 |
penpos1(thin, 90); z1r = (9/10, 1) nu; |
| 2141 |
penpos2(thick, 180); z2r = (0, 1/2) nu; |
| 2142 |
penpos3(med, 270); z3r = (3/4, 0) nu; |
| 2143 |
penpos4(med, 0); z4r = (3/2, 1/2) nu; |
| 2144 |
penpos5(thin, 90); z5 = (7/10, 14/15) nu; |
| 2145 |
|
| 2146 |
penstroke z1e{left} .. z2e{down} .. z3e .. {up}z4e .. {dir 210}z5e; |
| 2147 |
|
| 2148 |
label(6); |
| 2149 |
endchar; |
| 2150 |
|
| 2151 |
"The numeral 1"; |
| 2152 |
beginchar("1", num_wd, num_ht, 0); |
| 2153 |
penpos1(med, 270); z1 = (0, 1/2) nu; |
| 2154 |
penpos2(med, 0); z2l = z3r; |
| 2155 |
|
| 2156 |
penpos3(thick, 180); z3 = (1, 1) nu; |
| 2157 |
penpos4(thick, 180); z4 = (1, 0) nu; |
| 2158 |
|
| 2159 |
penstroke z1e .. {up}z2e; |
| 2160 |
penstroke z3e .. z4e; |
| 2161 |
|
| 2162 |
penpos5(med, 270); z4 = 1/2[z5r, z6r]; |
| 2163 |
penpos6(med, 270); z6r = (3/2, 0) nu; |
| 2164 |
|
| 2165 |
penstroke z5e .. z6e; |
| 2166 |
|
| 2167 |
label(6); |
| 2168 |
endchar; |
| 2169 |
|
| 2170 |
"The numeral 2"; |
| 2171 |
beginchar("2", num_wd, num_ht, 0); |
| 2172 |
penpos1(thin, 90); z1 = (1/2, 1/2) nu; |
| 2173 |
penpos2(med, 0); z2l = (1/5, 2/3) nu; |
| 2174 |
penpos3(med, 270); x3 = 1/2[x2,x4]; y3l = straight_ascend * ex; |
| 2175 |
penpos4(thick, 180); z4 = (5/4, 2/3) nu; |
| 2176 |
penpos5(med, 90); z5l = (1/3, 0) nu; |
| 2177 |
penpos6(med, 0); z6l = (0, 1/8) nu; |
| 2178 |
penpos7(med, 240); z7 = (3/5, 1/8) nu; |
| 2179 |
penpos8(med, 270); z8r = (1, 0) nu; |
| 2180 |
penpos9(thin, 0); z9r = (3/2, 1/4) nu; |
| 2181 |
|
| 2182 |
penstroke z1e .. z2e .. z3e .. z4e .. tension 1.6 |
| 2183 |
.. z5e{left} .. z6e{up} .. z7e .. z8e{right} .. {up}z9e; |
| 2184 |
|
| 2185 |
label(9); |
| 2186 |
endchar; |
| 2187 |
|
| 2188 |
"The numeral 3"; |
| 2189 |
beginchar("3", num_wd, num_ht, 0); |
| 2190 |
penpos1(thin, 0); z1 = (1/4, 3/4) nu; |
| 2191 |
penpos2(med, 270); z2l = (3/4, 1) nu; |
| 2192 |
penpos3(thick, 180); z3 = (13/10, 3/4) nu; |
| 2193 |
penpos4(med, 90); z4 = (5/8, 1/2) nu; |
| 2194 |
|
| 2195 |
penstroke z1e .. z2e{right} .. z3e .. {left}z4e; |
| 2196 |
|
| 2197 |
penpos5(med, 270); z5 = z4; |
| 2198 |
penpos6(thick, 180); z6l = (3/2, 1/4) nu; |
| 2199 |
penpos7(med, 90); z7l = (3/4, 0) nu; |
| 2200 |
penpos8(thin, 0); z8l = (0, 3/10) nu; |
| 2201 |
|
| 2202 |
penstroke z5e{right} .. z6e .. z7e .. z8e; |
| 2203 |
|
| 2204 |
label(8); |
| 2205 |
endchar; |
| 2206 |
|
| 2207 |
"The numeral 4"; |
| 2208 |
beginchar("4", num_wd, num_ht, 0); |
| 2209 |
penpos1(thick, 180); z1 = (3/4, 1) nu; |
| 2210 |
penpos2(med, 90); z2 = (0, 1/4) nu; |
| 2211 |
|
| 2212 |
penstroke z1e{down} .. z2e; |
| 2213 |
|
| 2214 |
penpos3(med, 270); z3 = z2; |
| 2215 |
penpos4(med, 270); z4 = (3/2, 1/4) nu; |
| 2216 |
|
| 2217 |
penstroke z3e .. z4e; |
| 2218 |
|
| 2219 |
penpos5(thick, 180); z5 = (1, 1/2) nu; |
| 2220 |
penpos6(thick, 180); z6 = (1, 0) nu; |
| 2221 |
|
| 2222 |
penstroke z5e .. z6e; |
| 2223 |
|
| 2224 |
label(6); |
| 2225 |
endchar; |
| 2226 |
|
| 2227 |
"The numeral 5"; |
| 2228 |
beginchar("5", num_wd, num_ht, 0); |
| 2229 |
penpos1(med, 270); z1l = (1/6, 1) nu; |
| 2230 |
penpos2(med, 270); z2l = (4/3, 1) nu; |
| 2231 |
|
| 2232 |
penstroke z1e{dir 340} .. z2e; |
| 2233 |
|
| 2234 |
penpos3(thick, 180); z3r = z1; |
| 2235 |
penpos4(thick, 180); z4r = (1/6, 1/2) nu; |
| 2236 |
|
| 2237 |
penstroke z3e .. z4e; |
| 2238 |
|
| 2239 |
penpos5(med, 270); z5r = z4l; |
| 2240 |
penpos6(thick, 180); z6l = (3/2, 1/4) nu; |
| 2241 |
penpos7(med, 90); z7l = (3/4, 0) nu; |
| 2242 |
penpos8(thin, 0); z8l = (0, 1/4) nu; |
| 2243 |
|
| 2244 |
penstroke z5e .. z6e .. z7e .. z8e; |
| 2245 |
|
| 2246 |
label(8); |
| 2247 |
endchar; |
| 2248 |
|
| 2249 |
"The numeral 6"; |
| 2250 |
beginchar("6", num_wd, num_ht, 0); |
| 2251 |
penpos1(thin, 90); z1r = (5/4, 1) nu; |
| 2252 |
penpos2(thick, 180); z2r = (0, 1/3) nu; |
| 2253 |
penpos3(med, 270); z3r = (3/4, 0) nu; |
| 2254 |
penpos4(med, 0); z4r = (3/2, 1/4) nu; |
| 2255 |
penpos5(med, 180); z5l = z2l; |
| 2256 |
|
| 2257 |
penstroke z1e .. z2e{down} .. z3e .. z4e .. z5e; |
| 2258 |
|
| 2259 |
label(5); |
| 2260 |
endchar; |
| 2261 |
|
| 2262 |
"The numeral 7"; |
| 2263 |
beginchar("7", num_wd, num_ht, 0); |
| 2264 |
penpos1(med, 270); z1l = (0, 1) nu; |
| 2265 |
penpos2(med, 270); z2l = (3/2, 1) nu; |
| 2266 |
|
| 2267 |
penstroke z1e{dir 340} .. z2e; |
| 2268 |
|
| 2269 |
penpos3(thick, 180); z3l = z2r; |
| 2270 |
penpos4(thick, 180); z4r = (1/2, 0) nu; |
| 2271 |
|
| 2272 |
penstroke z3e .. {down}z4e; |
| 2273 |
|
| 2274 |
penpos5(med, 270); |
| 2275 |
penpos6(med, 270); |
| 2276 |
1/2[z5, z6] = (z3 .. {down}z4) |
| 2277 |
intersectionpoint ((0,1/2) nu .. (3/2,1/2) nu); |
| 2278 |
z6 - z5 = (z2 - z1) / 2; |
| 2279 |
|
| 2280 |
penstroke z5e .. z6e; |
| 2281 |
|
| 2282 |
label(6); |
| 2283 |
endchar; |
| 2284 |
|
| 2285 |
"The numeral 8"; |
| 2286 |
beginchar("8", num_wd, num_ht, 0); |
| 2287 |
penpos1(thin, 90); z1r = (9/10, 1) nu; |
| 2288 |
penpos2(thick, 180); z2 = (1/6, 3/4) nu; |
| 2289 |
penpos3(thick, 210); z3 = 1/2[z2, z4]; |
| 2290 |
penpos4(thick, 180); z4l = (3/2, 1/4) nu; |
| 2291 |
penpos5(med, 90); z5l = (3/4, 0)nu; |
| 2292 |
penpos6(med, 0); z6l = (0, 1/4) nu; |
| 2293 |
penpos7(med, 330); z7 = 1/2[z6, z8]; |
| 2294 |
penpos8(med, 0); z8 = (4/3, 3/4) nu; |
| 2295 |
penpos9(thin, 90); z9r = (6/10, 19/20) nu; |
| 2296 |
|
| 2297 |
penstroke z1e{left} .. z2e .. z3e .. z4e .. z5e .. z6e .. z7e .. z8e .. z9e; |
| 2298 |
|
| 2299 |
label(9); |
| 2300 |
endchar; |
| 2301 |
|
| 2302 |
"The numeral 9"; |
| 2303 |
beginchar("9", num_wd, num_ht, 0); |
| 2304 |
penpos1(med, 90); z1r = (3/2, 9/10) nu; |
| 2305 |
penpos2(med, 90); z2r = (7/8, 1) nu; |
| 2306 |
penpos3(thick, 180); z3r = (1/6, 3/4) nu; |
| 2307 |
penpos4(med, 0); z4r = (3/2, 2/3) nu; |
| 2308 |
|
| 2309 |
penstroke z1e .. z2e .. z3e .. z4e; |
| 2310 |
|
| 2311 |
penpos5(thick, 180); z5l = (3/2, 19/20) nu; |
| 2312 |
penpos6(thick, 180); z6l = (3/2, 1/3) nu; |
| 2313 |
penpos7(med, 90); z7l = (3/4, 0) nu; |
| 2314 |
penpos8(thin, 0); z8l = (0, 1/4) nu; |
| 2315 |
|
| 2316 |
penstroke z5e .. z6e{down} .. z7e{left} .. z8e; |
| 2317 |
|
| 2318 |
label(8); |
| 2319 |
endchar; |
| 2320 |
|
| 2321 |
|
| 2322 |
%% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% |
| 2323 |
|
| 2324 |
%%\sec Punctuation marks. %{{{1 |
| 2325 |
|
| 2326 |
%% In order to put inter-letter links at the right positions, we had to remove |
| 2327 |
%% any spacing onthe right of letters. For this reason, we add a spacing, |
| 2328 |
%% proportional to the links' widths, at the left of all punctuatin marks. |
| 2329 |
|
| 2330 |
"Exclamation mark"; |
| 2331 |
beginchar("!", ltr_wd(1/2,2), loop_ascend * ex#, 0); |
| 2332 |
penpos1(thick, 180); |
| 2333 |
z1 = ((base_width + 2 link_width) / 2, loop_ascend) * ex; |
| 2334 |
penpos2(med, 180); z2 = (x1, 3/5 ex); |
| 2335 |
penstroke z1e .. z2e; |
| 2336 |
pickup pencircle scaled dot_size; |
| 2337 |
bot z3 = (x1, 0); |
| 2338 |
drawdot z3; |
| 2339 |
label(3); |
| 2340 |
save_letter(exclam)(x1) |
| 2341 |
endchar; |
| 2342 |
|
| 2343 |
"Spanish opening exclamation"; |
| 2344 |
beginchar(189, ltr_wd(1/2,2), (loop_ascend - straight_descend) * ex#, |
| 2345 |
straight_descend * ex#); |
| 2346 |
addto currentpicture also letter.exclam scaled -1 |
| 2347 |
shifted ((1/2 base_width + 2 link_width, |
| 2348 |
loop_ascend - straight_descend) * ex) |
| 2349 |
endchar; |
| 2350 |
|
| 2351 |
"Apostrophe"; |
| 2352 |
beginchar("'", ltr_wd(1/3,2), straight_ascend * ex#, 0); |
| 2353 |
penpos1(thick, 180); |
| 2354 |
z1 = ((base_width + 3 link_width) / 3, straight_ascend) * ex; |
| 2355 |
penpos2(thin, 90); |
| 2356 |
z2 = ((base_width - 3 link_width) / 3, straight_ascend - 1/2) * ex; |
| 2357 |
penstroke z1e{down} .. z2e; |
| 2358 |
label(2); |
| 2359 |
endchar; |
| 2360 |
|
| 2361 |
"High apostrophe"; |
| 2362 |
beginchar(18, ltr_wd(1/3,2), loop_ascend * ex#, 0); |
| 2363 |
penpos1(thick, 180); |
| 2364 |
z1 = ((base_width + 3 link_width) / 3, loop_ascend) * ex; |
| 2365 |
penpos2(thin, 90); |
| 2366 |
z2 = ((base_width - 3 link_width) / 3, loop_ascend - 1/2) * ex; |
| 2367 |
penstroke z1e{down} .. z2e; |
| 2368 |
label(2); |
| 2369 |
endchar; |
| 2370 |
|
| 2371 |
"Reverse apostrophe"; |
| 2372 |
beginchar("`", ltr_wd(1/3,2), straight_ascend * ex#, 0); |
| 2373 |
penpos1(thick, 180); |
| 2374 |
z1 = ((base_width - 3 link_width) / 3, straight_ascend) * ex; |
| 2375 |
penpos2(thin, 270); |
| 2376 |
z2 = ((base_width + 3 link_width) / 3, straight_ascend - 1/2) * ex; |
| 2377 |
penstroke z1e{down} .. z2e; |
| 2378 |
label(2); |
| 2379 |
endchar; |
| 2380 |
|
| 2381 |
"Comma"; |
| 2382 |
beginchar(",", ltr_wd(1/3,2), ex#, 1/3 ex#); |
| 2383 |
penpos1(thick, 180); z1 = ((base_width + 3 link_width) / 3, 1/4) * ex; |
| 2384 |
penpos2(thin, 90); z2l = ((base_width - 3 link_width) / 3, -1/3) * ex; |
| 2385 |
penstroke z1e{down} .. z2e; |
| 2386 |
label(2); |
| 2387 |
endchar; |
| 2388 |
|
| 2389 |
"Hyphen"; |
| 2390 |
beginchar("-", ltr_wd(5/6,0), ex#, 0); |
| 2391 |
penpos1(thick, 260); z1 = (1/6, 1/2) u; |
| 2392 |
penpos2(thick, 260); z2 = (4/6, 1/2) u; |
| 2393 |
penstroke z1e .. z2e; |
| 2394 |
label(2); |
| 2395 |
endchar; |
| 2396 |
|
| 2397 |
"En dash"; |
| 2398 |
beginchar(21, ltr_wd(1,0), ex#, 0); |
| 2399 |
penpos1(med, 270); z1 = (0, 1/2) u; |
| 2400 |
penpos2(med, 270); z2 = (1, 1/2) u; |
| 2401 |
penstroke z1e .. z2e; |
| 2402 |
label(2); |
| 2403 |
endchar; |
| 2404 |
|
| 2405 |
"Em dash"; |
| 2406 |
beginchar(22, ltr_wd(2,0), ex#, 0); |
| 2407 |
penpos1(med, 270); z1 = (0, 1/2) u; |
| 2408 |
penpos2(med, 270); z2 = (2, 1/2) u; |
| 2409 |
penstroke z1e .. z2e; |
| 2410 |
label(2); |
| 2411 |
endchar; |
| 2412 |
|
| 2413 |
"Period"; |
| 2414 |
beginchar(".", ltr_wd(1/2,2), ex#, 0); |
| 2415 |
pickup pencircle scaled dot_size; |
| 2416 |
bot z1 = ((base_width + 2 link_width) / 2 * ex, 0); |
| 2417 |
drawdot z1; |
| 2418 |
label(1) |
| 2419 |
endchar; |
| 2420 |
|
| 2421 |
"Colon"; |
| 2422 |
beginchar(":", ltr_wd(1/2,2), ex#, 0); |
| 2423 |
pickup pencircle scaled dot_size; |
| 2424 |
bot z1 = ((base_width + 2 link_width) / 2 * ex, 0); |
| 2425 |
drawdot z1; |
| 2426 |
top z2 = ((base_width + 2 link_width) / 2 * ex, ex); |
| 2427 |
drawdot z2; |
| 2428 |
label(2) |
| 2429 |
endchar; |
| 2430 |
|
| 2431 |
"Semicolon"; |
| 2432 |
beginchar(";", ltr_wd(1/3,2), ex#, 1/3 ex#); |
| 2433 |
penpos1(thick, 180); z1 = ((base_width + 3 link_width) / 3, 1/4) * ex; |
| 2434 |
penpos2(thin, 90); z2l = ((base_width - 3 link_width) / 3, -1/3) * ex; |
| 2435 |
penstroke z1e{down} .. z2e; |
| 2436 |
pickup pencircle scaled dot_size; |
| 2437 |
top z3 = ((base_width + 3 link_width) / 3 * ex, ex); |
| 2438 |
drawdot z3; |
| 2439 |
label(3); |
| 2440 |
endchar; |
| 2441 |
|
| 2442 |
"Question mark"; |
| 2443 |
beginchar("?", ltr_wd(3/2,2), loop_ascend * ex#, 0); |
| 2444 |
penpos1(med, 90); z1 = z2 - (2/4, 4/5) u; |
| 2445 |
penpos2(med, 270); x2 = x4; y2l = loop_ascend * ex; |
| 2446 |
penpos3(thick, 180); z3l = z1 + (5/4, 1/5) u; |
| 2447 |
penpos4(med, 180); z4 = (3/5 base_width + 3 link_width, 5/6) * ex; |
| 2448 |
penpos5(thin, 180); z5 = z4 - (0, 1/3) u; |
| 2449 |
penstroke z1e .. z2e{right} .. z3e .. z4e .. z5e; |
| 2450 |
|
| 2451 |
pickup pencircle scaled dot_size; |
| 2452 |
bot z6 = (x4, 0); |
| 2453 |
drawdot z6; |
| 2454 |
label(6); |
| 2455 |
|
| 2456 |
save_letter(interg)(x2) |
| 2457 |
endchar; |
| 2458 |
|
| 2459 |
"Spanish opening interrogation"; |
| 2460 |
beginchar(190, ltr_wd(3/2,2), (loop_ascend - straight_descend) * ex#, |
| 2461 |
straight_descend * ex#); |
| 2462 |
addto currentpicture also letter.interg scaled -1 |
| 2463 |
shifted ((3/2 base_width + 2 link_width, |
| 2464 |
loop_ascend - straight_descend) * ex); |
| 2465 |
endchar; |
| 2466 |
|
| 2467 |
"Left parenthesis"; |
| 2468 |
beginchar("(", ltr_wd(1,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2469 |
penpos1(med, 180); z1l = (5/6, loop_ascend) u; |
| 2470 |
penpos2(thick, 180); x2r = 1/6 v; y2 = 1/2[y1,y3]; |
| 2471 |
penpos3(med, 180); z3l = (5/6, -1/2 loop_descend) u; |
| 2472 |
penstroke z1e .. z2e .. z3e; |
| 2473 |
label(3); |
| 2474 |
endchar; |
| 2475 |
|
| 2476 |
"Right parenthesis"; |
| 2477 |
beginchar(")", ltr_wd(1,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2478 |
penpos1(med, 180); z1r = (1/6, loop_ascend) u; |
| 2479 |
penpos2(thick, 180); x2l = 5/6 v; y2 = 1/2[y1,y3]; |
| 2480 |
penpos3(med, 180); z3r = (1/6, -1/2 loop_descend) u; |
| 2481 |
penstroke z1e .. z2e .. z3e; |
| 2482 |
label(3); |
| 2483 |
endchar; |
| 2484 |
|
| 2485 |
"Left bracket"; |
| 2486 |
beginchar("[", ltr_wd(1,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2487 |
penpos1(med, 90); z1r = (5/6, loop_ascend) u; |
| 2488 |
penpos2(med, 90); z2r = (1/6, loop_ascend) u; |
| 2489 |
|
| 2490 |
penpos3(thick, 180); z3r = (1/6, loop_ascend) u; |
| 2491 |
penpos4(thick, 180); z4r = (1/6, -1/2 loop_descend) u; |
| 2492 |
|
| 2493 |
penpos5(med, 270); z5r = (1/6, -1/2 loop_descend) u; |
| 2494 |
penpos6(med, 270); z6r = (5/6, -1/2 loop_descend) u; |
| 2495 |
|
| 2496 |
if fixed: |
| 2497 |
draw z1 -- z2 -- z5 -- z6 withpen pencircle scaled med; |
| 2498 |
else: |
| 2499 |
penstroke z1e .. z2e; |
| 2500 |
penstroke z3e .. z4e; |
| 2501 |
penstroke z5e .. z6e; |
| 2502 |
fi |
| 2503 |
|
| 2504 |
label(6); |
| 2505 |
endchar; |
| 2506 |
|
| 2507 |
"Right bracket"; |
| 2508 |
beginchar("]", ltr_wd(1,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2509 |
penpos1(med, 270); z1l = (1/6, loop_ascend) u; |
| 2510 |
penpos2(med, 270); z2l = (5/6, loop_ascend) u; |
| 2511 |
|
| 2512 |
penpos3(thick, 180); z3l = (5/6, loop_ascend) u; |
| 2513 |
penpos4(thick, 180); z4l = (5/6, -1/2 loop_descend) u; |
| 2514 |
|
| 2515 |
penpos5(med, 90); z5l = (5/6, -1/2 loop_descend) u; |
| 2516 |
penpos6(med, 90); z6l = (1/6, -1/2 loop_descend) u; |
| 2517 |
|
| 2518 |
if fixed: |
| 2519 |
draw z1 -- z2 -- z5 -- z6 withpen pencircle scaled med; |
| 2520 |
else: |
| 2521 |
penstroke z1e .. z2e; |
| 2522 |
penstroke z3e .. z4e; |
| 2523 |
penstroke z5e .. z6e; |
| 2524 |
fi |
| 2525 |
|
| 2526 |
label(6); |
| 2527 |
endchar; |
| 2528 |
|
| 2529 |
"Left brace"; |
| 2530 |
beginchar("{", ltr_wd(7/6,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2531 |
penpos1(med, 90); |
| 2532 |
penpos2(thick, 180); |
| 2533 |
penpos3(med, 90); |
| 2534 |
penpos4(med, 270); |
| 2535 |
penpos5(thick, 180); |
| 2536 |
penpos6(med, 270); |
| 2537 |
|
| 2538 |
x1 = x6 = v; |
| 2539 |
y1r = loop_ascend * ex; |
| 2540 |
y6r = -1/2 loop_descend * ex; |
| 2541 |
z3 = z4 = (1/6 v, 1/2[y1,y6]); |
| 2542 |
z2 = 1/2 [z1, z3]; |
| 2543 |
z5 = 1/2 [z4, z6]; |
| 2544 |
|
| 2545 |
penstroke z1e {left} .. z2e .. {left} z3e; |
| 2546 |
penstroke z4e {right} .. z5e .. {right} z6e; |
| 2547 |
|
| 2548 |
label(6); |
| 2549 |
endchar; |
| 2550 |
|
| 2551 |
"Right brace"; |
| 2552 |
beginchar("}", ltr_wd(7/6,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2553 |
penpos1(med, 270); |
| 2554 |
penpos2(thick, 180); |
| 2555 |
penpos3(med, 270); |
| 2556 |
penpos4(med, 90); |
| 2557 |
penpos5(thick, 180); |
| 2558 |
penpos6(med, 90); |
| 2559 |
|
| 2560 |
x1 = x6 = 1/6 v; |
| 2561 |
y1l = loop_ascend * ex; |
| 2562 |
y6l = -1/2 loop_descend * ex; |
| 2563 |
z3 = z4 = (v, 1/2[y1,y6]); |
| 2564 |
z2 = 1/2 [z1, z3]; |
| 2565 |
z5 = 1/2 [z4, z6]; |
| 2566 |
|
| 2567 |
penstroke z1e {right} .. z2e .. {right} z3e; |
| 2568 |
penstroke z4e {left} .. z5e .. {left} z6e; |
| 2569 |
|
| 2570 |
label(6); |
| 2571 |
endchar; |
| 2572 |
|
| 2573 |
"Slash"; |
| 2574 |
beginchar("/", ltr_wd(2,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2575 |
penpos1(thick, 180); z1l = (w - 1/6 v, loop_ascend * ex); |
| 2576 |
penpos2(thick, 180); z2r = (1/6 v, -1/2 loop_descend * ex); |
| 2577 |
penstroke z1e .. z2e; |
| 2578 |
label(2); |
| 2579 |
endchar; |
| 2580 |
|
| 2581 |
"Vertical bar"; |
| 2582 |
beginchar("|", ltr_wd(1,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2583 |
penpos1(thick, 180); z1 = (w/2, loop_ascend * ex); |
| 2584 |
penpos2(thick, 180); z2 = (w/2, -1/2 loop_descend * ex); |
| 2585 |
penstroke z1e .. z2e; |
| 2586 |
label(2); |
| 2587 |
endchar; |
| 2588 |
|
| 2589 |
"Reverse slash"; |
| 2590 |
beginchar("\", ltr_wd(2,0), loop_ascend * ex#, 1/2 loop_descend * ex#); |
| 2591 |
penpos1(thick, 180); z1r = (1/6 v, loop_ascend * ex); |
| 2592 |
penpos2(thick, 180); z2l = (w - 1/6 v, -1/2 loop_descend * ex); |
| 2593 |
penstroke z1e .. z2e; |
| 2594 |
label(2); |
| 2595 |
endchar; |
| 2596 |
|
| 2597 |
"Ampersand"; |
| 2598 |
beginchar("&", ltr_wd(3,0), uc_ascend * ex#, 0); |
| 2599 |
penpos1(thick, 180); z1 = (9/4, 1/2) uu; |
| 2600 |
penpos2(med, 90); z2l = (11/16, 0) uu; |
| 2601 |
penpos3(med, 0); z3l = (0, 1/6) uu; |
| 2602 |
penpos5(med, 0); z5 = (8/5, 13/16) uu; |
| 2603 |
penpos4(med, angle(z5-z3)-90); z4 = 1/2[z3,z5]; |
| 2604 |
penpos6(med, 90); z6r = (9/8, 1) uu; |
| 2605 |
penpos7(thick, 180); z7 = (3/4, 1/2) uu; |
| 2606 |
penpos8(med, 270); z8r = (2, 0) uu; |
| 2607 |
penpos9(med, 0); z9r = (3, 1/5) uu; |
| 2608 |
penstroke z1e .. z2e .. z3e{up} .. z4e .. {up}z5e |
| 2609 |
.. z6e .. z7e .. z8e .. z9e; |
| 2610 |
label(9); |
| 2611 |
endchar; |
| 2612 |
|
| 2613 |
"French opening quote"; |
| 2614 |
beginchar(19, ltr_wd(11/10,2), ex#, 0); |
| 2615 |
penpos1(thick, 150); y1r = ex; |
| 2616 |
penpos2(thin, 90); z2 = (link_width, 1/2) u; |
| 2617 |
penpos3(thick, 30); y3l = 0; |
| 2618 |
x1l = x3r = w - (link_width + 2/5) * v; |
| 2619 |
penstroke z1e .. {dir 190} z2e; |
| 2620 |
penstroke z3e .. {dir 170} z2e; |
| 2621 |
label(3); |
| 2622 |
addto currentpicture also currentpicture shifted (2/5 v, 0); |
| 2623 |
endchar; |
| 2624 |
|
| 2625 |
"French closing quote"; |
| 2626 |
beginchar(20, ltr_wd(11/10,2), ex#, 0); |
| 2627 |
penpos1(thick, 210); y1l = ex; |
| 2628 |
penpos2(thin, 270); z2 = (w - (link_width + 2/5) * v, ex/2); |
| 2629 |
penpos3(thick, 330); y3r = 0; |
| 2630 |
x1r = x3l = link_width * v; |
| 2631 |
penstroke z1e .. {dir -10} z2e; |
| 2632 |
penstroke z3e .. {dir 10} z2e; |
| 2633 |
label(3); |
| 2634 |
addto currentpicture also currentpicture shifted (2/5 v, 0); |
| 2635 |
endchar; |
| 2636 |
|
| 2637 |
"Less than sign"; |
| 2638 |
beginchar("<", ltr_wd(3/2,2), num_ht, 0); |
| 2639 |
penpos1(med, 90); z1r = (3/2 + link_width, 9/10 straight_ascend) u; |
| 2640 |
penpos2(med, 90); z2 = (link_width, 1/2 straight_ascend) u; |
| 2641 |
penpos3(med, 90); z3l = (3/2 + link_width, 1/10 straight_ascend) u; |
| 2642 |
penstroke z1e .. z2e; |
| 2643 |
penstroke z3e .. z2e; |
| 2644 |
label(3); |
| 2645 |
endchar; |
| 2646 |
|
| 2647 |
"Greater than sign"; |
| 2648 |
beginchar(">", ltr_wd(3/2,2), num_ht, 0); |
| 2649 |
penpos1(med, 270); z1r = (link_width, 9/10 straight_ascend) u; |
| 2650 |
penpos2(med, 270); z2 = (3/2 + link_width, 1/2 straight_ascend) u; |
| 2651 |
penpos3(med, 270); z3l = (link_width, 1/10 straight_ascend) u; |
| 2652 |
penstroke z1e .. z2e; |
| 2653 |
penstroke z3e .. z2e; |
| 2654 |
label(3); |
| 2655 |
endchar; |
| 2656 |
|
| 2657 |
|
| 2658 |
%% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% |
| 2659 |
|
| 2660 |
%%\sec The ligature table. %{{{1 |
| 2661 |
|
| 2662 |
%% Here comes a crucial part of the French Cursive typeface: the ligature and |
| 2663 |
%% kerning table. It has to play two major roles: first of all, it is |
| 2664 |
%% responsible of the insertion of inter-letter links, a task for which the |
| 2665 |
%% lig/kern system in \TeX\ and \MF\ is thankfully powerful enough. Secondly, |
| 2666 |
%% this table is responsible for kerning, which is necessary for some |
| 2667 |
%% successions of an uppercase and a lowercase, but also in some cases for |
| 2668 |
%% punctuation. |
| 2669 |
|
| 2670 |
%%\subsec Macros for ligature tables. %{{{2 |
| 2671 |
|
| 2672 |
k# := base_width * ex#; |
| 2673 |
|
| 2674 |
"Right boundary pseudo-character"; |
| 2675 |
beginchar(23, 0, 0, 0) endchar; |
| 2676 |
|
| 2677 |
boundarychar := 23; |
| 2678 |
|
| 2679 |
def word_ends = |
| 2680 |
".", ",", ";", ":", "'", ")", "]", "/", 20, "-", 21, 22 enddef; |
| 2681 |
|
| 2682 |
%% The sets of variants of letters. |
| 2683 |
|
| 2684 |
def var_a = "a",160,161,224,225,226,227,228,229 enddef; |
| 2685 |
def var_c = "c",162,163,231 enddef; |
| 2686 |
def var_d = "d",164 enddef; |
| 2687 |
def var_e = "e",165,166,232,233,234,235 enddef; |
| 2688 |
def var_g = "g",167 enddef; |
| 2689 |
def var_i = "i",236,237,238,239 enddef; |
| 2690 |
def var_l = "l",168,169,170 enddef; |
| 2691 |
def var_n = "n",171,172,241 enddef; |
| 2692 |
def var_o = "o",174,242,243,244,245,246,248 enddef; |
| 2693 |
def var_r = "r",175,176 enddef; |
| 2694 |
def var_s = "s",177,178,179 enddef; |
| 2695 |
def var_t = "t",180,181 enddef; |
| 2696 |
def var_u = "u",182,183,249,250,251,252 enddef; |
| 2697 |
def var_y = "y",184,253 enddef; |
| 2698 |
def var_z = "z",185,186,187 enddef; |
| 2699 |
|
| 2700 |
%% The sets of shapes for links. |
| 2701 |
|
| 2702 |
def sh_small = var_a, var_c, var_d, var_e, var_g, var_o, "q", 247 enddef; |
| 2703 |
def sh_loop = "b", "f", "h", "k", var_l enddef; |
| 2704 |
def sh_vert = var_i, var_r, var_t, var_u, var_z enddef; |
| 2705 |
def sh_far = "j", "p", var_s enddef; |
| 2706 |
def sh_hloop = "h", "k" enddef; |
| 2707 |
def sh_mn = "m", var_n, "v", "w", "x", var_y enddef; |
| 2708 |
def sh_x = "x" enddef; |
| 2709 |
|
| 2710 |
%% Some macros to use these lists. |
| 2711 |
|
| 2712 |
boolean ligged[], first; |
| 2713 |
|
| 2714 |
def ligtables (text list) = |
| 2715 |
ligtable |
| 2716 |
for c = list: |
| 2717 |
if not known ligged[byte c]: |
| 2718 |
hide ( ligged[byte c] = true ) c: |
| 2719 |
fi |
| 2720 |
endfor |
| 2721 |
enddef; |
| 2722 |
|
| 2723 |
def link (text list) (expr chr) = |
| 2724 |
hide(first := true) |
| 2725 |
for lft = list: |
| 2726 |
if first: hide(first := false) else: , fi lft |=:| chr endfor |
| 2727 |
enddef; |
| 2728 |
|
| 2729 |
def links (suffix ln) (text sh) = |
| 2730 |
hide (first := true) |
| 2731 |
forsuffixes # = sh: |
| 2732 |
if first: hide(first := false) else: , fi |
| 2733 |
expandafter link expandafter ( scantokens ("sh_" & str #) )(lnk.#.ln) |
| 2734 |
endfor |
| 2735 |
enddef; |
| 2736 |
|
| 2737 |
%%% ligtable ligtables |
| 2738 |
%%% penpos link links |
| 2739 |
|
| 2740 |
%%\subsec Ligatures between lowercase and punctuations. %{{{2 |
| 2741 |
|
| 2742 |
ligtable "-": "-" =: 21, skipto 0; |
| 2743 |
ligtable 21: "-" =: 22, skipto 0; |
| 2744 |
|
| 2745 |
ligtable "!": "`" =: 189; |
| 2746 |
ligtable "?": "`" =: 190; |
| 2747 |
|
| 2748 |
ligtable "`": "`" kern -2 link_width * k#, skipto 0; |
| 2749 |
ligtable "'": "'" kern -2 link_width * k#, skipto 0; |
| 2750 |
ligtable 18: "'" =:| "'", skipto 0; |
| 2751 |
|
| 2752 |
ligtable "<": "<" =: 19; |
| 2753 |
ligtable ">": ">" =: 20; |
| 2754 |
|
| 2755 |
ligtable ||: "(": ")": "[": "]": "{": "}": "/": "|": "\": |
| 2756 |
189: 190: ".": ":": ";": 20: 22: |
| 2757 |
0:: |
| 2758 |
link(sh_far)(lnk.far.low), link(sh_mn)(lnk.mn.beg), |
| 2759 |
skipto 2; |
| 2760 |
|
| 2761 |
|
| 2762 |
%%\subsec Ligatures between lowercase letters. %{{{2 |
| 2763 |
|
| 2764 |
%% Special cases: the q and the s have a different shape at the end of words, |
| 2765 |
%% they have no right link, contrary to the other letters. |
| 2766 |
|
| 2767 |
ligtables ("q", var_s) |
| 2768 |
for c = 97 upto 122: c |=:| lnk.sq, endfor |
| 2769 |
for c = 160, 161, 162, 163, 165, 166, 167, 168, 170, 171, 172, |
| 2770 |
175, 176, 177, 178, 179, 181, 183, 185, 186, 187: c |=:| lnk.sq, endfor |
| 2771 |
for c = 224 upto 252: |
| 2772 |
if (c <> 230) and (c <> 240): c |=:| lnk.sq, fi endfor |
| 2773 |
253 |=:| lnk.sq; |
| 2774 |
|
| 2775 |
ligtables ("h", "k") |
| 2776 |
"'" |=: 18, skipto 1; |
| 2777 |
|
| 2778 |
ligtables (var_a, var_d, var_i, "m", var_n, "p", var_r, var_u, lnk.sq) |
| 2779 |
1:: |
| 2780 |
for lt = boundarychar, word_ends: lt |=:| lnk.lowmed, endfor |
| 2781 |
skipto 2; |
| 2782 |
|
| 2783 |
ligtables (lnk.low) |
| 2784 |
2:: |
| 2785 |
links (low) (small, hloop, loop, vert, far, mn, x); |
| 2786 |
|
| 2787 |
ligtables (var_l) |
| 2788 |
"'" |=: 18, skipto 3; |
| 2789 |
|
| 2790 |
ligtables (var_c, var_e, "f", var_g, "j", var_t, "x", var_y, var_z, 247) |
| 2791 |
3:: |
| 2792 |
links (med) (small, hloop, loop, vert, far, mn, x); |
| 2793 |
|
| 2794 |
ligtables (lnk.high) |
| 2795 |
for c = var_e: c kern -thin#, endfor |
| 2796 |
skipto 5; |
| 2797 |
|
| 2798 |
ligtables ("b") |
| 2799 |
"'" |=: 18, skipto 4; |
| 2800 |
|
| 2801 |
ligtables (var_o, "v", "w") |
| 2802 |
4:: |
| 2803 |
for c = var_e: c |=:| lnk.high, endfor |
| 2804 |
for c = "-", 21, 22: c kern thin#, endfor |
| 2805 |
5:: |
| 2806 |
links (high) (small, loop, vert, far, mn); |
| 2807 |
|
| 2808 |
%%\subsec Ligatures and spacings after uppercase letters. %{{{2 |
| 2809 |
|
| 2810 |
ligtable "G": "J": "Y": 221: |
| 2811 |
links (med) (small, hloop, loop, vert, far, mn, x); |
| 2812 |
|
| 2813 |
ligtable "F": "S": |
| 2814 |
lnk.small.low kern -1/2 k#, % small letters are closer |
| 2815 |
lnk.vert.low kern -1/4 k#, % verticals too |
| 2816 |
lnk.far.med kern -1/5 k#, % j, p, s too |
| 2817 |
link(sh_small)(lnk.small.low), |
| 2818 |
skipto 6; |
| 2819 |
|
| 2820 |
ligtable "I": 204: 205: 206: 207: |
| 2821 |
for l = lnk.loop.high, lnk.vert.low, lnk.mn.beg: l kern 1/8ex#, endfor |
| 2822 |
skipto 6; |
| 2823 |
|
| 2824 |
ligtable "N": 209: |
| 2825 |
lnk.small.low kern -1/3 k#, |
| 2826 |
lnk.far.med kern -1/5 k#, |
| 2827 |
skipto 6; |
| 2828 |
|
| 2829 |
ligtable "P": |
| 2830 |
lnk.small.low kern -5/8 k#, |
| 2831 |
lnk.far.med kern -1/3 k#, |
| 2832 |
lnk.vert.low kern -5/12 k#, |
| 2833 |
skipto 6; |
| 2834 |
|
| 2835 |
ligtable "Q": |
| 2836 |
lnk.mn.beg kern 1/5 k#, |
| 2837 |
link(sh_small)(lnk.small.low), |
| 2838 |
skipto 6; |
| 2839 |
|
| 2840 |
ligtable "H": "K": "L": |
| 2841 |
lnk.small.low kern 1/8 k#, |
| 2842 |
lnk.mn.beg kern 1/6 k#, |
| 2843 |
skipto 6; |
| 2844 |
|
| 2845 |
ligtable "B": "C": 199: "D": "M": "R": "T": "V": "W": "X": "Z": |
| 2846 |
"A": 192: 193: 194: 195: 196: 197: |
| 2847 |
"E": 200: 201: 202: 203: |
| 2848 |
"O": 210: 211: 212: 213: 214: 216: |
| 2849 |
"U": 217: 218: 219: 220: |
| 2850 |
lnk.mn.beg kern 1/6 k#, |
| 2851 |
6:: |
| 2852 |
links (med) (hloop), |
| 2853 |
links (low) (small, loop, vert), |
| 2854 |
links (med) (far), |
| 2855 |
links (beg) (mn); |
| 2856 |
|
| 2857 |
bye. |