% malcnc.mf 1.2.0 1994/10/11 -- lower case non-composite letter glyph programs % Copyright 1991-4 P. Damian Cugley. %%% @METAFONT-file { %%% filename = "malcnc.mf", %%% version = "1.2.0", %%% date = "1994/10/11", %%% package = "Malvern 1.2", %%% author = "P. Damian Cugley", %%% email = "damian.cugley@comlab.ox.ac.uk", %%% address = "Oxford University Computing Laboratory, %%% Parks Road, Oxford OX1 3QD, UK", %%% codetable = "USASCII", %%% keywords = "Malvern, METAFONT, font, typefont, TeX", %%% supported = "Maybe", %%% abstract = "Character programs for the Malvern font family, %%% for non-composite lower case latin letter.", %%% dependencies = "other program files", %%% } % See the Malvern Handbook (maman.tex) for more info about Malvern. % This software is available freely but without warranty. % See the file COPYING for details. % Glyph programs for lower case letters that do not generate % composite letters. % Some composite letters are generated by separate glyph programs. % Some letters aren't used in composite letters. %{{{ malcnc.mf if testing: endinput; fi %{{{ d iff known code.lc.d: b_char(code.lc.d)(b_wd#)(o_sp, 1); draw_b(l, -d, r, h, 0, x_ht) false; set_ic_tr; endchar; %}}} d %{{{ i iff known code.lc.i: ma_char(code.lc.i, max(pn.wd#, dot_wd#), min(body_ht#, 1/2dot_ht# + 1/2[x_ht#, asc_ht#]), 0v#)(i_sp, i_sp); draw_i; top z.dot = (1/2w, h); draw_dot.dot; labels(dot); endchar; iff known code.lc.dotless_i: ma_char(code.lc.dotless_i, max(pn.wd#, dot_wd#), min(body_ht#, 1/2dot_ht# + 1/2[x_ht#, asc_ht#]), 0v#)(i_sp, i_sp); draw_i; endchar; %}}} %{{{ o with slash iff known code.lc.o.slash: "l.c. o with slash"; x_char(code.lc.o.slash, if italic: 7u# else: 8u# fi)(o_sp, o_sp); draw_circle(l - ho, h + oo, r + ho, -d - oo); draw_O_slash; set_icc (1/12[r#,l#], 11/12h#) 0.7h#; endchar; %}}} %{{{ b, d, p, q, thorn iff known code.lc.b: b_char(code.lc.b, b_wd#)(1, o_sp); draw_b(l, -d, r, h, 0, x_ht) true; set_ic_o; endchar; iff known code.lc.p: y_char(code.lc.p, b_wd#)(1, o_sp); draw_b(l, -d, r, h, 0, x_ht) true; set_ic_o; endchar; iff known code.lc.q: y_char(code.lc.q, b_wd#)(o_sp, 1); draw_b(l, -d, r, h, 0, x_ht) false; set_ic_tr; endchar; iff known code.lc.thorn: "l.c. thorn"; ma_char(code.lc.thorn, b_wd#, asc_ht#, desc_dp#)(1, o_sp); draw_b(l, -d, r, h, 0, x_ht) true; set_ic_o; endchar; %}}} %{{{ v, x iff known code.lc.v: x_char(code.lc.v, 7u#)(v_sp, v_sp); draw_V; set_ic_tr; endchar; iff known code.lc.x: x_char(code.lc.x, 7u#)(x_sp, x_sp); draw_X 1/20; set_ic(h# - pn.ht#); endchar; %}}} %{{{ m, eng iff known code.lc.m: x_char(code.lc.m, 10u#)(1,n_sp); if 1/2[l,r] <> good.x 1/2[l,r]: change_width; fi save n_dip; n_dip = if italic: 3v else: 1.5v fi; H_stem.stem; draw_n_arch1(l, rt 1/2[l,r]); draw_n_arch2(lft 1/2[l,r],r); set_ic_n; endchar; iff known code.lc.eng: "Lappish lower case eng"; y_char(code.lc.eng, n_wd#)(1, n_sp); top lft z1stem = (l, h + o); bot lft z2stem = (l, -o); draw z1stem -- z2stem; draw_n_arch.a(l,r); x1tl = x4a; bot y2tl = bot y3tl - 1/3v = -d - o; lft x3tl = 3/4[r, l]; x2tl = 0.55[x1tl, x3tl]; z1tl = z2tl + whatever*ne; draw z4a --- z1tl ... z2tl{left} ... z3tl; labels(1stem, 2stem, 1tl, 2tl, 3tl); set_ic_n; endchar; %}}} %{{{ k k_wd# = 1/2pn.wd# + 5.5u#; def set_ic_x_ht = set_ic x_ht# enddef; vardef draw_lc.k@#(expr l, by, r, h, bl, x_ht) = top lft z@#stem1 = (l, h); bot lft z@#stem2 = (l, by); top rt z@#top1 = (r, x_ht + o); y@#top2 = y@#bot2 = 0.5[y@#top1, y@#bot1]; x@#top2 = rt x@#stem1; z@#top2 = z@#bot2; bot rt z@#bot1 = (r, by - o); draw z@#stem1 -- z@#stem2; draw z@#top1 -- z@#top2 ; draw z@#bot1 -- z@#bot2; labels(@#stem1, @#stem2, @#top1, @#top2, @#bot1, @#bot2); set_ic_x_ht; x.anchor := 1/2[rt x@#stem1, r]; enddef; iff known code.lc.k: b_char(code.lc.k, k_wd#)(1,x_sp); draw_lc.k(l, -d, r, h, 0, x_ht); endchar; %}}} %{{{ eszet if unknown code.lc.longs.s: code.lc.longs.s = code.lc.eszet; fi iff known code.lc.longs.s: "Ligature longs+s"; ma_char(code.lc.longs.s, pn.wd# + 7u#, asc_ht#, if italic: desc_dp# else: 0v# fi)(1,o_sp); bot lft z1 = (l, -d); lft x2 = l; top y3 = h + o; rt x8 = r; bot y9 = 0 - o; x7 = x9; y2 = 0.25[x_ht, h]; y4 = 1/2[y3, y5]; y5 = x_ht; y6 = 1/2[y5, y7]; y8 = 1/2[y7, y9]; x7 = 0.5[x10, x8]; y10 = y9 + 1u; lft x10 = rt x1 + 1u; y7 = 0.6[y9, y5]; x6 - x7 = 0.8(x7 - x8); x4 - x5 = 0.5(x5 - x6); z3 = z4 + whatever * se; z3 = z2 + whatever * ne; draw z1 --- vharc(2, 3) & hvarc(3, 4) .. z5 & hvarc(5, 6) ... hvarc(7, 8) & vharc(8, 9) .. z10; labels(range 1 thru 10); endchar; iff known code.lc.eszet1: "Variant German Eszet"; ma_char(code.lc.eszet1, pn.wd# + 7u#, asc_ht#, if italic: desc_dp# else: 0v# fi)(1,o_sp); lft x1 = lft x2 = l; rt x8 = r; top y3 = h + o; bot y1 = -d -o; bot y9 = bot y10 - 3/4v = -o; top y5 = top y6 + 1/4v - o = top y7 - o = x_ht; lft x6 = good.x(rt x1 + 1/2u); lft x10 = rt x1; z3 - z2 = z4 - z5 = (z3 - z4) xscaled -1 = whatever*ne; z8 - z9 = (z8 - z7) yscaled -1 = whatever*ne; z5' = (1/sqrt2)[(x5,y4), (x4,y5)]; draw z1 --- z2 ... z3{right} ... z4 ... z5'{(z5-z4)}; draw z6 ... z7{right} ... z8 ... {left}z9 ... z10; % bot bowl labels(range 1 thru 10, 5'); set_ic_o; endchar; %}}} %{{{ eth and Anglo-Saxon eth % This will be a bit tricky. def ma_eth(expr code) = b_char(code, 8u#)(o_sp, o_sp); % matched by |endchar| draw_circle.circ(l - ho, x_ht + oo, r + ho, -d - oo); z1 = (1/sqrt2)[(x1circ,y0circ), (x0circ,y1circ)]; z2 = z1 + whatever*se; y2 = 1/2[x_ht, h]; % junction top y3 = h + o; lft x3 = l + 1/2u; % this just happens to work draw z1 ... z2 ... z3; 1/2[z1a,z1b] = 0[z2,z3]; z1b - z1a = whatever*(z3 - z2) xscaled -1; top y1a = h + o; %%%lft x1b = l; draw z1a -- z1b; labels(1,2,3, 1a, 1b); set_ic_o; enddef; iff known code.lc.eth: "Icelandic eth"; ma_eth(code.lc.eth); endchar; iff known code.lc.eth1: ma_eth(code.lc.eth1); "Anglo-Saxon eth"; z2b - z1b = z1a - z2a = whatever*se; lft x2b = l - o; draw z1b -- z2b; draw z1a -- z2a; labels(2a, 2b); set_ic_o; endchar; %}}} %{{{ ae and oe ligatures def ma_e_lig(expr code, lsp, rsp) = x_char(code, pn.wd# + 12u#)(lsp, rsp); if 1/2w <> good.x 1/2w: change_width; fi forsuffixes $ = 1, 2, 3, 4, 5: 1/2[z$a, z$e] = z0; endfor x0 = 1/2w; y0 = y5a = good.y 1/2h; top y2a = h + o; bot y3a = -o; lft x4a = l; x2a = x3a = x5a = 0.55[x0, x4a]; y4a = 1/2[y3a, y0]; x1a = 0.85[x0, x4a]; top y1a = vround(h - 1/3v); y2e := (-d - o) + 1/2pn.ht; y3e := (h + o) - 1/2pn.ht; %% low-resolution hackettes set_ic_e; enddef; iff known code.lc.ae: "lower case ligature ae"; ma_e_lig(code.lc.ae)(a_sp, e_sp); draw z1a .. z2a{right} .. z0 .. z3a{left} .. z4a{up} .. z5a --- z5e .. z4e{up} .. z3e{left} .. z0 .. z2e{right} .. z1e; labels(1a, 2a, 3a, 4a, 5a, 1e, 2e, 3e, 4e, 5e, 0); endchar; iff known code.lc.oe: "lower case ligature oe"; ma_e_lig(code.lc.oe)(o_sp, e_sp); draw z0 --- z5e .. z4e{up} .. z3e{left} .. z0 .. z2e{right} .. z1e; draw_circle.o(l - ho, h + oo, rt 1/2w, -d - oo); labels(1e, 2e, 3e, 4e, 5e, 0); endchar; %}}} %{{{ f and f-ligatures longs_adjust# := -1u#; longs_rsp:=f_rsp + longs_adjust#/sp#; define_whole_pixels(longs_adjust); iff known code.lc.f: f_char(code.lc.f, f_wd#)(f_lsp, f_rsp); draw_f(l + f_bar_left, 0) false; draw_f_bar false; set_ic (h# - v# + 1/2pn.ht#); endchar; iff known code.lc.f.f: "ligature ff"; f_char(code.lc.f.f, 2f_wd# - f_bar_left# + f_join#)(f_lsp, f_rsp); draw_f1(l + f_bar_left, 0) true; draw_f2(l + f_wd + f_join, 0) false; draw_f_bar2 false; set_ic (h# - v# + 1/2pn.ht#); endchar; iff known code.lc.f.i: "ligature fi"; f_char(code.lc.f.i, f_wd# + (f_join# + fi_kern#) + pn.wd#)(f_lsp, i_sp); draw_f(l + f_bar_left, fi_kern) true; draw_f_bar true; bot z1foot = (x1, 0 - o); draw z1foot -- (x1foot, y1bar); rt z2foot = (r, y1foot); labels(1foot, 2foot); set_ic (h# - v# + 1/2pn.ht#); endchar; iff known code.lc.f.l: "ligature fl"; f_char(code.lc.f.l, f_wd# + (f_join# + fi_kern#) + pn.wd#)(f_lsp, l_sp); draw_f(l + f_bar_left, fi_kern) true; draw_f_bar true; bot z1foot = (x1, 0 - o); draw z1foot -- z1; labels(1foot); set_ic (h# - v# + 1/2pn.ht#); endchar; iff known code.lc.f.f.i: "ligature ffi"; f_char(code.lc.f.f.i, 2f_wd# - f_bar_left# + 2f_join# + fi_kern# + pn.wd#) (f_lsp, i_sp); draw_f1(l + f_bar_left, 0) true; draw_f2(l + f_wd + f_join, fi_kern) true; draw_f_bar2 true; bot z1foot = (x[2]1, 0 - o); draw z1foot -- (x1foot, y1bar); labels(1foot); set_ic (h# - v# + 1/2pn.ht#); endchar; iff known code.lc.f.f.l: "ligature ffl"; f_char(code.lc.f.f.l, 2f_wd# - f_bar_left# + 2f_join# + fi_kern# + pn.wd#) (f_lsp, l_sp); draw_f1(l + f_bar_left, 0) true; draw_f2(l + f_wd + f_join, fi_kern) true; draw_f_bar2 true; bot z1foot = (x[2]1, 0 - o); draw z1foot -- z[2]1; labels(1foot); set_ic (h# - v# + 1/2pn.ht#); endchar; iff known code.lc.longs: "long s"; f_char(code.lc.longs, f_wd#)(f_lsp, longs_rsp); draw_f(f_bar_left, 0) false; set_ic (h# - v# + 1/2pn.ht#); endchar; iff known code.lc.longs.longs: "ligature longs longs"; f_char(code.lc.longs.longs, 2f_wd# - f_bar_left# + f_join# + longs_adjust#)(f_lsp, longs_rsp); draw_f1(l + f_bar_left, longs_adjust)true; draw_f2(l + f_wd + longs_adjust + f_join, 0)false; set_ic (h# - v# + 1/2pn.ht#); endchar; %}}} %{{{ ij ligature iff known code.lc.ij: "lower-case Dutch ij"; ma_char(code.lc.ij, 2*max(pn.wd#, dot_wd#) + 2.5u#, min(body_ht#, 1/2dot_ht# + 1/2[x_ht#, asc_ht#]), desc_dp#)(i_sp, i_sp); x1i = w - x1j = l + 1/2max(dot_wd, pn.wd); top y1j = top y1i = x_ht; bot z2i = (x1i, 0); draw z1i -- z2i; draw_tail 1j; draw z1j -- z1tail; y0i = y0j = h; x0i = x1i; x0j = x1j; draw_dot0i; draw_dot0j; labels(0i, 1i, 2i, 0j, 1j); set_ic_tr; endchar; %}\}} ij ligature %}}} malcnc.mf % Local variables: % fold-folded-p: t % End: