% macy.mf 1.2.0 94/10/11 -- Cyrillic letters % Copyright 1994 P. Damian Cugley %%% @METAFONT-file { %%% filename = "macy.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.", %%% 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. %{{{ macy.mf %{{{ kit %{{{ heights etc for caps & lc cap.height# := cap_ht#; cap.narrow_wd# := 6.5u#; cap.medium_wd# := 8u#; cap.wide_wd# := 12u#; cap.tail_dp# := 2v#; lc.height# := x_ht#; lc.narrow_wd# := 5u#; lc.medium_wd# := 6u#; lc.wide_wd# := 9u#; lc.tail_dp# := 2v#; pn_adj# := pn.wd# - u#; string cap.case, lc.case; cap.case = "capital"; lc.case = "lower case"; %}}} heights etc for caps & lc %{{{ macro to start a char def ma_cy_char(expr pre)(suffix $$, ##) = if pre <> "": pre & " " & fi "Cyrillic " & $$case & " " & str ##; ma_char(code.cy.$$.##) enddef; %}}} macro to start a char %{{{ loop for rhs of several letters vardef cy_loop@#(expr leftx, rightx) = top y1@# = h + o; lft x1@# = lft x2@# = lft x6@# = hround leftx; rt x4@# = hround rightx; if italic: bot y3@# = -d - o; y2@# = y3@# + 1/12h; top y5@# = 2/3[-d, h]; y6@# = y5@# - 1/12h; else: bot y3@# = bot y2@# = -d; top y5@# = top y6@# = 2/3[-d, h]; fi y4@# = 1/2[y3@#, y5@#]; z5@# = z4@# + whatever * se; x3@# = x5@#; draw z1@# -- z2@# ... z3@#{right} ... z4@#{up} ... z5@#{left} ... z6@#; labels(1@#, 2@#, 3@#, 4@#, 5@#); enddef; %}}} loop for rhs of several letters %}}} kit forsuffixes $$ = cap: endfor if testing: endinput fi forsuffixes $$ = cap, lc: %{{{ D ma_cy_char("", $$, d)($$medium_wd# + 2pn_adj#, $$height#, $$tail_dp#)(1,1) bot lft z1 = (l, 0); bot rt z2 = (r, 0); top rt z3 = (r, h); top lft z4 = (0.3[l,r], h); draw z1 -- z2 -- z3 -- z4 -- cycle; bot lft z1tail = (l, -d - o); bot rt z2tail = (r, -d - o); draw z1 -- z1tail; draw z2 -- z2tail; labels(1,2,3,4, 1tail, 2tail); endchar; %}}} D %{{{ L ma_cy_char("", $$, l)($$medium_wd# + 2pn_adj#, $$height#, 0v#)(1,1) bot lft z1 = (l, 0); bot rt z2 = (r, 0); top rt z3 = (r, h); top lft z4 = (0.3[l,r], h); draw z1 -- z4 -- z3 -- z2; labels(1,2,3,4); endchar; %}}} L %{{{ TS ma_cy_char("", $$, ts)($$medium_wd# + 2pn_adj#, $$height#, $$tail_dp#)(1,1) top lft z1 = (l, h + o); top rt z4 = (r, h + o); bot lft z2 = (l, 0); bot rt z3 = (r, 0); bot rt z5 = (r, -d - o); draw z1 -- z2 -- z3; draw z4 -- z5; labels(1,2,3,4,5); set_ic_tr; endchar; %}}} TS %{{{ SHCH ma_cy_char("", $$, shch)($$wide_wd# + 2pn_adj#, $$height#, $$tail_dp#)(1,1) if 1/2w <> good.x (1/2w): change_width; fi top lft z1 = (l, h + o); top rt z4 = (r, h + o); bot lft z2 = (l, 0); bot rt z3 = (r, 0); bot rt z5 = (r, -d - o); z6 = 1/2[z1,z4]; z7 = 1/2[z2,z3]; draw z1 -- z2 -- z3; draw z4 -- z5; draw z6 -- z7; labels(1,2,3,4,5,6,7); set_ic_tr; endchar; %}}} SHCH %{{{ SH ma_cy_char("", $$, sh)($$wide_wd# + 2pn_adj#, $$height#, 0v#)(1,1) if 1/2w <> good.x (1/2w): change_width; fi top lft z1 = (l, h + o); top rt z4 = (r, h + o); bot lft z2 = (l, 0); bot rt z3 = (r, 0); z6 = 1/2[z1,z4]; z7 = 1/2[z2,z3]; draw z1 -- z2 -- z3 -- z4; draw z6 -- z7; labels(1,2,3,4,6,7); set_ic_tr; endchar; %}}} SH %{{{ DZ-hook ma_cy_char("Macedonian", $$, dz_hook) ($$medium_wd# + 2pn_adj#, $$height#, $$tail_dp#)(1,1) if 1/2w <> good.x (1/2w): change_width; fi top lft z1 = (l, h + o); top rt z4 = (r, h + o); bot lft z2 = (l, 0); bot rt z3 = (r, 0); z5 = (1/2[l,r], 0); bot z6 = (1/2[l,r], -d - o); draw z1 -- z2 -- z3 -- z4; draw z5 -- z6; labels(1,2,3,4,5,6); set_ic_tr; endchar; %}}} DZ-hook %{{{ I ma_cy_char("", $$, i)($$medium_wd#, $$height#, 0pt#)(1,1) top lft z1l = (l, h + o); top rt z1r = (r, h + o); bot lft z2l = (l, 0 - o); bot rt z2r = (r, 0 - o); z1join = z2l + whatever * ne; x1join = x1r; draw z1l -- z2l -- z1join; draw z1r -- z2r; set_ic_tr; labels(1l,1r,2l,2r,1join); endchar; %}}} I %{{{ P ma_cy_char("", $$, p)($$medium_wd#, $$height#, 0pt#)(1,1); bot lft z1 = (l, 0 - o); top lft z2 = (l , h); top rt z3 = (r, h); bot rt z4 = (r, 0 - o); draw z1 -- z2 -- z3 -- z4; labels(1,2,3,4); set_ic_tr; endchar; %}}} P %{{{ CH ma_cy_char("", $$, ch)($$medium_wd#, $$height#, 0pt#)(1/2,1); top rt z1r = (r, h + o); bot rt z2r = (r, -o); top lft z1l = (l, h + o); x2l = x1l; bot y3l = 1/3h; % bottom tangent of bowl bot rt z4l = (r, bot y3l + 0.5v); % where it joins stem z3l = z2l + whatever * se; % make circular curve x3l = 0.55[x1l, x1r]; draw z1l --- z2l{down} ... z3l{right} ... z4l; draw z1r -- z2r; labels(1l, 2l, 3l, 4l, 1r, 2r); set_ic_tr; endchar; %}}} CH %{{{ T % This is one that looks different in Kursiv ma_cy_char("", $$, t)($$medium_wd#, $$height#, 0pt#)(1/3,1/3); if 1/2w <> good.x (1/2w): change_width; fi top lft z1t = (l, h); top rt z2t = (r, h); z1s = 1/2[z1t, z2t]; bot z2s = (x1s, 0 - o); draw z1t -- z2t; draw z1s -- z2s; set_ic_tr; labels(1t, 2t, 1s, 2s); endchar; %}}} T %{{{ YE/E-acute ma_cy_char("Ukranian", $$, ye) (4/5$$height# * hratio + 2pn_adj#, $$height#, 0pt#)(1/3, 1/2); draw_C.c(l, h, r, -d) 1/16; z1bar = z3c; y2bar = y1bar; rt x2bar = 0.9[x3c, x1c]; draw z1bar -- z2bar; set_ic 0.95h#; remember; similarly(code.cy$$E_acute) "Cyrillic " & $$case & " E-acute"; currentpicture := currentpicture reflectedabout ((1/2w,0), (1/2w,h)); % this effectively transposes the sidebearings wug; endchar; %}}} YE/E-acute %{{{ Hard/Soft/Y ma_cy_char("", $$, soft_sign) ($$medium_wd# + 2pn_adj#, $$height#, 0pt#)(1, 1/2); cy_loop(l, r); endchar; ma_cy_char("", $$, hard_sign) ($$medium_wd# + 2u# + 2pn_adj#, $$height#, 0pt#)(1/3, 1/2); cy_loop(l + 2u, r); lft z0 = (l, y1); draw z0 -- z1; endchar; ma_cy_char("", $$, y) ($$medium_wd# + u# + pn.wd# + 2pn_adj#, $$height#, 0pt#)(1, 1); cy_loop(l, r - u - pn.wd); top rt z1r = (r, h + o); bot rt z2r = (r, 0 - o); draw z1r -- z2r; labels(1r, 2r); set_ic_tr; endchar; %}}} Hard/Soft/Y %{{{ Z ma_cy_char("",$$,z)($$narrow_wd#, $$height#, 0pt#)(1/2,1/2); lft x1 = lft x8 = l; rt x6 = r; top y2 = h + o; bot y7 = -d - o; x2 = x7 = 0.45[x1, x6]; % top & bot tangents y5 = y4 = good.y (0.55[y7, y2]); % height of join y3 = 1/2[y2,y4]; y6 = 1/2[y4, y7]; y1 = y2 - 1/16h; y8 = y7 + 1/16h; x4 = x2 + 1v; lft x5 = 0.2[x1, x6]; x3 = good.x (x6 - 1/2u); draw z1 ... z2{right} ... z3{down} ... z4 -- z5 -- z4 ... z6{down} ... z7{left} .. z8; labels(1,2,3,4,5,6,7,8); set_ic 0.85$$height#; endchar; %}}} Z %{{{ Macedonian NJ ma_cy_char("Macedonian", $$, nj)($$wide_wd#, $$height#, 0pt#)(1,1/2); top lft z1l = (l, h + o); bot lft z2l = (l, 0 - o);% left stem cy_loop.loop(lft 1/2[l,r], r); z.join = (x1l, y6loop); draw z1l -- z2l; draw z.join -- z6loop; labels(1l, 2l, join); endchar; %}}} Macedonian NJ endfor %}}} macy.mf %Local variables: %fold-folded-p: t %End: