%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Programs to make comma-like characters for mflogo % Damian Cugley, SEH Sun 2 Jul 1989 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def comma(suffix $)(text -+-) = % -+- should be `+' or `-' pickup dot_pen; drawdot(z$); x$a = x$b = x$ -+- 1/2(dot_pen_width - px); % Right edge x$c = x$ -+- 1/2(px - dot_pen_width); % Left edge y$a = y$; % Middle of blob y$b = y$a -+- -1/2 dot_pen_height; % bottom of blob y$c = y$b -+- -(ygap + o - 1/2 py); % Bottom of tail bit pickup pencircle xscaled px yscaled 0.75 py; draw z$a ... z$b ... z$c; labels($a,$b,$c) enddef; def semicolon_like(expr code, desc, updot, downtail) = beginchar(code,6 u# + 2 s#, if updot: xheight# else: dot_pen_height# - 2o# fi, if downtail: ygap# else: 0 fi); desc; pickup dot_pen; lft x1 = lft x2 = leftstemloc; top y1 = xheight + o; bot y2 = -o; if updot: drawdot z1 fi; if downtail: comma(2,+) else: drawdot(z2) fi; labels(1,2); endchar; enddef; semicolon_like(".","Full stop",false,false); semicolon_like(",","Comma",false,true); semicolon_like(":","Colon",true,false); semicolon_like(";","Semi-colon",true,true); beginlogochar("'",8); "Quote (')"; pickup dot_pen; top y1 = h + o; lft x1 = leftstemloc - ho; comma(1,+); labels(1); endchar; beginlogochar("`",8); "Backquote (`)"; pickup dot_pen; top y1 = h - ygap +o; rt x1 = w - leftstemloc + ho; comma(1,-); labels(1); endchar; open_quotes := nextcode; beginlogochar(open_quotes,12); "Double open-quotes (``)"; pickup dot_pen; rt x1 = rt (x2 + 3.5 u) = w - leftstemloc + ho; top y1 = top y2 = h - ygap + o; comma(1,-); comma(2,-); labels(1); endchar; close_quotes := nextcode; beginlogochar(close_quotes,12); "Double close-quotes ('')"; pickup dot_pen; lft x1 = lft (x2 - 3.5 u) = leftstemloc - ho; top y1 = top y2 = h + o; comma(1,+); comma(2,+); labels(1,2); endchar; ligtable "`": "`" =: open_quotes; ligtable "'": "'" =: close_quotes;