diff options
Diffstat (limited to 'fonts/pandora')
-rw-r--r-- | fonts/pandora/COPYRIGHT | 13 | ||||
-rw-r--r-- | fonts/pandora/README | 83 | ||||
-rw-r--r-- | fonts/pandora/caps.mf | 992 | ||||
-rw-r--r-- | fonts/pandora/fligs.mf | 230 | ||||
-rw-r--r-- | fonts/pandora/ligs.mf | 83 | ||||
-rw-r--r-- | fonts/pandora/number.mf | 468 | ||||
-rw-r--r-- | fonts/pandora/panaccent.mf | 632 | ||||
-rw-r--r-- | fonts/pandora/pandor.mf | 770 | ||||
-rw-r--r-- | fonts/pandora/pangreeku.mf | 356 | ||||
-rw-r--r-- | fonts/pandora/panlowers.mf | 1036 | ||||
-rw-r--r-- | fonts/pandora/panpunct.mf | 478 | ||||
-rw-r--r-- | fonts/pandora/pnb10.mf | 199 | ||||
-rw-r--r-- | fonts/pandora/pnr10.mf | 200 | ||||
-rw-r--r-- | fonts/pandora/pnsl10.mf | 199 | ||||
-rw-r--r-- | fonts/pandora/pnss10.mf | 198 | ||||
-rw-r--r-- | fonts/pandora/pnssb10.mf | 199 | ||||
-rw-r--r-- | fonts/pandora/pnssi10.mf | 199 | ||||
-rw-r--r-- | fonts/pandora/pntt9.mf | 199 | ||||
-rw-r--r-- | fonts/pandora/punctr.mf | 139 | ||||
-rw-r--r-- | fonts/pandora/puncts.mf | 77 | ||||
-rw-r--r-- | fonts/pandora/punctt.mf | 183 | ||||
-rw-r--r-- | fonts/pandora/rotext.mf | 38 | ||||
-rw-r--r-- | fonts/pandora/ttchar.mf | 76 | ||||
-rw-r--r-- | fonts/pandora/tttext.mf | 34 | ||||
-rw-r--r-- | fonts/pandora/widths.mf | 136 |
25 files changed, 7217 insertions, 0 deletions
diff --git a/fonts/pandora/COPYRIGHT b/fonts/pandora/COPYRIGHT new file mode 100644 index 0000000000..0036e3df0f --- /dev/null +++ b/fonts/pandora/COPYRIGHT @@ -0,0 +1,13 @@ +These files have been contributed to the distribution under +copyright, as noted at the head of each file. The are licensed +free for all educational and non-profit use, and for free +redistribution under the same provisions as hold for the +remainder of this distribution. If any commercial use +of these fonts is undertaken, the party planning such use +should get in touch with: + + N. N. Billawala + + {decwrl, seismo, ihnp4, ucbvax ...} !sun!metamarks!nb + + diff --git a/fonts/pandora/README b/fonts/pandora/README new file mode 100644 index 0000000000..a7aae86e75 --- /dev/null +++ b/fonts/pandora/README @@ -0,0 +1,83 @@ + ************************************************************************* + + Copyright (c) 1989 by N. N. Billawala + The following file contains information about the Pandora + Family of fonts. The fonts were developed using Metafont. + These fonts should be considered as in a beta state. + + ************************************************************************* + + + + The files are set up according to the following scheme: + + <general font file> + Contains all the parameters for varying the font. + pnb10.mf, pnr10.mf, pnsl10.mf, pnss10.mf, pnssb10.mf, + pnssi10.mf, pntt9.mf + <general macros file> + Macros used in the various characters. + pandor.mf + <character set file> + Determines which set of characters will be in the font. + rotext.mf, tttext.mf + <width information file> + Determines the widths of the characters. Note that + width values will change according to the individual + shape of the character. + width.mf + <individual character files> + The actual character descriptions are here. + panlowers.mf, caps.mf, number.mf, pangreeku.mf, panaccent.mf, + panpunct.mf, punctr.mf, puncts.mf, fligs.mf, ttchar.mf, + punctt.mf + <ligature and kerning information file> + ligs.mf + + In order to create a font, you need only invoke Metafont, set + a mode for a device, and input one of the general font files. + % mf + ** \mode=yourchoice; input pntt9 + + + The intent of the Pandora project is to test the ideas and + power of Metafont in a design context. The starting point + came from broad ideas about type, rather than trying to + create a specific predetermined typeface. + One strong driving force was the idea to create a generalized + description of the visual relationship between characters in a + typeface. This is far from saying that similar characters use + parts that are "cut and pasted" directly from one to another. + This is how a "straight arm" and "curved arm" came to be in the + same macro, though they are visually quite different. + Many parameters create an endless variety of possibilities. + The concern was to create a basis from which a "reasonable" + and readable set of fonts might be derived. It's not important + that all variations work, rather, that it's possible to find + a reasonable set within the basis. A rich description allows + a designer to quickly look at a number of possibilities. + The character sets for the fixed width font and for the + variable width fonts correspond to those which Don Knuth used + in the Computer Modern family of fonts. This was done + intentionally so that we would have compatible and + interchangeable character sets. The compatibility ends there. + All of the fonts are currently set for 10 pt type, + except pntt9.mf, which is set for 9 pt type. Pntt9.mf (Pandora + Single Pitch 9 works out to 15 characters per inch). Hooks + have been put in for point size changes as well as for + boldness. + + + + Comments, criticisms and suggestions are welcome. + Please send them to me at + {decwrl, seismo, ihnp4, ucbvax ...} !sun!metamarks!nb + + N. N. Billawala + + + + + + + diff --git a/fonts/pandora/caps.mf b/fonts/pandora/caps.mf new file mode 100644 index 0000000000..460d362e69 --- /dev/null +++ b/fonts/pandora/caps.mf @@ -0,0 +1,992 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% caps.mf uppercase roman alphabet + +% 26 characters + + + +iff OK "A": "The letter A"; + beginchar("A",A_w*width#+e_mono#,cap#,0); + + min_limit(join_radius)(.5apex.uc); + top z20=(.5w,h+ov_apex.uc)//; pos20(apex.uc,0-apex_angle); + bot y3=0; z3l=whatever[z20l,(0,0)]; + bot y6=0; z6r=whatever[z20r,(w,0)]; + z20l=z1l; z20r=z4r; + multpos(1,3)(thin_stem.uc,constant_angle(z20l,(0,0),0)); + multpos(4,6)(stem.uc,constant_angle(z20r,(w,0),0)); + + onaline(1l,3l)(2l); y2l=y5r=cap_bracket_h; + onaline(1r,3r)(2r,40,41,44); + onaline(4l,6l)(5l,40,42,43); + y41=y42=round(.45[serif_thickness,y40]-.35thin_stem.uc); % bar bottom + y43=y44=y41+max(1,.7thin_stem.uc); + onaline(4r,6r)(5r); y2r=y5l=min(y41,cap_bracket_h); + ref1=z43--z40--z44; + + p1 =(fullserif.l(z3,z1,z2l,z2r,.5hs,.5hs) soften(z41,z42) + fullserif.r(z6,z4,z5l,z5r,.5hs,.5hs) soften(z20r,z20l) z2l)--cycle; + p1'=upnotch(ref1,angle(z20-z40),notch_length.uc)--cycle; + + showpoints(1,2,3,4,5,6,20,40,41,42,43,44); +adjust(v_E*fitbasis.uc#+m_a*e_mfit#,v_D*fitbasis.uc#+m_a*e_mfit#); +show_character; endchar; + + + +iff OK "B": "The letter B"; + beginchar("B",B_w*width#+b_mono#,cap#,0); + + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=cap_bracket_h; + onaline(11r,14r)(1,5,5l,5r,9); y12l=max(h-cap_bracket_h,y13l); + + top y2r=h; + bot y1=bot y2l=top y2r-minor_curve.uc; + y5=.55h; + top y4r=top y5r=round(y5+.45thin_stem.uc); + bot y4l=bot y5l=top y5r-max(1,.9thin_stem.uc); + y6=.75[y5l,y5r]; + bot y8r=0; top y8l=top y9=bot y8r+minor_curve.uc; + rt z3r=(round(.9w),v_stress[y6,y2r])//; + lft z3l=(rt x3r-max(1,.9bowlstem.uc),v_stress[y5r,y2l]); + rt z7r=(w,v_stress[y8r,y6])//; lft z7l=(rt x7r-bowlstem.uc,v_stress[y8l,y4l]); + z3=.5[z3l,z3r]; + + good_x_for(2r)(z1,z3r,.4)a; good_x_for(2l)(z1,z3l,.4)b; + good_x_for(4r)(z5r,z3l,.4)c; good_x_for(4l)(z5l,z7l,.4)d; + good_x_for(6)(z5,z3,.6)e; + good_x_for(8l)(z9,z7l,.4)f; good_x_for(8r)(z9,z7r,.4)g; + + p1 =leftserif(z11,z14,z12l,z14r,.5hs)--leftserif(z14,z11,z13l,z11r,.5hs) + ...z8r{right} o_t z7r{upward} o_t z6{left}-- + z6+(0,epsilon){right} o_t z3r{upward} o_t z2r{left}...cycle; + p1'=z4r{right} i_t z3l{upward} i_t z2l{left}...z1--z5r...cycle; + p2'=z8l{right} i_t z7l{upward} i_t z4l{left}...z5l--z9...cycle; + + showpoints(1,2,3,4,5,6,7,8,9,11,12,13,14); +adjust(v_A*fitbasis.uc#+m_b*b_mfit#,v_F*fitbasis.uc#+m_bb*b_mfit#); +show_character; endchar; + + +iff OK "C": "The letter C"; + beginchar("C",H_w*width#+d_mono#,cap#,0); + + save_num(term_length)=if bulb_taper:c_and_s.uc else:cs fi; + rt z1=(.95w,.9h)//; + lft z3l=(0,(1-v_stress)*h)//; rt z3r=lft z3l+(bowlstem.uc,0); + rt z5l=(w,major_curve.uc-ov_t.uc+.05h)//; + top y2l=bot y2r+minor_curve.uc=h+ov_t.uc; + bot y4l=top y4r-major_curve.uc=-ov_t.uc; + good_x_for(2l)(z3l,z1,.6)a; good_x_for(2r)(z3r,z1-(bulb_thickness,0),.6)b; + good_x_for(4l)(z3l,z5l,.5)c; + ref1=z4l{right}...z5l; + pos5(max(1,.7major_curve.lc),angle(direction 1 of ref1)+90); + good_x_for(4r)(z3r,z5r,.5)d; + x4r:=min(x4r,x4l+minor_curve.uc); + + p1=(bulb.tr(z1,z2r,z2l,term_length,bulb_thickness,90) o_t + z3l{downward} o_t z4l{right} o_t z5l + if softpath:)softjoin(z5l--z5r)softjoin(else:--fi + z5r i_t z4r{left} i_t z3r{upward} i_t z2r{right})--cycle; + + showpoints(1,2,3,4,5); +adjust(v_C*fitbasis.uc#+m_d*d_mfit#,v_H*fitbasis.uc#+m_dd*d_mfit#); +show_character; endchar; + + +iff OK "D": "The letter D"; + beginchar("D",D_w*width#+d_mono#,cap#,0); + + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=cap_bracket_h; + onaline(11r,14r)(1,5); y12l=max(h-cap_bracket_h,y13l); + + top y2r=h; + bot y1=bot y2l=top y2r-major_curve.uc; + bot y4r=0; + top y5=top y4l=bot y4r+minor_curve.uc; + rt z3r=(w,v_stress*h)//; lft z3l=(rt x3r-bowlstem.uc,v_stress*h); + + good_x_for(2r)(z1,z3r,.4)a; good_x_for(2l)(z1,z3l,.4)b; + good_x_for(4r)(z5,z3r,.3)c; good_x_for(4l)(z5,z3l,.3)d; + + p1 =leftserif(z11,z14,z12l,z14r,.5hs)--leftserif(z14,z11,z13l,z11r,.5hs) + ...z4r{right} o_t z3r{upward} o_t z2r{left}...cycle; + p1'=(z4l{right} i_t z3l{upward} i_t z2l{left} soften(z1,z5)z4l{right})--cycle; + + showpoints(1,2,3,4,5,11,12,13,14); +adjust(v_A*fitbasis.uc#+m_b*d_mfit#,v_C*fitbasis.uc#+m_bb*d_mfit#); +show_character; endchar; + + +iff OK "E": "The letter E"; + beginchar("E",E_w*width#+b_mono#,cap#,0); + + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=cap_bracket_h; + onaline(11r,14r)(1,4,4l,4r,6); y12l=max(h-cap_bracket_h,y13l); + + top y2r=h; + bot y1=bot y2l=top y2r-max(1,.95thin_stem.uc); + top rt z3=(.95w,h)//; + bot y7l=0; + bot rt z8=(w,0); + top y6=top y7r=bot y7l+max(1,.97thin_stem.uc); + y4=.55h; + top y4r=bot y4l+max(1,.9thin_stem.uc)=top y5r=round(y4+.45thin_stem.uc); + + good_x_for(2r)(z1,z3,.6)a; good_x_for(2l)(z1,z3,.6)b; + good_x_for(7r)(z6,z8,.6)c; good_x_for(7l)(z6,z8,.6)d; + good_x_for(5r)(z4,z3,.8)e; + + p1=(leftserif(z14,z11,z13l,z11r,.5hs).. + arm.br(z8,z7r,z7l,.5as,.75tip_thickness,90-arm_angle)soft soften(z6,z4l) + arm.tr(z5r,z4l,z4r,.15as,.25tip_thickness,90) soften(z4r,z1) + arm.tr(z3,z2l,z2r,.4as,.75tip_thickness,90)soft... + leftserif(z11,z14,z12l,z14r,.75hs))--cycle; + + showpoints(1,2,3,4,5,6,7,11,12,13,14); +adjust(v_A*fitbasis.uc#+m_b*b_mfit#,v_F*fitbasis.uc#+m_bb*b_mfit#); +show_character; endchar; + + +iff OK "F": "The letter F"; + beginchar("F",E_w*width#+b_mono#,cap#,0); + + top y2r=h; + bot y1=bot y2l=top y2r-max(1,.95thin_stem.uc); + top rt z3=(w,h)//; + top y4r=bot y4l+max(1,.9thin_stem.uc)=top y5r=round(.52h); + + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=cap_bracket_h; y13r=min(y13l,y4l); + onaline(11r,14r)(1,4l,4r,13r); y12l=max(h-cap_bracket_h,y13l); + + good_x_for(2r)(z1,z3,.6)a; good_x_for(2l)(z1,z3,.6)b; + good_x_for(5r)(z4r,z3,.8)c; + + p1=(fullserif(z14,z11,z13l,z13r,.5hs,.75hs)..z4l + if softpath:)softjoin(else:--fi + arm.tr(z5r,z4l,z4r,.15as,.25tip_thickness,90) soften(z4r,z1) + arm.tr(z3,z2l,z2r,.4as,.75tip_thickness,90)soft... + leftserif(z11,z14,z12l,z14r,.75hs))--cycle; + + showpoints(1,2,3,4,5,11,12,13,14); +adjust(v_A*fitbasis.uc#+m_b*b_mfit#,v_G*fitbasis.uc#+m_bb*b_mfit#); +show_character; endchar; + + + + def character_points= +iff OK "G": "The letter G"; + beginchar(71+alt9,D_w*width#+d_mono#,cap#,0); + save_num(term_length)=if bulb_taper:c_and_s.uc else:cs fi; + rt z1=(w-.25stem.uc,.9h)//; + lft z3l=(0,(1-v_stress)*h)//; rt z3r=(lft x3l+bowlstem.uc,(1-v_stress)*h); + top y2l=bot y2r+minor_curve.uc=h+ov_t.uc; + bot y4l=top y4r-major_curve.uc=-ov_t.uc; + good_x_for(2l)(z3l,z1,.6)a; good_x_for(2r)(z3r,z1-(bulb_thickness,0),.6)b; + good_x_for(4l)(z3l,z5l,.5)c; good_x_for(4r)(z3r,z5r,.5)d; + rt z5l=(w,.15h)//; pos5(max(1,.75minor_curve.uc),130-oblique); + z11r=(w,min(.45h,y1-as))//; multpos(11,13)(stem.uc,0); + rt z13r=(w,0); + z20=(z5l--z5r i_t z4r{left})intersectionpoint(z11l--z13l); + onaline(11r,13r)(12r); + y12r=inlimit(y11r-cap_bracket_h)(y5l,y11r-serif_thickness); + onaline(11l,13l)(12l); y12l=inlimit(y12r)(y20,y11l); + ref1=z4l{right} o_t z5l; ref2=z13--z20; % pts added for terminal finish + z21=ref1 intersectionpoint ref2; + (t1,t2)=ref1 intersectiontimes ref2; + + p1=(bulb.tr(z1,z2r,z2l,term_length,bulb_thickness,90) o_t z3l{downward} o_t + if G_spur:subpath (0,t1) of ref1 soften(z21,z13,z13r) % spur option + else:z4l{right} o_t z5l if softpath:)softjoin( else:--fi fi + z5l--fullserif.r(z11,z13,z12l,z12r,.75hs,.25hs)--z20 + if softpath:)softjoin( else:--fi + z20 i_t z4r{left} i_t z3r{upward} i_t z2r{right})--cycle; + showpoints(1,2,3,4,5,11,12,13,20,21); + adjust(v_C*fitbasis.uc#+m_b*d_mfit#,v_F*fitbasis.uc#+m_bb*d_mfit#); + show_character; endchar; + enddef; + + vardef letter_G= save a,b; + vardef a=condition(G_spur)t; testing_codes; character_points; enddef; % spur + vardef b=condition(G_spur)f; testing_codes; character_points; enddef; % nospur + if test_all_characters:a;b; else:if G_spur:a; else:b; fi fi + enddef; + + letter_G; save letter_G; + + +iff OK "H": "The letter H"; + beginchar("H",H_w*width#+b_mono#,cap#,0); + + top lft z1l=(0,h)//; multpos(1,4,11,14)(stem.uc,0); + bot lft z4l=(0,0); + top rt z11r=(w,h)//; + bot rt z14r=(w,0); + onaline(1r,4r)(5l,5r); top y5r=top y15r=round(.55h+.45thin_stem.uc); + onaline(11l,14l)(15l,15r); bot y5l=bot y15l=top y5r-max(1,.9thin_stem.uc); + onaline(1l,4l)(2l,3l); y3l=y13r=cap_bracket_h; + onaline(1r,4r)(2r,3r); y3r=y13l=min(cap_bracket_h,y5l); + onaline(11r,14r)(12r,13r); y2r=y12l=max(h-cap_bracket_h,y5r); + onaline(11l,14l)(12l,13l); y2l=y12r=max(h-cap_bracket_h,y3l); + + p1=(fullserif(z4,z1,z3l,z3r,.5hs,.75hs) soften(z5l,z15l) + fullserif(z14,z11,z13l,z13r,.5hs,.75hs)-- + fullserif(z11,z14,z12l,z12r,.75hs,.5hs) soften(z15r,z5r) + fullserif(z1,z4,z2l,z2r,.75hs,.5hs))--cycle; + + showpoints(1,2,3,4,5,11,12,13,14,15); +adjust(v_A*fitbasis.uc#+m_a*b_mfit#,v_A*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + +iff OK "I": "The letter I"; + beginchar("I",I_w*width#+a_mono#,cap#,0); + + bot lft z4l=(if singlepitch:round(.5(w-stem.uc)) else:0 fi,0)//; + top lft z1l=(if singlepitch:round(.5(w-stem.uc)) else:0 fi,h)//; + multpos(1,4)(stem.uc,0); + onaline(1l,4l)(2l,3l); y3l=y3r=cap_bracket_h; + onaline(1r,4r)(2r,3r); y2l=y2r=max(h-cap_bracket_h,y3l); + + p1=fullserif(z1,z4,z2l,z2r,.75hs,.5hs)-- + fullserif(z4,z1,z3l,z3r,.5hs,.75hs)--cycle; + + if singlepitch:pickup pencircle yscaled thin_stem.uc rotated -oblique; + lft top z11=(0,h); rt top z12=(w,h); lft bot z13=(0,0); rt bot z14=(w,0); + draw z11--z12; draw z13--z14; showpoints(11,12,13,14); + fi + + showpoints(1,2,3,4); +adjust(v_A*fitbasis.uc#+m_a*a_mfit#,v_A*fitbasis.uc#+m_a*a_mfit#); +show_character; endchar; + + +iff OK "J": "The letter J"; + beginchar("J",J_w*width#+a_mono#,cap#,descender#); + + rt z40r=(w,0); multpos(1,40)(stem.uc,0); + top rt z1r=(w,h)//; + save_num(knob)=min(bulb_thickness,.6x40l); + onaline(1r,40r)(2r,3r); y3l=.25h; y3r=y3l-.1h; + onaline(1l,40l)(2l,3l); y2l=y2r=max(h-cap_bracket_h,y3l,y3r); + bot y4r=top y4l-minor_curve.uc=-.5d-ov_b.uc; + good_x_for(4r)(z5,z3r,.4)a; + good_x_for(4l)(z5+(knob,0),z3l,.4)b; + lft z5=(0,.5[y4r,y4l])//; + + p1=terminalserif.l(z1,z40,z2l,z2r,ts,0) o_t z3l{downward} o_t + bulb.bl(z5,z4l,z4r,.75cs,knob,90) i_t z3r{upward} i_t cycle; + + if singlepitch:pickup pencircle yscaled thin_stem.uc rotated -oblique; + lft top z11=(.25w,h); rt top z12=(x1,h); + draw z11--z12; showpoints(11,12); + fi + + showpoints(1,2,3,4,5,40); +adjust(m_dd*a_mfit#,.9v_A*fitbasis.uc#+m_d*a_mfit#); +show_character; endchar; + + + + def K_without_beveled_join= +iff OK "K": "The letter K"; + beginchar(75+alt5,R_w*width#+d_mono#,cap#,0); + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); + onaline(11r,14r)(12r,13r,3r,41); y3r=.4h; y13l=cap_bracket_h; + onaline(11l,14l)(12l,13l); y13r=max(y3r,y13l); + y12l=max(h-cap_bracket_h,y13l); + top rt z1r=(.95w,h)//; + multpos(1,3)(max(1,.9thin_stem.uc),constant_angle(z1r,z3r,0)); + onaline(1,3)(44); top y44=h; + onaline(1l,3l)(2l,4l,41); y12r=y2l=max(h-cap_bracket_h,y41); + onaline(1r,3r)(2r,40,42); + y4l=.1[y41,y44]; % y4l places bot/right arm + z6r=(w,0); + multpos(4,6)(max(1,.9stem.uc),constant_angle(z4l,z6r,max(1,.9stem.uc))lr); + onaline(4r,6r)(5r,42); y2r=max(h-cap_bracket_h,y42); + onaline(4l,6l)(5l,40); y5l=y5r=min(cap_bracket_h,y4l,y40); + onaline(4,6)(43); bot y43=0; + + p1=(fullserif(z14,z11,z13l,z13r,.5hs,.5hs) soften(z3r,z40) + fullserif.r(z43,z4,z5l,z5r,.5hs,.5hs)--z42 + if softpath:)softjoin(z42 fi-- + fullserif.r(z44,z3,z2l,z2r,.5hs,.5hs)--z41 + if softpath:)softjoin(z41 fi-- + fullserif(z11,z14,z12l,z12r,.75hs,.5hs))--cycle; + + showpoints(1,2,3,4,5,6,11,12,13,14,40,41,42,43,44); + adjust(v_A*fitbasis.uc#+m_b*d_mfit#,v_G*fitbasis.uc#+m_bb*d_mfit#); + show_character; endchar; + enddef; + + def K_with_beveled_join= +iff OK "K": "The letter K"; + beginchar(75+alt5,T_w*width#+d_mono#,cap#,0); + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=y13r=cap_bracket_h; + onaline(11r,14r)(12r,13r); y12l=y12r=max(h-cap_bracket_h,y13l); + ref1=rightserif(z14,z11,z13l,z13r,.5hs)--rightserif(z11,z14,z12l,z12r,.5hs); + top rt z1r=(.95w,h)//; + z3l=z4l=ref1 intersectionpoint ((0,.55h)--(w,.55h)); + z6r=(w,0); + + multpos(4,6)(max(1,.9stem.uc),constant_angle(z4l,z6r,max(1,.9stem.uc))lr); + multpos(1,3)(max(1,.9thin_stem.uc),constant_angle(z1r,z4l,thin_stem.uc)); + + onaline(1l,3l)(2l); + onaline(1r,3r)(2r,42); + onaline(1,3)(44); top y44=h; + onaline(4r,6r)(5r,42); y2l=y2r=max(h-cap_bracket_h,y4l,y42); + onaline(4l,6l)(5l); y5l=y5r=min(cap_bracket_h,y4l,y42); + onaline(4,6)(43); bot y43=0; + + p1=fullserif(z14,z11,z13l,z13r,.5hs,.5hs)-- + fullserif(z11,z14,z12l,z12r,.75hs,.5hs)--cycle; + p2=(terminalserif.r(z43,z4,z5l,z5r,.5ts,base_terminal_angle)--z42 + if softpath:)softjoin(z42 fi-- + fullserif.r(z44,z3,z2l,z2r,.5hs,.5hs)--z4l)--cycle; + + showpoints(1,2,3,4,5,6,11,12,13,14,42,43,44); + adjust(v_A*fitbasis.uc#+m_b*d_mfit#,v_G*fitbasis.uc#+m_bb*d_mfit#); + show_character; endchar; + enddef; + + vardef letter_K= save a,b; + vardef a=condition(beveled_join)t;testing_codes;K_with_beveled_join;enddef; + vardef b=condition(beveled_join)f;testing_codes;K_without_beveled_join;enddef; + if test_all_characters:a;b;else:if beveled_join:a; else:b; fi fi + enddef; + + letter_K; save letter_K,K_with_beveled_join,K_without_beveled_join; + + + +iff OK "L": "The letter L"; + beginchar("L",E_w*width#+b_mono#,cap#,0); + + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=cap_bracket_h; + onaline(11r,14r)(1,12r); y12l=y12r=max(h-cap_bracket_h,y13l); + bot y2l=0; + bot rt z3=(w,0); + top y1=top y2r=bot y2l+max(1,.95thin_stem.uc); + z0=z1-(0*stem.uc,0); + good_x_for(2r)(z1,z3,.6)a; good_x_for(2l)(z1,z3,.6)b; + + p1=(leftserif(z14,z11,z13l,z11r,.5hs)... + arm.br(z3,z2r,z2l,.5as,.75tip_thickness,90-arm_angle)soft + if softpath:...z1)softjoin(z1-- + else:...z0{left}--(z0+(0,eps)){right}... fi + fullserif(z11,z14,z12l,z12r,.5hs,.75hs))--cycle; + + showpoints(0,1,2,3,11,12,13,14); +adjust(v_A*fitbasis.uc#+m_f*b_mfit#,v_I*fitbasis.uc#+m_ff*b_mfit#); +show_character; endchar; + + + +iff OK "M": "The letter M"; + beginchar("M",M_w*width#+f_mono#,cap#,0); + + save_bool(nonotch):=if(cap<40):true else:false fi; % if real low res + min_limit(join_radius)(.5apex.uc); + lft x3l=0; bot y3=0; + rt x12r=w; bot y12=0; + top z31l=(.0w,h+ov_apex.uc)//;multpos(21,22,23,31,33)(apex.uc,0-apex_angle); + top z33r=(1w,h+ov_apex.uc)//; + multpos(1,3)(thin_stem.uc,constant_angle(z31l,(0,0),0)); + multpos(10,12)(if narrow_condition:w_narrow_amt + else:1 fi[thin_stem.uc,stem.uc],constant_angle(z33r,(w,0),0)); + onaline(3l,31l)(2l,21l); y21=y23=h+ov_apex.uc; + onaline(12r,33r)(11r,23r); + good_x_for(22)(z3r,z12l,.5)a; y22=if singlepitch:.25 else:.07 fi *y21; + + z1l=z21l; z4r=z21r; z6l=z22l; z9r=z22r; z7l=z23l; z10r=z23r; + multpos(4,6)(if narrow_condition:w_narrow_amt else:1 fi[thin_stem.uc,stem.uc], + constant_angle(z21r,z22l,stem.uc)); + multpos(7,9)(thin_stem.uc,constant_angle(z23l,z22r,thin_stem.uc)lr); + + onaline(1r,3r)(2r,41); + onaline(4l,6l)(5l,41); + onaline(4r,6r)(5r,42); + onaline(7l,9l)(8l,42); y5r=y8l=notch_pos[y42,y1]; + onaline(7r,9r)(8r,43); + onaline(10l,12l)(11l,43); y5l=y8r=notch_pos[min(y41,y43),y6]; + y2l=y2r=y11l=y11r=min(cap_bracket_h,y41,y43); + ref1=z5l--z41--z2r; ref2=z11l--z43--z8r; ref3=z5r--z42--z8l; + + p1=(fullserif.l(z3,z1,z2l,z2r,.5hs,.75hs).. + upnotch.r(ref1,angle upward,notch_length.uc)etchright soften(z22l,z22r) + upnotch.r(ref2,angle upward,notch_length.uc)etchright.. + fullserif.r(z12,z10,z11l,z11r,.5hs,.5hs) soften(z23r,z23l) + downnotch.r(ref3,angle(z22-z42),notch_length.uc) + soften(z21r,z21l) z2l)--cycle; + + showpoints(1,2,3,4,5,6,7,8,9,10,11,12,21,22,23,31,33,41,42,43); +adjust(v_B*fitbasis.uc#+m_a*f_mfit#,v_A*fitbasis.uc#+m_a*f_mfit#); +show_character;endchar; + + + +iff OK "N": "The letter N"; + beginchar("N",N_w*width#+b_mono#,cap#,0); + + save_bool(nonotch):=if(cap<40):true else:false fi; % if real low res + min_limit(join_radius)(.5apex.uc); + bot lft z3l=(0,0); multpos(1,3,7,9)(thin_stem.uc,0); + top rt z7r=(w,h)//; + top lft z31l=(0,h+ov_apex.uc)//; multpos(21,22,31,32)(apex.uc,0-apex_angle); + bot rt z32r=(w,0-ov_apex.uc); + onaline(3l,31l)(2l,21l); y21=h+ov_apex.uc; + onaline(7r,32r)(8r,22r); y22=-ov_apex.uc; + z1l=z21l; z4r=z21r; z6l=z22l; z9r=z22r; + + multpos(4,6)(stem.uc,constant_angle(z21r,z22l,stem.uc)); + onaline(1r,3r)(2r,41); + onaline(4l,6l)(5l,41); + onaline(4r,6r)(5r,42); y5l=notch_pos[y41,y9]; + onaline(7l,9l)(8l,42); y5r=notch_pos[y42,y1]; + y2l=y2r=h-y8l=h-y8r=min(cap_bracket_h,y41); + + ref1=z5l--z41--z2r; ref2=z5r--z42--z8l; + + p1=(fullserif(z3,z1,z2l,z2r,.5hs,.75hs).. + upnotch.r(ref1,angle upward,notch_length.uc)etchright + soften(z22l,z22r) fullserif(z7,z9,z8l,z8r,.75hs,.5hs).. + downnotch.r(ref2,angle downward,notch_length.uc)etchleft + soften(z21r,z21l) z2l)--cycle; + + showpoints(1,2,3,4,5,6,7,8,9,21,22,31,32,41,42); +adjust(v_B*fitbasis.uc#+m_a*b_mfit#,v_B*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + + + +iff OK "O": "The letter O"; + beginchar("O",O_w*width#+d_mono#,cap#,0); + + if singlepitch:save circ; circ1=circ2=circ3=.75; fi + top z1=(h_stress*w,h+ov_t.uc)//; + lft z2=(0,(1-v_stress)*h)//; + bot z3=((1-h_stress)*w,-ov_b.uc)//; + rt z4=(w,v_stress*h)//; + + circular_shape(y1,y3,x2,x4,minor_curve.uc,bowlstem.uc); + + showpoints(1,2,3,4); +adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_C*fitbasis.uc#+m_a*d_mfit#); +show_character; endchar; + + +iff OK "P": "The letter P"; + beginchar("P",B_w*width#+b_mono#,cap#,0); + + top y2r=h; + bot y1=bot y2l=top y2r-minor_curve.uc; + y4=.45h; y5=.46h; + top y4r=top y5r=round(y4+.45minor_curve.uc); + bot y4l=top y4r-max(1,.9minor_curve.uc); + bot y5l=top y5r-max(1,.86minor_curve.uc); + rt z3r=(w,v_stress[y4l,y2r])//; + lft z3l=(rt x3r-bowlstem.uc,v_stress[y4r,y2l]); + + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); y13l=cap_bracket_h; + onaline(11l,14l)(12l,13l); y12l=max(h-cap_bracket_h,y13l); + onaline(11r,14r)(1,5l,5r,13r); y13r=min(cap_bracket_h,y5l); + + good_x_for(2r)(z1,z3r,.4)a; good_x_for(2l)(z1,z3l,.4)b; + good_x_for(4r)(z5r,z3l,.4)c; good_x_for(4l)(z5l,z3r,.4)d; + + p1=(fullserif(z14,z11,z13l,z13r,.5hs,.75hs)--z5l if softpath:)softjoin(z5l fi + ...z4l{right} o_t z3r{upward} o_t z2r{left}... + leftserif(z11,z14,z12l,z14r,.5hs))--cycle; + p1'=z5r...z4r{right} i_t z3l{upward} i_t z2l{left}...z1--cycle; + + showpoints(1,2,3,4,5,11,12,13,14); +adjust(v_A*fitbasis.uc#+m_b*b_mfit#,v_G*fitbasis.uc#+m_bb*b_mfit#); +show_character; endchar; + + +iff OK "Q": "The letter Q"; + beginchar("Q",O_w*width#+d_mono#,cap#,0); + + if singlepitch:save circ; circ1=circ2=circ3=.75; fi + top z1=(h_stress*w,h+ov_t.uc)//; + lft z2=(0,(1-v_stress)*h)//; + bot z3r=((1-h_stress)*w,-ov_b.uc)//; pos3(minor_curve.uc,-90); + rt z4=(w,v_stress*h)//; + + z11r=(.4x3l,y3r); pos11(minor_curve.uc,60); + z12l=z3r-(.05w,0); pos12(max(1,.8minor_curve.uc),90); + z13r=(w,y12l)//; pos13(max(1,.95stem.uc),60-.5oblique); + + circular_shape(y1,y3r,x2,x4,minor_curve.uc,bowlstem.uc); + p2 =z11l{1,.4}..z12l{right}..z13l{1,.7}-- + z13r{-1,-.7}..z12r{left}..z11r{-1,-.4}--cycle; + + showpoints(1,2,3,4,11,12,13); +adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_C*fitbasis.uc#+m_a*d_mfit#); +show_character; endchar; + + + + + def R_without_beveled_join= +iff OK "R": "The letter R"; + beginchar(82+alt5,R_w*width#+b_mono#,cap#,0); + top y2r=h; + bot y1=bot y2l=top y2r-minor_curve.uc; + y5=.5h; + top y4r=top y5r=round(y5+.45minor_curve.uc); + bot y4l=bot y5l=top y5r-max(1,.9minor_curve.uc); + rt z3r=(if narrow_condition:w else:round(.9w)fi,v_stress[y4l,y2r])//; + lft z3l=(rt x3r-bowlstem.uc,v_stress[y4r,y2l]); + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); y13l=cap_bracket_h; + onaline(11l,14l)(12l,13l); y12l=max(h-cap_bracket_h,y13l); + onaline(11r,14r)(1,5l,5r,13r); y13r=min(cap_bracket_h,y5l); + good_x_for(2r)(z1,z3r,.4)a; good_x_for(2l)(z1,z3l,.4)b; + good_x_for(4r)(z5r,z3l,.5)c; good_x_for(4l)(z5l,z3r,.4)d; + y20=y5l; + + ref1=z5l{right}...z4l o_t z3r{upward}; good_x_for(20)(z5l,z3r,.3)e; + z7l=ref1 intersectionpoint ((x20,0)--(x20,h)); + bot rt z9r=(w,0); + multpos(7,9)(max(1,.9stem.uc),constant_angle(z7l,(x9r,0),stem.uc)lr); + onaline(7l,9l)(8l); y8l=min(cap_bracket_h,y7l); + onaline(7r,9r)(8r,21); y21=h; + onaline(7,9)(22); y22=0; + z40=ref1 intersectionpoint (z21--z9r); + (t1,t2)=ref1 intersectiontimes (z21--z9r); + y8r=min(cap_bracket_h,y40); + + p1 =(fullserif(z14,z11,z13l,z13r,.5hs,.75hs) soften(z5l,z7l) + terminalserif(z22,z7,z8l,z8r,.25ts,0)--z40 + if softpath:)softjoin(z40 fi + --subpath (t1,3) of ref1 o_t z2r{left}... + leftserif(z11,z14,z12l,z14r,.5hs))--cycle; + p1'=z4r{right} i_t z3l{upward} i_t z2l{left}...z1--z5r--cycle; + + showpoints(1,2,3,4,5,7,8,9,11,12,13,14,20,21,22,40); + adjust(v_A*fitbasis.uc#+m_b*b_mfit#,v_F*fitbasis.uc#+m_bb*b_mfit#); + show_character; endchar; + enddef; + + def R_with_beveled_join= +iff OK "R": "The letter R"; + beginchar(82+alt5,R_w*width#+b_mono#,cap#,0); + top y2r=h; + bot y1=bot y2l=top y2r-minor_curve.uc; + y5=.5h; + top y4r=top y5r=round(y5+.35minor_curve.uc); + bot y4l=bot y5l=top y5r-max(1,.7minor_curve.uc); + rt z3r=(if narrow_condition:w else:round(.9w)fi,v_stress[y4l,y2r])//; + lft z3l=(rt x3r-bowlstem.uc,v_stress[y4r,y2l]); + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); y13l=cap_bracket_h; + onaline(11l,14l)(12l,13l); y12l=max(h-cap_bracket_h,y13l); + onaline(11r,14r)(1,5l,5r,13r); y13r=min(cap_bracket_h,y5l); + good_x_for(2r)(z1,z3r,.4)a; good_x_for(2l)(z1,z3l,.4)b; + good_x_for(4r)(z5r,z3l,.5)c; good_x_for(4l)(z5l,z3r,.4)d; + y20=y5r; + + ref1=z5l...z4l{right} o_t z3r{upward}; + ref2=z3l{downward} i_t z4r{left}...z5r; good_x_for(20)(z5r,z3l,.1)e; + z7l=ref2 intersectionpoint ((x20,0)--(x20,h)); + (t3,t4)=ref2 intersectiontimes ((x20,0)--(x20,h)); + + bot rt z9r=(w,0); + multpos(7,9)(max(1,.9stem.uc),constant_angle(z7l,(x9r,0),stem.uc)lr); + onaline(7l,9l)(8l); y8l=min(cap_bracket_h,y7l); + onaline(7r,9r)(8r,21); y21=h; + onaline(7,9)(22); y22=0; + z40=ref1 intersectionpoint (z21--z9r); + (t1,t2)=ref1 intersectiontimes (z21--z9r); + y8r=min(cap_bracket_h,y40); + + p1=(subpath(0,t3) of ref2--z7l if softpath:)softjoin(z7l fi + --terminalserif(z22,z7,z8l,z8r,.25ts,base_terminal_angle)--z40 + if softpath:)softjoin(z40 fi + --(subpath (t1,infinity) of ref1 o_t z2r{left}... + leftserif(z11,z14,z12l,z14r,.5hs)-- + fullserif(z14,z11,z13l,z13r,.5hs,.75hs)-- + z1--z2l{right} i_t z3l{downward}))--cycle; + + showpoints(1,2,3,4,5,7,8,9,11,12,13,14,20,21,22,40); + adjust(v_A*fitbasis.uc#+m_b*b_mfit#,v_F*fitbasis.uc#+m_bb*b_mfit#); + show_character; endchar; + enddef; + + vardef letter_R= save a,b; + vardef a=condition(beveled_join)t;testing_codes;R_with_beveled_join; enddef; + vardef b=condition(beveled_join)f;testing_codes;R_without_beveled_join;enddef; + if test_all_characters:a;b;else:if beveled_join:a; else:b; fi fi + enddef; + + letter_R; save letter_R,R_with_beveled_join,R_without_beveled_join; + + + +iff OK "S": "The letter S"; + beginchar("S",S_w*width#+b_mono#,cap#,0); + + save_num(term_length)=if bulb_taper:c_and_s.uc else:.9cs fi; + rt z1=(.93w,.95h)//; + lft z7=(0,.07h)//; + top y2l=bot y2r+minor_curve.uc=h+ov_t.uc; + bot y6r=top y6l-minor_curve.uc=-ov_b.uc; + z4=(.5w,.52h)//; + lft z3l=(round(.05w),.5[y4,y2l])//; + rt z5r=(w,.5[y6r,y4])//; + good_x_for(2l)(z3l,z1,.5)a; good_x_for(2r)(z3r,z1-(bulb_thickness,0),.4)b; + good_x_for(6r)(z7,z5r,.5)c; good_x_for(6l)(z7+(bulb_thickness,0),z5l,.6)d; + + z3=z3l+(.5stem.uc,0); z5=z5r-(.5stem.uc,0); + ref1=z3..z4..z5; + pos4(stem.uc,(angle(postcontrol 1 of ref1-precontrol 1 of ref1))+90); + rt z3r=(lft x3l+stem.uc,(1-v_stress)[y4r,y2r]); + lft z5l=(rt x5r-stem.uc,v_stress[y6l,y4l]); + + p1=bulb.tr(z1,z2r,z2l,term_length,bulb_thickness,90) + o_t z3l{downward} o_t z4l i_t z5l i_t + bulb.bl(z7,z6l,z6r,1.1term_length,bulb_thickness,90) + o_t z5r{upward} o_t z4r i_t z3r i_t cycle; + + showpoints(1,2,3,4,5,6,7,8); +adjust(v_F*fitbasis.uc#+m_a*b_mfit#,v_F*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "T": "The letter T"; + beginchar("T",T_w*width#+b_mono#,cap#,0); + + bot z40=(.5w,0); pos40(stem.uc,0); + bot y14=0; lft x14l=round x40l; multpos(11,14)(stem.uc,0); + w:=2*x14l+stem.uc; + top z11=(x14,h)//; + onaline(11l,14l)(13l,12l); y13l=y13r=cap_bracket_h; + onaline(11r,14r)(13r,12r); + + top lft z1=(0,h)//; + top rt z4=(w,h)//; + top y2r=top y3r=h; x2r-x1=x4-x3r=.25w; x2r:=min(x2r,x11); x3r:=max(x3r,x11); + bot y2l=bot y3l=bot y12l=bot y12r=top y2r-max(1,.95thin_stem.uc); + + good_x_for(2l)(z1+(tip_thickness,0),z12l,.6)a; x2l:=min(x2l,x12l); + good_x_for(3l)(z4-(tip_thickness,0),z12r,.6)b; x3l:=max(x3l,x12r); + + p1=(fullserif(z14,z11,z13l,z13r,.75hs,.75hs)--z12r + if softpath:)softjoin(z12r fi + --arm.tr(z4,z3l,z3r,.4as,.75tip_thickness,90)soft-- + arm.tl(z1,z2l,z2r,.4as,.75tip_thickness,90)soft--z12l + if softpath:)softjoin(z12l fi--z13l)--cycle; + + showpoints(1,2,3,4,11,12,13,14,40); +adjust(v_H*fitbasis.uc#+m_a*b_mfit#,v_H*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + + + + def U_like_lowercase= % the letter U as a version of the lowercase u +iff OK "U": "The letter U"; + beginchar(85+alt3,H_w*width#+b_mono#,cap#,0); + y5=ductal[arch_thickness.uc,h-serif_thickness]; + + bot lft z1l=(0,0); multpos(1,4,11,14)(stem.uc,0); + top lft z4l=(0,h)//; + top rt z11r=(w,h)//; + bot rt z14r=(w,0); y13r=cap_bracket_h; y12l=max(h-cap_bracket_h,y5); + onaline(11l,14l)(5,12l); y12r=max(h-cap_bracket_h,y13r); + onaline(11r,14r)(12r,13r); y2r=max((.95-r_arch)*h,arch_thickness.uc); + onaline(1l,4l)(2l,3l); y2l=(.95-l_arch)*h; y3l=max(h-cap_bracket_h,y2l); + onaline(1r,4r)(2r,3r); y3r=max(h-cap_bracket_h,y2r); + + ref1=z12l..terminalserif.r(z14,z11,z12l,z13r,.75ts,x_terminal_angle); + ref2=arch.bl(z5,-ov_b.uc,z2r,z2l)uc; + p1=terminalserif.l(z11,z14,z12l,z12r,.5ts,0)--softenit(ref1,ref2)-- + terminalserif.l(z4,z1,z3l,z3r,.75ts,0)-- + outer_juncture_path.br(ref2,ref1,2)--cycle; + showpoints(1,2,3,4,5,11,12,13,14); + adjust(.9v_A*fitbasis.uc#+m_a*b_mfit#,v_A*fitbasis.uc#+m_a*b_mfit#); + show_character; endchar; + enddef; + + def U_like_trajan= +iff OK "U": "The letter U"; + beginchar(85+alt3,U_w*width#+b_mono#,cap#,0); + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + lft z14l=(0,0); + top rt z1r=(w,h)//; multpos(1,4)(thin_stem.uc,0); + rt z4r=(w,0); + y13l=y13r-.5major_curve.uc=.3[major_curve.uc,h-serif_thickness]; + y3r=y3l=.3[minor_curve.uc,h-serif_thickness]; + onaline(11l,14l)(12l,13l); y12l=max(h-cap_bracket_h,y13l); + onaline(11r,14r)(12r,13r); y12r=max(h-cap_bracket_h,y13r); + onaline(11,14)(40); + onaline(1l,4l)(2l,3l); y2l=max(h-cap_bracket_h,y3l); + onaline(1r,4r)(2r,3r); y2r=max(h-cap_bracket_h,y3r); + onaline(1,4)(41); y40=y41=h; + bot y5l=top y5r-major_curve.uc=-ov_b.uc; + good_x_for(5l)(z11l,z1r,.5)a; good_x_for(5r)(z11r,z1l,.5)b; + + p1=fullserif(z40,z14,z12l,z12r,.75hs,.75hs)... + z13l{downward} o_t z5l{right} o_t z3r{upward}... + fullserif(z41,z4,z2l,z2r,.75hs,.5hs)... + z3l{downward} i_t z5r{left} i_t z13r{upward}...cycle; + + showpoints(1,2,3,4,5,11,12,13,14,40,41); + adjust(.9v_A*fitbasis.uc#+m_a*b_mfit#,.9v_B*fitbasis.uc#+m_a*b_mfit#); + show_character; endchar; + enddef; + + vardef letter_U= save a,b; + vardef a=condition(like_lowercase)t; testing_codes;U_like_lowercase; enddef; + vardef b=condition(like_lowercase)f; testing_codes;U_like_trajan; enddef; + if test_all_characters:a;b; else:if like_lowercase:a;else:b; fi fi + enddef; + + letter_U; save letter_U,U_like_lowercase,U_like_trajan; + + + + def character_points= +iff OK "V": "The letter V"; + beginchar(86+alt4,A_w*width#+e_mono#,cap#,0); + min_limit(join_radius)(.5apex.uc); + bot z20=(.5w,-ov_apex.uc); pos20(apex.uc,0-apex_angle); + lft z1l=(0,h)//; multpos(1,3)(stem.uc,constant_angle(z1l,z20l,0)); + rt z4r=(w,h)//; multpos(4,6)(thin_stem.uc,constant_angle(z4r,z20r,0)); + onaline(1l,20l)(2l,3l); y3l=y20l; + onaline(1r,3r)(2r,40); + onaline(4r,20r)(5r,6r); y6r=y20r; + onaline(4l,6l)(5l,40); y2l=y2r=y5l=y5r=max(h-cap_bracket_h,y40); + onaline(1,3)(41); top y41=top y42=h; + onaline(4,6)(42); + ref1=notch_pos[z40,z2r]--z40--notch_pos[z40,z5l]; + + if flat_diagonal_endings: + p1=(fullserif.l(z41,z3,z2l,z2r,.5hs,.5hs) soften(z20l,z20r) + fullserif.r(z42,z6,z5l,z5r,.5hs,.5hs).. + downnotch.r(ref1,angle(z20-z40),notch_length.uc))..cycle; + else:p1=(terminalserif.l(z41,z3,z2l,z2r,.75ts,20)soft soften(z20l,z20r) + terminalserif.l(z42,z6,z5l,z5r,.75ts,0)soft.. + downnotch.r(ref1,angle(z20-z40),notch_length.uc))..cycle; + fi + showpoints(1,2,3,4,5,6,20,40,41,42); + adjust(v_D*fitbasis.uc#+m_a*e_mfit#,v_E*fitbasis.uc#+m_a*e_mfit#); + show_character; endchar; + enddef; + + vardef letter_V= save a,b; + vardef a=condition(flat_diagonal_endings)t; testing_codes; + character_points; enddef; + vardef b=condition(flat_diagonal_endings)f; testing_codes; + character_points; enddef; + if test_all_characters:a;b; else:if flat_diagonal_endings:a; else:b; fi fi + enddef; + + letter_V; save letter_V; + + + + def character_points= +iff OK "W": "The letter W with flat diagonals"; + beginchar(87+alt4,W_w*width#+f_mono#,cap#,0); + min_limit(join_radius)(.5apex.uc); + lft z1l=(0,h)//; + rt z10r=(w,h)//; + bot z21=(.22w,-ov_apex.uc); multpos(21,22,23)(apex.uc,0-apex_angle); + bot z23=(w-x21,-ov_apex.uc); + + z3l=z21l; z6r=z21r; z9l=z23l; z12r=z23r; + multpos(1,3)(if narrow_condition:w_narrow_amt else:1 fi[thin_stem.uc,stem.uc], + constant_angle(z1l,z21l,0)); + multpos(10,12)(thin_stem.uc,constant_angle(z10r,z23r,0)); + onaline(1r,3r)(2r,41,46); onaline(1l,3l)(2l); onaline(1,3)(44); + onaline(10l,12l)(11l,43,47); onaline(10r,12r)(11r); onaline(10,12)(45); + + top y44=h;y45=y46=y47=y44; + x22=.5[x46,x47]; y22=if singlepitch:.75h else:h+ov_apex.uc fi; + z4l=z22l; z7r=z22r; + multpos(4,6)(thin_stem.uc,constant_angle(z22l,z21r,thin_stem.uc)lr); + multpos(7,9)(if narrow_condition:w_narrow_amt else:1 fi[thin_stem.uc,stem.uc], + constant_angle(z22r,z23l,stem.lc)); + onaline(4l,6l)(5l,41); onaline(4r,6r)(5r,42); + onaline(7l,9l)(8l,42); onaline(7r,9r)(8r,43); + y5l=y8r=notch_pos[max(y41,y43),y22]; y5r=y8l=notch_pos[y42,y3l]; + y2l=y2r=y11l=y11r=max(h-cap_bracket_h,y41,y43); + + ref1=notch_pos[z41,z2r]--z41--z5l; + ref2=z8l--z42--z5r; + ref3=z8r--z43--notch_pos[z43,z11l]; + + if flat_diagonal_endings: + p1=(fullserif.l(z44,z3,z2l,z2r,.5hs,.5hs) soften(z21l,z21r) + upnotch.r(ref2,angle(z22-z42),notch_length.uc) + soften(z23l,z23r) fullserif.r(z45,z12,z11l,z11r,.5hs,.5hs).. + downnotch.r(ref3,angle(z23-z43),notch_length.uc) soften(z22r,z22l) + downnotch.r(ref1,angle(z21-z41),notch_length.uc))..cycle; + else:p1=(terminalserif.l(z44,z3,z2l,z2r,.75ts,20)soft soften(z21l,z21r) + upnotch.r(ref2,angle(z22-z42),notch_length.uc) + soften(z23l,z23r) terminalserif.l(z45,z12,z11l,z11r,.5ts,0)soft.. + downnotch.r(ref3,angle(z23-z43),notch_length.uc) soften(z22r,z22l) + downnotch.r(ref1,angle(z21-z41),notch_length.uc))..cycle; + fi + showpoints(1,2,3,4,5,6,7,8,9,10,11,12,21,22,23,41,42,43,44,45,46,47); + adjust(.25[v_D,v_A]*fitbasis.uc#+m_a*f_mfit#, + .25[v_E,v_A]*fitbasis.uc#+m_a*f_mfit#); + show_character;endchar; + enddef; + + vardef letter_W= save a,b; + vardef a=condition(flat_diagonal_endings)t; testing_codes; + character_points; enddef; + vardef b=condition(flat_diagonal_endings)f; testing_codes; + character_points; enddef; + if test_all_characters:a;b; else:if flat_diagonal_endings:a; else:b; fi fi + enddef; + + letter_W; save letter_W; + + + + + def character_points= +iff OK "X": "The letter X"; + beginchar(88+alt4,A_w*width#+e_mono#,cap#,0); + top z1l=(.05w,h)//; top z11r=(.95w,h)//; + bot z4r=(w,0); bot z14l=(0,0); + multpos(1,4)(stem.uc,constant_angle(z1l,z4r,stem.uc)lr); + multpos(11,14)(thin_stem.uc,constant_angle(z11r,z14l,thin_stem.uc)); + onaline(1l,4l)(2l,3l,42,43); + onaline(1r,4r)(2r,3r,40,41); + onaline(1,4)(21,22); top y21=top y23=h; + onaline(11l,14l)(12l,13l,40,43); + onaline(11r,14r)(12r,13r,41,42); + onaline(11,14)(23,24); bot y22=bot y24=0; + y2l=y2r=y12l=y12r=max(h-serif_thickness-.5cap_bracket_h,y40); + y3l=y3r=y13l=y13r=min(serif_thickness+.5cap_bracket_h,y42); + + ref1=notch_pos[z40,z2r]--z40--notch_pos[z40,z12l]; + ref2=notch_pos[z42,z3l]--z42--notch_pos[z42,z13r]; + + if flat_diagonal_endings:p1=fullserif(z21,z4,z2l,z2r,.5hs,.25hs)--z43-- + fullserif(z24,z11,z13l,z13r,.5hs,.5hs)-- + upnotch.r(ref2,angle(z40-z42),notch_length.uc)-- + fullserif(z22,z1,z3l,z3r,.5hs,.5hs)--z41-- + fullserif(z23,z14,z12l,z12r,.25hs,.5hs)-- + downnotch.r(ref1,angle(z42-z40),notch_length.uc)--cycle; + else:p1=terminalserif.l(z21,z4,z2l,z2r,.5ts,0)soft--z43-- + terminalserif.r(z24,z11,z13l,z13r,.5ts,0)soft-- + upnotch.r(ref2,angle(z40-z42),notch_length.uc)-- + terminalserif.r(z22,z1,z3l,z3r,.5ts,diag_terminal_angle)soft--z41-- + terminalserif.l(z23,z14,z12l,z12r,.5ts,0)soft-- + downnotch.r(ref1,angle(z42-z40),notch_length.uc)--cycle; + fi + showpoints(1,2,3,4,11,12,13,14,21,22,23,24,40,41,42,43); + adjust(v_G*fitbasis.uc#+m_a*e_mfit#,v_G*fitbasis.uc#+m_a*e_mfit#); + show_character; endchar; + enddef; + + vardef letter_X= save a,b; + vardef a=condition(flat_diagonal_endings)t; testing_codes; + character_points; enddef; + vardef b=condition(flat_diagonal_endings)f; testing_codes; + character_points; enddef; + if test_all_characters:a;b; else:if flat_diagonal_endings:a; else:b; fi fi + enddef; + + letter_X; save letter_X; + + + +iff OK "Y": "The letter Y"; + beginchar("Y",A_w*width#+e_mono#,cap#,0); + + bot z20=(.5w,0); multpos(15,20,42)(stem.uc,0); + bot y15=0; lft x15l=round x20l; + w:=2*x15l+stem.uc; + + top lft z11l=(0,h)//; + top rt z1r=(w,h)//; + z42r=whatever[z15r,z15r+dir(90-oblique)]; y42r=.45[y15,y11l]; + multpos(11,13)(stem.uc,constant_angle(z11l,z42r,stem.uc)lr); + multpos(1,3)(thin_stem.uc,constant_angle(z1r,z42r,0)); + + z3r=z13r=z42r; + onaline(1r,3r)(2r); + onaline(1l,3l)(2l,40); y2r=max(h-.5cap_bracket_h,y42r); + onaline(1,3)(45); top y44=top y45=h; + onaline(11l,13l)(12l,41); z41=whatever[z15l,z15l+dir(90-oblique)]; + onaline(15l,41)(14l); y14l=min(.3serif_thickness+.7cap_bracket_h,y41); + onaline(11r,13r)(12r,40); y2l=y12r=max(h-.5cap_bracket_h,y40); + onaline(11,13)(44); y12l=max(h-.5cap_bracket_h,y41); + onaline(15r,42r)(14r); y14r=min(.3serif_thickness+.7cap_bracket_h,y42r); + + ref1=notch_pos[z40,z12r]--z40--notch_pos[z40,z2l]; + + p1=(fullserif.l(z44,z13,z12l,z12r,.5hs,.25hs)-- + z41 if softpath:)softjoin(z41 fi-- + fullserif(z15,.5[z14l,z14r],z14l,z14r,.75hs,.75hs)-- + z42r if softpath:)softjoin(z42r fi-- + fullserif.r(z45,z42,z2l,z2r,.25hs,.5hs)-- + downnotch.r(ref1,angle downward,notch_length.uc))--cycle; + + showpoints(1,2,3,11,12,13,14,15,20,40,41,42,44,45); +adjust(v_H*fitbasis.uc#+m_a*e_mfit#,v_H*fitbasis.uc#+m_a*e_mfit#); +show_character; endchar; + + + +iff OK "Z": "The letter Z"; + beginchar("Z",S_w*width#+b_mono#,cap#,0); + + min_limit(join_radius)(.5apex.uc); + top rt z1r=(w,h-apex.uc)//; + bot lft z3l=(0,apex.uc); + multpos(1,3)(max(1,.98stem.uc),constant_angle(z1r,z3l,max(1,.98stem.uc))); + + z43=(x1r,h); + z41=(x3l,0); + rt z14=(w,0); + lft z11=(.05w,h)//; + top y12r=h; bot y12l=bot y40=top y12r-max(1,.95thin_stem.uc); + bot y13l=0; top y13r=top y42=bot y13l+max(1,.95thin_stem.uc); + onaline(1l,3l)(2l,40); y2l=notch_pos[y40,y3l]; + onaline(1r,3r)(2r,42); y2r=notch_pos[y42,y1r]; + good_x_for(12r)(z11,z43,.5)a;good_x_for(12l)(z11+(tip_thickness,0),z40,.5)b; + good_x_for(13l)(z41,z14,.5)c;good_x_for(13r)(z42,z14-(tip_thickness,0),.5)d; + + ref1=z2l--z40--z12l; ref2=z2r--z42--z13r; + + p1=(arm.tl(z11,z12l,z12r,.4as,tip_thickness,90)soft-- + rightnotch.r(ref1,angle right,notch_length.uc)etchdown + soften(z2l,z3l,z41,z13l) + arm.br(z14,z13r,z13l,.5as,tip_thickness,90-arm_angle)soft-- + leftnotch.r(ref2,angle left,notch_length.uc)etchup + soften(z2r,z1r,z43) z12r)--cycle; + + showpoints(1,2,3,11,12,13,40,41,42,43); +adjust(v_H*fitbasis.uc#+m_a*b_mfit#,v_H*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + diff --git a/fonts/pandora/fligs.mf b/fonts/pandora/fligs.mf new file mode 100644 index 0000000000..52ac5325e3 --- /dev/null +++ b/fonts/pandora/fligs.mf @@ -0,0 +1,230 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% fligs.mf ligatures with the "f" character + +% 5 characters; iff OK "f": for testing + +% Only the ff,fi,fl ligatures have a fixed pitch ligature. +% The reason being that combining two stems might look reasonable; but +% combining three stems would generally create the undesirable type of +% darkness found in the lowercase m + + +iff OK "f": "The ff ligature"; + beginchar(11,(n_w+r_w-stem.lc#/(width#+mono#))*width#+b_mono#,ascender#,0); + + if mono=0: bot lft z4l=(round (.2r_w*width),0); + bot lft z14l=(round (x4l+n_w*width-stem.lc),0); + else: bot lft z4l=(0,0); bot rt z14r=(w,0); fi + top z1l=(x4l,h)//; multpos(1,4,11,14)(stem.lc,0); + top z11l=(x14l,h)//; + onaline(1l,4l)(2l,3l); y2l=max(xheight,.75xheight+(r_arch*(h-xheight))); + onaline(1r,4r)(2r,3r,22r); y2r=max(xheight,.75xheight+(l_arch*(h-xheight))); + onaline(11l,14l)(12l,13l); y12l=y2l; y12r=y2r; + onaline(11r,14r)(12r,13r); y3l=y3r=y13l=y13r=x_bracket_h; + rt z16=(if mono<>0:w+abs(x14l-x4r)else:max(w,x14r+.95abs(x14l-x4r))fi,.99h)//; + rt z6=(x14l,y5r-y15r+y16)//; + save_num(knob)=min(bulb_thickness,.6(x16-x14r)); + top y15r=bot y15l+minor_curve.lc=round(.5[h+ov_t.lc,maxheight]); + top y5r=inlimit(.9[xheight,h+ov_t.lc])(xheight+2minor_curve.lc,h+ov_t.lc); + bot y5l+minor_curve.lc=top y5r; + good_x_for(5r)(z3l,z6,.5)a; + good_x_for(5l)(z3r,z6-(bulb_thickness,0),.5)b; + good_x_for(15r)(z13l,z16,.6)c; + good_x_for(15l)(z13r,z16-(knob,0),.6)d; + + top rt z21=(w if mono<>0:+max(1,.75stem.lc)fi,xheight)//; + y22r=y21; multpos(22,23)(max(1,.8thin_stem.lc),90); + lft z23r=(0 if mono<>0:-max(1,.75stem.lc)fi,y21)//; + + p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t + bulb.tr(z6,z5l,z5r,.75cs,bulb_thickness,90) o_t z2l{downward}--cycle; + p2=fullserif(z14,z11,z13l,z13r,.5hs,.75hs)--z12r{upward} i_t + bulb.tr(z16,z15l,z15r,.75cs,knob,90) o_t z12l{downward}--cycle; + + min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness)); + p3=(arm.tr(z21,z22l,z22r,.15as,.25tip_thickness,90) + soften(z23r,z23l) z22l)--cycle; + + showpoints(1,2,3,4,5,6,11,12,13,14,15,16,21,22,23); +adjust(v_a*fitbasis.lc#-.25r_w*width#+m_a*b_mfit#,0*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + +% This character is based on 2 "f"; the width is determined by the "n" width +% plus the width of the single "f" minus one stem. The crossbar has been +% extended. The right "f" should be like the single one; the top of the +% left "f" extended to overlap the right one. +% Placement of the curved arm on first "f" slightly altered + + + +iff OK "f": "The fi ligature"; + beginchar(12,(n_w+.2r_w)*width#+b_mono#,ascender#,0); + + bot lft z4l=(round (.2r_w*width),0); multpos(1,4,11,14)(stem.lc,0); + bot rt z14r=(w,0); + top z1l=(x4l,h)//; + top z11l=(x14l,xheight)//; + onaline(1l,4l)(2l,3l); y2l=max(xheight,.75xheight+(r_arch*(h-xheight))); + onaline(1r,4r)(2r,3r); y2r=max(xheight,.75xheight+(l_arch*(h-xheight))); + onaline(11l,14l)(13l); + onaline(11r,14r)(13r); y3l=y3r=y13l=y13r=x_bracket_h; + rt z6=(x14l,.5[y5r,y5l])//; + top y5r=bot y5l+minor_curve.lc=h+ov_t.lc; + good_x_for(5r)(z3l,z6,.5)a; + good_x_for(5l)(z3r,z6-(bulb_thickness,0),.5)b; + bot z21l=(0 if mono<>0:-max(1,.75stem.lc)fi,top y11l-max(1,.8thin_stem.lc))//; + z22r=z11l; + multpos(21,22)(max(1,.8thin_stem.lc),90); + + min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness)); + p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t + bulb.tr(z6,z5l,z5r,.75cs,bulb_thickness,90) o_t z2l{downward}--cycle; + p2=(fullserif(z14,z11,z13l,z13r,.5hs,.75hs) soften(z11r,z21r,z21l,z22l) + z13l)--cycle; + + showpoints(1,2,3,4,5,6,11,13,14,21,22); +adjust(v_a*fitbasis.lc#-.25r_w*width#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + +% This character is based on the "f" and "i"; the width is determined +% by the "n" width plus the width of the left part of the "f" arm. +% Placement of the curved arm on the "f" slightly altered + + + +iff OK "f": "The fl ligature"; + beginchar(13,(n_w+.2r_w)*width#+b_mono#,ascender#,0); + + bot lft z4l=(round (.2r_w*width),0); multpos(1,4,11,14)(stem.lc,0); + bot rt z14r=(w,0); + top z1l=(x4l,h)//; + top z11r=(x14r,.98h)//; + onaline(1l,4l)(2l,3l); y2l=max(xheight,.75xheight+(r_arch*(h-xheight))); + onaline(1r,4r)(2r,3r); y2r=max(xheight,.75xheight+(l_arch*(h-xheight))); + onaline(11l,14l)(13l); + onaline(11r,14r)(13r); y3l=y3r=y13l=y13r=x_bracket_h; + top y5r=bot y5l+minor_curve.lc=h+ov_t.lc; + good_x_for(5r)(z3l,z11r,.5)a; + good_x_for(5l)(z3r,z11r-(bulb_thickness,0),.5)b; + + top rt z21r=(x14,xheight)//; multpos(21,22)(max(1,.8thin_stem.lc),90); + lft z22r=(0 if mono<>0:-max(1,.75stem.lc)fi,y21r)//; + z23=.5[z21r,z22r]; + + min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness)); + p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t + bulb.tr(z11r,z5l,z5r,.75cs,bulb_thickness,90)soft o_t z2l{downward}--cycle; + p2=fullserif(z14,z11,z13l,z13r,.5hs,.75hs)--z11r--z11l--cycle; + p3=(z23 soften(z21r,z21l,z22l,z22r) z23)--cycle; + + showpoints(1,2,3,4,5,6,11,13,14,21,22,23); +adjust(v_a*fitbasis.lc#-.25r_w*width#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + +% This character is based on the "f" and "l"; the width is determined +% by the "n" width plus the width of the left part of the "f" arm. +% Placement of the curved arm on the "f" slightly altered + + +if mono=0: % skips these characters if monopitch + +iff OK "f": "The ffi ligature"; + beginchar(14,(2n_w+.2r_w-stem.lc#/(width#+mono#))*width#,ascender#,0); + + bot lft z4l=(round (.2r_w*width),0); multpos(1,4,11,14,21,24)(stem.lc,0); + bot lft z14l=(round (x4l+n_w*width-stem.lc),0); + bot lft z24l=(round (x14l+n_w*width-stem.lc),0); + top z1l=(x4l,h)//; + top z11l=(x14l,h)//; + top z21l=(x24l,xheight)//; + onaline(1l,4l)(2l,3l); y2l=max(xheight,.75xheight+(r_arch*(h-xheight))); + onaline(1r,4r)(2r,3r); y2r=max(xheight,.75xheight+(l_arch*(h-xheight))); + onaline(11l,14l)(12l,13l); y12l=y2l; y12r=y2r; + onaline(11r,14r)(12r,13r); y3l=y3r=y13l=y13r=y23l=y23r=x_bracket_h; + onaline(21l,24l)(23l); + onaline(21r,24r)(23r); + rt z16=(x24l,.99h)//; + rt z6=(x14l,y5r-y15r+y16)//; + top y15r=bot y15l+minor_curve.lc=round(.5[h+ov_t.lc,maxheight]); + top y5r=inlimit(.9[xheight,h+ov_t.lc])(xheight+2minor_curve.lc,h+ov_t.lc); + bot y5l+minor_curve.lc=top y5r; + good_x_for(5r)(z3l,z6,.5)a; + good_x_for(5l)(z3r,z6-(bulb_thickness,0),.5)b; + good_x_for(15r)(z13l,z16,.5)c; + good_x_for(15l)(z13r,z16-(bulb_thickness,0),.5)d; + bot z31l=(0,top y21l-max(1,.8thin_stem.lc))//; + z32r=z21l; + multpos(31,32)(max(1,.8thin_stem.lc),90); + + min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness)); + p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t + bulb.tr(z6,z5l,z5r,.75cs,bulb_thickness,90) o_t z2l{downward}--cycle; + p2=fullserif(z14,z11,z13l,z13r,.5hs,.5hs)--z12r{upward} i_t + bulb.tr(z16,z15l,z15r,.75cs,bulb_thickness,90) o_t z12l{downward}--cycle; + p3=(fullserif(z24,z21,z23l,z23r,.5hs,.75hs) soften(z21r,z31r,z31l,z32l) + z23l)--cycle; + + showpoints(1,2,3,4,5,6,11,12,13,14,15,16,21,23,24,31,32); +adjust(v_a*fitbasis.lc#-.25r_w*width#,v_a*fitbasis.lc#); +show_character; endchar; + +% This character is based on 2 "f" and an "i"; the width is +% determined by 2 "n" widths plus the width of the single "f" minus two stems. +% It's a combination of the "ff" and "fi" ligatures +% Placement of the curved arm on first and second "f" slightly altered +% No setting for fixed pitch + + +iff OK "f": "The ffl ligature"; + beginchar(15,(2n_w+.2r_w-stem.lc#/(width#+mono#))*width#,ascender#,0); + + bot lft z4l=(round (.2r_w*width),0); multpos(1,4,11,14,21,24)(stem.lc,0); + bot lft z14l=(round (x4l+n_w*width-stem.lc),0); + bot lft z24l=(round (x14l+n_w*width-stem.lc),0); + top z1l=(x4l,h)//; + top z11l=(x14l,h)//; + top z21l=(x24l,.98h)//; + onaline(1l,4l)(2l,3l); y2l=max(xheight,.75xheight+(r_arch*(h-xheight))); + onaline(1r,4r)(2r,3r); y2r=max(xheight,.75xheight+(l_arch*(h-xheight))); + onaline(11l,14l)(12l,13l); y12l=y2l; y12r=y2r; + onaline(11r,14r)(12r,13r); y3l=y3r=y13l=y13r=y23l=y23r=x_bracket_h; + onaline(21l,24l)(23l); + onaline(21r,24r)(23r); + rt z16=(x24,.99h)//; + rt z6=(x14l,y5r-y15r+y16)//; + top y15r=bot y15l+minor_curve.lc=round(.5[h+ov_t.lc,maxheight]); + top y5r=inlimit(.9[xheight,h+ov_t.lc])(xheight+2minor_curve.lc,h+ov_t.lc); + bot y5l+minor_curve.lc=top y5r; + good_x_for(5r)(z3l,z6,.5)a; + good_x_for(5l)(z3r,z6-(bulb_thickness,0),.5)b; + good_x_for(15r)(z13l,z16,.5)c; + good_x_for(15l)(z13r,z16-(bulb_thickness,0),.5)d; + + top rt z31r=(x24,xheight)//; multpos(31,32)(max(1,.8thin_stem.lc),90); + lft z32r=(0,y31r)//; + z33=.5[z31r,z32r]; + + min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness)); + p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t + bulb.tr(z6,z5l,z5r,.75cs,bulb_thickness,90) o_t z2l{downward}--cycle; + p2=fullserif(z14,z11,z13l,z13r,.5hs,.5hs)--z12r{upward} i_t + bulb.tr(z21r,z15l,z15r,.75cs,bulb_thickness,90)soft o_t z12l{downward}-- + cycle; + p3=fullserif(z24,z21,z23l,z23r,.5hs,.75hs)--z21r--z21l--cycle; + p4=(z33 soften(z31r,z31l,z32l,z32r) z33)--cycle; + + showpoints(1,2,3,4,5,6,11,12,13,14,15,16,21,22,23,24,31,32,33); +adjust(v_a*fitbasis.lc#-.25r_w*width#,v_a*fitbasis.lc#); +show_character; endchar; + +% This character is based on 2 "f" and an "l"; the width is +% determined by 2 "n" widths plus the width of the single "f" minus two stems. +% It's a combination of the "ff" and "fl" ligatures +% Placement of the curved arm on first and second "f" slightly altered +% No setting for fixed pitch + +fi %*****closing for case if monopitch diff --git a/fonts/pandora/ligs.mf b/fonts/pandora/ligs.mf new file mode 100644 index 0000000000..4f4c9b66a8 --- /dev/null +++ b/fonts/pandora/ligs.mf @@ -0,0 +1,83 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% ligs.mf ligatures and kerning information + +ligtable "'":"'"=:oct"042"; % single closed quote +ligtable oct"140":oct"140"=:oct"134"; % single open quote +ligtable "-":"-"=:oct"173"; % -- makes en dash +ligtable oct"173":"-"=:oct"174"; % (en dash)+(-) makes em dash +ligtable "f":"f"=:oct"013", "i"=:oct"014", "l"=:oct"015"; % fi,ff,fl ligatures +ligtable oct"013":"i"=:oct"016", "l"=:oct"017"; % ffi,ffl ligatures + +k#:=-.08fitbasis.lc#; kk#:=-.16fitbasis.lc#; kkk#:=-.24fitbasis.lc#; +K#:=-.08fitbasis.uc#; KK#:=-.16fitbasis.uc#; KKK#:=-.2fitbasis.uc#; + +% *** lowercase and lowercase *** +ligtable "b":"o":"p":oct"034": "v" kern k#, "y" kern k#, "x" kern kk#; +ligtable "e":"s":oct"032":oct"033": "v" kern k#, "y" kern k#, "x" kern kk#; +ligtable "c":"r":"t": "a" kern k#, "c" kern k#, "d" kern k#, "e" kern k#, + "g" kern k#, "o" kern k#, "q" kern k#, "s" kern k#, + "v" kern k#, "x" kern k#, "y" kern k#, + oct"032" kern k#, oct"033" kern k#, oct"034" kern k#; +ligtable "k":"v":"x":"y":"a" kern k#, "c" kern k#, "d" kern k#, "e" kern k#, + "g" kern k#, "o" kern k#, "q" kern k#, + oct"032" kern k#, oct"033" kern k#, oct"034" kern k#; + +ligtable "A": "U" kern K#, "X" kern K#, + "T" kern KK#, "V" kern KKK#, "Y" kern KKK#, + "w" kern k#, "v" kern kk#, "y" kern kk#; +ligtable "C": "T" kern K#, "V" kern K#, "X" kern K#, "Y" kern K#, + oct"035" kern KK#, "v" kern k#, "y" kern k#; +ligtable "D":"O":"Q":oct"037": + "T" kern K#, oct"035" kern KK#, + "A" kern K#, "V" kern KK#, "X" kern KK#, "Y" kern K#; +ligtable "F":"U": "T" kern KK#, oct"035" kern KKK#; +ligtable "L": "T" kern KK#, "V" kern KK#, "Y" kern KK#; +ligtable "K": "C" kern K#, "G" kern K#, "O" kern K#, "Q" kern K#, + oct"036" kern K#, oct"037" kern K#, + "A" kern KK#, oct"035" kern KK#, + "a" kern k#, "c" kern k#, "d" kern k#, "e" kern k#, + "g" kern k#, "o" kern k#, "q" kern k#, + oct"032" kern k#, oct"033" kern k#, oct"034" kern k#; +ligtable "P": "V" kern K#, "X" kern K#, "Y" kern K#, "A" kern KK#, + "." kern KK#, "," kern KK#, oct"035" kern KK#, + "a" kern kk#, "c" kern kk#, "d" kern kk#, "e" kern kk#, + "g" kern kk#, "o" kern kk#, "q" kern kk#, "s" kern kk#, + oct"032" kern kk#, oct"033" kern kk#, oct"034" kern kk#; +ligtable "R": "a" kern k#, "c" kern k#, "d" kern k#, "e" kern k#, + "g" kern k#, "o" kern k#, "q" kern k#, "s" kern kk#, + oct"032" kern k#, oct"033" kern k#, oct"034" kern k#, + oct"035" kern KK#; +ligtable "S":"W": oct"035" kern KKK#, + "v" kern kk#, "y" kern kk#; +ligtable "T":"A" kern K#, "C" kern K#, "G" kern K#, "O" kern K#, + "Q" kern K#, "X" kern K#, "Y" kern K#, oct"035" kern KK#, + "m" kern k#, "n" kern k#, "p" kern k#, "r" kern k#, "u" kern k#, + "v" kern k#, "w" kern k#, "x" kern k#, "y" kern k#, "z" kern k#, + "a" kern kk#, "c" kern kk#, "d" kern kk#, "e" kern kk#, + "g" kern kk#, "o" kern kk#, "q" kern kk#, "s" kern kk#, + oct"032" kern kk#, oct"033" kern kk#, oct"034" kern kk#, + "." kern KK#, "," kern KK#; +ligtable "V":"O" kern KK#, "Q" kern KK#, "A" kern KKK#, + oct"035" kern KKK#, oct"036" kern KK#, oct"037" kern KK#, + "m" kern k#, "n" kern k#, "p" kern k#, "r" kern k#, "u" kern k#, + "v" kern k#, "w" kern k#, "x" kern k#, "y" kern k#, "z" kern k#, + "a" kern kk#, "c" kern kk#, "d" kern kk#, "e" kern kk#, + "g" kern kk#, "o" kern kk#, "q" kern kk#, "s" kern kk#, + oct"032" kern kk#, oct"033" kern kk#, oct"034" kern kk#; +ligtable "X":"C" kern K#, "G" kern K#, "O" kern K#, "Q" kern K#, + oct"036" kern K#, oct"037" kern K#, "A" kern KK#, oct"035" kern KK#; +ligtable "Y":"C" kern KK#, "G" kern KK#, "O" kern KK#, "Q" kern KK#, + oct"036" kern KK#, oct"037" kern KK#, + "A" kern KKK#, oct"035" kern KKK#, + "a" kern kkk#, "c" kern kkk#, "d" kern kkk#, "e" kern kkk#, + "g" kern kkk#, "m" kern kkk#, "n" kern kkk#, "o" kern kkk#, + "p" kern kkk#, "q" kern kkk#, "r" kern kkk#, "s" kern kkk#, + "u" kern kkk#, "v" kern kkk#, "w" kern kkk#, "x" kern kkk#, + "y" kern kkk#, "z" kern kkk#, + oct"032" kern kkk#, oct"033" kern kkk#, oct"034" kern kkk#, + "i" kern kk#, "j" kern kk#, oct"020" kern kk#, oct"022" kern kk#; + diff --git a/fonts/pandora/number.mf b/fonts/pandora/number.mf new file mode 100644 index 0000000000..09519de8c4 --- /dev/null +++ b/fonts/pandora/number.mf @@ -0,0 +1,468 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% number.mf numerals +% 10 characters + + +iff OK "0": "The number 0"; + beginchar("0",num_width_c#+c_mono#,cap#,0); + if mono<>0:save circ; circ1=circ2=circ3=1.05; fi + + top z1=(h_stress*w,h+ov_t.uc)//; + lft z2=(0,(1-v_stress)*h)//; + bot z3=((1-h_stress)*w,-ov_b.uc)//; + rt z4=(w,v_stress*h)//; + + circular_shape(y1,y3,x2,x4,minor_curve.uc,bowlstem.uc); + + showpoints(1,2,3,4); +adjust(.5num_fit_c#+m_a*c_mfit#,.5num_fit_c#+m_a*c_mfit#); +show_character; endchar; + + +iff OK "1": "The number 1"; + beginchar("1",num_width_a#+b_mono#,cap#,0); + + save_num(terminal_thickness)=max(.75thin_stem.uc,.3stem.uc); + bot z40=(.5w,0); multpos(1,4,40)(stem.uc,0); + lft x4l=round x40l; bot y4=0; + top z1=(x4,h)//; + onaline(1l,4l)(2l,3l); y3l=y3r=cap_bracket_h; + onaline(1r,4r)(2r,3r); y2r=y2l=max(h-cap_bracket_h,y3l); + y2l:=min(y2l,h-terminal_thickness-(stem.uc*sind max(25-.5oblique,0))); + + p1=fullserif(z4,z1,z3l,z3r,1.25hs,1.25hs)-- + terminalserif.l(z1,z4,z2l,z2r,1.5pt,max(25-.5oblique,0))--cycle; + + showpoints(1,2,3,4); +adjust(.5num_fit_a#+m_a*b_mfit#,.5num_fit_a#+m_a*b_mfit#); +show_character; endchar; + + + + +def character_points= +iff OK "2": "The number 2"; + beginchar(50+alt8,num_width_b#+b_mono#,cap#,0); + + twotension:=10; + z1=(.05w,.9h)//; + rt z3r=(w,if inflection_two:.75h else:.7h fi)//;lft z3l=(z3r-(bowlstem.uc,0)); + top y2r=bot y2l+max(1,major_curve.uc)=h+ov_t.uc; + good_x_for(2r)(z1,z3r,.5)a; good_x_for(2l)(z1+(bulb_thickness,0),z3l,.5)b; + top lft z5l=(0,max(1,.9stem.uc))//; + z4l=.5[z5l,z3l]; + bot lft z6l=(0,0); z6r=z6l+(0,apex.uc)//; + bot rt z8=(.95w,0); + bot y7l=top y7r-max(1,.9stem.uc)=0; + good_x_for(7l)(z6l,z8,.5)c; good_x_for(7r)(z5r,z8-(tip_thickness,0),.5)d; + + ref1=(z6r-(0,max(1,.8thin_stem.uc))) + ..tension atleast twotension and 1..z3r{upward}; + ref2=z3l{downward}..tension atleast 1 and twotension..z6r; + ref3=(-1,y7r)--(w,y7r); + ref4=z3l{downward}...z4l...z6r{downward}...z6l; + + if inflection_two: + rt z5r=ref4 intersectionpoint ref3+(1.3thin_stem.uc,0); z4r=.5[z5r,z3r]; + p1=(bulb.tl(z1,z2l,z2r,cs,bulb_thickness,90)soft i_t + ref4 if softpath:)softjoin(z6l fi + --arm.br(z8,z7r,z7l,.5as,.75tip_thickness,90-arm_angle+.5oblique)soft-- + z5r if softpath:)softjoin(z5r fi + {upward}..z4r...z3r{upward} o_t z2r{left})--cycle; + else: + rt z5r=ref1 intersectionpoint ref3; + (t1,t2)=ref1 intersectiontimes ref3; + p1=(bulb.tl(z1,z2l,z2r,cs,bulb_thickness,90)soft i_t + ref2 soften(z6r,z6l) + arm.br(z8,z7r,z7l,.5as,.75tip_thickness,90-arm_angle+.5oblique)soft--z5r + if softpath:)softjoin(z5r fi + --subpath(t1,infinity)of ref1 o_t z2r{left})--cycle; + fi + showpoints(1,2,3,4,5,6,7,8); + adjust(.5num_fit_b#+m_a*b_mfit#,.5num_fit_b#+m_a*b_mfit#); + show_character; endchar; + enddef; + + def number_two=save a,b; + vardef a=condition(inflection_two)t; testing_codes; character_points; enddef; + vardef b=condition(inflection_two)f; testing_codes; character_points; enddef; + if test_all_characters:a;b;else:if inflection_two:a;else:b;fi fi + enddef; + + number_two; save number_two; + + + + def three_diagonal_top(expr addtocode)= +iff OK "3": "The number 3"; + beginchar(51+alt6+addtocode,num_width_b#+b_mono#,cap#,0); + + top z1=(0w,h)//; + lft z9=(0,.05h)//; + bot lft z10r=(.05w,-ov_b.uc)//; + pos10(minor_curve.uc,-90-oblique); + z5=if open_tail:(.2w,.57h)//;else:(.3w,.55h)//; fi + z3r=(round(.97w),h-apex.uc)//; + z40=(.97w,h)//; + x5r=x5+.45thin_stem.uc*(cosd (90-oblique)); + x5l=x5r-.9thin_stem.uc*(cosd (90-oblique)); + top y2r=bot y2l+max(1,.9stem.uc)=h; + top y6r=top y5r=round(y5+.45thin_stem.uc); + bot y6l=bot y5l=y5r-max(1,.9thin_stem.uc); + bot y8r=top y8l-minor_curve.uc=-ov_b.uc; + z4l=z5r; + if open_tail:rt z7r=(w,.65[y8r,y6r])//; + lft z7l=(x7r-stem.uc,.65[y8l,y6l]); + else:rt z7r=(w,v_stress[y8r,y6r])//; + lft z7l=(x7r-stem.uc,v_stress[y8l,y6l]); fi + + numeric theta[],phi[],d[]; + d1=thin_stem.uc; + theta1=angle(length(z3r-z5r) +-+ d1,d1); + phi1=angle(z3r-z5r)-theta1; + multpos(3,4)(thin_stem.uc,phi1-90); + + onaline(3l,4l)(41); y41=y2l; + onaline(3r,4r)(42); y42=y5r; + good_x_for(2r)(z1,z40,.4)a; good_x_for(2l)(z1+(bulb_thickness,0),z41,.4)b; + good_x_for(6r)(z42,z7r,.2)c; good_x_for(6l)(z5l,z7l,.3)d; + good_x_for(8r)(z9,z7r,.4)e; good_x_for(8l)(z9+(bulb_thickness,0),z7l,.4)f; + + p1=(arm.tl(z1,z2l,z2r,.5as,.5tip_thickness,90)soft + soften(z41,z5r,z5l) z6l{right} i_t z7l{downward} i_t + if open_tail:{-(dir (7*h/w))}z10l--z10r{dir(7*h/w)} + else:bulb.bl(z9,z8l,z8r,.75cs,.75bulb_thickness,90) fi + o_t z7r{upward} o_t z6r{left} soften(z42,z3r,z40) z2r)--cycle; + + showpoints(1,2,3,4,5,6,7,8,9,10,40,41,42); + adjust(.5num_fit_b#+m_a*b_mfit#,.5num_fit_b#+m_a*b_mfit#); + show_character; endchar; + enddef; + + def three_round_top(expr addtocode)= +iff OK "3": "The number 3"; + beginchar(51+alt6+addtocode,num_width_b#+b_mono#,cap#,0); + + z1=(.05w,.95h)//; + lft z9=(0,.05h)//; + bot lft z10r=(.05w,-ov_b.uc)//; + pos10(minor_curve.uc,-90-oblique); + z5=(.3w,.55h)//; + x5r=x5+.45thin_stem.uc*(cosd (90-oblique)); + x5l=x5r-.9thin_stem.uc*(cosd (90-oblique)); + top y2r=bot y2l+minor_curve.uc=h+ov_t.uc; + top y4r=top y5r=round(y5+.45thin_stem.uc); + bot y4l=bot y5l=y5r-max(1,.9thin_stem.uc); + y6=.75[y5l,y5r]; + bot y8r=top y8l-major_curve.uc=-ov_b.uc; + rt z3r=(round(.97w),v_stress[y6,y2r])//; + lft z3l=(x3r-stem.uc,v_stress[y5r,y2l]); + if open_tail:rt z7r=(w,.65[y8r,y6])//; + lft z7l=(x7r-stem.uc,.65[y8l,y4l]); + else:rt z7r=(w,v_stress[y8r,y6])//; + lft z7l=(x7r-stem.uc,v_stress[y8l,y4l]); fi + z3=.5[z3l,z3r]; + + good_x_for(2r)(z1,z3r,.5)a; good_x_for(2l)(z1+(bulb_thickness,0),z3l,.5)b; + good_x_for(4r)(z5r,z3l,.4)c; good_x_for(4l)(z5l,z7l,.4)d; + good_x_for(6)(z5,z3,.6)e; + good_x_for(8r)(z9,z7r,.4)g; good_x_for(8l)(z9+(bulb_thickness,0),z7l,.4)f; + + p1=(bulb.tl(z1,z2l,z2r,1.2cs,.75bulb_thickness,90)soft i_t + z3l{downward} i_t z4r{left} soften(z5r,z5l) z4l{right} i_t z7l{downward} + i_t if open_tail:{-(dir (7*h/w))}z10l--z10r{dir(7*h/w)} + else:bulb.bl(z9,z8l,z8r,.75cs,.75bulb_thickness,90) fi + o_t z7r{upward} o_t + z6{left}--(z6+(0,epsilon){right} o_t z3r{upward} o_t z2r{left}))--cycle; + + showpoints(1,2,3,4,5,6,7,8,9); + adjust(.5num_fit_b#+m_a*b_mfit#,.5num_fit_b#+m_a*b_mfit#); + show_character; endchar; + enddef; + + + vardef number_three=save first,second,third,fourth,addtocode; + addtocode:=-1; + vardef first=condition(diagonal_three)t; condition(open_tail)t; + testing_codes; three_diagonal_top(0); enddef; + vardef second=condition(diagonal_three)t; condition(open_tail)f; + testing_codes; three_diagonal_top(incr addtocode); enddef; + vardef third=condition(diagonal_three)f; condition(open_tail)t; + testing_codes; three_round_top(incr addtocode+alt7); enddef; + vardef fourth=condition(diagonal_three)f; condition(open_tail)f; + testing_codes; three_round_top(incr addtocode); enddef; + + if test_all_characters:first;second;third;fourth; + elseif diagonal_three and open_tail:first; + elseif diagonal_three and (not open_tail):second; + elseif (not diagonal_three) and open_tail:third; + elseif (not diagonal_three) and (not open_tail):fourth; fi + enddef; + + number_three; save number_three,three_diagonal_top,three_round_top; + + + +iff OK "4": "The number 4"; + beginchar(52+alt10,num_width_e#+.5*(d_mono#+e_mono#),cap#,0); + + min_limit(join_radius)(.5minor_curve.uc); + top rt z11r=(round(.82w),h)//; multpos(11,13)(max(1,stem.uc),0); + rt z13r=(round(.82w),0); + bot lft z4l=(0,round(.2h))//; pos4(apex.uc,90-apex_angle); + onaline(11r,13r)(10r,12r,23,25); + onaline(11l,13l)(12l,20,22,24,26,27); + y12l=y12r=min(cap_bracket_h,y4l); y20=y11r-max(thin_stem.uc,.3stem.uc,1); + y10=if open_four:.75h else:h fi; y27=y10+thin_stem.uc-stem.uc; + y24=y25=y4l; top y23=bot y24+max(1,.9thin_stem.uc); + pos10(apex.uc,0-oblique); + z3l=z4r; + z1r=if open_four:(x13l,h-.5thin_stem.uc)// else:z20 fi; %z1r controls top of 4 + multpos(1,2,3)(thin_stem.uc,constant_angle(z1r,z3l,thin_stem.uc)); + onaline(1r,3r)(2r,21); y21=y22=y23; y2r=notch_pos[y20,y21]; + onaline(2l,3l)(28); y28=y11r; y26=.8[y22,y20]; + rt z5=(w,y4l)//; + ref1=z26--z20--z2r; + + if open_four: + p1=(z27--fullserif(z13,z11,z12l,z12r,.75hs,.75hs) + soften (z10r,z10) z27)--cycle; + p2=(arm.br(z5,z23,z25,.15as,.25tip_thickness,90-arm_angle+.5oblique) + soften(z21,z1r,z1l,z4r,z4l) z25)--cycle; + else: + p1=(z2l soften(z4r,z4l,z24) fullserif(z13,z11,z12l,z12r,.75hs,.75hs)--z25 + if softpath:)softjoin(z25 fi + --arm.br(z5,z23,z25,.15as,.25tip_thickness,90-arm_angle+.5oblique) + soften(z23,z11r,z28) z2l)--cycle; + p1'=(upnotch(ref1,angle(z20-z22),notch_length.uc) soften(z21,z22) z26) + --cycle; + fi + showpoints(1,2,3,4,5,10,11,12,13,20,21,22,23,24,25,26,27,28); +adjust(.5num_fit_e#+m_f*.5(d_mfit#+e_mfit#), + .5num_fit_e#+m_ff*.5(d_mfit#+e_mfit#)); +show_character; endchar; + + + + def character_points= +iff OK "5": "The number 5"; + beginchar(53+alt6,num_width_b#+b_mono#,cap#,0); + + top z1=(.9w,h)//; + top z3l=(round .05w,h)//; multpos(3,5)(thin_stem.uc,0-oblique); + z5l=(round .05w,if open_tail:.6h else:.55h fi)//; + lft z9=(0,.05h)//; + bot lft z10r=(.05w,-ov_b.uc)//; + pos10(minor_curve.uc,-90-oblique); + + top y2r=bot y2l+max(1,.9stem.uc)=h; + bot y4l=top y4r-max(1,.9thin_stem.uc)=bot y5l; + bot y8r=top y8l-minor_curve.uc=-ov_b.uc; + if open_tail:rt z7r=(w,.65[y8r,y4r])//;lft z7l=(x7r-stem.uc,.65[y8l,y4l]); + else:rt z7r=(w,v_stress[y8r,y4r])//; + lft z7l=(x7r-stem.uc,v_stress[y8l,y4l]); fi + onaline(3r,5r)(40,41); y40=y2l; y41=y4r; + + good_x_for(2r)(z3l,z1,.5)a; good_x_for(2l)(z40,z1-(tip_thickness,0),.5)b; + good_x_for(4r)(z41,z7r,.4)c; good_x_for(4l)(z5l,z7l,.55)d; + good_x_for(8r)(z9,z7r,.4)e; good_x_for(8l)(z9+(bulb_thickness,0),z7l,.4)f; + + if open_tail: + p1=(arm.tr(z1,z2l,z2r,.5as,.5tip_thickness,90)soft soften(z3l,z5l) + z4l{right} i_t z7l{downward} i_t + {-(dir (7*h/w))}z10l--z10r{dir(7*h/w)} o_t + z7r{upward} o_t z4r{left} soften(z41,z40) z2l)--cycle; + else: + p1=(arm.tr(z1,z2l,z2r,.5as,.5tip_thickness,90)soft soften(z3l,z5l) + z4l{right} i_t z7l{downward} i_t z8l{left} i_t + bulb.bl(z9,z8l,z8r,.75cs,.75bulb_thickness,90) + o_t z7r{upward} o_t z4r{left} soften(z41,z40) z2l)--cycle; + fi + showpoints(1,2,3,4,5,7,8,9,10,40,41); + adjust(.5num_fit_b#+m_a*b_mfit#,.5num_fit_b#+m_a*b_mfit#); + show_character; endchar; + enddef; + + vardef number_five= save a,b; + vardef a=condition(open_tail)t; testing_codes; character_points; enddef; + vardef b=condition(open_tail)f; testing_codes; character_points; enddef; + if test_all_characters:a;b; else:if open_tail:a; else:b; fi fi + enddef; + + number_five; save number_five; + + + + def character_points= +iff OK "6": "The number 6"; + beginchar(54+alt6,num_width_c#+c_mono#,cap#,0); + + save_pairs(good_dir); + top z0r=(.9w,h+ov_t.uc)//; pos0(max(1,.9minor_curve.uc),90+taper_angle); + z1=(.85w,.98h)//; + lft z3r=(0,(1-v_stress)*h)//; rt z3l=z3r+(stem.uc,0); + top y2r=bot y2l+minor_curve.uc=h+ov_t.uc; + good_x_for(2l)(z3l,z1-(bulb_thickness,0),.7)a; good_x_for(2r)(z3r,z1,.7)b; + bot y4r=top y4l-minor_curve.uc=-ov_b.uc; + y6r=y6l+max(1,round(.9minor_curve.uc))=.7h; + rt z5r=(w,v_stress[y4r,y6r])//; + lft z5l=(x5r-stem.uc,v_stress[y4r,y6r]); + good_x_for(4l)(z3l,z5l,.5)c; good_x_for(4r)(z3r,z5r,.5)d; + y100=(.5ductal)[y6l,y3l]; + + ref1=z4l{left} i_t z3l{upward} i_t if open_tail:z0l else: z2l{right} fi; + z7l=ref1 intersectionpoint ((0,y5r)..(w,y5r)//); + z7r=ref1 intersectionpoint ((0,y100)..(w,y100)//); + (t1,t2)=ref1 intersectiontimes ((0,y100)..(w,y100)//); + good_x_for(6l)(z7l,z5l,.52)e; good_x_for(6r)(z7r,z5r,.5)f; + + ref2=z6r{left}...z7r; + if (angle(direction 1 of ref2)<=-90-oblique)and + (angle(direction 1 of ref2)>=-180-oblique):good_dir7=(0,0); + else: good_dir7=dir(-90-oblique);fi + + p1'=z6l{left} i_t z7l{downward} i_t z4l{right} i_t z5l{upward} i_t cycle; + p1=if open_tail:(z7r+(0,eps){upward} i_t z0l--z0r + else:(subpath(t1,infinity) of ref1-- + bulb.tr(z1,z2l,z2r,.75cs,.75bulb_thickness,90)soft fi + o_t z3r{downward} o_t + z4r{right} o_t z5r{upward} o_t z6r{left}...z7r{good_dir7})--cycle; + + showpoints(0,1,2,3,4,5,6,7); + adjust(.5num_fit_c#+m_a*c_mfit#,.5num_fit_c#+m_a*c_mfit#); + show_character; endchar; + enddef; + + def number_six=save a,b; + vardef a=condition(open_tail)t; testing_codes; character_points; enddef; + vardef b=condition(open_tail)f; testing_codes; character_points; enddef; + if test_all_characters:a;b;else:if open_tail:a;else:b;fi fi + enddef; + + number_six; save number_six; + + + +iff OK "7": "The number 7"; + beginchar("7",num_width_b#+b_mono#,cap#,0); + + top z1=(0,h)//; + z3r=(w,h-apex.uc)//; + z40=(w,h)//; + z5l=(.05w,0); + z6=(x5l+bowlstem.uc,0); + top y2r=bot y2l+max(1,.9stem.uc)=h; + + numeric theta[],phi[],d[]; + d1=thin_stem.uc; + theta1=angle(length(z3r-z5l) +-+ d1,d1); + phi1=angle(z3r-z5l)-theta1; + multpos(3,5)(thin_stem.uc,phi1-90); + + onaline(3l,5l)(4l,41); y41=y2l; y4l=.5[y5l,y41]; + z4r=.5[z3r,z5r]; + good_x_for(2r)(z1,z40,.5)a; good_x_for(2l)(z1+(tip_thickness,0),z41,.5)b; + + p1=(arm.tl(z1,z2l,z2r,.5as,.75tip_thickness,90-arm_angle+oblique)soft--z41 + if softpath:)softjoin( else:--fi + flex(z41,(z4l-(.05w,0)),z5l))softjoin(z5l--z6)softjoin + (flex(z6,(z4r-(.05w,0)),z3r)) + if softpath:softjoin(z3r--z40)softjoin else:--fi (z40--z2r)--cycle; + + showpoints(1,2,3,4,5,6,40,41); +adjust(.7num_fit_b#+m_e*b_mfit#,.3num_fit_b#+m_ee*b_mfit#); +show_character; endchar; + + +iff OK "8": "The number 8"; + beginchar("8",num_width_c#+d_mono#,cap#,0); + + bot z6r=(.5w,-ov_b.uc); top y6l=bot y6r+thin_stem.lc; + top z2l=(x6r,h+ov_t.uc)//; bot y2r=top y2l-thin_stem.lc; + z4=z8=.55[z6r,z2l]; + rt z1l=(round(.95w),.5[y4,y2l])//; lft z1r=rt z1l-(thin_stem.lc,0); + lft z3l=(round(.05w),.5[y4,y2l])//; rt z3r=lft z3l+(stem.lc,0); + z1=.5[z1l,z1r]; z3=.5[z3l,z3r]; + rt z5r=(w,.5[y6r,y4])//; lft z5l=rt z5r-(stem.lc,0); z5=.5[z5l,z5r]; + lft z7r=(0,.5[y6r,y4])//; rt z7l=lft z7r+(thin_stem.lc,0); z7=.5[z7l,z7r]; + good_x_for(2r)(z3r,z1r,.5)a; + good_x_for(6l)(z7l,z5l,.5)b; + + ref5=z3..z4..z5; ref6=z1..z8..z7; + pos4(max(1,.95stem.lc), + (angle(postcontrol 1 of ref5-precontrol 1 of ref5))+90); + pos8(max(1,thin_stem.lc), + (angle(postcontrol 1 of ref6-precontrol 1 of ref6))+90); + + ref1=z2r{left} i_t z3r{downward} i_t z4r o_t z5r{downward} o_t z6r{left}; + ref2=z6r{left} o_t z7r{upward} o_t z8l i_t z1r{upward} i_t z2r{left}; + ref3=z2l{right} o_t z1l{downward} o_t z8r i_t z7l{downward} i_t z6l{right}; + ref4=z6l{right} i_t z5l{upward} i_t z4l o_t z3l{upward} o_t z2l{right}; + (t1,t2)=ref1 intersectiontimes ref2; (t3,t4)=ref1 intersectiontimes ref3; + (t5,t6)=ref3 intersectiontimes ref4; (t7,t8)=ref2 intersectiontimes ref4; + + p1 =(subpath(0,t4-eps)of ref3)--(subpath(t3+eps,infinity)of ref1)-- + (subpath(0,t7-eps)of ref2)--(subpath(t8+eps,infinity)of ref4)--cycle; + p1'=(subpath(0,t1-eps)of ref1)--(subpath(t2+eps,infinity)of ref2)--cycle; + p2'=(subpath(0,t6-eps)of ref4)--(subpath(t5+eps,infinity)of ref3)--cycle; + + showpoints(1,2,3,5,6,7,41,42,43,44); +adjust(.5num_fit_c#+m_a*d_mfit#,.5num_fit_c#+m_a*d_mfit#); +show_character; endchar; + + + + def character_points=. +iff OK "9": "The number 9"; + beginchar(57+alt6,num_width_c#+c_mono#,cap#,0); + + save_pairs(good_dir); + bot z0r=(.1w,-ov_b.uc)//; pos0(max(1,.9minor_curve.uc),-90+taper_angle); + z1=(.15w,.02h)//; + rt z3r=(w,v_stress*h)//; lft z3l=z3r-(stem.uc,0); + bot y2r=top y2l-minor_curve.uc=-ov_b.uc; + good_x_for(2l)(z3l,z1+(bulb_thickness,0),.7)a; good_x_for(2r)(z3r,z1,.7)b; + top y4r=bot y4l+minor_curve.uc=h+ov_t.uc; + y6r=y6l-max(1,round(.9minor_curve.uc))=.3h; + lft z5r=(0,(1-v_stress)[y4r,y6r])//; + rt z5l=(x5r+stem.uc,(1-v_stress)[y4r,y6r]); + good_x_for(4l)(z3l,z5l,.5)c; good_x_for(4r)(z3r,z5r,.5)d; + y100=(.5ductal)[y6l,y3l]; + + ref1=z4l{right} i_t z3l{downward} i_t if open_tail:z0l else:z2l{left} fi; + z7l=ref1 intersectionpoint ((0,y5r)..(w,y5r)//); + z7r=ref1 intersectionpoint ((0,y100)..(w,y100)//); + (t1,t2)=ref1 intersectiontimes ((0,y100)..(w,y100)//); + good_x_for(6l)(z7l,z5l,.52)e; good_x_for(6r)(z7r,z5r,.5)f; + + ref2=z6r{right}...z7r; + if (angle(direction 1 of ref2)<=90-oblique)and + (angle(direction 1 of ref2)>=-oblique):good_dir7=(0,0); + else: good_dir7=dir(90-oblique);fi + + p1'=z6l{right} i_t z7l{upward} i_t z4l{left} i_t z5l{downward} i_t cycle; + p1 =if open_tail:(z7r-(0,eps){downward} i_t z0l--z0r + else:(subpath(t1,infinity) of ref1-- + bulb.bl(z1,z2l,z2r,.75cs,.75bulb_thickness,90)soft fi + o_t z3r{upward} o_t + z4r{left} o_t z5r{downward} o_t z6r{right}...z7r{good_dir7})--cycle; + + showpoints(0,1,2,3,4,5,6,7); + adjust(.5num_fit_c#+m_a*c_mfit#,.5num_fit_c#+m_a*c_mfit#); + show_character; endchar; + enddef; + + def number_nine=save a,b; + vardef a=condition(open_tail)t; testing_codes; character_points; enddef; + vardef b=condition(open_tail)f; testing_codes; character_points; enddef; + if test_all_characters:a;b;else:if open_tail:a;else:b;fi fi + enddef; + + number_nine; save number_nine; + + + diff --git a/fonts/pandora/panaccent.mf b/fonts/pandora/panaccent.mf new file mode 100644 index 0000000000..c90139618a --- /dev/null +++ b/fonts/pandora/panaccent.mf @@ -0,0 +1,632 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% accent.mf miscellaneous accents, ligatures and chars for foreign languages + +%19 characters; iff OK "x": for testing + + + +iff OK "x": "The letter i with no dot"; + beginchar(oct"020",i_w*width#+a_mono#,xheight#,0); + + bot z40=(if singlepitch:.65w else:.5w fi,0); multpos(1,4,40)(stem.lc,0); + lft x4l=round x40l; bot y4=0; + z1=(x4,h)//; + onaline(1l,4l)(2l,3l); y3l=y3r=x_bracket_h; + onaline(1r,4r)(2r,3r); y2l=y2r=max(h-x_bracket_h,y3l); + + p1=fullserif(z4,z1,z3l,z3r,.75hs,.75hs)-- + terminalserif.l(z1,z4,z2l,z2r,.5ts,x_terminal_angle)--cycle; + if singlepitch:pickup pencircle yscaled thin_stem.lc rotated -oblique; + lft top z12=(0,h); rt top z13=(x1,h); + draw z12--z13; showpoints(12,13); + fi + + showpoints(1,2,3,4,40); +adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); +show_character; endchar; + +% Exactly the came character as the lowercase "i", but with no dot + + + +iff OK "x": "The letter j with no dot"; + beginchar(oct"021",j_w*width#+a_mono#,xheight#,descender#); + + top rt z1r=(w,h)//; multpos(1,4)(stem.lc,0); + rt z4r=(w,0); + onaline(1l,4l)(2l,3l); y3l=max(.25xheight,-d+(l_arch*(d+.25xheight))); + onaline(1r,4r)(2r,3r); y3r=max(.25xheight,-d+(r_arch*(d+.25xheight))); + onaline(1,4)(11); y11=y1+max(1,.2h); y2l=y2r=h-x_bracket_h; + lft z6=(0,-.95d)//; + save_num(knob)=min(bulb_thickness,.3*abs(x4l-x6)); + bot y5r=top y5l-minor_curve.lc=-d-ov_b.lc; + good_x_for(5r)(z6,z3r,.4)a; good_x_for(5l)(z6+(knob,0),z3l,.4)b; + + p1=terminalserif.l(z1,z4,z2l,z2r,.5ts,x_terminal_angle)--z3l{downward} i_t + bulb.bl(z6,z5l,z5r,.5cs,knob,90) o_t z3r{upward}--cycle; + + if singlepitch:pickup pencircle yscaled thin_stem.lc rotated -oblique; + lft top z12=(.2w,h); rt top z13=(x1,h); + draw z12--z13; showpoints(12,13); + fi + + showpoints(1,2,3,4,5,6,11); +adjust(m_ee*a_mfit#,v_a*fitbasis.lc#+m_e*a_mfit#); +show_character; endchar; + +% Exactly the came character as the lowercase "j", but with no dot + + + +iff OK "x": "Grave accent"; %******* .8 ACCENT WIDTH x 1 ACCENT DEPTH + beginchar(oct"022",.8accent_w*width#+b_mono#, + accent_height#+xheight#+accent_depth#,0); + top rt z1=(0,h)//; + bot lft z2=(w,h-max(1,accent_depth))//; + p1=prime_accent(z1,z2,accent_thick_end,accent_thin_end); + showpoints(1,2); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "x": "Acute accent"; %******* .8 ACCENT WIDTH x 1 ACCENT DEPTH + beginchar(oct"023",.8accent_w*width#+b_mono#, + accent_height#+xheight#+accent_depth#,0); + top rt z1=(w,h)//; + bot lft z2=(0,h-max(1,accent_depth))//; + p1=prime_accent(z1,z2,accent_thick_end,accent_thin_end); + showpoints(1,2); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "x": "Hachek accent"; %******* 1 ACCENT WIDTH x 2/3 ACCENT DEPTH + beginchar(oct"024",accent_w*width#+b_mono#, + accent_height#+xheight#+2/3accent_depth#,0); + save theta,adjustment; + top lft z1=(0,h)//; + bot z2l=bot z22=(.5w,h-max(1,2/3accent_depth))//; + rt z3=(w,y1)//; + pos2(.6[accent_thin_end,accent_thick_end],90); + pos22(min(apex.lc,.5stem.lc),0-apex_angle); + if y2=y1: x1:=x1+eps; fi % keeps from division by 0 error on next line + if bold:theta1=theta3=0; adjustment=1/cosd (angle(z2-z1)+90); + else:theta1=angle(z1-z2)-90;theta3=angle(z3-z2)-90;adjustment=1; fi + pos1(accent_thin_end*adjustment,theta1); + pos3(accent_thin_end*adjustment,theta3); + onaline(1,2)(23); onaline(1l,22l)(21); + onaline(2,3)(21); onaline(22r,3r)(23); + + p1=if realsoft_accents: (z2r soften(z1r,z1l) z21{z21-z1l}... + z23{z3r-z23} soften(z3r,z3l) z2r)--cycle; + else: (z2r soften(z1r,z1l,z22l,z22r,z3r,z3l) z2r)--cycle; fi + + showpoints(1,2,3,21,22,23); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + +% Currently the angle of the accent is based on a varying "accent_depth" +% The thetas are the angles at the ends, flattened for bold chars, +% but theta could be an arbitrary value + + + +iff OK "x": "Breve accent"; %******* 1 ACCENT WIDTH x 2/3 ACCENT DEPTH + beginchar(oct"025",accent_w*width#+b_mono#, + accent_height#+xheight#+accent_depth#,0); + save theta,adjustment; + save_num(thickness)=.5[accent_thin_end,accent_thick_end]; + top lft z1l=(0,h)//; + bot z2l=(.5w,h-accent_depth)//; + rt z3r=(w,y1l)//; + pos2(thickness,90); + if y2l=y1l: x1l:=x1l+eps; fi % keeps from division by 0 error on next line + ref1=z1l...z2l{right}; ref2=z3r...z2l{right}; + if bold:theta1=theta3=0; adjustment=1/cosd (angle(direction 0 of ref1)+90); + else:adjustment=1; + theta1=angle(direction 0 of ref1)+90; + theta3=angle(direction 0 of ref2)-90;fi + pos1(thickness*adjustment,theta1); + pos3(thickness*adjustment,theta3); + save_pair(end_dir)=if abs(y1l-y2l)>abs(x1l-x2l):upward else:(0,0) fi; + + p1=(z2l{right}...z3r{end_dir} + if softpath:)softjoin(z3r--z3l)softjoin( else:-- fi + z3l{-end_dir}...z2r{left}...z1r{end_dir} + if softpath:)softjoin(z1r--z1l)softjoin( else:-- fi + z1l...z2l{right})--cycle; + + showpoints(1,2,3); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + +% Currently the angle of the accent is based on a varying "accent_depth" +% The thetas are the angles at the ends, flattened for bold chars, +% but theta could be an arbitrary value + + + +iff OK "x": "Macron accent"; %******* 1 ACCENT WIDTH x .5 ACCENT DEPTH + beginchar(oct"026",accent_w*width#+b_mono#, + accent_height#+xheight#+accent_depth#,0); + min_limit(join_radius)(.25[accent_thin_end,accent_thick_end]); + lft z1=(0,h-.5accent_depth)//; + rt z3=(w,y1)//; + multpos(1,3)(.5[accent_thin_end,accent_thick_end],90); + z2l=.5[z1l,z3l]; + + p1=(z2l soften(z3l,z3r,z1r,z1l) z2l)--cycle; + + showpoints(1,2,3); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "x": "Circle accent"; %******* 1 ACCENT WIDTH x ACCENT DEPTH + beginchar(oct"027",accent_w*width#+b_mono#, + accent_height#+xheight#+accent_depth#,0); + + save thickness; + thickness=min(.3[accent_thin_end,accent_thick_end],.3*accent_depth-1); + z0=(.5w,h-.5*max(2,accent_depth))//; + top z1r=(x0,h); pos1(thickness,90); + bot z3r=(x0,round(h-max(2,accent_depth))); pos3(thickness,-90); + lft z2r=(round(x0-.5(y1r-y3r)),.5[y1r,y3r]); pos2(thickness,180); + rt z4r=(round(x0+.5(y1r-y3r)),y2r); pos4(thickness,0); + + p1 =z1r{left} o_t z2r{downward} o_t z3r{right} o_t z4r{upward} o_t cycle; + p1'=z1l{left} i_t z2l{downward} i_t z3l{right} i_t z4l{upward} i_t cycle; + + showpoints(1,2,3,4); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "x": "Cedilla"; %******* 1 ACCENT WIDTH x .75 ACCENT DEPTH + beginchar(oct"030",accent_w*width#+b_mono#,0,descender#); + + bot lft z1l=(.35w,-min(.75accent_depth,d))//; + multpos(1,3)(max(.15accent_depth,accent_thin_end),90-oblique); + lft z4r=(.5w,0)//; pos4(.25accent_depth,80-oblique); + rt z5r=lft z4r+(.5[accent_thin_end,accent_thick_end],0); + z3l=z4l; pos5(accent_depth,80-oblique); + rt z2r=(w,.5[y1l,y3r])//; pos2(accent_thick_end,0); + ref1=z2r{upward}...z3{left}; + z20=ref1 intersectionpoint (z5r--z5l); + (t1,t2)=ref1 intersectiontimes (z5r--z5l); + + p1=(subpath(0,t1)of ref1--z5r--z4r--z4l if softpath:)softjoin(z4l fi + --z3l{right}...z2l{downward}...z1r{left} + if softpath:)softjoin(z1r--z1l)softjoin( else:-- fi + z1l{right}...z2r{upward})--cycle; + + showpoints(1,2,3,4,5); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "x": "The Double S Ligature or scharfes S"; + beginchar(oct"031",b_w*width#+d_mono#,ascender#,0); + + min_limit(join_radius)(.5*max(1,thin_stem.lc)); + lft z1l=(0,xheight)//; multpos(1,4)(stem.lc,0); + bot lft z4l=(0,0); y3l=y3r=x_bracket_h; + onaline(1l,4l)(2l,3l); y2l=max(xheight,.75xheight+(r_arch*(h-xheight))); + onaline(1r,4r)(2r,3r); y2r=max(xheight,.75xheight+(l_arch*(h-xheight))); + + top z10r=(.45w,h+ov_t.lc)//; pos10(minor_curve.lc,90); + z13l=(.3[x3r,w],.55h)//; multpos(11,12,13)(1[thin_stem.lc,stem.lc],0); + bot y16r=top y16l-minor_curve.lc=-ov_b.lc; + z17l=(.2[x3r,w],y16l)//; pos17(thin_stem.lc,-90); + y17r:=max(0,y17r); + rt z15r=(w,.4[y16r,y13r])//; multpos(14,15)(bowlstem.lc,0); + good_x_for(16l)(z17l,z15l,.4)a; good_x_for(16r)(z17r,z15r,.5)b; + good_x_for(11l)(z13l,z15l,.5)c; y11l=.5[y13r,y10r]; + z12=.5[z11,z13]; + z14=.5[z13,z15]; + + p1=(terminalserif.l(z4,z1,z3l,z3r,.5hs,0)soft--z2r{upward} i_t + z10l{right} i_t z11l{downward}...z12l... z13l{downward}...z14l... + z15l{downward} i_t z16l{left} i_t z17l + if softpath:)softjoin(z17l--z17r)softjoin( else:-- fi + z17r o_t z16r{right} o_t z15r{upward}...z14r...z13r{upward}...z12r... + z11r{upward} o_t z10r{left} o_t z2l{downward})--cycle; + p2=terminalserif.l(.5[z1l,z1],.5[z4l,z4],z3l,.5[z3l,z3r],.75hs, + x_terminal_angle)--cycle; + + min_limit(join_radius)(.5*max(1,.75minor_curve.lc)); + showpoints(1,2,3,4,10,11,12,13,14,15,16,17); +adjust(v_a*fitbasis.lc#+m_b*d_mfit#,v_g*fitbasis.lc#+m_bb*d_mfit#); +show_character; endchar; + + + +iff OK "x": "The ae ligature"; + beginchar(oct"032",ae_w*width#+f_mono#,xheight#,0); + + min_limit(join_radius)(.5*max(1,.75minor_curve.lc)); % "e" part + bot rt z1r= + (if narrow_condition:w else:.95w fi,round(.6h-.65*.8thin_stem.lc))//; + pos1(max(1,.85stem.lc),ebar_angle); + rt z3r=(round(if mono=0:a_w*width else:.5f_mono+.45stem.lc fi),.5h)//; + pos3(if narrow_condition:narrow_amt[thin_stem.lc,stem.lc] + else:max(1,.9stem.lc) fi,0); + rt z5l=(w,.15h)//; pos5(max(1,.75minor_curve.lc),130-oblique); + top y2l=bot y2r+major_curve.lc=h+ov_t.lc; + bot y4l=top y4r-minor_curve.lc=-ov_t.lc; + good_x_for(2l)(z3l,z1r,.6)a; good_x_for(2r)(z3r,z1l,.6)b; + good_x_for(4l)(z3l,z5l,.5)c; good_x_for(4r)(z3r,z5r,.5)d; + x4r:=min(x4r,x4l+minor_curve.lc); + onaline(1l,1r)(40); x40=x41=0; + z42=z1r+(max(1,.8thin_stem.lc),0)rotated(90+ebar_angle); + z42-z41=whatever*(z1r-z1l); + + lft z109=(if narrow_condition:0 else:.05w fi,.9h)//; % "a" part + rt z114r=(round(if mono=0:a_w*width else:.5f_mono+.45stem.lc fi),0); + lft z114l=(rt x114r-max(1,.9stem.lc),0); + z111r=(x114r,max(r_arch*h,y3r))//; pos111(max(1,.9stem.lc),0); + top y110r=bot y110l+arch_thickness.lc=h+ov_t.lc; + good_x_for(110r)(z109,z114r,min(.95,arch_reference+.1))e; + good_x_for(110l)(z109,z114l,arch_inner_amt)f; + x110l:=max(x110l,x110r-arch_thickness.lc); + onaline(111l,114l)(101l,101r); + y101r=y101l+max(1,minor_curve.lc)=.55h+.75minor_curve.lc; + lft z103l=(0,.35[-ov_b.lc,y101r])//; + rt z103r=(lft x103l+if narrow_condition:narrow_amt[thin_stem.lc,stem.lc] + else:max(1,bowlstem.lc) fi,max(.4[-ov_b.lc,y101r],major_curve.lc)); + y102=.75y101r; good_x_for(102)(z103l,z101r,.4)g; + % "e" part + ref1=z2r{right}..tension atleast .8 .. z1l{downward}; % inner right ref path + ref2=z5r i_t z4r{left} i_t z3r{upward} i_t z2r{right}; % inner left ref path + ref3=z1r--z40; % outer bar ref path + ref4=z41--z42; % inner bar ref path + ref5=z2l{left} o_t_c z3l{downward} o_t_c z4l{right}; + ref6=z4l{left} o_t_c z3l{upward}; + (t1,t2)=ref2 intersectiontimes ref3; z20=ref2 intersectionpoint ref3; + (t3,t4)=ref2 intersectiontimes ref4; z21=ref2 intersectionpoint ref4; + (t5,t6)=ref1 intersectiontimes ref4; z22=ref1 intersectionpoint ref4; + + ref101=z3r{upward}...z111r{upward} o_t_c + bulb.tl(z109,z110l,z110r,.75cs,.5bulb_thickness,90); + z105=(xpart point.5of ref6,ypart point.5of ref6+minor_bowl_tip.lc); + ref102=arch.bl(z105,-ov_b.lc,z103r,z103l)lc; + ref103=(0,y101l)--(w,y101l)//; + (t7,t8) =ref5 intersectiontimes ref101; + (t9,t10) =ref5 intersectiontimes ref103; + (t11,t12)=ref5 intersectiontimes reverse ref102; + (t13,t14)=ref6 intersectiontimes ref102; + + p1=(subpath(t8,infinity)of ref101 i_t z111l-- + z101r{z102-z101r}...z103l{downward}-- + subpath(0,t14)of ref102-- subpath(t13,0)of ref6 o_t_c z5l + if softpath:)softjoin(z5l--z5r)softjoin( else:-- fi + subpath(0,t1)of ref2--z20 if softpath:)softjoin(z20 fi + --z1r)softjoin(z1r{upward}..tension atleast .8 .. z2l{left}-- + subpath(0,t7)of ref5)--cycle; + p1'=subpath(0,t5)of ref1--z22-(eps,0)--z21+(eps,0)-- % eye of "e" + subpath(t3,infinity)of ref2--cycle; + p2'=subpath(0,t12)of reverse ref102-- % eye of "a" + subpath(t11-eps,t9+eps)of ref5{z102-z101r}...cycle; + + showpoints(1,2,3,4,5,20,21,22,40,41,42,101,102,103,105,106,109,110,111,114); +adjust(v_f*fitbasis.lc#+m_a*f_mfit#,v_f*fitbasis.lc#+m_a*f_mfit#); +show_character; endchar; + +% There's still an intersection problem with this, but it seems to work for now +% Based on the lowercase "a" and "e" + + + +iff OK "x": "The oe ligature"; + beginchar(oct"033",oe_w*width#+f_mono#,xheight#,0); + min_limit(join_radius)(.5*max(1,.75minor_curve.lc)); + + top y11r=h+ov_t.lc; bot y11l=top y11r-minor_curve.lc; % "o" part + bot y13r=-ov_b.lc; top y13l=bot y13r+minor_curve.lc; + lft z12r=(0,(1-v_stress)*h)//; + rt z12l=(lft x12r+bowlstem.lc,(1-v_stress)*h); + rt z14r=(if mono=0:oo_w*width else:.52f_mono+.45bowlstem.lc fi,.5h)//; + lft z14l=(round(x14r-if narrow_condition:narrow_amt[thin_stem.lc,bowlstem.lc] + else:max(1,.9bowlstem.lc) fi),.5h); + good_x_for(11r)(z12r,z14r,.53)a; good_x_for(11l)(z12l,z14l,.47)b; + good_x_for(13r)(z12r,z14r,.47)c; good_x_for(13l)(z12l,z14l,.53)d; + + p1 =z11r{left} o_t_c z12r{downward} o_t_c z13r{right} o_t_c + z14r{upward} o_t_c cycle; + p1'=z11l{left} i_t z12l{downward} i_t z13l{right} i_t z14l{upward} i_t cycle; + + bot rt z1r= % "e" part + (if narrow_condition:w else:.95w fi,round(.6h-.65*.8thin_stem.lc))//; + z3l=z14l; z3r=z14r; + pos1(if narrow_condition:w_narrow_amt[thin_stem.lc,stem.lc] + else:max(1,.85stem.lc) fi,ebar_angle); + rt z5l=(w,.15h)//; pos5(max(1,.75minor_curve.lc),130-oblique); + top y2l=bot y2r+major_curve.lc=h+ov_t.lc; + bot y4l=top y4r-minor_curve.lc=-ov_t.lc; + good_x_for(2l)(z3l,z1r,.6)e; good_x_for(2r)(z3r,z1l,.6)f; + good_x_for(4l)(z3l,z5l,.5)g; good_x_for(4r)(z3r,z5r,.5)h; + x4r:=min(x4r,x4l+minor_curve.lc); + onaline(1l,1r)(40); x40=x41=0; + z42=z1r+(max(1,.8thin_stem.lc),0)rotated(90+ebar_angle); + z42-z41=whatever*(z1r-z1l); + + ref1=z2r{right}..tension atleast .8 ..z1l{downward}; % inner right ref path + ref2=z5r i_t z4r{left} i_t z3r{upward} i_t z2r{right}; % inner left ref path + ref3=z1r--z40; % outer bar ref path + ref4=z41--z42; % inner bar ref path + z20=ref2 intersectionpoint ref3; (t1,t2)=ref2 intersectiontimes ref3; + z21=ref2 intersectionpoint ref4; (t3,t4)=ref2 intersectiontimes ref4; + z22=ref1 intersectionpoint ref4; (t5,t6)=ref1 intersectiontimes ref4; + + p2 =(z2l{left} o_t_c z3l{downward} o_t_c z4l{right} o_t_c z5l + if softpath:)softjoin(z5l--z5r)softjoin( else:-- fi + subpath(0,t1)of ref2--z20 if softpath:)softjoin(z20 fi + --z1r)softjoin(z1r{upward}..tension atleast .8 ..z2l{left})--cycle; + p2'=subpath(0,t5)of ref1--z22-(eps,0)--z21+(eps,0)-- % eye of "e" + subpath(t3,infinity)of ref2--cycle; + + showpoints(1,2,3,4,5,11,12,13,14,20,21,22,40,41,42); +adjust(v_c*fitbasis.lc#+m_a*f_mfit#,v_f*fitbasis.lc#+m_a*f_mfit#); +show_character; endchar; + +% This character is based on the "o" and the "e". The center curved stem +% has been decreased a bit and the center reference points are made to +% coincide and keep a constant height of .5h. The rightmost point of the +% "e" has been extended to w from .95w + + + + +iff OK "x": "The lowercase o with slash"; + beginchar(oct"034",oo_w*width#+d_mono#,xheight#,0); + + top z1=(h_stress*w,h+ov_t.uc)//; % circle + lft z2=(0,(1-v_stress)*h)//; + bot z3=((1-h_stress)*w,-ov_b.uc)//; + rt z4=(w,v_stress*h)//; + + circular_shape(y1,y3,x2,x4,minor_curve.lc,bowlstem.lc); % circle + + pickup slashpen rotated angle((.95w,h)//-(.05w,0)//); % slash + top rt z11=(.95w,1.1h)//; + bot lft z12=(.05w,-.1h)//; + draw z11--z12; + + showpoints(1,2,3,4,11,12); +adjust(v_c*fitbasis.lc#+m_a*d_mfit#,v_c*fitbasis.lc#+m_a*d_mfit#); +show_character; endchar; + +% This is just a lowercase "o" with a slash added +% Only y1/y3 and x2/x4 values actually used; the points are put in for proofs + + + +iff OK "x": "The AE ligature"; + beginchar(oct"035",AE_w*width#+f_mono#,cap#,0); + + save_bool(nonotch):=if(cap<40):true else:false fi; % if real low res + bot lft z14l=(2/3*A_w*width+.5f_mono,0); % E part + top z11l=(x14l,h)//; + multpos(11,14)(if narrow_condition:narrow_amt + else:1 fi[thin_stem.uc,stem.uc],0); + onaline(11l,14l)(13l,40,42,43); y13l=cap_bracket_h; + onaline(11r,14r)(1,4,4l,4r,6); y40=y2r-max(thin_stem.uc,.3stem.uc,1); + top y2r=h; + bot y1=bot y2l=top y2r-max(1,.95thin_stem.uc); + top rt z3=(if narrow_condition:w else:.95w fi,h)//; + bot y7l=0; + bot rt z8=(w,0); + top y6=top y7r=bot y7l+max(1,.97thin_stem.uc); + y4=.55h; + top y4r=bot y4l+max(1,.9thin_stem.uc)=top y5r=round(y4+.45thin_stem.uc); + good_x_for(2r)(z1,z3,.6)a; good_x_for(2l)(z1,z3,.6)b; + good_x_for(7r)(z6,z8,.6)c; good_x_for(7l)(z6,z8,.6)d; + good_x_for(5r)(z4,z3,.8)e; + + z21r=z40; % A part + bot lft z23l=(0,0); + multpos(21,23)(thin_stem.uc,constant_angle(z21r,z23l,thin_stem.uc)); + onaline(21l,23l)(22l); y41=y42=round(.33y21); y22l=cap_bracket_h; + onaline(21r,23r)(22r,41,44); y43=y44=y41+max(1,.7thin_stem.uc);% bar height + onaline(21,23)(20,24); top y20=h; y22r=min(y41,y22l); bot y24=0; + ref1=z43--z40--z44; + + p1=(arm.br(z8,z7r,z7l,.5as,.75tip_thickness,90-arm_angle)soft soften(z6,z4l) + arm.tr(z5r,z4l,z4r,.15as,.25tip_thickness,90) soften(z4r,z1) + arm.tr(z3,z2l,z2r,.4as,.75tip_thickness,90)soft... + leftserif(z20,z23,z22l,z23r,.1hs)-- + fullserif.l(z24,z21,z22l,z22r,.5hs,.5hs) soften(z41,z42) + leftserif(z14,z11,z13l,z11r,.1hs))..cycle; + p1'=upnotch(ref1,angle(z40-z43),notch_length.uc)etchright--cycle; + + showpoints(1,2,3,4,5,6,7,11,12,13,14,20,21,22,23,24,40,41,42,43,44); +adjust(v_I*fitbasis.uc#+m_a*f_mfit#,v_F*fitbasis.uc#+m_a*f_mfit#); +show_character; endchar; + +% Based on the E and the left stem of the A; shortened serif on E + + + +iff OK "x": "The OE ligature"; + beginchar(oct"036",OE_w*width#+f_mono#,cap#,0); + + if singlepitch:save circ; circ1=circ2=circ3=.75; fi + rt z14r=(round(if mono=0:O_w*width else:.55f_mono+.5stem.lc fi),0)//; + top z11l=(x14l,h)//; % E part + multpos(11,14)(if narrow_condition:.9%********narrow_amt + else:1 fi[thin_stem.uc,stem.uc],0); + onaline(11l,14l)(12l,13l,24l,25l); y13l=cap_bracket_h; + onaline(11r,14r)(1,4,4l,4r,6,24r,25r); y12l=max(h-cap_bracket_h,y13l); + top y2r=h; y24l=y24r=.35h; y25l=y25r=h-y24l; + bot y1=bot y2l=top y2r-max(1,.95thin_stem.uc); + top rt z3=(if narrow_condition:w else:.95w fi,h)//; + bot y7l=0; + bot rt z8=(w,0); + top y6=top y7r=bot y7l+max(1,.97thin_stem.uc); + y4=.55h; + top y4r=bot y4l+max(1,.9thin_stem.uc)=top y5r=round(y4+.45thin_stem.uc); + good_x_for(2r)(z1,z3,.6)a; good_x_for(2l)(z1,z3,.6)b; + good_x_for(7r)(z6,z8,.6)c; good_x_for(7l)(z6,z8,.6)d; + good_x_for(5r)(z4,z3,.8)e; + + top y21r=bot y21l+minor_curve.uc=h; % O part + bot y23r=top y23l-minor_curve.uc=0; + lft z22r=(0,(1-v_stress)*h)//; + rt z22l=(lft x22r+bowlstem.uc,(1-v_stress)*h); + + good_x_for(21r)(z22r,z24r,h_stress)f;good_x_for(21l)(z22l,z24l,(1-h_stress))g; + good_x_for(23r)(z22r,z24r,(1-h_stress))h;good_x_for(23l)(z22l,z24l,h_stress)i; + + p1=(leftserif(z14,z11,z13l,z11r,eps).. + arm.br(z8,z7r,z7l,.5as,.75tip_thickness,90-arm_angle)soft soften(z6,z4l) + arm.tr(z5r,z4l,z4r,.15as,.25tip_thickness,90) soften(z4r,z1) + arm.tr(z3,z2l,z2r,.4as,.75tip_thickness,90)soft... + leftserif(z11,z14,z12l,z14r,eps))--cycle; + p2 =z21r{left} o_t z22r{downward} o_t z23r{right} o_t z24r{upward} o_t + z25r{upward} o_t cycle; + p2'=z21l{left} i_t z22l{downward} i_t z23l{right} i_t z24l{upward} i_t + z25l{upward} i_t cycle; + + showpoints(1,2,3,4,5,6,7,11,12,13,14,21,22,23,24,25); +adjust(v_C*fitbasis.uc#+m_a*f_mfit#,v_F*fitbasis.uc#+m_a*f_mfit#); +show_character; endchar; + +% Takes the O and E and overlaps them; thins right curve of the O; +% shortens the serifs on the E + + + + +iff OK "x": "The uppercase O with slash"; + beginchar(oct"037",O_w*width#+d_mono#,cap#,0); + + if singlepitch:save circ; circ1=circ2=circ3=.75; fi + top z1=(h_stress*w,h+ov_t.uc)//; % circle + lft z2=(0,(1-v_stress)*h)//; + bot z3=((1-h_stress)*w,-ov_b.uc)//; + rt z4=(w,v_stress*h)//; + + circular_shape(y1,y3,x2,x4,minor_curve.uc,bowlstem.uc); % circle + + pickup slashpen rotated angle((.95w,h)//-(.05w,0)//); % slash + top rt z11=(.95w,1.1h)//; + bot lft z12=(.05w,-.1h)//; + draw z11--z12; + + showpoints(1,2,3,4,11,12); +adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_C*fitbasis.uc#+m_a*d_mfit#); +show_character; endchar; + +% This is just an uppercase "O" with a slash added +% Only y1/y3 and x2/x4 values actually used; the points are put in for proofs + + + +iff OK "x": "Circumflex accent"; %******* 1 ACCENT WIDTH x 2/3 ACCENT DEPTH + beginchar(oct"136",accent_w*width#+b_mono#, + accent_height#+xheight#+2/3accent_depth#,0); + + save theta,adjustment; + bot lft z1=(0,h-max(1,2/3accent_depth))//; + top z2l=top z22=(.5w,h)//; + rt z3=(w,y1)//; + pos2(.6[accent_thin_end,accent_thick_end],-90); + pos22(min(apex.lc,.5stem.lc),0-apex_angle); + if y2=y1: x1:=x1+eps; fi % keeps from division by 0 error on next line + if bold:theta1=theta3=180; adjustment=1/cosd (angle(z2-z1)+90); + else:theta1=angle(z1-z2)+90;theta3=angle(z3-z2)+90; adjustment=1; fi + pos1(accent_thin_end*adjustment,theta1); + pos3(accent_thin_end*adjustment,theta3); + onaline(1,2)(23); onaline(1l,22l)(21); + onaline(2,3)(21); onaline(22r,3r)(23); + + p1=if realsoft_accents: (z2r soften(z1r,z1l) z21{z21-z1l}... + z23{z3r-z23} soften(z3r,z3l) z2r)--cycle; + else: (z2r soften(z1r,z1l,z22l,z22r,z3r,z3l) z2r)--cycle; fi + + showpoints(1,2,3,21,22,23); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + +% Currently the angle of the accent is based on a varying "accent_depth" +% The thetas are the angles at the ends, flattened for bold chars, +% but theta could be an arbitrary value + + + +iff OK "~": "Tilde accent"; %******* 1 ACCENT WIDTH x .75 ACCENT DEPTH + beginchar(oct"176",accent_w*width#+b_mono#, + accent_height#+xheight#+.75accent_depth#,0); + + save_pairs(end_dir); + top z2r=(.22w,h)//; + bot z4l=(.78w,h-.75accent_depth)//; + multpos(2,4)(.75[accent_thin_end,accent_thick_end],90-oblique); + pos3(.75[accent_thin_end,accent_thick_end],85-oblique); + % controls mid-width if angle<>90 + z3=.5[z2,z4]; + lft z1r=(0,y4l)//; + rt z5l=(w,y2r)//; + end_dir1=if abs(y2r-y1r)>abs(x2r-x1r):upward else:(0,0) fi; + end_dir2=if abs(y5l-y4l)>abs(x5l-x4l):upward else:(0,0) fi; + ref1=z1r{end_dir1}...z2r{right}; + ref2=z4l{right}...z5l{end_dir2}; + pos1(accent_thin_end,(angle direction 0 of ref1)+90); + pos5(accent_thin_end,(angle direction 1 of ref2)+90); + + p1=(z2l{right}...z3l...z4l{right}...z5l{end_dir2} + if softpath:)softjoin(z5l--z5r)softjoin( else:-- fi z5r{-end_dir2} + ...z4r{left}...z3r...z2r{left}...z1r{-end_dir1} + if softpath:)softjoin(z1r--z1l)softjoin( else:-- fi z1l{end_dir1} + ...z2l{right})--cycle; + + showpoints(1,2,3,4,5); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + + +iff OK "x": "Umlaut (German) or double dot accent"; + beginchar(oct"177",accent_w*width#+b_mono#, + accent_height#+xheight#+2/3accent_depth#,0); + + save_num(dot_size)=min(accent_dot_diameter,.5w-1); + lft z1=(0,h-.5dot_size)//; + rt z2=(w,h-.5dot_size)//; + p1=dot.l(z1,dot_size); + p2=dot.r(z2,dot_size); + showpoints(1,2); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + +% no slant of shape with obliqueness + + diff --git a/fonts/pandora/pandor.mf b/fonts/pandora/pandor.mf new file mode 100644 index 0000000000..51837b21bf --- /dev/null +++ b/fonts/pandora/pandor.mf @@ -0,0 +1,770 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% pandor.mf a base file which contains the macros used for creating Pandora + + +%*****MAJOR CHARACTER PART MACROS************************************** + + +boolean its_a_leftserif; % in horizontal serif macro + +vardef full_serif_points@#(expr A,B,Bl,Br,leftlength,rightlength)= + min_limit(join_radius)(.5serif_thickness); + (z1-B)=whatever*(A@#-B@#); % makes center ref line + (z1l-Bl)=whatever*(A@#-B@#); % makes parallel ref line on left + (z1r-Br)=whatever*(A@#-B@#); % makes parallel ref line on right + + y2=y2l=y2r=ypart A; % base of serif + y1=y1l=y1r=y3=y4=ypart A if ypart A>ypart B:-else:+fi serif_thickness; + % puts serif_thickness between A and B + x5=x2=.5[x1l,x1r]; % puts entasis at mid-base and makes it + y5=entasis[y2l,y1l]; % a proportion of the serif_thickness + + if its_a_leftserif:x3=x2l=x1l-round(leftlength+serif_constant_amt); + else:x4=x2r=x1r+round(rightlength+serif_constant_amt); fi +enddef; + +vardef leftserif@#(expr A,B,Bl,Br,alength)=its_a_leftserif:=true; % left serif + save x,y,p; path p[]; + full_serif_points@#(A,B,Bl,Br,alength,0); + p0:=Bl{z1l-Bl} if ctrls:..controls(onstem[z1l,Bl])and(onbase[z1l,z3]).. + else:...fi {z3-z1l}z3; % the bracket curve + if midbracket_pull<>0: + z3'l=z1l; pos3'(alength+5pt,.5[angle(B-A),if ypart A>ypart B:-fi 180]); + z8'=p0 intersectionpoint (z3'l--z3'r); % z3'l--z3'r bisects bracket + z8=(midbracket_pull-eps)[z8',z1l];fi % bracket pulled in at z8 + if ypart A>ypart B:reverse fi + ((if midbracket_pull=0:p0 else:Bl{z1l-Bl}...z8...{z3-z1l}z3 fi + if softpath:)softjoin(z3--z2l)softjoin(else:--fi z2l..z5{right})) +enddef; + +vardef rightserif@#(expr A,B,Bl,Br,alength)=its_a_leftserif:=false;% right serif + save x,y,p; path p[]; + full_serif_points@#(A,B,Bl,Br,0,alength); + p4:=z4{z1r-z4} if ctrls:..controls(onbase[z1r,z4])and(onstem[z1r,Br]).. + else:...fi {Br-z1r}Br; % the bracket curve + if midbracket_pull<>0: + z4'l=z1r; pos4'(alength+5pt,.5[angle(B-A),0]); + z9'=p4 intersectionpoint (z4'l--z4'r); % z4'l--z4'r bisects bracket + z9=(midbracket_pull-eps)[z9',z1r];fi % bracket pulled in at z9 + if ypart A>ypart B:reverse fi + ((z5{right}..z2r if softpath:)softjoin(z2r--z4)softjoin(else:--fi + if midbracket_pull=0:p4 else:z4{z1r-z4}...z9...{Br-z1r}Br fi)) +enddef; + +vardef fullserif@#(expr A,B,Bl,Br,leftlength,rightlength)= % full serif + save x,y,p; path p[]; + p1=rightserif(A,B,Bl,Br,rightlength); p2=leftserif(A,B,Bl,Br,leftlength); + if ypart A>ypart B:(p1--p2)else:(p2--p1)fi +enddef; + + + +vardef terminalserif@#(expr A,B,Bl,Br,tip_length,base_angle)suffix$= + + save x,y,join_radius,aleft,atop,arc,ball,heel,midbracket_point,tip,p; + boolean aleft,atop; pair arc,ball,heel,midbracket_point,tip; path p[]; + aleft=(str@#="l"); atop=(ypart A>ypart B); + + heel- if aleft:Br else:Bl fi =whatever*(A-B); + heel=A+(whatever,0)rotated(if not aleft:180+ fi base_angle); + ball- if aleft:Bl else:Br fi =whatever*(A-B); ball=whatever[heel,A]; + + z0=A if atop:-else:+fi(0,terminal_thickness) rotated base_angle; + % z0 added for cases of small terminal_thickness and length + z2=whatever[ball,if aleft:Bl else:Br fi]; (z0-z2)=whatever*(ball-A); + % terminal_thickness and stem intersection when no bracket + z1=z2+(tip_length+serif_constant_amt,0)rotated angle(ball-A); + % z1 is an inner tip point + tip=whatever[heel,ball]; z1-tip=whatever*(z0-A); + % places tip on base by an amount past the stem + z3=heel if str$="soft":+(terminal_softness+1,0)rotated angle(tip-heel)fi; + arc=.5[z3,tip]+(terminal_entasis*terminal_thickness,0)rotated angle(B-A); + + if aleft:z5=Bl; z6=Br; else:z5=Br; z6=Bl;fi + p1=z5{ball-z5} if ctrls: + ..controls(onstem[z2,z5])and(onbase[z2,(-eps)[z1,tip]]).. + else:...fi {z1-z2}(-eps)[z1,tip]--z1; + join_radius:=min(terminal_softness,abs(heel-z3),.5abs(heel-z6)); + p2=(arc{heel-tip}...z3{heel-tip}...{heel-tip}heel + if str$="soft":)softjoin(heel fi --z6); + min_limit(join_radius)(.5terminal_thickness); + + if midbracket_pull<>0: + bisecting_angle:=if aleft and(sign(angle(B-A))<>sign(angle(ball-A))): + 180+fi .5[angle(B-A),angle(ball-A)]; + % this angle bisects the inner angle/area of the bracket + z4=z2+(tip_length+5pt+serif_constant_amt,0)rotated bisecting_angle; + % sets point z4 for a reference path along bisecting angle + midbracket_point=(z2--z4)intersectionpoint p1; + % midbracket_point intersects the reference path along the + % bisecting angle and the reference path of the bracket + z9=(midbracket_pull-eps)[midbracket_point,z2]; + % the final path goes through z9, which gives the amount of + % "pull" toward the point where the stem meets the terminal + fi % base with no bracketing + + if atop=aleft:reverse fi + ((if midbracket_pull=0:p1 + else:z5{ball-z5}...z9...{z1-z2}(-eps)[z1,z2]--z1 fi + if softpath:)softjoin(z1--tip)softjoin(else:--fi + tip..arc{heel-tip}--p2)) +enddef; + + +vardef arm@# % uses @#strings of tl,tr,bl,br + (expr heel,inner_ref,outer_ref,tip_length,tipthickness,base_angle)suffix$= + + save x,y,innertip,outertip,toward,control_point,tip_direction,midbase,section; + pair innertip,outertip,toward,control_point,tip_direction,midbase; + path section[]; % separate parts of path for different join_radii + save_bool(atop)=((str@#="tr")or(str@#="tl")); + save_bool(curvedarm)=(atop and (ypart outer_ref>ypart heel)) or + ((not atop) and (ypart outer_ref<ypart heel)); + + toward=(xpart heel-xpart outer_ref,0); % direction going toward the heel + tip_direction=dir(base_angle if atop:+180 fi-oblique); + z0=whatever[heel,heel+eps*tip_direction]; y0=ypart inner_ref; + outertip=if not curvedarm:z0+(tip_length,0) + else:heel+(max(tip_length,abs(z0-heel)),0) fi rotated angle tip_direction; + midbase=.5[outertip,heel]; + innertip=outertip+tipthickness* + dir(base_angle+if((str@#="tl")or(str@#="bl")):- else:+fi 90-oblique); + control_point-innertip=whatever*(heel-outertip); + control_point=whatever[inner_ref,z0]; + save_num(join_radius)= + min(.5abs(outertip-heel),abs(heel-outer_ref),arm_softness); + section1=(midbase--heel)softjoin(heel...outer_ref{-toward}); + section2= + (inner_ref{toward} + if curvedarm:... + if abs(innertip-control_point)>abs(inner_ref-control_point): + if atop:{downward} else:{upward} fi fi + else:..controls(onstem[control_point,inner_ref])and + (onbase[control_point,innertip])..{outertip-heel} fi + innertip if softpath:)softjoin(innertip--outertip)softjoin( else:--fi + outertip--midbase); + + if ((str@#="tl")or(str@#="br")):reverse fi (section2--section1) +enddef; + +vardef bulb@# % like arm + (expr heel,inner_ref,outer_ref,tip_length,tipthickness,base_angle)suffix$= + save x,y,athickness,alength,bulb_taper_angle; z0=heel; + if bulbs: save_bool(softpath)=true; fi + if bulb_taper:athickness=1; bulb_thickness:=athickness; + bulb_taper_angle=base_angle + if((str@#="tr")or(str@#="bl")):-else:+fi taper_angle; + alength=if (c_and_s.lc<>0)or(c_and_s.uc<>0):max else:min fi + (abs(ypart outer_ref-ypart inner_ref),tip_length); + else:athickness=tipthickness;alength=tip_length;bulb_taper_angle=base_angle;fi + arm@#(z0,inner_ref,outer_ref,alength,athickness,bulb_taper_angle)$ +enddef; + + +vardef shortarm@#(expr AA,BB,CC,D,E,F)suffix$= % short form inspired by DEK + save x,y,GG,HH,II,JJ,KK,LL,M; pair GG,HH,II,JJ,KK,LL; path M[]; + save_bool(N)=((str@#="tr")or(str@#="tl")); + save_bool(O)=(N and(ypart CC>ypart AA))or((not N)and(ypart CC<ypart AA)); + II=(xpart AA-xpart CC,0); % direction going II the AA + KK=dir(F if N:+180 fi-oblique); + z0=whatever[AA,AA+eps*KK]; y0=ypart BB; + HH=if not O:z0+(D,0)else:AA+(max(D,abs(z0-AA)),0)rotated angle KK; + LL=.5[HH,AA]; + GG=HH+E*dir(F+if((str@#="tl")or(str@#="bl")):- else:+fi 90-oblique); + JJ-GG=whatever*(AA-HH); JJ=whatever[BB,z0]; + join_radius:=min(.5abs(HH-AA),abs(AA-CC),arm_softness); + M1=(LL--AA)softjoin(AA...CC{-II}); + min_limit(join_radius)(.5E); + M2=(BB{II} if O:...if abs(GG-JJ)>abs(BB-JJ):if N:{downward}else:{upward} fi fi + else:..controls(onstem[JJ,BB])and(onbase[JJ,GG])..{HH-AA} fi + GG if softpath:)softjoin(GG--HH)softjoin( else:-- fi HH--LL); + if ((str@#="tl")or(str@#="br")):reverse fi (M2--M1) +enddef; + + + + +% limiting directions for the joining point of the arch to the assumed stem + +vardef archlimit@#(expr p)= % limits dir at point 1 of path upward or downward + save a,b; pair b; b=(direction 1 of p); a=angle(b)+oblique; + if (tr and((a<-180)or(-90<a)))or(tl and((a<-90)or(0<a))):downward + elseif (bl and((a<0)or(90<a)))or(br and((a<90)or(180<a))):upward + else: b fi + enddef; +vardef neg_archlimit@#(expr p)=dir(180+angle(archlimit@#(p))) enddef; + +vardef arch@#(expr inner_tip_pt,yy,inner_stem_pt,outer_stem_pt)suffix$= + save x,y,tl,bl,tr,br,pp; boolean tl,bl,tr,br; path pp[]; + tl=(str@#="tl"); tr=(str@#="tr"); bl=(str@#="bl"); br=(str@#="br"); + save_bool(ontop)=tl or tr; + save_pair(stem_dir)=if ontop:upward else:downward fi; % joining dir at stem + save_pair(toward)=(xpart(inner_tip_pt-inner_stem_pt),0); % dir right or left + pickup pencircle scaled minimum_linethickness; + + y0r=yy; % connects extreme y-value + pos0(arch_thickness$,if ontop:+ else:-fi 90); % to reference pts + good_x_for(0)(inner_tip_pt,inner_stem_pt,arch_reference)a; + z1l=inner_tip_pt; % placement of the "tip" of + pos1(arch_tip$,if ontop:+ else:-fi90-oblique);% the arch + y2l=y0l; y2r=y0r; % z2l/z2r are actual arch points + good_x_for(2l)(inner_tip_pt,z0l,arch_inner_amt)b; + if abs(x0l-x2l)>.5*arch_thickness$:x2l:=x0l + if tl or bl:+else:-fi .5*arch_thickness$;fi + onaline(0,2l)(2r); + onaline(1l,1r)(11); y11=if ontop:min else:max fi (.75[y0l,y0r],y1r); + if (tr or br):rt else:lft fi z10=.5[inner_tip_pt,z11]; + + pp0=z0r{toward}...z1r; % ref paths for direction limits + pp1=z0l{toward}...z1l; + pp2=z0{toward}...z1; + pp3=outer_stem_pt{stem_dir} o_t z2r{toward}...z11{archlimit@#(pp0)}-- + inner_tip_pt{neg_archlimit@#(pp1)}...z2l{-toward} o_t + inner_stem_pt{-stem_dir}; + if ensure_min_archthickness: % path ensures min thickness + for n:=1,2:draw z0{toward}...z10{archlimit@#(pp2)};endfor fi + + if (tr or br)<>ontop:reverse fi pp3 +enddef; + + + +vardef outer_juncture_path@#(expr arch_path,stem_path,atime)= % for tr_bl + save x,y,t,tl,bl,tr,br,atop,aleft,pp,angle_limit; + boolean tl,bl,tr,br,atop,aleft; path pp[]; + tl=(str@#="tl"); tr=(str@#="tr"); bl=(str@#="bl"); br=(str@#="br"); + atop=tl or tr; aleft=tl or bl; + if softjuncture=false:save join_radius; join_radius:=eps;fi + + z10=point atime of arch_path; + z11=point (atime-1) of arch_path; + z12=z10+(eps,0)rotated angle(z10-precontrol atime of arch_path); + pp1=subpath (0,atime) of arch_path--z12; + z1=pp1 intersectionpoint stem_path; + (t1,t2)=pp1 intersectiontimes stem_path; + z2=z1+(juncture_opening,0)rotated(if aleft:180 else:0 fi-oblique); + angle_limit1=max(if atop:0,else:-179,-fi 90-oblique-stemcut_angle); + z3=z2 if juncture_opening>0:+(abs(z11-z10)+2,0)rotated angle_limit1 fi; + z4=(z2--z3) intersectionpoint reverse stem_path; + (t3,t4)=(z2--z3) intersectiontimes reverse stem_path; + (t5,t6)=z4 intersectiontimes stem_path; + + if archcut_angle<>0: + angle_limit2=if tl or br:max else:min fi + (angle(z11-z10),angle(precontrol atime of arch_path-z10)-archcut_angle); + z5=z1+(abs(z11-z10)+2,0)rotated angle_limit2; + z6=(z5--z1) intersectionpoint pp1; + (t7,t8)=(z5--z1) intersectiontimes pp1; + (subpath(0,t8)of arch_path soften(z6,z1,z2,z4) % indent into arch + else:(subpath(0,t1)of arch_path soften(z1,z2,z4) % indent into stem + fi (subpath(t4,0)of reverse stem_path)) +enddef; + + +% Only used in the lower case characters + +vardef bowl@#(expr major_tip,yy,minor_tip,yyy,inner_bowl,outer_bowl)= + save arch_thickness,arch_tip,arch_reference,arch_inner_amt; + save major,minor; path major,minor; + arch_thickness.lc:= minor_curve.lc; + arch_tip.lc:= minor_bowl_tip.lc; + arch_reference:= minor_bowl_reference; + arch_inner_amt:= minor_bowl_inner_amt; + minor=arch if str@#="r":br else:tl fi(minor_tip,yyy,inner_bowl,outer_bowl)lc; + arch_thickness.lc:= major_curve.lc; + arch_tip.lc:= major_bowl_tip.lc; + arch_reference:= major_bowl_reference; + arch_inner_amt:= major_bowl_inner_amt; + major=arch if str@#="r":tr else:bl fi (major_tip,yy,inner_bowl,outer_bowl)lc; + major--minor +enddef; + +vardef bowl_counter(expr bowlpath)= % returns the counter of a bowl path + save x,y; + z1=point 3 of bowlpath; z2=point 8 of bowlpath; z3=.5[z1,z2]; + min_limit(join_radius)(.5*abs(z1-z2)); + if softpath:(z3--z1)softjoin(z1--subpath(3,8)of bowlpath--z2)softjoin(z2--z3) + else:subpath(3,8)of bowlpath + fi +enddef; +vardef outer_bowlpath(expr p)=subpath(9,11)of p--subpath(0,2)of p enddef; + % return the major and minor outer paths of a bowl + + +vardef circular_shape(expr ytop,ybot,xleft,xright,topstroke,sidestroke)= + save x,y,amt,ref; path ref[],ref[]'; + top y1r=ytop; bot y1l=top y1r-topstroke; + bot y3r=ybot; top y3l=bot y3r+topstroke; + lft z2r=(xleft,(1-v_stress)*h); rt z2l=(lft x2r+sidestroke,(1-v_stress)*h); + rt z4r=(xright,v_stress*h); lft z4l=(rt x4r-sidestroke,v_stress*h); + good_x_for(1r)(z2r,z4r,h_stress)a; good_x_for(1l)(z2l,z4l,(1-h_stress))b; + good_x_for(3r)(z2r,z4r,(1-h_stress))c; good_x_for(3l)(z2l,z4l,h_stress)d; + z1=.5[z1l,z1r]; amt1=.5*abs(y1r-y1l); + z3=.5[z3l,z3r]; amt3=.5*abs(y3r-y3l); + x1r:=inlimit(x1r)(x1-amt1,x1+amt1); x1l:=inlimit(x1l)(x1-amt1,x1+amt1); + x3r:=inlimit(x3r)(x3-amt3,x3+amt3); x3l:=inlimit(x3l)(x3-amt3,x3+amt3); + ref1=z1r{left} o_t_c z2r{downward} o_t_c z3r{right} o_t_c + z4r{upward} o_t_c cycle; + ref1'=z1l{left} i_t z2l{downward} i_t z3l{right} i_t z4l{upward} i_t cycle; + + if mode<>proof:fill ref1; unfill ref1'; + else:pickup pencircle; draw ref1; draw ref1'; fi +enddef; + +def o_t=..tension atleast circ1.. enddef; % outer curve tensions +def i_t=..tension atleast circ2.. enddef; % inner curve tensions +def o_t_c=..tension atleast circ3.. enddef; % outer circular_shape tensions + + +%***** SOME ACCENT AND PUNCTUATION CHARACTER PART MACROS ***************** +%***** +% The dot macro specifies a round path of diameter <size> to be placed from +% a reference point. +% Note that this dot does not slant with any obliqueness. +% tension given the same as that for the circular shapes, since the actual +% "roundness" of the dot isn't very important; more important is that there +% is a mark there for distinguishing the character. +% Used mostly in punctuation and accent characters + +vardef dot@#(expr ref_pt,size)= + save x,y; + if str@#="b":z1l=ref_pt; % dot placed above reference point + elseif str@#="t":z1r=ref_pt; % dot placed below reference point + elseif str@#="l":z2l=ref_pt; % dot placed to right of reference point + elseif str@#="r":z2r=ref_pt; % dot placed to left of reference point + else:z1=ref_pt; fi % reference point is in center of dot + z2=z1; pos1(size,90); pos2(size,0); + z1r{left} o_t z2l{down} o_t z1l{right} o_t z2r{up} o_t cycle +enddef; + + +%***** + +% The prime_accent macro makes a four-sided polygon. +% It assumes that the top end is as thick or thicker than the bottom +% end and rounds the thicker end. +% Theta is the angle at the ends; flattened in bold chars, +% but theta could be an arbitrary value. +% Used in grave/acute/long Hungarian accents + +vardef prime_accent(expr top_pt,bot_pt,top_thickness,bot_thickness)= + save x,y,theta,adjustment; + z1=top_pt; z3=bot_pt; + if y3=y1: x1:=x1+eps; fi % keeps from division by 0 error on next line + if bold:theta=0;adjustment=1/cosd (angle(z3-z1)+90); + else:theta=angle(z3-z1)+90; adjustment=1;fi + pos1(top_thickness*adjustment,theta); + pos3(bot_thickness*adjustment,theta); + z2r=z1r+(min(.5top_thickness,.5*abs(z3-z1)),0)rotated angle(z3r-z1r); + z2l=z1l+(min(.5top_thickness,.5*abs(z3-z1)),0)rotated angle(z3l-z1l); + onaline(1l,3l)(6l,7l); + onaline(1r,3r)(6r,7r); + if x1>x3:y6l=y1r; y7r=y3l; else:y6r=y1l; y7l=y3r; fi + if realsoft_accents: + (z2r{z1r-z3r}...z1{z1l-z1r}...z2l{z3l-z1l} soften(z3l,z3r) z2r)--cycle + elseif x1>x3:z6l--z3l--z7r--z1r--cycle + else:z1l--z7l--z3r--z6r--cycle fi +enddef; + +%***** + +% The comma macro makes a dot-like figure with a tail. +% The reference point is placed in the center of the <head> or <dot part>. +% The <size> is the diameter of the <head>. +% The tail extends past the head by <tail_length>. +% The thickness at the tip of the tail is <tail_tip>. +% The <tail_placement> positions the tail_tip in relation to the head. +% And the <comma_dot_indent> affects the transition from tail_tip to head. +% Used in comma/semi-colon/left and right, single and double quotes + +vardef comma(expr pt,size,tail_length,tail_tip,tail_placement)= + save x,y,ref; path ref; + save_num(tail)=if prime:.5 else:tail_placement fi; + z1=z2=pt; pos1(size,90-oblique); pos2(size,0-oblique); + good_x_for(3)(z2l,z2r,comma_dot_indent)a; y3=y1l; + z4=(tail[x2l,x2r],y1l-tail_length) rotatedaround (pt,-oblique); + ref=pt{downward}...z4; + pos4(tail_tip,angle(direction 1 of ref)+90); + + if prime:z1r{left} o_t {downward}z2l--z4l--z4r--z2r{upward}...cycle + else:z1r{left} o_t z2l{downward} o_t z3...z4l{direction 1 of ref}-- + z4r{-direction 1 of ref}...z2r{upward}...cycle fi +enddef; + +% ***** + +% The arrowhead macro makes an arrowhead which is then rotated around its tip +% point to the desired direction. +% It points when @#=t:up,@#=b:down,@#=r:right,@#=l:left. +% The head_width is the widest (horizontal) span of the arrowhead. +% The head_depth is the perpendicular distance from the tip to widest part + +vardef arrow@#(expr tip,head_width,head_depth)= + save x,y,p; path p[]; + z1=tip; + y2=y3=y1+head_depth; + round x1=x2+.5head_width=x3-.5head_width; + z4=(x2,y1-1.5head_depth); + z5=(x3,y4); + penpos1(head_thickness,90); + penpos2(head_thickness,angle(z2-z1)-90); + penpos3(head_thickness,angle(z3-z1)+90); + p1=z1l--z2l--z2r--z1r--z1r-(eps,0)--z3r--z3l--z1l-(eps,0)--cycle; + p2=z1l--z2l--z4--z5--z3l--z1l--cycle; + save_num(turn)=if str@#="b":0-oblique elseif str@#="r":90 + elseif str@#="t":180-oblique elseif str@#="l":270 fi; + fill p1 rotatedaround (tip,turn); unfill p2 rotatedaround (tip,turn); +enddef; + + +%*** SHOW_CHARACTER macros *********************************************** + +% These macros show the characters for different stages of development. +% <fill_all> fill p[1-4] unfill p'[1-4] +% <draw_outlines> draw p[1-4] draw p'[1-4] +% <outline_and_fill> does <draw_outlines> and <fill_all> shifted +% <draw_with_reference_paths> does <draw_outlines> and draw ref[1-6] +% <openit> fixes size of terminalscreen window (altered from plain.mf) +% <makebox> makes a reference box for screen/proof chars (altered from plain.mf) +% <showpoints> shows point positions on screen while working on char + +def fill_all= + for n=1 upto 6:if known p[n]:fill p[n];fi if known p[n]':unfill p[n]';fi + endfor enddef; +def draw_outlines= pickup pencircle; + for n=1 upto 6:if known p[n]:draw p[n];fi if known p[n]':draw p[n]';fi endfor + enddef; +def outline_and_fill= pickup pencircle; + for n=1 upto 6: + if known p[n]: draw p[n]; fill p[n] shifted (0,-(h+d+100)); fi + if known p[n]':draw p[n]'; unfill p[n]' shifted (0,-(h+d+100)); fi + endfor enddef; +def draw_with_reference_paths= + draw_outlines; + pickup pencircle scaled .15pt; + for=1 upto 6:if known p[n]: draw ref[n]; fi endfor + enddef; + +def openit = openwindow currentwindow % fixes size of terminalscreen window + from (0,0) to (1.5screen_rows,screen_cols) at (-100,300) enddef; + +def makebox(text rule)= % makes a reference box for screen and proof characters + for y=0,h.o_,-d.o_: rule((l,y),(r,y)); endfor % horizontals + for x=l,r: rule((x,-d.o_),(x,h.o_)); endfor % outer verticals + for x=0,wsaved: rule((x,0),(x,.2h.o_)); endfor % inner verticals + if charic<>0: rule((wsaved+charic*hppp,h.o_),(wsaved+charic*hppp,.5h.o_));fi +enddef; + +def showpoints(text t)= % Shows point positions on screen while working on char + if mode=proof:pickup pencircle scaled 3; + forsuffixes $:=t:forsuffixes s:=l,,r:if known z$.s:draw z$s;fi endfor endfor + pickup pencircle scaled 1; penlabels(t); fi +enddef; + + +%*****EXTRA*********************************************************** + + +%*****VARIATIONS on some PLAIN.MF macros + +%***** +% This allows a selection of chars to be tested, w/o losing memory to defs +% An extra line [iff OK "<character>":] must be added before each char + +let semi_ = ;; let colon_ = :; let endchar_ = endchar; +def iff expr b = if b:let next_=use_it else:let next_=lose_it fi; next_ enddef; +def use_it = let : = restore_colon; enddef; +def restore_colon = let : = colon_; enddef; +def lose_it = let endchar=fi; let ;=restore_endchar semi_ if false enddef; +def restore_endchar=let ;=semi_; let endchar=endchar_; enddef; +def always_iff expr b = use_it enddef; +boolean wanted[]; + +% To use this bit of magic, include the following commented-out lines + % for x:="I": + % wanted[byte x]:=true; endfor + % this allows specifying only those characters which are to be shown + % the chars can be specified inside of quotes("c") or as a number(23) +def OK expr x=known wanted[byte x] enddef; + % let iff=always_iff; % allows testing of all chars in the file + +%***** +% This allows adjustments to left and right sidebearings of characters, +% so that the space in which the character sits can be different from +% the space in which the reference points for the character are given. + +letter_fit#:=letter_fit:=0; +def adjust(expr left_adjustment,right_adjustment) = + l:=-round(left_adjustment*hppp)-letter_fit; + interim xoffset:=-l; + charwd:=charwd+2letter_fit#+left_adjustment+right_adjustment; + r:=l+round(charwd*hppp); + w:=r-round(right_adjustment*hppp)-letter_fit; + enddef; + +%***** + +% Changes <penpos> to <pos> and makes <multpos> for multiple reference positions +% with the same length and angle arguments + +vardef pos@#(expr b,d) = + (x@#r-x@#l,y@#r-y@#l)=(b,0)rotated d;x@#=.5(x@#l+x@#r);y@#=.5(y@#l+y@#r)enddef; +vardef multpos(text t)(expr b,d)=forsuffixes $=t:pos$(b,d); endfor enddef; + +%***** + +% A takeoff on flex, allows softening of paths if softpath is true. +% This takes a list of points and softens the path between the straight +% lines connecting these points; a <point> or <path> must follow this +% macro, i.e., not a <pathjoin>. + +def soften(text t)= % t is a list of pairs + hide(n_:=0; for z=t: z_[incr n_]:=z; endfor;) + if softpath: + --z_1)for k=2 upto n_:softjoin(z_[k-1]--z_[k]) endfor softjoin(z_[n_]-- + else: --z_1 for k=2 upto n_-1: --z_[k] endfor --z_[n_]-- fi +enddef; +newinternal n_; pair z_[],dz_; + +%***** + + +%*****MISCELLANEOUS + +%**** fitbasis ***** +% If the basis for figuring the sidebearings or fitting has not been set +% to 0 by the fixed_pitch_characters macro, then this gives values to the +% upper and lower case <fitbasis> + +def makeknown(text t)(expr value)= + forsuffixes $=t:if unknown $:$=value;fi endfor enddef; + +%***** booleans + +% These macros shorten the code +def bool(text t)=boolean t; t enddef; +def save_bool(text t)=save t;bool(t) enddef; +def save_pair(text t)=save t;pair t; t enddef; +def save_pairs(text t)=save t;pair t[]; enddef; +def save_num(text t)=save t;t enddef; + +% The condition macro localizes a boolean and gives it a true or false value + +def condition(text t)suffix $$= + save_bool(t):=if(str$$="t"):true else:false; fi enddef; + +%***** + +% The softenit macro softens the join for two paths that are always to +% have some softness + +vardef softenit(expr path_one,path_two)= + save x,y,t; + (t1,t2)=path_one intersectiontimes reverse path_two; + z1=path_one intersectionpoint reverse path_two; + (subpath(0,t1)of path_one--z1)softjoin(z1--subpath(t2,0)of reverse path_two) +enddef; + +%***** + +% The define_minimums macro makes minimum stroke amount of one pixel +def define_minimums(text t)=forsuffixes $=t: $:=max($,minimum_linethickness); + endfor enddef; + +%***** +% For turning off overshoots when the resolution is too low +def lowres_fix(text t)=forsuffixes $=t: $:=0; endfor enddef; +%***** + +% The fixed_pt macro increases the length of the stem measurement dependent +% on the obliqueness to maintain stem widths +% Used only in global bowlstem/stem/thin_stem specs + +if unknown scale_factor:scale_factor=1; fi +def fixed_pt=(scale_factor*1/(pt#*cosd oblique)) enddef; + +%***** + +% In the inlimit macro, the first <text> argument gives the value, +% and places this value between the <expr> arguments +% The lower and upper bound values are just recommended values thought +% to maintain "reasonable" shapes +vardef inlimit(text amt)(expr lowerlimit,upperlimit)=save this; + this:=max(amt,lowerlimit); this:=min(this,upperlimit);this +enddef; + +% The min_limit macro maintains a minimum limit +def min_limit(text this)(expr limit)=if this>limit:save this;this=limit;fi +enddef; + +%***** + +% Gives value to the <sign> used in terminalserif def +def sign(expr a)=if a<=0:0 else:1 fi enddef; + +%***** + +% The onaline macro allows thinking that a point be on a particular line; +% an x or y value must be supplemented + +vardef onaline(suffix a,b)(text t)=forsuffixes $=t:z$=whatever[z.a,z.b]; endfor + enddef; + +%***** +% The good_x_for macro gives reference points horizontal placement, +% and moves them appropriately, according to vertical height and obliqueness + +vardef good_x_for(text t)(expr leftpoint,rightpoint,amt)suffix$= + z1$=(xpart leftpoint,y.t-ypart leftpoint)//; + z2$=(xpart rightpoint,y.t-ypart rightpoint)//; + x.t=amt[x1$,x2$]; +enddef; + +%***** + +% The constant_angle macro keeps a constant angle so that the thickness +% of the line can remain constant as the line may change, e.g., as width, +% obliqueness changes. +% The stem value should be zero if the reference points are on the same +% side of the stem, and the value of the stem otherwise. +% The suffix lr is used when the reference points are diagonally opposite +% each other and the top_pt is on the left of the stem +% and the bot_pt on the right. +% This could probably be made more efficient, but it works as is... *** FIX + +vardef constant_angle(expr top_pt,bot_pt,stem)suffix $= + save theta; + theta=if str$="lr":-else:+fi (angle(length(top_pt-bot_pt) +-+ stem,stem)); + angle(top_pt-bot_pt)+theta-90 +enddef; + +%***** + +% The notch macro makes an indentation to compensate for filling in at junctures +% Variation in the length and width or thickness of the cut can be specified +% Ideally one might tailor the length of the cut dependent on the angle +% of the two stems at the juncture, however, here they are all considered +% together +% The notch macros:upnotch,downnotch,leftnotch,rightnotch all assume +% A three point counterclockwise path with the notching occuring at the +% middle point; the points connect as straight lines and the notching +% begins at a point .5 of the way from the endpoints to the apex + +vardef notch@#(expr apath,notch_direction,notch_length)= + save a; def a=(max(notch_length,eps),0)rotated notch_direction; enddef; + z0=point 1 of apath; z2=z1+a; z3=z6+a; z4=z5+a; z6=.5[z1,z5]; + if str@#="r":reverse fi + (point 0 of apath--point .5 of apath + if nonotch:--z0--else: ..controls z1..z2--z4..controls z5.. fi + point 1.5 of apath--point 2 of apath) +enddef; + +vardef rightnotch@#(expr one,n_dir,n_l)suffix $= + save x,y,a; def a(expr n)=(n*notch_width,0)rotated(n_dir+90); enddef; + if center_notch: z6=z0; z1=z0-a(.5); + elseif str$="etchup": z1=z0; z5=z0+a(1); + elseif str$="etchdown": z5=z0; z1=z0-a(1);else:z6=z0; z1=z0-a(.5); fi + notch@#(one,n_dir,n_l) enddef; +vardef leftnotch@#(expr one,n_dir,n_l)suffix $= + save x,y,a; def a(expr n)=(n*notch_width,0)rotated(n_dir-90); enddef; + if center_notch: z6=z0; z5=z0-a(.5); + elseif str$="etchup": z5=z0; z1=z0+a(1); + elseif str$="etchdown": z1=z0; z5=z0-a(1);else:z6=z0; z5=z0-a(.5); fi + notch@#(one,n_dir,n_l) enddef; +vardef upnotch@#(expr one,n_dir,n_l)suffix $= + save x,y,a; def a(expr n)=(n*notch_width,0)rotated(n_dir-90); enddef; + if center_notch: z6=z0; z1=z0+a(.5); + elseif str$="etchleft": z1=z0; z5=z0-a(1); + elseif str$="etchright":z5=z0; z1=z0+a(1); else:z6=z0; z1=z0+a(.5); fi + notch@#(one,n_dir,n_l) enddef; +vardef downnotch@#(expr one,n_dir,n_l)suffix $= + save x,y,a; def a(expr n)=(n*notch_width,0)rotated(n_dir+90); enddef; + if center_notch: z6=z0; z5=z0+a(.5); + elseif str$="etchleft": z5=z0; z1=z0-a(1); + elseif str$="etchright":z1=z0; z5=z0+a(1); else:z6=z0; z5=z0+a(.5); fi + notch@#(one,n_dir,n_l) enddef; + +%***** + +%***** + +% The fixed_pitch_characters macro takes a true/false(or otherwise) +% and number of characters_per_inch arguments. +% This macro sets the often used <mono> value and other values for +% single pitch, where all characters have the same width. +% Note that a slight alteration made to mono# will allow +% the character width to be specified arbitrarily, e.g., setting +% mono#:=10.7pt# makes a single pitch width of 10.7 points. + +def fixed_pitch_characters(text t)(expr characters_per_inch)= + boolean narrow_condition; % are characters especially narrow? + boolean singlepitch; % affects character shapes for ijlwIJMWO0 + if t=true:mono#:=(72.27/characters_per_inch)*pt#; + width#:=0; + fitbasis.lc#:=fitbasis.uc#:=0; + singlepitch:=true; + else:mono#:=0; + singlepitch:=false; fi + define_pixels(mono,width); + narrow_condition:=if (mono<>0)and(characters_per_inch>12):true else:false fi; +enddef; + +%***** + +vardef testing_codes= + % There are a number of alternate characters. The "alt[]" scheme gives these + % alternate characters a different code number than the one they would + % normally have, if used, for the purpose of testing. + + if test_all_characters: + alt0:=if a_full_bowl:128 else:0 fi; % characters: a + alt1:=if g_full_bowl:128 else:0 fi; % characters: g + alt2:=if spur:0 else:128 fi; % characters: G,b,q (a,g) + alt3:=if like_lowercase:128 else:0 fi; % characters: U + alt4:=if flat_diagonal_endings:0 else:128 fi; % characters: v,w,x,y,V,W,X + alt5:=if beveled_join:128 else:0 fi; % characters: R,K,k + alt6:=if open_tail:0 else:128 fi; % characters: 3,5,6,9 + alt7:=if diagonal_three:0 else:128 fi; % characters: 3 + alt8:=if inflection_two:0 else:128 fi; % characters: 2 + alt9:=if G_spur:128 else:0 fi; % characters: G + alt10:=if open_four:0 else:128 fi; % characters: 4 + + else:alt0:=alt1:=alt2:=alt3:=alt4:=alt5:=alt6:=alt7:=alt8:=alt9:=alt10:=0; fi +enddef; + +%******************************* +makeknown(minimum_linethickness)(1); + + +def vpix(text t)(text tt)= t:=tt; t:=vround(tt.#*hppp); enddef; % whole v pix +def hpix(text t)(text tt)= t:=tt; t:=hround(tt.#*hppp); enddef; % whole h pix + + +def define_pixels(text t) = + forsuffixes $=t: $:=$.#*hppp; endfor enddef; +def define_whole_pixels(text t) = + forsuffixes $=t: $:=hround($.#*hppp); endfor enddef; +def define_whole_vertical_pixels(text t) = + forsuffixes $=t: $:=vround($.#*hppp); endfor enddef; +def define_good_x_pixels(text t) = + forsuffixes $=t: $:=good.x($.#*hppp); endfor enddef; +def define_good_y_pixels(text t) = + forsuffixes $=t: $:=good.y($.#*hppp); endfor enddef; +def define_blacker_pixels(text t) = + forsuffixes $=t: $:=$.#*hppp+blacker; endfor enddef; +def define_whole_blacker_pixels(text t) = + forsuffixes $=t: $:=hround($.#*hppp+blacker); + if $<=0: $:=1; fi endfor enddef; +def define_whole_vertical_blacker_pixels(text t) = + forsuffixes $=t: $:=vround($.#*hppp+blacker); + if $<=0: $:=1_o_; fi endfor enddef; +def define_corrected_pixels(text t) = + forsuffixes $=t: $:=vround($.#*hppp*o_correction)+eps; endfor enddef; +def define_horizontal_corrected_pixels(text t) = + forsuffixes $=t: $:=hround($.#*hppp*o_correction)+eps; endfor enddef; + + diff --git a/fonts/pandora/pangreeku.mf b/fonts/pandora/pangreeku.mf new file mode 100644 index 0000000000..c10f0d35dd --- /dev/null +++ b/fonts/pandora/pangreeku.mf @@ -0,0 +1,356 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% greeku.mf uppercase Greek characters not coinciding with uppercase roman + +% 11 characters; iff OK "g": for testing + + +iff OK "g": "The uppercase Greek Gamma"; + beginchar(0,E_w*width#+b_mono#,cap#,0); + + top lft z11l=(0,h)//; multpos(11,14)(stem.uc,0); + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=y13r=cap_bracket_h; + onaline(11r,14r)(1,13r); y12l=max(h-cap_bracket_h,y13l); + top y2r=h; + top rt z3=(w,h)//; + bot y1=bot y2l=top y2r-max(1,.95thin_stem.uc); + z0=z1-(0*stem.uc,0); + good_x_for(2l)(z1,z3,.6)a; good_x_for(2r)(z1,z3,.6)b; + + p1=(leftserif(z11,z14,z12l,z11r,.5hs)-- + fullserif(z14,z11,z13l,z13r,.5hs,.75hs) + if softpath:--z1)softjoin(z1... + else:...(z0-(0,eps)){left}--z0{right}... fi + arm.tr(z3,z2l,z2r,.5as,.75tip_thickness,90+arm_angle))--cycle; + + showpoints(0,1,2,3,11,12,13,14); +adjust(v_A*fitbasis.uc#+m_f*b_mfit#,v_I*fitbasis.uc#+m_ff*b_mfit#); +show_character; endchar; + + + +iff OK "g": "The uppercase Greek Delta"; + beginchar(1,O_w*width#+e_mono#,cap#,0); + min_limit(join_radius)(.5apex.uc); + + bot lft z21l=(0,0); multpos(21,22)(apex.uc,90-apex_angle); + bot rt z22l=(w,0); + top z23=(.5[x21,x22],h)//; pos23(apex.uc,0-apex_angle); + z1l=z23l; z2l=z21r; z3l=z21l; z4l=z22l; z5r=z22r; z6r=z23r; + multpos(1,2)(thin_stem.uc,constant_angle(z23l,z21r,0)); + multpos(3,4)(major_curve.uc,90); + multpos(5,6)(stem.uc,constant_angle(z23r,z22r,0)); + onaline(1r,2r)(41,43,51,52); + onaline(3r,4r)(41,42,53,54); + onaline(5l,6l)(42,43,55,56); + y51=y56=max(notch_pos,.5)[y43,y41]; + y52=y55=max(notch_pos,.5)[y41,y43]; + x53=max(notch_pos,.5)[x41,x42]; x54=max(notch_pos,.5)[x42,x41]; + + p1=(.5[z23l,z21r] soften(z21r,z21l,z22l,z22r,z23r,z23l) .5[z23l,z21r])--cycle; + p1'=leftnotch((z52--z41--z53),angle(z21-z41),notch_length.uc)-- + rightnotch((z54--z42--z55),angle(z22-z42),notch_length.uc)-- + upnotch((z56--z43--z51),angle(z23-z43),notch_length.uc)--cycle; + + showpoints(1,2,3,4,5,6,21,22,23,41,42,43,51,52,53,54,55,56); +adjust(v_E*fitbasis.uc#+m_a*e_mfit#,v_D*fitbasis.uc#+m_a*e_mfit#); +show_character; endchar; + + + +iff OK "g": "The uppercase Greek Theta"; + beginchar(2,O_w*width#+d_mono#,cap#,0); + + top z1=(h_stress*w,h+ov_t.uc)//; % circle + lft z2=(0,(1-v_stress)*h)//; + bot z3=((1-h_stress)*w,-ov_b.uc)//; + rt z4=(w,v_stress*h)//; + + z10=(.5w,round(.52h))//; pos10(round max(1,.75stem.uc),0); % bar + z13=(0,.35*(abs(x4-x2)-2bowlstem.uc)); + top z11=(z10+z13); + bot z12=(z10-z13); + ref1=fullserif(z11,z10,z10l,z10r,.2hs,.2hs)-- + fullserif(z12,z10,z10l,z10r,.2hs,.2hs)--cycle; + + p1=ref1 rotatedaround(z10,90); % bar + circular_shape(y1,y3,x2,x4,minor_curve.uc,bowlstem.uc); % circle + + showpoints(1,2,3,4,10,11,12,13); +adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_C*fitbasis.uc#+m_a*d_mfit#); +show_character; endchar; + +% Only y1/y3 and x2/x4 values actually used; the points are put in for proofs + + +iff OK "g": "The uppercase Greek Lambda"; + beginchar(3,A_w*width#+e_mono#,cap#,0); + + min_limit(join_radius)(.5apex.uc); + top z20=(.5w,h+ov_apex.uc)//; pos20(apex.uc,0-apex_angle); + bot y3=0; z3l=whatever[z20l,(0,0)]; + bot y6=0; z6r=whatever[z20r,(w,0)]; + z20l=z1l; z20r=z4r; + multpos(1,3)(thin_stem.uc,constant_angle(z20l,(0,0),0)); + multpos(4,6)(stem.uc,constant_angle(z20r,(w,0),0)); + + onaline(1l,3l)(2l); + onaline(1r,3r)(2r,40); + onaline(4l,6l)(5l,40); y2l=y2r=y5l=y5r=min(cap_bracket_h,y40); + onaline(4r,6r)(5r); + ref1=notch_pos[z40,z5l]--z40--notch_pos[z40,z2r]; + + p1 =(fullserif.l(z3,z1,z2l,z2r,.5hs,.5hs)-- + upnotch.r(ref1,angle(z20-z40),notch_length.uc)-- + fullserif.r(z6,z4,z5l,z5r,.5hs,.5hs) soften(z20r,z20l) z2l)--cycle; + + showpoints(1,2,3,4,5,6,20,40); +adjust(v_E*fitbasis.uc#+m_a*e_mfit#,v_D*fitbasis.uc#+m_a*e_mfit#); +show_character; endchar; + + +iff OK "g": "The uppercase Greek Xi"; + beginchar(4,R_w*width#+d_mono#,cap#,0); + + top lft z1=(.02w,h)//; % top arm + top rt z4=(.98w,h)//; + onaline(1,4)(2r,3r); x2r=.25[x1,x4]; x3r=.75[x1,x4]; + bot lft z5=(0,0); % bottom arm + bot rt z8=(w,0); + onaline(5,8)(6l,7l); x6l=.25[x5,x8]; x7l=.75[x5,x8]; + multpos(2,3,6,7)(max(1,.9stem.uc),90-oblique); + + z10=(.5w,round(.52h))//; pos10(max(1,.9stem.uc),0); % middle arm + z11=z10+(0,.35*abs(x4-x1)); + z12=z10-(0,.35*abs(x4-x1)); + ref1=fullserif(z11,z10,z10l,z10r,.2hs,.2hs)-- + fullserif(z12,z10,z10l,z10r,.2hs,.2hs)--cycle; + + p1=arm.tl(z1,z2l,z2r,.5as,.75tip_thickness,90-arm_angle)-- % top arm + arm.tr(z4,z3l,z3r,.5as,.75tip_thickness,90+arm_angle)--cycle; + p2=arm.bl(z5,z6r,z6l,.5as,.75tip_thickness,90+arm_angle)-- % bottom arm + arm.br(z8,z7r,z7l,.5as,.75tip_thickness,90-arm_angle)--cycle; + p3=ref1 rotatedaround(z10,90); % middle arm + + showpoints(1,2,3,4,5,6,7,8,10,11,12); +adjust(v_F*fitbasis.uc#+m_a*b_mfit#,v_F*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + +iff OK "g": "The uppercase Greek Pi"; + beginchar(5,R_w*width#+b_mono#,cap#,0); + + top lft z1l=(0,h)//; multpos(1,4,11,14)(stem.uc,0); + bot lft z4l=(0,0); + top rt z11r=(w,h)//; + bot rt z14r=(w,0); + onaline(1l,4l)(2l,3l); y3l=y3r=y13l=y13r=cap_bracket_h; + onaline(1r,4r)(2r,3r); + onaline(11r,14r)(12r,13r); y2r=y12l=h-max(1,.7thin_stem.uc); + onaline(11l,14l)(12l,13l); y2l=y12r=max(h-cap_bracket_h,y3l); + + p1=(fullserif(z4,z1,z3l,z3r,.5hs,.75hs)--z2r + if softpath:)softjoin(z2r--z12l)softjoin( else:-- fi z12l-- + fullserif(z14,z11,z13l,z13r,.5hs,.75hs)-- + rightserif(z11,z14,z12l,z12r,.625hs)-- + leftserif(z1,z4,z2l,z2r,.625hs))--cycle; + + showpoints(1,2,3,4,11,12,13,14); +adjust(v_A*fitbasis.uc#+m_a*b_mfit#,v_A*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + + + +iff OK "g": "The uppercase Greek Sigma"; + beginchar(6,R_w*width#+b_mono#,cap#,0); + + save_bool(nonotch):=if(cap<40):true else:false fi; % if real low res + min_limit(join_radius)(.5apex.uc); + bot lft z1l=(0,0); multpos(1,3)(max(1,.75stem.uc),90); + bot rt z3l=(w,0); + top lft z10r=(0,h)//; multpos(10,12)(max(1,.95thin_stem.uc),90); + top rt z12r=(.95w,h)//; + lft z21l=(0,0); multpos(21,23)(apex.uc,90-apex_angle); + lft z23r=(0,h)//; pos22(max(1,.5apex.uc),90-apex_angle); + z22=(.75[x1l,x3l],.52h)//; + + z4l=z21r; z6r=z22l; z9r=z22r; z7l=z23l; + multpos(4,6)(thin_stem.uc,constant_angle(z22l,z21r,0)); + multpos(7,9)(stem.uc,constant_angle(z23l,z22r,0)); + + onaline(1r,3r)(2r,41); onaline(1l,3l)(2l); x2l=.5[x1l,x3l]; + onaline(4l,6l)(5l,42); onaline(4r,6r)(5r,41); + onaline(7l,9l)(8l,42); onaline(7r,9r)(8r,43); + onaline(10l,12l)(11l,43); onaline(10r,12r)(11r); + y5l=notch_pos[y42,y4l]; y5r=notch_pos[y41,y22l]; + y8l=notch_pos[y42,y7l]; y8r=notch_pos[y43,y22r]; + good_x_for(2r)(z41,z3r,.5)a; + x11r=.5[x10r,x12r]; good_x_for(11l)(z43,z12r,.5)b; + ref1=z5r--z41--z2r; ref2=z11l--z43--z8r; ref3=z5l--z42--z8l; + + p1=(arm.br(z3l,z2r,z2l,.5as,.75tip_thickness,90-arm_angle)soft-- + leftnotch.r(ref1,angle(z21-z41),notch_length.uc)etchdown + --z22l if softpath:)softjoin(z22l--z22r)--( else:-- fi z22r-- + leftnotch.r(ref2,angle(z23-z43),notch_length.uc)etchdown + --arm.tr(z12r,z11l,z11r,.4as,.75tip_thickness,90+arm_angle)soft-- + z23r if softpath:)softjoin(z23r--z23l)--( else:-- fi z23l-- + rightnotch.r(ref3,angle(z22-z42),notch_length.uc)-- + z21r if softpath:)softjoin(z21r--z21l)--( else:-- fi z21l--z2l)--cycle; + + showpoints(1,2,3,4,5,6,7,8,9,10,11,12,21,22,23,41,42,43); +adjust(v_G*fitbasis.uc#+m_b*b_mfit#,v_H*fitbasis.uc#+m_bb*b_mfit#); +show_character;endchar; + +iff OK "g": "The uppercase Greek Upsilon"; + beginchar(7,O_w*width#+f_mono#,cap#,0); + + save_pairs(dir_limit); + bot z40=(.5w,0); pos40(stem.uc,0); + bot y14=0; lft x14l=round x40l; multpos(11,14)(stem.uc,0); + w:=2*x14l+stem.uc; + top z11=(x14,.65h)//; + onaline(11l,14l)(13l); y13l=y13r=min(cap_bracket_h,y11); + onaline(11r,14r)(13r); + + z1r=(0,.85h)//; pos1(max(1,.5major_curve.uc),90-oblique); + z4r=(w,.85h)//; pos4(max(1,.5major_curve.uc),90-oblique); + good_x_for(2r)(z1r,z11l,.5)a; top y2r=h; + good_x_for(2l)(z1l,z11l,.5)c; y2l=y5l=y2r-major_curve.uc; + good_x_for(5r)(z11r,z4r,.5)b; top y5r=h; + good_x_for(5l)(z11r,z4l,.5)d; + + dir_limit1=if abs(y5l-y4l)>abs(x5l-x4l):downward else:(0,0) fi; + dir_limit2=if abs(y5r-y4r)>abs(x5r-x4r):downward else:(0,0) fi; + + p1=fullserif(z14,z11,z13l,z13r,.75hs,.75hs)...z11r{upward}...z5l{right}... + {dir_limit1}z4l--z4r{-dir_limit2}...z5r{left}...{downward}z11+(eps,0)-- + z11{upward}...z2r{left}...{dir_limit2}z1r-- + z1l{-dir_limit1}...z2l{right}...z11l{downward}...cycle; + + showpoints(1,2,4,5,11,12,13,14,40); +adjust(v_H*fitbasis.uc#+m_a*f_mfit#,v_H*fitbasis.uc#+m_a*f_mfit#); +show_character; endchar; + + + +iff OK "g": "The uppercase Greek Phi"; + beginchar(8,O_w*width#+e_mono#,cap#,0); + + save_num(stem_thickness)=round(if narrow_condition: + narrow_amt[thin_stem.uc,stem.uc] else:max(1,.8stem.uc) fi); + bot z40=(.5w,0); multpos(11,14,40)(stem_thickness,0); % stem + z14l=round z40l; + w:=2*x14l+stem_thickness; + top z11=(x14,h)//; + onaline(11l,14l)(13l,12l,1l,1r,3l,3r); + onaline(11r,14r)(13r,12r,4l,4r,6l,6r); + y13l=y13r=.5cap_bracket_h; + y12l=y12r=max(h-.5cap_bracket_h,y13l); + top y1r=.85[y14+serif_thickness,y11-serif_thickness]; + y6r=y1r; bot y1l=top y1r-max(1,.9minor_curve.uc); y6l=y1l; + bot y3r=.15[y14+serif_thickness,y11-serif_thickness]; + y4r=y3r; top y3l=bot y3r+max(1,.9minor_curve.uc); y4l=y3l; + lft z2r=(0,(1-v_stress)*h)//; + pos2(bowlstem.uc,180); + rt z5r=(w,v_stress*h)//; + pos5(bowlstem.uc,0); + + p1 =fullserif(z11,z14,z12l,z12r,.75hs,.75hs)-- % stem + fullserif(z14,z11,z13l,z13r,.75hs,.75hs)--cycle; + p2 =z1r{left} o_t z2r{downward} o_t z3r{right} o_t z4r{right} o_t + z5r{upward} o_t z6r{left} o_t cycle; + p1'=z1l{left} i_t z2l{downward} i_t z3l{right} i_t z4l{right} i_t + z5l{upward} i_t z6l{left} i_t cycle; + + showpoints(1,2,3,4,5,6,11,12,13,14); +adjust(v_G*fitbasis.uc#+m_a*b_mfit#,v_G*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% Only y1/y3 and x2/x4 values actually used; the points are put in for proofs + + +iff OK "g": "The uppercase Greek Psi"; + beginchar(9,O_w*width#+f_mono#,cap#,0); + + save_num(stem_thickness)=if narrow_condition: + narrow_amt[thin_stem.uc,stem.uc] else:max(1,.8stem.uc) fi; + bot z40=(.5w,0); multpos(11,14,40)(stem_thickness,0); % stem + z14l=round z40l; + w:=2*x14l+stem_thickness; + top z11=(x14,h)//; + save_num(ht)=round(y11-y14-serif_thickness); % length of stem between serifs + onaline(11l,14l)(13l,12l); y13l=y13r=cap_bracket_h; + onaline(11r,14r)(13r,12r); y12l=y12r=max(h-cap_bracket_h,y13l); + onaline(11,14)(3l,3r); + % lute + lft z2l=(.05w,.5ht)//; + multpos(2,4)(if narrow_condition:narrow_amt else:.8 fi + [thin_stem.uc,bowlstem.uc],0); + rt z4r=(.95w,y2l)//; + multpos(0,1,5,6)(if narrow_condition:narrow_amt else:.7fi + [thin_stem.uc,bowlstem.uc],0); + rt z0r=(abs(x2r-x2l),.85ht)//; + lft z6l=(w-abs(x2r-x2l),y0l)//; + z1r=.75[z2r,z0r-(0,tip_thickness)]; + z5l=.75[z4l,z6l-(0,tip_thickness)]; + bot y3r=serif_thickness+.2ht; + top y3l=bot y3r+thin_stem.uc; + + p1=terminalserif.l(z0,z1,z1l,z1r,.5ts,0)soft... % lute + z2l o_t z3r{right} o_t z4r... + terminalserif.r(z6,z5,z5l,z5r,.5ts,0)soft... + z4l i_t z3l{left} i_t z2r...cycle; + p2=fullserif(z11,z14,z12l,z12r,.75hs,.75hs)-- % stem + fullserif(z14,z11,z13l,z13r,.75hs,.75hs)--cycle; + + showpoints(0,1,2,3,4,5,6,11,12,13,14); +adjust(v_G*fitbasis.uc#+m_a*f_mfit#,v_G*fitbasis.uc#+m_a*f_mfit#); +show_character; endchar; + + + +iff OK "g": "The uppercase Greek Omega"; + beginchar(10,O_w*width#+d_mono#,cap#,0); + twotension:=3; + + bot lft z1=(0,0); bot rt z11=(w,0); + bot y2l=top y2r-max(1,.8stem.uc)=0; bot y12l=top y12r-max(1,.8stem.uc)=0; + good_x_for(2l)(z1,z3l,.5)a; good_x_for(12l)(z11,z13l,.5)b; + good_x_for(2r)(z1,z4,.75)c; good_x_for(12r)(z11,z14,.75)d; + bot z3l=(.4w,0); bot z13l=(.6w,0); + z3r=z3l+(0,min(2apex.uc,stem.uc))//; z13r=z13l+(0,min(2apex.uc,stem.uc))//; + z3=.5[z3l,z3r]; z13=.5[z13l,z13r]; + lft z5r=(0,.55h)//; rt z15r=(w,.55h)//; + pos5(bowlstem.uc,180); pos15(bowlstem.uc,0); + top y10r=bot y10l+minor_curve.uc=h+ov_t.uc; + good_x_for(10r)(z5r,z15r,.53)e; + good_x_for(10l)(z5l,z15l,.47)f; + z10=.5[z10l,z10r]; save_num(amt)=.5*abs(y10r-y10l); + x10r:=inlimit(x10r)(x10-amt,x10+amt); + x10l:=inlimit(x10l)(x10-amt,x10+amt); + + ref1=z10r{left}...z5r{downward}..tension atleast 1 and twotension..z3; + ref2=z13..tension atleast twotension and 1..z15r{upward}...z10r{left}; + ref3=(-1,y2r)//--(w,y2r)//; + ref4=z3r..tension atleast twotension and 1..z5l{upward} i_t z10l{right} i_t + z15l{downward}..tension atleast 1 and twotension..z13r; + + z4 =ref3 intersectionpoint ref1; + z14=ref3 intersectionpoint ref2; + (t1,t2)=ref3 intersectiontimes ref1; + (t3,t4)=ref3 intersectiontimes ref2; + + p1=(arm.bl(z1,z2r,z2l,.5as,.5tip_thickness,90+arm_angle+.5oblique)soft + soften(z3l,z3r) ref4 soften(z13r,z13l) + arm.br(z11,z12r,z12l,.5as,.5tip_thickness,90-arm_angle+.5oblique)soft-- + z14--subpath(t4,infinity)of ref2--subpath(0,t2)of ref1--z4)--cycle; + + showpoints(1,2,3,4,5,10,11,12,13,14,15); +adjust(.5num_fit_b#+m_a*d_mfit#,.5num_fit_b#+m_a*d_mfit#); +show_character; endchar; + diff --git a/fonts/pandora/panlowers.mf b/fonts/pandora/panlowers.mf new file mode 100644 index 0000000000..146c7c2dd7 --- /dev/null +++ b/fonts/pandora/panlowers.mf @@ -0,0 +1,1036 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% lowers.mf lowercase roman alphabet + +% 26 characters + + + vardef a_halfbowl= % letter a with half bowl +iff OK "a": "The letter a"; + beginchar("a",a_w*width#+b_mono#,xheight#,0); + lft z9=(.1w,.9h)//; + rt z11r=(w,r_arch*h)//; multpos(11,13)(stem.lc,0); + bot rt z13r=(w,0); + onaline(11l,13l)(1l,1r,5,6,12l); + y1r=y1l+max(1,minor_curve.lc)=.52h+.75minor_curve.lc; + y5=.35[major_curve.lc-ov_b.lc,y1l]; + y6=max(arch_thickness.lc,y5-arch_tip.lc); + onaline(11r,13r)(12r); + y12r=x_bracket_h; y12l=max(y12r,y1r); + top y10r=bot y10l+arch_thickness.lc=h+ov_t.lc; + good_x_for(10r)(z9,z12l,min(.95,arch_reference+.1 if singlepitch:+.05 fi))a; + good_x_for(10l)(z9,z10r,arch_inner_amt)b; + x10l:=max(x10l,x10r-arch_thickness.lc); + lft z3l=(0,.35[-ov_b.lc,y1r])//; + rt z3r=(lft x3l+max(1,.9bowlstem.lc),max(.4[-ov_b.lc,y1r],major_curve.lc)); + y2=.75y1r; good_x_for(2)(z3l,z1r,.4)c; + ref1=terminalserif.r(z13,z11,z5,z12r,.5ts,base_terminal_angle)soft; + archtip:=arch_tip.lc; save arch_tip; + arch_tip.lc=min(archtip,minor_bowl_tip.lc,y5-arch_thickness.lc); + ref2=arch.bl(z5,-ov_b.lc,z3r,z3l)lc; + p1'=z3r{upward}...z1l{z1r-z2}--subpath(3,5)of ref2--cycle; + p1 =z1r{z2-z1r}...z3l{downward}--outer_juncture_path.br(ref2,ref1,2)-- + z11r{upward} o_t bulb.tl(z9,z10l,z10r,.75cs,.5bulb_thickness,90) i_t + z12l{downward}..z1r & cycle; + showpoints(1,2,3,5,6,9,10,11,12,13); + adjust(v_f*fitbasis.lc#+m_cc*b_mfit#,v_b*fitbasis.lc#+m_c*b_mfit#); + show_character; endchar; + enddef; + + + def a_fullbowl= % the letter a with fullbowl +iff OK "a": "The letter a"; + beginchar(97+alt0+alt2,b_w*width#+c_mono#,xheight#,0); + top rt z11r=(w,h)//; multpos(11,13)(stem.lc,0); + bot rt z13r=(w,0); pos10(max(1,.3stem.lc),0-oblique); % spur + onaline(11l,13l)(1l,2,5,6); + y1l=(h+ov_t.lc-minor_curve.lc)-minor_ductal.lc; + y2=y1l+minor_bowl_tip.lc; + y5=ductal[major_curve.lc-ov_b.lc,y1l]; + y6=y5-minor_bowl_tip.lc; + onaline(11r,13r)(1r,10r,12r); + top y10=h; y12r=x_bracket_h; y1r=y1l-.5stem.lc; + lft z3l=(0,(1-v_stress)*h-.0*bowlstem.lc)//; + rt x3r=lft x3l+bowlstem.lc; + y3r=inlimit((1-v_stress)*h+.0*bowlstem.lc)(major_curve.lc,h-minor_curve.lc); + ref1=bowl.l(z5,-ov_b.lc,z1l,h+ov_t.lc,z3r,z3l); + ref3=(z1r soften(z10r,z10l) z2); + ref4=terminalserif.r(z13,z11,z5,z12r,.5ts,base_terminal_angle)soft; + if spur:ref2=outer_bowlpath(ref1); % bowl and spur + p1=outer_juncture_path.br(ref2,ref4,5)--ref3--cycle; + else:ref0=bowl.l(z5,-ov_b.lc,z1r,h+ov_t.lc,z3r,z3l); % bowl + ref2=outer_bowlpath(ref0); + p1=outer_juncture_path.br(ref2,ref4,5)--cycle; fi + p1'=bowl_counter(ref1)--cycle; % counter + showpoints(1,2,3,5,6,10,11,12,13); + adjust(v_c*fitbasis.lc#+m_cc*c_mfit#,v_a*fitbasis.lc#+m_c*c_mfit#); + show_character; endchar; + enddef; + + def letter_a= save a,b,c; + vardef a=condition(spur)t; testing_codes; a_fullbowl; enddef; + vardef b=condition(spur)f; testing_codes;a_fullbowl; enddef; + vardef c=a_halfbowl; enddef; + if test_all_characters:a;b;c;else:if a_full_bowl:if spur:a;else:b;fi else:c;fi + fi + enddef; + + letter_a; save letter_a,a_fullbowl,a_halfbowl; + + + + def character_points= +iff OK "b": "The letter b"; + beginchar(98+alt2,b_w*width#+c_mono#,ascender#,0); + top lft z11l=(0,h)//; multpos(11,14)(stem.lc,0); + bot lft z14l=(0,0); + z15l=z14l; pos15(max(1,.3stem.lc),0); + onaline(11r,14r)(1r,2,5,6,12r); + y1l=y1r=(minor_curve.lc-ov_b.lc)+minor_ductal.lc; + y2=y1r-minor_bowl_tip.lc; + y5=ductal[xheight+ov_t.lc-major_curve.lc,y1r]; + y6=xheight+ov_t.lc; + y12r=max(y6,h-x_bracket_h); + onaline(11l,14l)(1l,12l,13l); + y13l=x_bracket_h; + y12l=max(h-x_bracket_h,y13l); + rt z3r=(w,v_stress*xheight+.0*bowlstem.lc)//; + lft x3l=rt x3r-bowlstem.lc; + y3l=inlimit(v_stress*xheight-.0*bowlstem.lc) + (minor_curve.lc,xheight-minor_curve.lc); + + ref1=bowl.r(z5,xheight+ov_t.lc,z1r,-ov_b.lc,z3l,z3r); + ref3=(z1l soften(z15l,z15r) z2); + ref4=terminalserif.l(z11,z14,z12l,z12r,.5ts,asc_terminal_angle); + p1'=bowl_counter(ref1)--cycle; % counter + if spur:p1=outer_bowlpath(ref1)--ref4--ref3--cycle; % bowl and spur + else:ref0=bowl.r(z5,xheight+ov_t.lc,z1l,-ov_b.lc,z3l,z3r); % bowl + p1 =outer_bowlpath(ref0)--ref4--cycle; fi + showpoints(1,2,3,5,6,11,12,13,14,15,20,21); + adjust(v_a*fitbasis.lc#+m_c*c_mfit#,v_c*fitbasis.lc#+m_cc*c_mfit#); + show_character; endchar; + enddef; + + vardef letter_b= save a,b; + vardef a=condition(spur)t; testing_codes;character_points; enddef; % spur + vardef b=condition(spur)f; testing_codes;character_points; enddef; % no spur + if test_all_characters:a;b; else:if spur:a; else:b; fi fi + enddef; + + letter_b; save letter_b; + + + +iff OK "c": "The letter c"; + beginchar("c",c_w*width#+b_mono#,xheight#,0); + + save_num(term_length)=if bulb_taper:c_and_s.lc else:.75cs fi; + min_limit(join_radius)(.5minor_curve.lc); + rt z1=(.95w,.9h)//; + lft z3l=(0,.5h)//; + rt z3r=(lft x3l+bowlstem.lc,.5h); + rt z5l=(w,major_curve.lc-ov_t.lc+.02h)//; + top y2l=bot y2r+minor_curve.lc=h+ov_t.lc; + bot y4l=top y4r-major_curve.lc=-ov_t.lc; + good_x_for(2l)(z3l,z1,.6)a; good_x_for(2r)(z3r,z1-(bulb_thickness,0),.6)b; + good_x_for(4l)(z3l,z5l,.5)c; + ref1=z4l{right}...z5l; + pos5(max(1,.7major_curve.lc),angle(direction 1 of ref1)+90); + good_x_for(4r)(z3r,z5r,.5)d; + + x4r:=min(x4r,x4l+minor_curve.lc); + + p1=(bulb.tr(z1,z2r,z2l,term_length,bulb_thickness,90) o_t + z3l{downward} o_t z4l{right} o_t z5l + if softpath:)softjoin(z5l--z5r)softjoin(else:--fi + z5r i_t z4r{left} i_t z3r{upward} i_t z2r{right})--cycle; + + showpoints(1,2,3,4,5); +adjust(v_c*fitbasis.lc#+m_e*b_mfit#,v_h*fitbasis.lc#+m_ee*b_mfit#); +show_character; endchar; + + + +iff OK "d": "The letter d"; + beginchar("d",b_w*width#+c_mono#,ascender#,0); + + top rt z11r=(w,h)//; multpos(11,14)(stem.lc,0); + bot rt z14r=(w,0); + z15r=(1.05w,0); pos15(max(1,.8stem.lc),0); + onaline(11l,14l)(1l,2,5,6,12l); + y1l=(xheight+ov_t.lc-minor_curve.lc)-minor_ductal.lc; + y2=y1l+minor_bowl_tip.lc; + y5=ductal[major_curve.lc-ov_b.lc,y1l]; + y6=y5-minor_bowl_tip.lc; + onaline(11r,14r)(12r,13r); + y13r=x_bracket_h; + y12r=max(h-x_bracket_h,y13r); y12l=max(y12r,y1l); + lft z3l=(0,(1-v_stress)*xheight-.0*bowlstem.lc)//; + rt x3r=lft x3l+bowlstem.lc; + y3r=inlimit((1-v_stress)*xheight+.0*bowlstem.lc) + (major_curve.lc,xheight-minor_curve.lc); + + ref1=bowl.l(z5,-ov_b.lc,z1l,xheight+ov_t.lc,z3r,z3l); + ref2=outer_bowlpath(ref1); + ref3=terminalserif.r(z14,z11,z5,z13r,.5ts,base_terminal_angle)soft; + + p1'=bowl_counter(ref1)--cycle; % counter + p1 =terminalserif.l(z11,z14,z12l,z12r,.5ts,asc_terminal_angle) % stem + --outer_juncture_path.br(ref2,ref3,5)--cycle; % bowl + + showpoints(1,2,3,5,6,11,12,13,14,15); +adjust(v_c*fitbasis.lc#+m_cc*c_mfit#,v_a*fitbasis.lc#+m_c*c_mfit#); +show_character; endchar; + + +iff OK "e": "The letter e"; + beginchar("e",b_w*width#+d_mono#,xheight#,0); + + min_limit(join_radius)(.5minor_curve.lc); + bot rt z1r=(.95w,round(.6h-.65*.8thin_stem.lc))//; + pos1(if narrow_condition:w_narrow_amt[thin_stem.lc,stem.lc] + else:max(1,.85stem.lc) fi,ebar_angle); + lft z3l=(0,(1-v_stress)*h)//; + rt z3r=(lft x3l+bowlstem.lc,y3l); + rt z5l=(w,.15h)//; pos5(minor_curve.lc,130-oblique); + top y2l=bot y2r+major_curve.lc=h+ov_t.lc; + bot y4l=top y4r-minor_curve.lc=-ov_t.lc; + good_x_for(2l)(z3l,z1r,.51)a; good_x_for(2r)(z3r,z1l,.49)b; + good_x_for(4l)(z3l,z5l,.5)c; good_x_for(4r)(z3r,z5r,.5)d; + x4r:=min(x4r,x4l+minor_curve.lc); + onaline(1l,1r)(40); x40=x41=0; + z42=z1r+(max(1,.8thin_stem.lc),0)rotated(90+ebar_angle); + z42-z41=whatever*(z1r-z1l); + + ref1=z2r{right} ..tension atleast .8 ..z1l{downward}; % inner right ref path + ref2=z5r i_t z4r{left} i_t z3r{upward} i_t z2r{right}; % inner left ref path + ref3=z1r--z40; % outer bar ref path + ref4=z41--z42; % inner bar ref path + z20=ref2 intersectionpoint ref3; (t1,t2)=ref2 intersectiontimes ref3; + z21=ref2 intersectionpoint ref4; (t3,t4)=ref2 intersectiontimes ref4; + z22=ref1 intersectionpoint ref4; (t5,t6)=ref1 intersectiontimes ref4; + + p1 =(z2l{left} o_t_c z3l{downward} o_t_c z4l{right} o_t_c z5l + if softpath:)softjoin(z5l--z5r)softjoin( else:-- fi + subpath(0,t1)of ref2--z20 if softpath:)softjoin(z20 fi + --z1r)softjoin(z1r{upward}..tension atleast .8 .. z2l{left})--cycle; + p1'=subpath(0,t5)of ref1--z22-(eps,0)--z21+(eps,0)-- + subpath(t3,infinity)of ref2--cycle; + + showpoints(1,2,3,4,5,20,21,22,40,41,42); +adjust(v_c*fitbasis.lc#+m_a*d_mfit#,v_f*fitbasis.lc#+m_a*d_mfit#); +show_character; endchar; + + + +iff OK "f": "The letter f"; + beginchar("f",r_w*width#+a_mono#,ascender#,0); + + lft z1l=(round .2w,h)//; multpos(1,4)(stem.lc,0); + bot lft z4l=(round .2w,0); + save_num(knob)=min(bulb_thickness,.4(w-x4r)); + onaline(1l,4l)(2l,3l); y2l=max(xheight,.75xheight+(r_arch*(h-xheight))); + onaline(1r,4r)(2r,3r,12r); y2r=max(xheight,.75xheight+(l_arch*(h-xheight))); + rt z6=(w,.75[y5l,y5r])//; y3l=y3r=x_bracket_h; + top y5r=bot y5l+minor_curve.lc=h+ov_t.lc; + good_x_for(5r)(z3l,z6,.6)a; good_x_for(5l)(z3r,z6-(knob,0),.6)b; + + top rt z11=(w,xheight)//; multpos(12,13)(max(1,.8thin_stem.lc),90); + y12r=y11; + lft z13r=(0,y11)//; + + p1=fullserif(z4,z1,z3l,z3r,.5hs,.75hs)--z2r{upward} i_t + bulb.tr(z6,z5l,z5r,.75cs,knob,90) o_t z2l{downward}--cycle; + + min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness)); + p2=(arm.tr(z11,z12l,z12r,.15as,.25tip_thickness,90) + soften(z13r,z13l) z12l)--cycle; + + showpoints(1,2,3,4,5,6,11,12,13); +adjust(v_a*fitbasis.lc#-.25r_w*width#+m_e*a_mfit#,0*fitbasis.lc#+m_ee*a_mfit#); +show_character; endchar; + + + + def g_doublebowl= +iff OK "g": "The letter g"; + beginchar(103+alt2,o_w*width#+b_mono#,xheight#,descender#); + + top y1r=h+ov_t.lc; bot y1l=top y1r-max(1,.9major_curve.lc);% bowl + bot y3r=round(.3h); top y3l=bot y3r+max(1,.9major_curve.lc); + lft z2r=(0,(1-v_stress)[y3r,y1r])//; + rt z2l=(lft x2r+max(1,.9bowlstem.lc),(1-v_stress)[y3l,y1l]); + rt z4r=(round(.9w),v_stress[y3r,y1r])//; + lft z4l=(rt x4r-max(1,.9bowlstem.lc),v_stress[y3l,y1l]); + good_x_for(1r)(z2r,z4r,.52)a; good_x_for(1l)(z2l,z4l,.48)b; + good_x_for(3r)(z2r,z4r,.48)c; good_x_for(3l)(z2l,z4l,.52)d; + + top rt z5r=(w,round .95h)//; pos5(max(1,thin_stem.lc),90-oblique); % ear + ref1=z3r{right} o_t z4r{upward} o_t z1r{left}; + z6l=ref1 intersectionpoint ((0,y5l)--z5l); + z6r=ref1 intersectionpoint ((0,y5r)--z5r); + (t1,t2)=ref1 intersectiontimes ((0,y5l)--z5l); + (t3,t4)=ref1 intersectiontimes ((0,y5r)--z5r); + ref2=z1r{left} o_t z2r{downward} o_t z3r{right}; + + z20=(0,.1[y3r,y2r]); z21=(0,y20+max(1,.35thin_stem.lc)); + z10r=ref2 intersectionpoint (z20--z20+(w,0)); + z10l=ref2 intersectionpoint (z21--z21+(w,0)); + z11l=(0,.45stem.lc)//; + (z10r-z11r)=whatever*(z10l-z11l); y11r=.8stem.lc; + z12l=(.25w,-ov_b.lc)//; z12r=(.25[x11r,w],.8stem.lc)//; + z13l=(.6w,-ov_b.lc)//; z13r=(.6[x11r,w],.8stem.lc)//; + z15r=(.5w,-d)//; z15l=(.5w,-d+thin_stem.lc)//; + z14l=(w-max(1,.75[thin_stem.lc,.8stem.lc]),.5[y15l,y13l])//; + z14r=(w,.5[y15r,y13r]); + z16r=(0,.5[y12l,y15r])//; z16l=(x16r+thin_stem.lc,.5[y12l,y15l])//; + z17r=z12l-(thin_stem.lc,0); + + p1 =subpath(0,t1)of ref1--z6l--z5l--z5r--z6r--subpath(t3,2)of ref1-- + ref2--cycle; + p1'=z1l{left} i_t z2l{downward} i_t z3l{right} i_t z4l{upward} i_t cycle; + p2=z10r{z11r-z10r}..controls(z11r)..z12r{right}...z13r{right}... + z14r{downward}...z15r{left}...z16r...z17r-(0,eps)--z17r{left}... + z11l--z10l--cycle; + p2'=z12l{right}..z13l{right}...z14l{downward}...z15l{left}... + z16l{upward}...cycle; + + showpoints(1,2,3,4,5,6,10,11,12,13,14,15,16,17,20,21); + adjust(v_c*fitbasis.lc#+m_a*b_mfit#,v_g*fitbasis.lc#+m_a*b_mfit#); + show_character; endchar; + enddef; + + def g_fullbowl= +iff OK "g": "The letter g"; + beginchar(103+alt1,b_w*width#+c_mono#,xheight#,descender#); + top rt z11r=(w,h)//; multpos(11,14)(stem.lc,0); + bot rt z14r=(w,-d)//; pos10(max(1,.3stem.lc),0-oblique); % spur + onaline(11l,14l)(1l,2,5,6,13l); + y1l=(h+ov_t.lc-minor_curve.lc)-minor_ductal.lc; + y2=y1l+minor_bowl_tip.lc; y1r=y1l; + y5=ductal[arch_thickness.lc-ov_b.lc,y1l]; + y6=y5-minor_bowl_tip.lc; + onaline(11r,14r)(1r,10r,13r); + y13r=min(.25xheight,-d+(1-v_stress)*xheight); + y13l=.3[y6,y14+minor_curve.lc]; + top y10=h; + lft z3l=(0,(1-v_stress)*h-.0*bowlstem.lc)//; + rt x3r=lft x3l+bowlstem.lc; + y3r=inlimit((1-v_stress)*h+.0*bowlstem.lc)(major_curve.lc,h-minor_curve.lc); + lft z16=(.1w,-.9d)//; + bot y15r=top y15l-minor_curve.lc=-d-ov_b.lc; + good_x_for(15r)(z16,z13r,.4)a; + good_x_for(15l)(z16+(bulb_thickness,0),z13l,.4)b; + + ref1=bowl.l(z5,-ov_b.lc,z1l,h+ov_t.lc,z3r,z3l); + ref2=z6--z13l{downward} i_t + bulb.bl(z16,z15l,z15r,.5cs,bulb_thickness,90) o_t z13r{upward}; % tail + ref3=(z1r soften(z10r,z10l) z2); + p1'=bowl_counter(ref1)--cycle; % counter + if spur:p1=ref2--ref3--outer_bowlpath(ref1)--cycle; % bowl and spur + else:ref0=bowl.l(z5,-ov_b.lc,z1r,h+ov_t.lc,z3r,z3l); % bowl + p1=ref2--outer_bowlpath(ref0)--cycle; fi + showpoints(1,2,3,5,6,10,11,13,14,15,20,21); + adjust(v_c*fitbasis.lc#+m_cc*c_mfit#,v_a*fitbasis.lc#+m_c*c_mfit#); + show_character; endchar; + enddef; + + def letter_g= save a,b,c; + vardef a=condition(spur)t; testing_codes;g_fullbowl; enddef; + vardef b=condition(spur)f; testing_codes;g_fullbowl; enddef; + vardef c=condition(g_full_bowl)f; testing_codes;g_doublebowl; enddef; + if test_all_characters:a;b;c;else:if g_full_bowl:if spur:a;else:b;fi else:c;fi + fi + enddef; + + letter_g; save letter_g,g_fullbowl,g_doublebowl; + + + + +iff OK "h": "The letter h"; + beginchar("h",n_w*width#+b_mono#,ascender#,0); + + y5=ductal[xheight-arch_thickness.lc,serif_thickness]; + + top rt z1r=(w,h)//; multpos(1,4,11,14)(stem.lc,0); + bot rt z4r=(w,0); + top lft z11l=(0,h)//; + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=x_bracket_h; y12l=max(h-x_bracket_h,y13l); + onaline(11r,14r)(5,12r,13r); y13r=min(y13l,y5); y12r=max(y12l,xheight); + onaline(1l,4l)(2l,3l); y2l=min(l_arch*xheight,xheight-arch_thickness.lc); + onaline(1r,4r)(2r,3r); y2r=r_arch*xheight; y3r=min(x_bracket_h,y2r); + y3l=min(x_bracket_h,y2l); + ref1=z13r..terminalserif.l(z11,z14,z12l,z12r,.5ts,asc_terminal_angle)..z13l; + ref2=arch.tr(z5,xheight+ov_t.lc,z2l,z2r)lc; + + p1=fullserif(z14,z11,z13l,z13r,.5hs,.5hs)--softenit(ref1,ref2)-- + fullserif(z4,z1,z3l,z3r,.5hs,.75hs)--softenit(ref2,ref1)--cycle; + + showpoints(1,2,3,4,5,11,12,13,14); +adjust(v_a*fitbasis.lc#+m_c*b_mfit#,v_b*fitbasis.lc#+m_cc*b_mfit#); +show_character; endchar; + + +iff OK "i": "The letter i"; + beginchar("i",i_w*width#+b_mono#,xheight#,0); + + bot z40=(if singlepitch:.55w else:.5w fi,0); multpos(1,4,40)(stem.lc,0); + lft x4l=round x40l; bot y4=0; + z1=(x4,h)//; + onaline(1,4)(11); y11=y1+max(1,.2h); + onaline(1l,4l)(2l,3l); y3l=y3r=x_bracket_h; + onaline(1r,4r)(2r,3r); y2l=y2r=max(h-x_bracket_h,y3l); + + p1=fullserif(z4,z1,z3l,z3r,.75hs,.75hs)-- + terminalserif.l(z1,z4,z2l,z2r,.5ts,x_terminal_angle)--cycle; + p2=dot.b(z11,accent_dot_diameter); + + if singlepitch:pickup pencircle yscaled thin_stem.lc rotated -oblique; + lft top z12=(0,h); rt top z13=(x1,h); + draw z12--z13; showpoints(12,13); + fi + + showpoints(1,2,3,4,11,40); +adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + + +iff OK "j": "The letter j"; + beginchar("j",j_w*width#+a_mono#,xheight#,descender#); + + top rt z1r=(w,h)//; multpos(1,4)(stem.lc,0); + rt z4r=(w,0); + onaline(1l,4l)(2l,3l); y3l=max(.25xheight,-d+(l_arch*(d+.25xheight))); + onaline(1r,4r)(2r,3r); y3r=max(.25xheight,-d+(r_arch*(d+.25xheight))); + onaline(1,4)(11); y11=y1+max(1,.2h); y2l=y2r=h-x_bracket_h; + lft z6=(0,-.95d)//; + save_num(knob)=min(bulb_thickness,.3*abs(x4l-x6)); + bot y5r=top y5l-minor_curve.lc=-d-ov_b.lc; + good_x_for(5r)(z6,z3r,.4)a; good_x_for(5l)(z6+(knob,0),z3l,.4)b; + + p1=terminalserif.l(z1,z4,z2l,z2r,.5ts,x_terminal_angle)--z3l{downward} i_t + bulb.bl(z6,z5l,z5r,.5cs,knob,90) o_t z3r{upward}--cycle; + p2=dot.b(z11,accent_dot_diameter); + + if singlepitch:pickup pencircle yscaled thin_stem.lc rotated -oblique; + lft top z12=(.2w,h); rt top z13=(x1,h); + draw z12--z13; showpoints(12,13); + fi + + showpoints(1,2,3,4,5,6,11); +adjust(m_ee*a_mfit#,v_a*fitbasis.lc#+m_e*a_mfit#); +show_character; endchar; + + + + def k_without_beveled_join= +iff OK "k": "The letter k"; + beginchar(107+alt5,b_w*width#+c_mono#,ascender#,0); + top lft z11l=(0,h)//; multpos(11,14)(stem.lc,0); + bot lft z14l=(0,0); + onaline(11r,14r)(12r,13r,3r,41); y3r=.5xheight; + onaline(11l,14l)(12l,13l); y13l=x_bracket_h; y13r=max(y3r,y13l); + y12l=max(h-x_bracket_h,y13l); + top rt z1r=(if narrow_condition:w else:.95w fi,xheight)//; + multpos(1,3)(max(1,.9thin_stem.lc),constant_angle(z1r,z3r,0)); + onaline(1,3)(44); top y44=xheight; + onaline(1l,3l)(2l,4l,41); y12r=max(h-x_bracket_h,y41); + onaline(1r,3r)(2r,40,42); y4l=.02[y41,y44]; % y4l places bot/right arm + z6r=(w,0); y2l=max(xheight-x_bracket_h,y41); + multpos(4,6)(max(1,.95stem.lc),constant_angle(z4l,z6r,max(1,.95stem.lc))lr); + onaline(4r,6r)(5r,42); y2r=max(xheight-x_bracket_h,y42); + onaline(4l,6l)(5l,40); y5l=y5r=min(x_bracket_h,y4l,y40); + onaline(4,6)(43); bot y43=0; + + p1=(fullserif(z14,z11,z13l,z13r,.5hs,.5hs) soften(z3r,z40) + fullserif.r(z43,z4,z5l,z5r,.5hs,.5hs)--z42 + if softpath:)softjoin(z42 fi-- + fullserif.r(z44,z3,z2l,z2r,.5hs,.25hs)--z41 + if softpath:)softjoin(z41 fi-- + terminalserif.l(z11,z14,z12l,z12r,.5ts,asc_terminal_angle))--cycle; + + showpoints(1,2,3,4,5,6,11,12,13,14,40,41,42,43,44); + adjust(v_a*fitbasis.lc#+m_c*c_mfit#,v_g*fitbasis.lc#+m_cc*c_mfit#); + show_character; endchar; + enddef; + + def k_with_beveled_join= +iff OK "k": "The letter k"; + beginchar(107+alt5,b_w*width#+b_mono#,ascender#,0); + top lft z11l=(0,h)//; multpos(11,14)(stem.lc,0); + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=y13r=x_bracket_h; + onaline(11r,14r)(12r,13r); y12l=y12r=max(h-x_bracket_h,y13l); + ref1=rightserif(z14,z11,z13l,z13r,.5hs)--rightserif(z11,z14,z12l,z12r,.5hs); + top rt z1r=(if narrow_condition:w else:.95w fi,xheight)//; + z3l=z4l=ref1 intersectionpoint ((0,.55xheight)--(w,.55xheight)); + z6r=(w,0); + + multpos(4,6)(max(1,.95stem.lc),constant_angle(z4l,z6r,max(1,.95stem.lc))lr); + multpos(1,3)(max(1,.9thin_stem.lc),constant_angle(z1r,z4l,thin_stem.lc)); + + onaline(1l,3l)(2l); + onaline(1r,3r)(2r,42); + onaline(1,3)(44); top y44=xheight; + onaline(4r,6r)(5r,42); y2l=y2r=max(xheight-x_bracket_h,y4l,y42); + onaline(4l,6l)(5l); y5l=y5r=min(x_bracket_h,y4l,y42); + onaline(4,6)(43); bot y43=0; + + p1=fullserif(z14,z11,z13l,z13r,.5hs,.5hs)-- + terminalserif.l(z11,z14,z12l,z12r,.5ts,asc_terminal_angle)--cycle; + p2=(terminalserif.r(z43,z4,z5l,z5r,.5ts,base_terminal_angle)--z42 + if softpath:)softjoin(z42 fi-- + fullserif.r(z44,z3,z2l,z2r,.5hs,.25hs)--z4l)--cycle; + + showpoints(1,2,3,4,5,6,11,12,13,14,42,43,44); + adjust(v_a*fitbasis.lc#+m_c*b_mfit#,v_g*fitbasis.lc#+m_cc*b_mfit#); + show_character; endchar; + enddef; + + vardef letter_k= save a,b; + vardef a=condition(beveled_join)t;testing_codes;k_with_beveled_join; enddef; + vardef b=condition(beveled_join)f;testing_codes;k_without_beveled_join;enddef; + if test_all_characters:a;b; else:if beveled_join:a; else:b; fi fi + enddef; + + letter_k; save letter_k,k_with_beveled_join,k_without_beveled_join; + + + + +iff OK "l": "The letter l"; + beginchar("l",i_w*width#+b_mono#,ascender#,0); + + bot z40=(if singlepitch:.55w else:.5w fi,0); + multpos(1,4,40)(stem.lc,0); + lft x4l=round x40l; bot y4=0; + z1=(x4,h)//; + onaline(1l,4l)(2l,3l); y3l=y3r=x_bracket_h; + onaline(1r,4r)(2r,3r); y2l=y2r=max(h-x_bracket_h,y3l); + + p1=fullserif(z4,z1,z3l,z3r,.75hs,.75hs)-- + terminalserif.l(z1,z4,z2l,z2r,.5ts,asc_terminal_angle)--cycle; + + if singlepitch:pickup pencircle yscaled thin_stem.lc rotated -oblique; + lft top z11=(0,h); rt top z12=(x1,h); + draw z11--z12; showpoints(11,12); + fi + showpoints(1,2,3,4); +adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + + +iff OK "m": "The letter m"; + beginchar("m",m_w*width#+f_mono#,xheight#,0); + + bot lft z4l=(0,0); multpos(1,4,11,14,21,24,44,44')(stem.lc,0); + % rounds stems/spaces between stems to be = + y44=y44'=y14=y24=y4; % y-values of refs set to actual pts + x44l-x4l=x44'l-x44l; % makes spaces equal & connects ref to + x44'r=w; % actual pts + x14l=round x44l; % makes actual pt a rounded ref pt + x24l-x14l=x14l-x4l; w:=x24r; % makes actual spaces equal;resets x24r + + top z1=(x4,h)//; top z11=(x14,h)//; top z21=(x24,h)//; + y5=y15=ductal[h-arch_thickness.lc,serif_thickness]; + onaline(1l,4l)(2l,3l); y3l=x_bracket_h; y2l=max(h-x_bracket_h,y3l); + onaline(1r,4r)(5,3r); y3r=min(y3l,y5); + onaline(11l,14l)(12l,13l); y22r=r_arch*h; + onaline(11r,14r)(15,13r); y12l=y22l=min(l_arch*h,h-arch_thickness.lc); + onaline(21l,24l)(22l,23l); y13l=y23l=min(y3l,y12l); + onaline(21r,24r)(22r,23r); y13r=y23r=min(y3r,y3l); + + ref1=terminalserif.l(z1,z4,z2l,z3r,.5ts,x_terminal_angle); + ref2=z13r--arch.tr(z5,h+ov_t.lc,z12l,z15)lc; + ref5=outer_juncture_path.tl(ref2,ref1,3); + ref3=arch.tr(z15,h+ov_t.lc,z22l,z22r)lc; + z40=(point 2 of ref3);z41=z40+(h,0)rotated angle(z40-precontrol 2 of ref3); + ref4=subpath(0,2)of ref3--z41; + (t1,t2)=ref4 intersectiontimes ref5; + + p1=fullserif(z24,z21,z23l,z23r,.5hs,.75hs)-- + subpath(0,t1)of ref4--subpath(t2,infinity)of ref5-- + softenit(fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z5, + z5--subpath(3,infinity)of ref2)-- + softenit(fullserif(z14,z11,z13l,z13r,.5hs,.5hs)--z15, + subpath(3,5)of ref3)--cycle; + + showpoints(1,2,3,4,5,11,12,13,14,15,21,22,23,24,41,44,44'); +adjust(v_a*fitbasis.lc#+m_c*f_mfit#,v_b*fitbasis.lc#+m_cc*f_mfit#); +show_character; endchar; + + + +iff OK "n": "The letter n"; + beginchar("n",n_w*width#+b_mono#,xheight#,0); + + y5=ductal[h-arch_thickness.lc,serif_thickness]; + + top rt z1r=(w,h)//; multpos(1,4,11,14)(stem.lc,0); + bot rt z4r=(w,0); + top lft z11l=(0,h)//; + bot lft z14l=(0,0); + onaline(11l,14l)(12l,13l); y13l=x_bracket_h; y12l=max(h-x_bracket_h,y13l); + onaline(11r,14r)(5,13r); y13r=min(y13l,y5); + onaline(1l,4l)(2l,3l); y2l=min(l_arch*h,h-arch_thickness.lc);y2r=r_arch*h; + onaline(1r,4r)(2r,3r); y3l=min(x_bracket_h,y2l);y3r=min(x_bracket_h,y2r); + + ref1=z13r..terminalserif.l(z11,z14,z12l,z13r,.5ts,x_terminal_angle); + ref2=arch.tr(z5,h+ov_t.lc,z2l,z2r)lc; + + p1=fullserif(z14,z11,z13l,z13r,.5hs,.5hs)-- + softenit(ref1,subpath(3,5)of ref2)-- + fullserif(z4,z1,z3l,z3r,.5hs,.75hs)-- + outer_juncture_path.tl(ref2,ref1,2)--cycle; + + showpoints(1,2,3,4,5,11,12,13,14); +adjust(v_a*fitbasis.lc#+m_c*b_mfit#,v_b*fitbasis.lc#+m_cc*b_mfit#); +show_character; endchar; + + +iff OK "o": "The letter o"; + beginchar("o",oo_w*width#+d_mono#,xheight#,0); + + top z1=(h_stress*w,h+ov_t.lc)//; + lft z2=(0,(1-v_stress)*h)//; + bot z3=((1-h_stress)*w,-ov_b.lc)//; + rt z4=(w,v_stress*h)//; + + circular_shape(y1,y3,x2,x4,minor_curve.lc,bowlstem.lc); + + showpoints(1,2,3,4); +adjust(v_c*fitbasis.lc#+m_a*d_mfit#,v_c*fitbasis.lc#+m_a*d_mfit#); +show_character; endchar; + +% Only y1/y3 and x2/x4 values actually used; the points are put in for proofs + + +iff OK "p": "The letter p"; + beginchar("p",b_w*width#+c_mono#,xheight#,descender#); + + top lft z11l=(0,h)//; multpos(11,14)(stem.lc,0); + bot lft z14l=(0,-d)//; + onaline(11r,14r)(1,2,5,13r); + y1=(minor_curve.lc-ov_b.lc)+minor_ductal.lc; + y2=y1-minor_bowl_tip.lc; + y5=ductal[h+ov_t.lc-major_curve.lc,y1]; + onaline(11l,14l)(12l,13l); + y13l=-d+x_bracket_h; y13r=min(y13l,y2); + y12l=max(h-x_bracket_h,y13l); + rt z3r=(w,v_stress*xheight+.0*bowlstem.lc)//; + lft x3l=rt x3r-bowlstem.lc; + y3l=inlimit(v_stress*xheight-.0*bowlstem.lc) + (minor_curve.lc,xheight-minor_curve.lc); + + ref1=bowl.r(z5,h+ov_t.lc,z1,-ov_b.lc,z3l,z3r); + ref2=outer_bowlpath(ref1); + ref3=terminalserif.l(z11,z14,z12l,z5,.5ts,x_terminal_angle); + + p1'=bowl_counter(ref1)--cycle; % counter + p1 =outer_juncture_path.tl(ref2,ref3,5)-- + fullserif(z14,z11,z13l,z13r,.5hs,1hs)--cycle; % bowl + + showpoints(1,2,3,5,11,12,13,14); +adjust(v_a*fitbasis.lc#+m_c*c_mfit#,v_c*fitbasis.lc#+m_cc*c_mfit#); +show_character; endchar; + + + + def character_points= +iff OK "q": "The letter q with foot"; + beginchar(113+alt2,b_w*width#+c_mono#,xheight#,descender#); + top rt z11r=(w,h)//; multpos(11,14)(stem.lc,0); + bot rt z14r=(w,-d)//; pos10(max(1,.3stem.lc),0-oblique); % spur + onaline(11l,14l)(1l,2,5,6,13l); + y1l=(h+ov_t.lc-minor_curve.lc)-minor_ductal.lc; + y2=y1l+minor_bowl_tip.lc; y1r=y1l; + y5=ductal[arch_thickness.lc-ov_b.lc,y1l]; + y6=y5-minor_bowl_tip.lc; + onaline(11r,14r)(1r,10r,13r); + y13r=-d+x_bracket_h; y13l=min(y6,y13r); + top y10=h; + lft z3l=(0,(1-v_stress)*h-.0*bowlstem.lc)//; + rt x3r=lft x3l+bowlstem.lc; + y3r=inlimit((1-v_stress)*h+.0*bowlstem.lc)(major_curve.lc,h-minor_curve.lc); + + ref1=bowl.l(z5,-ov_b.lc,z1l,h+ov_t.lc,z3r,z3l); + ref2=z6--fullserif(z14,z11,z13l,z13r,.5hs,1hs); % tail + ref3=(z1r soften(z10r,z10l) z2); + p1'=bowl_counter(ref1)--cycle; % counter + if spur:p1=ref2--ref3--outer_bowlpath(ref1)--cycle; % bowl and spur + else:ref0=bowl.l(z5,-ov_b.lc,z1r,h+ov_t.lc,z3r,z3l); % bowl + p1=ref2--outer_bowlpath(ref0)--cycle; fi + showpoints(1,2,3,5,6,10,11,13,14,20,21); + adjust(v_c*fitbasis.lc#+m_cc*c_mfit#,v_a*fitbasis.lc#+m_c*c_mfit#); + show_character; endchar; + enddef; + + vardef letter_q= save a,b; + vardef a=condition(spur)t; testing_codes; character_points; enddef; % spur + vardef b=condition(spur)f; testing_codes; character_points; enddef; % no spur + if test_all_characters:a;b; else:if spur:a; else:b; fi fi + enddef; + + letter_q; save letter_q; + + +iff OK "r": "The letter r"; + beginchar("r",r_w*width#+a_mono#,xheight#,0); + + save arch_thickness; arch_thickness.lc=max(1,minor_curve.lc); + save_num(arch_reference)=.95; + top lft z11l=(0,h)//; multpos(11,14)(stem.lc,0); + bot lft z14l=(0,0); + rt z1=(w,if bulb_taper:.99h else:.95h fi)//; + save_num(knob)=if bulb_taper:stem.lc + else:inlimit(2bulb_thickness)(1.3arch_thickness.lc,.6(w-x14r)) fi; + save_num(arm_softness)=.3knob; + rt z40r=(w,.5h); pos40(knob,0); + onaline(11r,14r)(5,13r); + y5=(inlimit(ductal)(.1,.3))[h-arch_thickness.lc,serif_thickness]; + onaline(11l,14l)(12l,13l); y13l=x_bracket_h; y13r=min(y13l,y5); + y12l=max(h-x_bracket_h,y13l); + + ref1=terminalserif.l(z11,z14,z12l,z5,.5ts,x_terminal_angle); + ref2=arch.tr(z5,h+ov_t.lc,z40l,z40r)lc; + z2r=(point 1 of ref2); + z2l=(point 1 of reverse ref2); + + p1=(fullserif(z14,z11,z13l,z13r,.5hs,.75hs)--z5)softjoin + (z5--subpath(2,1)of reverse ref2-- + bulb.tr(z1,z2l,z2r,knob,knob,90)-- + outer_juncture_path.tl(subpath(1,infinity)of ref2,ref1,1))--cycle; + + showpoints(1,2,5,11,12,13,14,40); +adjust(v_a*fitbasis.lc#+m_e*a_mfit#, + max(v_h*fitbasis.lc#,v_a*fitbasis.lc#-(r_w-i_w)*width#)+m_ee*a_mfit#); +show_character; endchar; + + + +iff OK "s": "The letter s"; + beginchar("s",s_w*width#+b_mono#,xheight#,0); + + save circ_s; circ_s1=.5(1-circ1); circ_s2=.5(1-circ1); % lessens tension + save circ; circ1=1-circ_s1; circ2=1-circ_s2; % variance + save_num(term_length)=if bulb_taper:c_and_s.lc else:.75cs fi; + rt z1=(.93w,.95h)//; + lft z7=(0,.07h)//; + top y2l=bot y2r+minor_curve.lc=h+ov_t.lc; + bot y6r=top y6l-minor_curve.lc=-ov_b.lc; + z4=(.5w,.52h)//; + lft z3l=(round(.05w),.5[y4,y2l])//; + rt z5r=(w,.5[y6r,y4])//; + good_x_for(2l)(z3l,z1,.5)a; good_x_for(2r)(z3r,z1-(bulb_thickness,0),.4)b; + good_x_for(6r)(z7,z5r,.5)c; good_x_for(6l)(z7+(bulb_thickness,0),z5l,.6)d; + + z3=z3l+(.5stem.lc,0); z5=z5r-(.5stem.lc,0); + ref1=z3..z4..z5; + pos4(stem.lc,(angle(postcontrol 1 of ref1-precontrol 1 of ref1))+90-10); + rt z3r=(lft x3l+max(1,.95stem.lc),(1-v_stress)[y4r,y2r]); + lft z5l=(rt x5r-.95stem.lc,v_stress[y6l,y4l]); + + p1=bulb.tr(z1,z2r,z2l,term_length,bulb_thickness,90) + o_t z3l{downward} o_t z4l i_t z5l i_t + bulb.bl(z7,z6l,z6r,1.1term_length,bulb_thickness,90) + o_t z5r{upward} o_t z4r i_t z3r i_t cycle; + + showpoints(1,2,3,4,5,6,7,8); +adjust(v_f*fitbasis.lc#+m_a*b_mfit#,v_f*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "t": "The letter t"; + beginchar("t",s_w*width#+d_mono#,max(1.2xheight#,.5[xheight#,cap#]),0); + + lft z1l=(round .2w,max(h,xheight+1))//; + rt z1r=(x1l+stem.lc,y1l+max(1,.3stem.lc)); + lft z3l=(round .2w,.35*xheight)//; rt z3r=(x3l+stem.lc,.35*xheight); + rt z5l=(w,.15xheight)//; pos5(max(1,.85minor_curve.lc),130-oblique); + bot y4l=top y4r-minor_curve.lc=-ov_t.lc; + good_x_for(4l)(z3l,z5l,.5)c; good_x_for(4r)(z3r,z5r,.5)d; + x4r:=min(x4r,x4l+minor_curve.lc); + + top z11=(.9w,xheight)//; multpos(12,13)(max(1,.8thin_stem.lc),90); + onaline(1r,3r)(12r); y12r=y11; + top lft z13r=(0,xheight)//; + + p1=(z3l{downward} o_t z4l{right} o_t z5l + if softpath:)softjoin(z5l--z5r)softjoin(else:--fi + z5r i_t z4r{left} i_t z3r{upward} soften(z1r,z1l) z3l{downward})--cycle; + min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness)); + p2=(arm.tr(z11,z12l,z12r,.15as,.25tip_thickness,90) + soften(z13r,z13l) z12l)--cycle; + + + showpoints(1,2,3,4,5,11,12,13); +adjust(v_b*fitbasis.lc#-.2s_w*width#+m_e*d_mfit#,v_h*fitbasis.lc#+m_ee*d_mfit#); +show_character; +endchar; + + + +iff OK "u": "The letter u"; + beginchar("u",n_w*width#+b_mono#,xheight#,0); + + y5=ductal[arch_thickness.lc,h-serif_thickness]; + + bot lft z1l=(0,0); multpos(1,4,11,14)(stem.lc,0); + top lft z4l=(0,h)//; + top rt z11r=(w,h)//; + bot rt z14r=(w,0); y13r=x_bracket_h; y12l=max(h-x_bracket_h,y5); + onaline(11l,14l)(5,12l); y12r=max(h-x_bracket_h,y13r); + onaline(11r,14r)(12r,13r); y2l=(.95-l_arch)*h; y3l=max(h-x_bracket_h,y2l); + onaline(1l,4l)(2l,3l); y2r=max((.95-r_arch)*h,arch_thickness.lc); + onaline(1r,4r)(2r,3r); y3r=max(h-x_bracket_h,y2r); + + + ref1=z12l..terminalserif.r(z14,z11,z12l,z13r,.5ts,base_terminal_angle); + ref2=arch.bl(z5,-ov_b.lc,z2r,z2l)lc; + + p1=terminalserif.l(z11,z14,z12l,z12r,.5ts,0)--softenit(ref1,ref2)-- + terminalserif.l(z4,z1,z3l,z3r,.5ts,x_terminal_angle)-- + outer_juncture_path.br(ref2,ref1,2)--cycle; + + showpoints(1,2,3,4,5,11,12,13,14); +adjust(v_b*fitbasis.lc#+m_cc*b_mfit#,v_a*fitbasis.lc#+m_c*b_mfit#); +show_character; endchar; + + + + + def character_points= +iff OK "v": "The letter v"; + beginchar(118+alt4,v_w*width#+d_mono#,xheight#,0); + save_bool(nonotch):=if(xheight<25):true else:false fi; % if real low res + min_limit(join_radius)(.5apex.lc); + bot z20=(.5w,-ov_apex.lc); pos20(apex.lc,0-apex_angle); + lft z1l=(0,h)//; multpos(1,3)(.95stem.lc,constant_angle(z1l,z20l,0)); + rt z4r=(w,h)//; multpos(4,6)(thin_stem.lc,constant_angle(z4r,z20r,0)); + onaline(1l,20l)(2l,3l); y3l=y20l; + onaline(1r,3r)(2r,40); + onaline(4r,20r)(5r,6r); y6r=y20r; + onaline(4l,6l)(5l,40); y2l=y2r=y5l=y5r=max(h-x_bracket_h,y40); + onaline(1,3)(41); top y41=top y42=h; + onaline(4,6)(42); + ref1=notch_pos[z40,z2r]--z40--notch_pos[z40,z5l]; + if flat_diagonal_endings: + p1=(fullserif.l(z41,z3,z2l,z2r,.5hs,.5hs) soften(z20l,z20r) + fullserif.r(z42,z6,z5l,z5r,.5hs,.5hs).. + downnotch.r(ref1,angle(z20-z40),notch_length.lc))..cycle; + else:p1=(terminalserif.l(z41,z3,z2l,z2r,.5ts,diag_terminal_angle)soft + soften(z20l,z20r) terminalserif.l(z42,z6,z5l,z5r,.5ts,0)soft.. + downnotch.r(ref1,angle(z20-z40),notch_length.lc))--cycle; + fi + showpoints(1,2,3,4,5,6,20,40,41,42); + adjust(v_d*fitbasis.lc#+m_a*d_mfit#,v_e*fitbasis.lc#+m_a*d_mfit#); + show_character; endchar; + enddef; + + vardef letter_v= save a,b; + vardef a=condition(flat_diagonal_endings)t; testing_codes; + character_points; enddef; + vardef b=condition(flat_diagonal_endings)f; testing_codes; + character_points; enddef; + if test_all_characters:a;b; else:if flat_diagonal_endings:a; else:b; fi fi + enddef; + + letter_v; save letter_v; + + + + def character_points= +iff OK "w": "The letter w"; + beginchar(119+alt4,w_w*width#+f_mono#,xheight#,0); + save_bool(nonotch):=if(xheight<25):true else:false fi; % if real low res + min_limit(join_radius)(.5apex.lc); + lft z1l=(0,h)//; + rt z10r=(w,h)//; + bot z21=(.22w,-ov_apex.lc); multpos(21,22,23)(apex.lc,0-apex_angle); + bot z23=(w-x21,-ov_apex.lc); + + z3l=z21l; z6r=z21r; z9l=z23l; z12r=z23r; + multpos(1,3)(if narrow_condition:w_narrow_amt else:1 fi[thin_stem.lc,stem.lc], + constant_angle(z1l,z21l,0)); + multpos(10,12)(thin_stem.lc,constant_angle(z10r,z23r,0)); + onaline(1r,3r)(2r,41,46); onaline(1l,3l)(2l); onaline(1,3)(44); + onaline(10l,12l)(11l,43,47); onaline(10r,12r)(11r); onaline(10,12)(45); + + top y44=h;y45=y46=y47=y44; + x22=.5[x46,x47]; y22=if singlepitch:.8h else:h+ov_apex.lc fi; + z4l=z22l; z7r=z22r; + multpos(4,6)(thin_stem.lc,constant_angle(z22l,z21r,thin_stem.lc)lr); + multpos(7,9)(if narrow_condition:w_narrow_amt else:1 fi[thin_stem.lc,stem.lc], + constant_angle(z22r,z23l,stem.lc)); + onaline(4l,6l)(5l,41); onaline(4r,6r)(5r,42); + onaline(7l,9l)(8l,42); onaline(7r,9r)(8r,43); + y5l=y8r=notch_pos[max(y41,y43),y22]; y5r=y8l=notch_pos[y42,y3l]; + y2l=y2r=y11l=y11r=max(h-x_bracket_h,y41,y43); + + ref1=notch_pos[z41,z2r]--z41--z5l; + ref2=z8l--z42--z5r; + ref3=z8r--z43--notch_pos[z43,z11l]; + + if flat_diagonal_endings: + p1=(fullserif.l(z44,z3,z2l,z2r,.5hs,.5hs) soften(z21l,z21r) + upnotch.r(ref2,angle(z22-z42),notch_length.lc) + soften(z23l,z23r) fullserif.r(z45,z12,z11l,z11r,.5hs,.5hs).. + downnotch.r(ref3,angle(z23-z43),notch_length.lc) soften(z22r,z22l) + downnotch.r(ref1,angle(z21-z41),notch_length.lc))..cycle; + else:p1=(terminalserif.l(z44,z3,z2l,z2r,.75ts,20)soft soften(z21l,z21r) + upnotch.r(ref2,angle(z22-z42),notch_length.lc) + soften(z23l,z23r) terminalserif.l(z45,z12,z11l,z11r,.5ts,0)soft.. + downnotch.r(ref3,angle(z23-z43),notch_length.lc) soften(z22r,z22l) + downnotch.r(ref1,angle(z21-z41),notch_length.lc))..cycle; + fi + showpoints(1,2,3,4,5,6,7,8,9,10,11,12,21,22,23,41,42,43,44,45,46,47); + adjust(v_d*fitbasis.lc#+m_a*f_mfit#,v_e*fitbasis.lc#+m_a*f_mfit#); + show_character;endchar; + enddef; + + vardef letter_w= save a,b; + vardef a=condition(flat_diagonal_endings)t; testing_codes; + character_points; enddef; + vardef b=condition(flat_diagonal_endings)f; testing_codes; + character_points; enddef; + if test_all_characters:a;b; else:if flat_diagonal_endings:a; else:b; fi fi + enddef; + + letter_w; save letter_w; + + + + + def character_points= +iff OK "x": "The letter x"; + beginchar(120+alt4,v_w*width#+d_mono#,xheight#,0); + top z1l=(.05w,h)//; top z11r=(.95w,h)//; + bot z4r=(w,0); bot z14l=(0,0); + multpos(1,4)(stem.lc,constant_angle(z1l,z4r,stem.lc)lr); + multpos(11,14)(thin_stem.lc,constant_angle(z11r,z14l,thin_stem.lc)); + onaline(1l,4l)(2l,3l,42,43); + onaline(1r,4r)(2r,3r,40,41); + onaline(1,4)(21,22); top y21=top y23=h; + onaline(11l,14l)(12l,13l,40,43); + onaline(11r,14r)(12r,13r,41,42); + onaline(11,14)(23,24); bot y22=bot y24=0; + y2l=y2r=y12l=y12r=max(h-serif_thickness-.5x_bracket_h,y40); + y3l=y3r=y13l=y13r=min(serif_thickness+.5x_bracket_h,y42); + + ref1=notch_pos[z40,z2r]--z40--notch_pos[z40,z12l]; + ref2=notch_pos[z42,z3l]--z42--notch_pos[z42,z13r]; + + if flat_diagonal_endings:p1=fullserif(z21,z4,z2l,z2r,.5hs,.25hs)--z43-- + fullserif(z24,z11,z13l,z13r,.5hs,.5hs)-- + upnotch.r(ref2,angle(z40-z42),notch_length.lc)-- + fullserif(z22,z1,z3l,z3r,.5hs,.5hs)--z41-- + fullserif(z23,z14,z12l,z12r,.25hs,.5hs)-- + downnotch.r(ref1,angle(z42-z40),notch_length.lc)--cycle; + else:p1=terminalserif.l(z21,z4,z2l,z2r,.5ts,0)soft--z43-- + terminalserif.r(z24,z11,z13l,z13r,.5ts,0)soft-- + upnotch.r(ref2,angle(z40-z42),notch_length.lc)-- + terminalserif.r(z22,z1,z3l,z3r,.5ts,diag_terminal_angle)soft--z41-- + terminalserif.l(z23,z14,z12l,z12r,.5ts,0)soft-- + downnotch.r(ref1,angle(z42-z40),notch_length.lc)--cycle; + fi + showpoints(1,2,3,4,11,12,13,14,21,22,23,24,40,41,42,43); + adjust(v_g*fitbasis.lc#+m_a*d_mfit#,v_g*fitbasis.lc#+m_a*d_mfit#); + show_character; endchar; + enddef; + + vardef letter_x= save a,b; + vardef a=condition(flat_diagonal_endings)t; testing_codes; + character_points; enddef; + vardef b=condition(flat_diagonal_endings)f; testing_codes; + character_points; enddef; + if test_all_characters:a;b; else:if flat_diagonal_endings:a; else:b; fi fi + enddef; + + letter_x; save letter_x; + + + + + def character_points= +iff OK "y": "The letter y"; + beginchar(121+alt4,v_w*width#+d_mono#,xheight#,descender#); + + bot z20=(.5w+.5thin_stem.lc,0); + rt z4r=(w,h)//; + multpos(4,7)(thin_stem.lc,constant_angle(z4r,z20,0)); + onaline(4r,20)(5r,6r,7r); y7=-d; y6r=y7+x_bracket_h; + onaline(4l,7l)(3l,5l,6l,40); y3l=.05h; + lft z1l=(0,h)//; + multpos(1,3)(stem.lc,constant_angle(z1l,z3l,0)); + onaline(1l,3l)(2l); + onaline(1r,3r)(2r,40); y2l=y2r=y5l=y5r=max(h-x_bracket_h,y40); + onaline(1,3)(41); top y41=top y42=h; y6l=min(y6r,y3l); + onaline(4,7)(42); + ref1=notch_pos[z40,z2r]--z40--notch_pos[z40,z5l]; + + if flat_diagonal_endings:p1=(fullserif.l(z41,z3,z2l,z2r,.5hs,.5hs)--z3l + if softpath:)softjoin( else:-- fi z3l-- + fullserif(z7,z4,z6l,z6r,.75hs,.5hs).. + fullserif(z42,z7,z5l,z5r,.5hs,.5hs).. + downnotch.r(ref1,angle(z20-z40),notch_length.lc))..cycle; + else:p1=(terminalserif.l(z41,z3,z2l,z2r,.5ts,diag_terminal_angle)soft + ..z3l if softpath:)softjoin( else:-- fi z3l-- + terminalserif.l(z7,z4,z6l,z6r,.5ts,0)soft.. + terminalserif.l(z42,z7,z5l,z5r,.5ts,0)soft.. + downnotch.r(ref1,angle(z20-z40),notch_length.lc))..cycle; + fi + showpoints(1,2,3,4,5,6,7,20,40,41,42); + adjust(v_d*fitbasis.lc#+m_a*d_mfit#,v_e*fitbasis.lc#+m_a*d_mfit#); + show_character; endchar; + enddef; + + vardef letter_y= save a,b; + vardef a=condition(flat_diagonal_endings)t; testing_codes; + character_points; enddef; + vardef b=condition(flat_diagonal_endings)f; testing_codes; + character_points; enddef; + if test_all_characters:a;b; else:if flat_diagonal_endings:a; else:b; fi fi + enddef; + + letter_y; save letter_y; + + + +iff OK "z": "The letter z"; + beginchar("z",s_w*width#+b_mono#,xheight#,0); + + min_limit(join_radius)(.5apex.lc); + top rt z1r=(w,h-apex.lc)//; + bot lft z3l=(0,apex.lc); + multpos(1,3)(max(1,.98stem.lc),constant_angle(z1r,z3l,max(1,.98stem.lc))); + + z43=(x1r,h); + z41=(x3l,0); + rt z14=(w,0); + lft z11=(.05w,h)//; + top y12r=h; bot y12l=bot y40=top y12r-max(1,.95thin_stem.lc); + bot y13l=0; top y13r=top y42=bot y13l+max(1,.95thin_stem.lc); + onaline(1l,3l)(2l,40); y2l=notch_pos[y40,y3l]; + onaline(1r,3r)(2r,42); y2r=notch_pos[y42,y1r]; + good_x_for(12r)(z11,z43,.5)a;good_x_for(12l)(z11+(tip_thickness,0),z40,.5)b; + good_x_for(13l)(z41,z14,.5)c;good_x_for(13r)(z42,z14-(tip_thickness,0),.5)d; + + ref1=z2l--z40--z12l; ref2=z2r--z42--z13r; + + p1=(arm.tl(z11,z12l,z12r,.4as,tip_thickness,90)soft-- + rightnotch.r(ref1,angle right,notch_length.lc)etchdown + soften(z2l,z3l,z41,z13l) + arm.br(z14,z13r,z13l,.5as,tip_thickness,90-arm_angle)soft-- + leftnotch.r(ref2,angle left,notch_length.lc)etchup + soften(z2r,z1r,z43) z12r)--cycle; + + showpoints(1,2,3,11,12,13,40,41,42); +adjust(v_g*fitbasis.lc#+m_a*b_mfit#,v_g*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + diff --git a/fonts/pandora/panpunct.mf b/fonts/pandora/panpunct.mf new file mode 100644 index 0000000000..bbea875cfc --- /dev/null +++ b/fonts/pandora/panpunct.mf @@ -0,0 +1,478 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% punct.mf punctuation: common in all character sets + +% 21 characters + + +iff OK "!": "Exclamation point"; + beginchar("!",I_w*width#+a_mono#,cap#,0); + min_limit(join_radius)(.5thin_stem.uc); + bot z1=(round(.5w),0); + z0=bot z1+(0,.5accent_dot_diameter); + top z3=(x1,h)//; pos3(stem.uc,-oblique); + onaline(0,3)(2); bot y2=max(bot y1+accent_dot_diameter+2,.3y3); + pos2(thin_stem.uc,-oblique); + + p1=dot.b(z1,accent_dot_diameter); + p2=(z3--z3l)softjoin(z3l--z2l)softjoin(z2l--z2r)softjoin(z2r--z3r) + softjoin(z3r--z3)--cycle; + + showpoints(0,1,2,3); +adjust(v_a*fitbasis.uc#+m_a*a_mfit#,v_a*fitbasis.uc#+m_a*a_mfit#); +show_character; endchar; + +% rotation of shape and slant of position with obliqueness + + +iff OK "#": "Sharp/number/hash/pound"; + beginchar("#",.5width#+b_mono#,ascender#,descender#); + min_limit(join_radius)(.375stem.uc); + + multpos(1,2,3,4)(max(1,.75stem.uc),90); + bot lft z3l=(0,round(1.05math_axis-.2h-.5*max(1,.75stem.uc)))//; + z4l=(x3l+.9w,y3l); + bot rt z2l=(w,y3l+round .4h)//; + z1l=(x2l-.9w,y2l); + onaline(1,2)(11); x11=round(.27[x1,x2]); + onaline(3,4)(12); x12=round(.27[x3,x4]); + onaline(11,12)(5,6); top y5=h-mathlines; bot y6=-d+mathlines; + + pickup mathpen rotated (angle(z5-z6)-90); + draw z5--z6; + draw (z5--z6) shifted + (max(round .5mathlines+2,round(abs(x2-x1))-2*round(.27(x2-x1))),0); + p1=(z1 soften(z1l,z2l,z2r,z1r) z1)--cycle; + p2=(z3 soften(z3l,z4l,z4r,z3r) z3)--cycle; + + showpoints(1,2,3,4,5,6,11,12); +adjust(v_G*fitbasis.uc#+m_a*b_mfit#,v_G*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + +iff OK "$": "Dollar sign"; + beginchar("$",num_width_b#+b_mono#,ascender#,0); + + top y2l=bot y2r+max(1,.75minor_curve.uc)=round(.9(h+d)); + bot y6r=top y6l-max(1,.75minor_curve.uc)=round(.12(h+d)); + rt z1=(.93w,y2r-.05(y2r-y6r))//; + lft z7=(0,y6r+.1(y2r-y6r))//; + z4=(.5w,.52[y6r,y2l])//; + lft z3l=(if narrow_condition:0 else:round(.05w) fi,.5[y4,y2l])//; + rt z5r=(w,.5[y6r,y4])//; + good_x_for(2l)(z3l,z1,.5)a; good_x_for(2r)(z3r,z1-(bulb_thickness,0),.4)b; + good_x_for(6r)(z7,z5r,.5)c; good_x_for(6l)(z7+(bulb_thickness,0),z5l,.6)d; + + z3=z3l+(.5stem.uc,0); z5=z5r-(.5stem.uc,0); + ref1=z3..z4..z5; + pos4(stem.uc,(angle (postcontrol 1 of ref1-precontrol 1 of ref1))+90); + rt z3r=(lft x3l+max(1,.75stem.uc),(1-v_stress)[y4r,y2r]); + lft z5l=(rt x5r-.75stem.uc,v_stress[y6l,y4l]); + + bot z10=(.5w,-ov_b.uc); multpos(10,11)(max(1,.75thin_stem.uc),-oblique); + top z11=(.5w,h+ov_t.uc)//; + + p1=bulb.tr(z1,z2r,z2l,cs,bulb_thickness,90) + o_t z3l{downward} o_t z4l i_t z5l i_t + bulb.bl(z7,z6l,z6r,cs,bulb_thickness,90) + o_t z5r{upward} o_t z4r i_t z3r i_t cycle; + p2=(.5[z10l,z11l] soften(z11l,z11r,z10r,z10l) .5[z10l,z11l])--cycle; + + showpoints(1,2,3,4,5,6,7,8,10,11); +adjust(.5num_fit_b#+m_a*b_mfit#,.5num_fit_b#+m_a*b_mfit#); +show_character; endchar; + +% currently same width as the lining numbers + + + +iff OK "%": "Percent sign"; + beginchar("%",.5width#+d_mono#,ascender#,0); + + top y1r=h; bot y1l=top y1r-max(1,.5major_curve.lc); + bot y3r=.6h; top y3l=bot y3r+max(1,.5major_curve.lc); + lft z2r=(0,(1-v_stress)[y3r,y1r])//; + rt z2l=(lft x2r+max(1,.5bowlstem.lc),(1-v_stress)[y3r,y1r]); + rt z4r=(round(.5w),v_stress[y3r,y1r])//; + lft z4l=(rt x4r-max(1,.5bowlstem.lc),v_stress[y3r,y1r]); + good_x_for(1r)(z2r,z4r,.52)a; good_x_for(1l)(z2l,z4l,.48)b; + good_x_for(3r)(z2r,z4r,.48)c; good_x_for(3l)(z2l,z4l,.52)d; + + pickup mathpen rotated angle((w,h)//-(0,0)//); + z10=(round(.5w),round(-.6h))//; + top rt z11=(w,h)//; + bot lft z12=(0,0)//; + draw z11--z12; + + p1 =z1r{left} o_t z2r{downward} o_t z3r{right} o_t z4r{upward} o_t cycle; + p1'=z1l{left} i_t z2l{downward} i_t z3l{right} i_t z4l{upward} i_t cycle; + p2 =p1 shifted z10; + p2'=p1' shifted z10; + + z13r= point 3.5 of p1; pos13(max(1,.5major_curve.lc),90-oblique); + z14r= (.5[x13,x11],y13); pos14(max(1,.35bowlstem.lc),90-oblique); + z15=z11+(.5mathlines,0)rotated (angle((w,h)//-(0,-d)//)+90); + p3=z13l...z14l{right}...z15--z15...z14r{left}...z13r--cycle; + + showpoints(1,2,3,4,11,12,13,14,15); +adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_C*fitbasis.uc#+m_a*d_mfit#); +show_character; endchar; + + +iff OK "&": "Ampersand"; + beginchar("&",.65width#+d_mono#,cap#,0); + + bot y6r=top y6l-thin_stem.uc=-ov_b.uc; + top y2l=y2r+max(1,.9thin_stem.uc)=h+ov_t.uc; + z4=.65[z6r,z2l]; + rt z1l=(.75w if narrow_condition:+.05w fi,.5[y4,y2r])//; + pos1(max(1,.9thin_stem.uc),180); + lft z3l=(round(.25w),.5[y4,y2r])//; + pos3(max(1,.9stem.uc),0); + z5=(if narrow_condition:.93w else:.9w fi,.8[y6r,y4])//; + z11=(.95[x6l,x5],y5-terminal_thickness-.07h); + multpos(5,11)(max(1,if narrow_condition:.8 else:.9 fi *thin_stem.uc),0); + lft z7r=(0,.45[y6r,y4])//; rt z7l=z7r+(bowlstem.uc,0); z7=.5[z7l,z7r]; + z8=.5[z7r,z1l]; + good_x_for(2r)(z3r,z1r,.5)a; good_x_for(2l)(z3l,z1l,.5)b; + good_x_for(6l)(z7l,z11l,.4)c; good_x_for(6r)(z7r,z11r,.4)d; + x6l:=min(x6l,x6r+thin_stem.uc); + + z9l=z8; + bot rt z10=(.9w,0); pos10(max(1,.57stem.uc),10); + ref0=z1{downward}..z8..z7{downward}; + pos8(max(1,thin_stem.uc),angle(direction 1 of ref0)+90); + pos9(max(1,.9stem.uc),angle(direction 1 of ref0)+180); + + ref1=z2r{left} i_t z3r{downward}... + subpath(0,4)of reverse terminalserif.r(z10,z9,z9l,z9r,.5ts,0)soft; + ref2=subpath(4,20)of reverse terminalserif.r(z10,z9,z9l,z9r,.5ts,0)soft + ...z3l{upward} o_t z2l{right}; + ref3=z6r{left} o_t z7r{upward} o_t z8l i_t z1r{upward} i_t z2r{left}; + ref4=z6l{left} i_t z7l{upward} i_t z8r o_t z1l{upward} o_t z2l{left}; + ref5=z5l..z11l i_t z6l{left}; + ref6=reverse terminalserif(z5,z11,z11l,z11r,.75hs,0) o_t z6r{left}; + + (t1,t2)=ref1 intersectiontimes ref3; (t3,t4)=ref2 intersectiontimes ref3; + (t5,t6)=ref1 intersectiontimes ref4; (t7,t8)=ref2 intersectiontimes ref4; + (t9,t10)=ref1 intersectiontimes ref5; (t11,t12)=ref2 intersectiontimes ref5; + (t13,t14)=ref1 intersectiontimes ref6;(t15,t16)=ref2 intersectiontimes ref6; + + p1 =reverse(subpath(0,t14)of ref6--subpath(t13,infinity)of ref1-- + subpath(0,t15)of ref2--subpath(t16,infinity)of ref6-- + subpath(0,t4)of ref3--subpath(t3,infinity)of ref2-- + subpath(infinity,t6)of ref4--subpath(t5,t9)of ref1-- + subpath(t10,1)of ref5)--cycle; + p1'=subpath(0,t1)of ref1--subpath(t2,infinity)of ref3--cycle; + p2'=subpath(0,t8)of ref4--subpath(t7,t11)of ref2-- + subpath(t12,infinity)of ref5--cycle; + + showpoints(1,2,3,4,5,6,7,8,9,10,11,41,42,43,44,45,46,47,48,100); +adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_G*fitbasis.uc#+m_a*d_mfit#); +show_character; endchar; + + +iff OK "'": "Single right quote or apostrophe"; + beginchar(oct"047",I_w*width#+a_mono#,cap#,0); + save_num(head)=accent_dot_diameter; + top z1=(.5w,.75[xheight,cap]-.5head)//; + ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0); + p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique); + showpoints(1); +adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); +show_character; endchar; + +% rotation and slant of position with obliqueness + + +iff OK "(": "Left parenthesis"; % need to add shift if w>.45h + beginchar("(",.25width#+b_mono#,maxheight#,maxdepth#); + save_num(width_limit)=min(w,.4(h+d)); + parenthesis_curl:=2; def p_c={curl parenthesis_curl} enddef; + min_limit(join_radius)(max(.5,.37thin_stem.uc)); + + top z1l=(width_limit,h)//; + bot z3l=(width_limit,-d)//; + lft z2l=.5[z1l,z3l]+(width_limit,0)rotated(180-oblique); + pos2(max(1,.75stem.uc),-oblique); + ref1=z1l...z2l{downward}...z3l; + pos1(max(1,.75thin_stem.uc),angle(direction 0 of ref1)+90); + pos3(max(1,.75thin_stem.uc),angle(direction 2 of ref1)+90); + ref2=z1l p_c..z2l{downward}..p_c z3l; ref3=z3r p_c..z2r{upward}..p_c z1r; + + if softpath:p1=(z2l{downward}..p_c z3l)softjoin(z3l--z3r)softjoin + ref3 softjoin(z1r--z1l)softjoin(z1l p_c..z2l{downward})--cycle; + else:p1=ref2--ref3--cycle; fi + + showpoints(1,2,3); +adjust(v_C*fitbasis.uc#+m_c*b_mfit#,v_H*fitbasis.uc#+m_cc*b_mfit#); +show_character; endchar; + + +iff OK ")": "Right parenthesis"; % need to add shift if w>.45h + beginchar(")",.25width#+b_mono#,maxheight#,maxdepth#); + save_num(width_limit)=min(w,.4(h+d)); + parenthesis_curl:=2; def p_c={curl parenthesis_curl} enddef; + min_limit(join_radius)(max(.5,.37thin_stem.uc)); + + top z1l=(0,h)//; + bot z3l=(0,-d)//; + lft z2l=.5[z1l,z3l]+(width_limit,0)rotated(-oblique); + pos2(max(1,.75stem.uc),180-oblique); + ref1=z1l...z2l{downward}...z3l; + pos1(max(1,.75thin_stem.uc),angle(direction 0 of ref1)-90); + pos3(max(1,.75thin_stem.uc),angle(direction 2 of ref1)-90); + ref2=z1l p_c..z2l{downward}..p_c z3l; ref3=z3r p_c..z2r{upward}..p_c z1r; + + if softpath:p1=(z2l{downward}..p_c z3l)softjoin(z3l--z3r)softjoin + ref3 softjoin(z1r--z1l)softjoin(z1l p_c..z2l{downward})--cycle; + else:p1=ref2--ref3--cycle; fi + + showpoints(1,2,3); +adjust(v_H*fitbasis.uc#+m_cc*b_mfit#,v_C*fitbasis.uc#+m_c*b_mfit#); +show_character; endchar; + + + +iff OK "*": "Asterisk"; + beginchar("*",.35width#+d_mono#,cap#,0); + save_num(w_h)=min(w,h); save_bool(softpath)=true; + save_num(join_radius)=.3stem.uc; + z1=(.5w,if singlepitch:math_axis else:h-.5w_h fi)//; + top z3=z1+(0,.5w_h); + z2=whatever[z1,z3]; y2=.7[bot y1,top y3]; + multpos(2,3)(inlimit(.75stem.uc)(1,abs(z2-z1)-2),0); + + pickup pencircle scaled 1.5; draw z1; + ref1=(z1 soften(z2r,z3r,z3l,z2l) z1)--cycle; + for nn:=6: for n:=1 upto nn: + p[n]=ref1 rotatedaround (z1,(1-n)*(360/nn)-oblique); endfor endfor + + showpoints(1,2,3); +adjust(v_d*fitbasis.uc#+m_a*d_mfit#,v_d*fitbasis.uc#+m_a*d_mfit#); +show_character; endchar; + +% rotation of shape and slant of position with obliqueness + + +iff OK "+": "Plus sign"; + beginchar("+",.5width#+b_mono#,cap#,0); + save_num(w_h)=min(w,h); + pickup mathpen; + z0=(.5w,math_axis)//; + lft z1=round(z0-(.5w_h,0)); + rt z2=lft z1+(w_h,0); + top z3=round(z0+(0,.5w_h)); + bot z4=z3-(0,1.01w_h); + x2:=(x2 if(x3-x1)>(x2-x3):+1 elseif(x3-x1)<(x2-x3):-1 fi); + draw z1--z2; + draw z3--z4; +adjust(v_a*fitbasis.uc#+m_a*b_mfit#,v_a*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% use different mathpen for softness +% character position, but not shape slants with obliqueness +% must make sure that the plus/minus have the same widths + + +iff OK ",": "Comma"; + beginchar(",",1.15I_w*width#+a_mono#,xheight#,descender#); + save_num(head)=round_dot_diameter; + top z1=(round(.5w),.5round_dot_diameter)//; + ref1=comma(z1,head,min(.8d,.6xheight),accent_thin_end,0); + p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique); + showpoints(1); +adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); +show_character; endchar; + + +iff OK ".": "Period"; + beginchar(".",1.5I_w*width#+a_mono#,xheight#,0); + bot z1=(.5w,0); + p1=dot.b(z1,round_dot_diameter); + showpoints(1); +adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); +show_character; endchar; + +% no slant of shape with obliqueness + + + +iff OK "/": "Right leaning slash"; % need to add shift if w>.45h + beginchar("/",.45width#+b_mono#,maxheight#,maxdepth#); + pickup mathpen rotated angle((min(w,.5(h+d)),h)//-(0,-d)//); + top rt z1=(min(w,.5(h+d)),h)//; + bot lft z2=(0,-d)//; + draw z1--z2; +adjust(v_H*fitbasis.uc#+m_a*b_mfit#,v_H*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% use different mathpen for softness + + + +iff OK ":": "Colon"; + beginchar(":",I_w*width#+a_mono#,xheight#,0); + bot z1=(round(.5w),0); + top z2=(x1,if singlepitch:h + else:max(.85xheight,top y1+round_dot_diameter+2) fi)//; + p1=dot.b(z1,round_dot_diameter); + p2=dot.t(z2,round_dot_diameter); + showpoints(1,2); +adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); +show_character; endchar; + +% no slant of shape, but slant of position of top dot with obliqueness + +iff OK ";": "Semi-colon"; + beginchar(";",I_w*width#+a_mono#,xheight#,descender#); + save_num(head)=round_dot_diameter; + top z1=(round(.5w),.5round_dot_diameter)//; + top z2=(x1,if singlepitch:h + else:max(.85xheight,top y1+round_dot_diameter+2) fi)//; + ref1=comma(z1,head,min(.8d,.6xheight),accent_thin_end,0); + p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique); + p2=dot.t(z2,round_dot_diameter); + showpoints(1,2); +adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); +show_character; endchar; + +% no slant of shape, but slant of position of top dot with obliqueness + + +iff OK "=": "Equals sign"; + beginchar("=",.5width#+b_mono#,cap#,0); + pickup mathpen; + bot lft z1=(0,math_axis+.15h)//; + rt z2=(lft x1+w,y1); + top lft z3=(0,math_axis-.15h)//; + rt z4=(lft x3+w,y3); + draw z1--z2; + draw z3--z4; +adjust(v_a*fitbasis.uc#+m_a*b_mfit#,v_a*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% use different mathpen for softness +% character position, but not shape slants with obliqueness + + +iff OK "?": "Question mark"; + beginchar("?",.35width#+b_mono#,cap#,0); %.4width + min_limit(join_radius)(.5thin_stem.uc); + lft z1=(0,.9h)//; + rt z3r=(w,.75h)//; lft z3l=z3r-(stem.uc,0); + top y2r=bot y2l+max(1,major_curve.uc)=h+ov_t.uc; + good_x_for(2r)(z1,z3r,.5)a; good_x_for(2l)(z1+(bulb_thickness,0),z3l,.5)b; + bot z7=(.35w,0); + z8=bot z7+(0,.5accent_dot_diameter); + bot z6=(bot z7+(0,max(bot y7+accent_dot_diameter+2,.3y2r)))//; + multpos(5,6)(thin_stem.uc,-oblique); + onaline(6,8)(5); y5=max(y7+accent_dot_diameter+2,.35y2r); + z4l=.4[z5l,z3l]; z4r=.4[z5r,z3r]; + + p1=(bulb.tl(z1,z2l,z2r,cs,max(1,.75bulb_thickness),90)soft i_t z3l{downward} + i_t z4l o_t z5l{downward}--z6l)softjoin(z6l--z6r)softjoin + (z6r--z5r{upward} i_t z4r o_t z3r{upward} o_t z2r{left})--cycle; + p2=dot.b(z7,accent_dot_diameter); + + showpoints(1,2,3,4,5,6,7,8); +adjust(v_C*fitbasis.uc#+m_a*b_mfit#,v_C*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "@": "Commercial at sign"; + beginchar("@",.6width#+f_mono#,maxheight#,maxdepth#); + majorcurve:=max(1,.75major_curve.lc); + majorbowltip:=max(1,.75major_bowl_tip.lc); + minorcurve:=max(1,.75minor_curve.lc); + save major_curve,minor_curve,major_bowl_tip; + save_bool(ensure_min_archthickness):=false; + save_num(thinline)=max(1,.4pt); + major_curve.lc:=majorcurve; major_bowl_tip.lc:=majorbowltip; + minor_curve.lc:=minorcurve; + + top rt z11r=(if narrow_condition:w else:.75w fi,.75h)//; + bot rt z13r=(if narrow_condition:w else:.75w fi,.27h)//; + multpos(11,13)(max(1,.75stem.lc),0); + onaline(11l,13l)(1l,5,6); y1l=y1r=(y11r-minor_curve.lc)-minor_ductal.lc; + onaline(11r,13r)(1r); y5=ductal[.25h+major_curve.lc,y1l]; + y6=y5-major_curve.lc; + lft z3l=(if narrow_condition:.45w-.5*.75bowlstem.lc else:.25w fi, + (1-v_stress)[y13,y11r]-.15bowlstem.lc)//; + rt x3r=lft x3l+max(1,.75bowlstem.lc); + y3r=inlimit((1-v_stress)[y13r,y11r]+.15bowlstem.lc) + (.25h+major_curve.lc,.75h-minor_curve.lc); + + ref1=bowl.l(z5,.25h,z1l,.75h,z3r,z3l); + ref2=bowl.l(z5,.25h,z1r,.75h,z3r,z3l); + ref3=outer_bowlpath(ref2); + ref4=terminalserif.r(z13,z11,z5,z1r,0,0); + + pickup pencircle scaled thinline; + rt z20 =(w,.5h)//; + rt z21 =z1r; + top z22=(.5w,.95h)//; + lft z23=(0,.5h)//; + bot z24=(.5w,.05h)//; + z25=(.75[x24,x20],.3[y24,y13]); + draw (if narrow_condition:z20...z21{upward}else:z13{right}...z20{upward} fi + ...z22{left}...z23{downward}...z24{right}...z25) + if singlepitch:shifted(0,-.5d) fi; + p1'=(bowl_counter(ref1)--cycle) if singlepitch:shifted(0,-.5d) fi; % counter + p1 =(outer_juncture_path.br(ref3,ref4,5)--cycle) % bowl + if singlepitch:shifted(0,-.5d) fi; + + showpoints(1,2,3,5,6,11,13,20,21,22,23,24,25); +adjust(v_C*fitbasis.uc#+m_a*f_mfit#,v_C*fitbasis.uc#+m_a*f_mfit#); +show_character; endchar; + +% this character is quite thin compared to the others and even has its own +% arch_thickness + + + +iff OK "[": "Left square bracket"; % need to add shift if w>.45h + beginchar("[",.3width#+b_mono#,maxheight#,maxdepth#); + pickup mathpen; + top rt z1=(min(w,.3(h+d)),h)//; + top lft z2=(0,h)//; + bot lft z3=(0,-d)//; + bot rt z4=(min(w,.3(h+d)),-d)//; + draw z1--z2--z3--z4; +adjust(v_A*fitbasis.uc#+m_e*b_mfit#,v_H*fitbasis.uc#+m_ee*b_mfit#); +show_character; endchar; + +% use different mathpen for softness + + +iff OK "]": "Right square bracket"; % need to add shift if w>.45h + beginchar("]",.3width#+b_mono#,maxheight#,maxdepth#); + pickup mathpen; + top lft z1=(0,h)//; + top rt z2=(min(w,.3(h+d)),h)//; + bot rt z3=(min(w,.3(h+d)),-d)//; + bot lft z4=(0,-d)//; + draw z1--z2--z3--z4; +adjust(v_H*fitbasis.uc#+m_ee*b_mfit#,v_A*fitbasis.uc#+m_e*b_mfit#); +show_character; endchar; + +% use different mathpen for softness + + +iff OK "`": "Single left quote"; + beginchar(oct"140",I_w*width#+a_mono#,cap#,0); + save_num(head)=accent_dot_diameter; + z1=(.5w,.75[xheight,cap]-.5head-min(.6xheight,2pt))//; + ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0); + p1=ref1 rotatedaround(z1,180 if prime:prime_angle fi -oblique); + showpoints(1); +adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); +show_character; endchar; + +% rotation and slant of position with obliqueness + + diff --git a/fonts/pandora/pnb10.mf b/fonts/pandora/pnb10.mf new file mode 100644 index 0000000000..c9b6c897cc --- /dev/null +++ b/fonts/pandora/pnb10.mf @@ -0,0 +1,199 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% pnb10.mf Pandora Bold 10 point + +font_identifier:="PNB"; + +mode_setup; % general setup +input pandor % general definitions used in pandora + +designsize:= 10pt#; % intended "ideal" size for parameters +width#:= 10pt#; % width of an em +maxheight#:= 7.75pt#; % max height for delimiters,e.g., [,{,( +ascender#:= 7.5pt#; % height of ascenders, e.g., on l,h,k +cap#:= 7pt#; % height of uppercase, e.g., B,H,L +xheight#:= 5pt#*1.02; % xheight of lowercase, e.g., x,n,o +descender#:= 2pt#; % depth of descenders, e.g., on j,p,q +maxdepth#:= 2.25pt#; % max depth for delimiters,e.g., [,{,( +math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math + +accent_height#:=.3(ascender#-xheight#); % places bottom of accents +accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth + +define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender, + maxdepth,math_axis,accent_depth); + +fixed_pitch_characters(false)(0); % true/false, # of characters per inch +oblique:=0; % slant of character reference points + +bowlstem.uc#:=1.05*1.4 *fixed_pt; % uppercase (uc) bowl width +bowlstem.lc#:=1*1.4 *fixed_pt; % lowercase (lc) bowl width +stem.uc#:=1*1.4 *fixed_pt; % uppercase stem width +stem.lc#:=.95*1.4 *fixed_pt; % lowercase stem width +thin_stem.uc#:=.62*1.35 *fixed_pt; % width of thin uppercase stems +thin_stem.lc#:=.6*1.25 *fixed_pt; % width of thin lowercase stems +define_pixels + (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc); + +boldness:=1/1.3; +makeknown(fitbasis.lc#)((.21+.02)*width#-.8fixed_pt); +makeknown(fitbasis.uc#)((.30+.02)*width#-.8fixed_pt); + +apex.uc:=inlimit(.4stem.uc)(0,stem.uc); % apex flatness in uppercase +apex.lc:=inlimit(.4stem.lc)(0,stem.lc); % apex flatness in lowercase +ov_t.uc:=.02cap; % top curve overshoot for uppercase +ov_t.lc:=.02xheight; % top curve overshoot for lowercase +ov_b.uc:=.02cap; % bottom curve overshoot for uppercase +ov_b.lc:=.02xheight; % bottom curve overshoot for lowercase +ov_apex.uc:=.01cap; % apex overshoot for uppercase +ov_apex.lc:=.01xheight; % apex overshoot for lowercase +apex_angle:=oblique; % for changing the angle at apex +if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi +if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi + + % for SERIFS and ARMS +serif_thickness:=inlimit(.3stem.lc)(eps,.5xheight); % base thickness of h-serifs +terminal_thickness:=serif_thickness; % base thickness of terminal serifs +tip_thickness:= serif_thickness; % base thickness of arms +bulb_thickness:= 2*serif_thickness; % (base) thickness of bulbs +x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join +cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap); % uc bracket join +bool(ctrls):=false; % for explicit placement of control pts +onbase:=inlimit(0)(0,1); % places control pt along base of serif +onstem:=inlimit(0)(0,1); % places control pt along stem of serif +midbracket_pull:= inlimit(.4)(0,1); % pulls brackets in on arms and serifs +entasis:= inlimit(.1)(0,1); % amount of arc in horizontal serif base +terminal_entasis:= inlimit(.1)(0,1); % amount of arc in terminal serif base +arm_angle:= inlimit(10)(0,60); % global angle off of 90 degrees +asc_terminal_angle:= inlimit(0)(0,60); % at ascender height: from 0 deg...h,k,l +x_terminal_angle:= inlimit(15)(0,60); % at x-height: from 0 deg...m,n,r +base_terminal_angle:=inlimit(0)(0,60); % at base line: from 0 deg...u +diag_terminal_angle:=inlimit(10)(0,60); % on diagonals: from 0 deg...k,v,w,y +hs:=.75pt; % global horizontal serif length +ts:=.75pt; % global terminal serif length +as:=pt; % global arm length +cs:=pt; % global curvedarm length +serif_constant_amt:=0pt; % adds same length amount to all serifs +bool(bulbs):=false; % arms become bulbs if true +bool(bulb_taper):=false; % changes bulbs to tapering shape +taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end +bulb_taper_amt:=0; % taper length as a % of limb thickness +c_and_s.lc:=0; % c,s bulb length if bulb_taper=true +c_and_s.uc:=0; % C,G,S bulb length if bulb_taper=true +terminal_softness:=.2stem.lc; % softness in heel of the terminal serif +arm_softness:=.2thin_stem.lc; % softness in the heel of the arm + + % ARCHES +arch_thickness.uc:=.2[thin_stem.uc,stem.uc]; % uppercase arch thickness +arch_thickness.lc:=.2[thin_stem.lc,stem.lc]; % lowercase arch thickness +arch_tip.uc:=.5arch_thickness.uc; % thinnest part of the uc arch +arch_tip.lc:=.5arch_thickness.lc; % thinnest part of the lc arch +arch_reference:=inlimit(.7)(.4,.95); % puts ref pts between tip/stem +arch_inner_amt:=inlimit(.8)(.4,.95); % puts arch pts between tip/ref pts +r_arch:=l_arch:=inlimit(.6)(0,1); % y-value of max outer stress on r_arch +bool(ensure_min_archthickness):=true; % guarantees minimum thickness + + % BOWLS +major_curve.uc:=.9arch_thickness.uc; % uppercase major bowl curve thickness +major_curve.lc:=.9arch_thickness.lc; % lowercase major bowl curve thickness +minor_curve.uc:=.85arch_thickness.uc; % uppercase minor bowl curve thickness +minor_curve.lc:=.85arch_thickness.lc; % lowercase minor bowl curve thickness +major_bowl_tip.lc:=.9arch_tip.lc; % lowercase major bowl tip thickness +minor_bowl_tip.lc:=.8arch_tip.lc; % lowercase minor bowl tip thickness +major_bowl_reference:=inlimit(.6)(.4,.95); % puts ref pts between tip/bowlstem +minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem +major_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts +minor_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts + +define_minimums( % these values keep a one pixel minimum + bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc, + bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc, + major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc, + major_curve.uc,minor_curve.uc); + + % ARCHES and BOWLS and CIRCULAR SHAPES +v_stress:=.52; % places point of vert stress on bowl +h_stress:=.51; % places horzstress on circular shapes +ductal:=inlimit(.1)(0,1); % for more ductal strokes: value of 1 +minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join +circ1:=inlimit(.95)(.75,1.5); % tension of outer curve shapes +circ2:=inlimit(.95)(.75,1.5); % tension of inner curve shapes +circ3:=inlimit(.95)(.75,1.5); % tension of outer circular_shapes + + % JUNCTURES and NOTCHES +bool(softjuncture):=true; % are junctures soft? in junct macro +juncture_opening:=inlimit(.1stem.lc)(0,stem.lc);% indent into stem at juncture +stemcut_angle:=-2; % cut into stem at angle off of 90 +archcut_angle:=5; % cuts into regular arch path +notch_length.uc:=.05stem.uc; % length of corrective notching (uc) +notch_length.lc:=.05stem.lc; % length of corrective notching (lc) +notch_width:=1; % width of corrective notching in pixels +notch_pos:=.3; % positions the beginning of the notch +bool(center_notch):= % centers all notches + if(thin_stem.lc/stem.lc)>=.75:true else:false fi; +bool(nonotch):=if(xheight<15) % if real low resolution + or(xheight#>15pt#) % or large character size + or(thin_stem.uc/stem.uc<.5):true % or small thin/thick ratio + else:false fi; % this overrides notching + + % PUNCTUATION, ACCENTS, MATH and PENS +round_dot_diameter:=1.1stem.uc; % diameter of dots on ;: +accent_dot_diameter:=.9stem.lc; % diameter of dots(!?") and dot accents +comma_dot_indent:=inlimit(.25)(0,1); % indent in the comma macro for the dot +bool(prime):=false; % changes commas to prime +prime_angle:=-20; % angle of prime-like comma +bool(realsoft_accents):=true; % make accents soft as possible +accent_thin_end:=max(1,.5thin_stem.lc); % thinnest end of accents +accent_thick_end:=max(1,.75stem.lc); % thickest end of accents +mathlines:=max(1,.45*1.4pt); % thickness of lines in math characters +head_thickness:=max(1,.9mathlines); % arrowhead thickness +def mathpen=pensquare scaled mathlines enddef; % for []/=+#%-\<>_|^ +blank_space_thickness:=max(1,.7mathlines); % for space char +def slashpen=pensquare scaled max(1,.6thin_stem.lc) enddef; % in O-slash chars +def dashpen=pensquare scaled max(1,.75mathlines) enddef; % for en em + + % MISCELLANEOUS +join_radius:=.1pt; % global softness for use with softjoin +bool(softpath):=true; % softens paths in macros +narrow_amt:=inlimit(.7)(0,1); % thins strokes if narrow condition=true +w_narrow_amt:=inlimit(.3)(0,1); % thins strokes especially for eMwW oe +ebar_angle:=0; % used on the lowercase e +bool(bold):=true; % changes accent shapes if bold + +rulepen:=pensquare scaled 1; % makes screenrules 1 pixel thick +if oblique=0:let //=relax % lets // do nothing if needed otherwise + else:def //=slanted sind(oblique/cosd oblique) enddef fi; % // slants ref pts +pair upward,downward; + upward=dir(90-oblique); % "up" along oblique angle + downward=dir(-90-oblique); % "down" along oblique angle + + % ALTERNATE character specs +bool(test_all_characters):=false; % allows testing of alternate characters + alt0:=0; bool(a_full_bowl):=false; % for half/double bowls on a + alt1:=0; bool(g_full_bowl):=false; % for half/double bowls on g + alt2:=0; bool(spur):=true; % for pronged terminals on G,a,b,g,q + alt3:=0; bool(like_lowercase):=false; % alternate U + alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X + alt5:=0; bool(beveled_join):=false; % on R,K,k + alt6:=0; bool(open_tail):=false; % for 3,5,6,9 + alt7:=0; bool(diagonal_three):=false; % for diagonal as opposed to round top 3 + alt8:=0; bool(inflection_two):=true; % for 2 with inflection + alt9:=0; bool(G_spur):=true; % spur on G + alt10:=0;bool(open_four):=true; % for top of 4 + +extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];"; +extra_beginchar:=extra_beginchar&"w#:=charwd;"; % for adjust def +extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;"; % for adjust def + +for x:="a": + wanted[byte x]:=true; endfor % test these characters +let iff=always_iff; % tests all chars in the file + let show_character=draw_outlines; + if (mode<>proof):let show_character=fill_all;fi + +input rotext % Roman Text character set + + diff --git a/fonts/pandora/pnr10.mf b/fonts/pandora/pnr10.mf new file mode 100644 index 0000000000..204cf23555 --- /dev/null +++ b/fonts/pandora/pnr10.mf @@ -0,0 +1,200 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% pnr10.mf Pandora 10 point + +font_identifier:="PNR"; + +mode_setup; % general setup +input pandor % general definitions used in pandora + +designsize:= 10pt#; % intended "ideal" size for parameters +width#:= 10pt#; % width of an em +maxheight#:= 7.75pt#; % max height for delimiters,e.g., [,{,( +ascender#:= 7.5pt#; % height of ascenders, e.g., on l,h,k +cap#:= 7pt#; % height of uppercase, e.g., B,H,L +xheight#:= 5pt#; % xheight of lowercase, e.g., x,n,o +descender#:= 2pt#; % depth of descenders, e.g., on j,p,q +maxdepth#:= 2.25pt#; % max depth for delimiters,e.g., [,{,( +math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math + +accent_height#:=.3(ascender#-xheight#); % places bottom of accents +accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth + +define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender, + maxdepth,math_axis,accent_depth); + +fixed_pitch_characters(false)(0); % true/false, # of characters per inch +oblique:=0; % slant of character reference points + +bowlstem.uc#:=1.05 *fixed_pt; % uppercase (uc) bowl width +bowlstem.lc#:=1 *fixed_pt; % lowercase (lc) bowl width +stem.uc#:=1 *fixed_pt; % uppercase stem width +stem.lc#:=.95 *fixed_pt; % lowercase stem width +thin_stem.uc#:=.62 *fixed_pt; % width of thin uppercase stems +thin_stem.lc#:=.6 *fixed_pt; % width of thin lowercase stems +define_pixels + (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc); + +boldness:=1; +makeknown(fitbasis.lc#)(.21*width#); +makeknown(fitbasis.uc#)(.30*width#); + +apex.uc:=inlimit(.3stem.uc)(0,stem.uc); % apex flatness in uppercase +apex.lc:=inlimit(.3stem.lc)(0,stem.lc); % apex flatness in lowercase +ov_t.uc:=.02cap; % top curve overshoot for uppercase +ov_t.lc:=.02xheight; % top curve overshoot for lowercase +ov_b.uc:=.02cap; % bottom curve overshoot for uppercase +ov_b.lc:=.02xheight; % bottom curve overshoot for lowercase +ov_apex.uc:=.02cap; % apex overshoot for uppercase +ov_apex.lc:=.02xheight; % apex overshoot for lowercase +apex_angle:=oblique; % for changing the angle at apex +if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi +if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi + + % for SERIFS and ARMS +serif_thickness:=inlimit(.3stem.lc)(eps,.5xheight); % base thickness of h-serifs +terminal_thickness:=serif_thickness; % base thickness of terminal serifs +tip_thickness:= serif_thickness; % base thickness of arms +bulb_thickness:= 2*serif_thickness; % (base) thickness of bulbs +x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join +cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap); % uc bracket join +bool(ctrls):=false; % for explicit placement of control pts +onbase:=inlimit(0)(0,1); % places control pt along base of serif +onstem:=inlimit(0)(0,1); % places control pt along stem of serif +midbracket_pull:= inlimit(.4)(0,1); % pulls brackets in on arms and serifs +entasis:= inlimit(.1)(0,1); % amount of arc in horizontal serif base +terminal_entasis:= inlimit(.1)(0,1); % amount of arc in terminal serif base +arm_angle:= inlimit(10)(0,60); % global angle off of 90 degrees +asc_terminal_angle:= inlimit(0)(0,60); % at ascender height: from 0 deg...h,k,l +x_terminal_angle:= inlimit(20)(0,60); % at x-height: from 0 deg...m,n,r +base_terminal_angle:=inlimit(0)(0,60); % at base line: from 0 deg...u +diag_terminal_angle:=inlimit(10)(0,60); % on diagonals: from 0 deg...k,v,w,y +hs:=pt; % global horizontal serif length +ts:=pt; % global terminal serif length +as:=pt; % global arm length +cs:=pt; % global curvedarm length +serif_constant_amt:=0pt; % adds same length amount to all serifs +bool(bulbs):=true; % arms become bulbs if true +bool(bulb_taper):=false; % changes bulbs to tapering shape +taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end +bulb_taper_amt:=0; % taper length as a % of limb thickness +c_and_s.lc:=0; % c,s bulb length if bulb_taper=true +c_and_s.uc:=0; % C,G,S bulb length if bulb_taper=true +terminal_softness:=.2stem.lc; % softness in heel of the terminal serif +arm_softness:=.2thin_stem.lc; % softness in the heel of the arm + + % ARCHES +arch_thickness.uc:=.2[thin_stem.uc,stem.uc]; % uppercase arch thickness +arch_thickness.lc:=.2[thin_stem.lc,stem.lc]; % lowercase arch thickness +arch_tip.uc:=.5arch_thickness.uc; % thinnest part of the uc arch +arch_tip.lc:=.5arch_thickness.lc; % thinnest part of the lc arch +arch_reference:=inlimit(.7)(.4,.95); % puts ref pts between tip/stem +arch_inner_amt:=inlimit(.8)(.4,.95); % puts arch pts between tip/ref pts +r_arch:=l_arch:=inlimit(.6)(0,1); % y-value of max outer stress on r_arch +bool(ensure_min_archthickness):=true; % guarantees minimum thickness + + % BOWLS +major_curve.uc:=.9arch_thickness.uc; % uppercase major bowl curve thickness +major_curve.lc:=.9arch_thickness.lc; % lowercase major bowl curve thickness +minor_curve.uc:=.85arch_thickness.uc; % uppercase minor bowl curve thickness +minor_curve.lc:=.85arch_thickness.lc; % lowercase minor bowl curve thickness +major_bowl_tip.lc:=.9arch_tip.lc; % lowercase major bowl tip thickness +minor_bowl_tip.lc:=.8arch_tip.lc; % lowercase minor bowl tip thickness +major_bowl_reference:=inlimit(.6)(.4,.95); % puts ref pts between tip/bowlstem +minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem +major_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts +minor_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts + +define_minimums( % these values keep a one pixel minimum + bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc, + bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc, + major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc, + major_curve.uc,minor_curve.uc); + + % ARCHES and BOWLS and CIRCULAR SHAPES +v_stress:=.52; % places point of vert stress on bowl +h_stress:=.51; % places horzstress on circular shapes +ductal:=inlimit(.1)(0,1); % for more ductal strokes: value of 1 +minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join +circ1:=inlimit(.95)(.75,1.5); % tension of outer curve shapes +circ2:=inlimit(.95)(.75,1.5); % tension of inner curve shapes +circ3:=inlimit(.95)(.75,1.5); % tension of outer circular_shapes + + % JUNCTURES and NOTCHES +bool(softjuncture):=false; % are junctures soft? in junct macro +juncture_opening:=inlimit(.05stem.lc)(0,stem.lc);% indent into stem at juncture +stemcut_angle:=-2; % cut into stem at angle off of 90 +archcut_angle:=0; % cuts into regular arch path +notch_length.uc:=.05stem.uc; % length of corrective notching (uc) +notch_length.lc:=.05stem.lc; % length of corrective notching (lc) +notch_width:=1; % width of corrective notching in pixels +notch_pos:=.3; % positions the beginning of the notch +bool(center_notch):= % centers all notches + if(thin_stem.lc/stem.lc)>=.75:true else:false fi; +bool(nonotch):=if(xheight<15) % if real low resolution + or(xheight#>15pt#) % or large character size + or(thin_stem.uc/stem.uc<.5):true % or small thin/thick ratio + else:false fi; % this overrides notching + + % PUNCTUATION, ACCENTS, MATH and PENS +round_dot_diameter:=1.1stem.uc; % diameter of dots on ;: +accent_dot_diameter:=stem.lc; % diameter of dots(!?") and dot accents +comma_dot_indent:=inlimit(.25)(0,1); % indent in the comma macro for the dot +bool(prime):=false; % changes commas to prime +prime_angle:=-20; % angle of prime-like comma +bool(realsoft_accents):=true; % make accents soft as possible +accent_thin_end:=max(1,.5thin_stem.lc); % thinnest end of accents +accent_thick_end:=max(1,.75stem.lc); % thickest end of accents +mathlines:=max(1,.45pt); % thickness of lines in math characters +head_thickness:=max(1,.9mathlines); % arrowhead thickness +def mathpen=pensquare scaled mathlines enddef; % for []/=+#%-\<>_|^ +blank_space_thickness:=max(1,.7mathlines); % for space char +def slashpen=pensquare scaled max(1,.5thin_stem.lc) enddef; % in O-slash chars +def dashpen=pensquare scaled max(1,.75mathlines) enddef; % for en em + + % MISCELLANEOUS +join_radius:=.1pt; % global softness for use with softjoin +bool(softpath):=true; % softens paths in macros +narrow_amt:=inlimit(.7)(0,1); % thins strokes if narrow condition=true +w_narrow_amt:=inlimit(.3)(0,1); % thins strokes especially for eMwW oe +ebar_angle:=0; % used on the lowercase e +bool(bold):=false; % changes accent shapes if bold + +rulepen:=pensquare scaled 1; % makes screenrules 1 pixel thick +if oblique=0:let //=relax % lets // do nothing if needed otherwise + else:def //=slanted sind(oblique/cosd oblique) enddef fi; % // slants ref pts +pair upward,downward; + upward=dir(90-oblique); % "up" along oblique angle + downward=dir(-90-oblique); % "down" along oblique angle + + % ALTERNATE character specs +bool(test_all_characters):=false; % allows testing of alternate characters + alt0:=0; bool(a_full_bowl):=false; % for half/double bowls on a + alt1:=0; bool(g_full_bowl):=false; % for half/double bowls on g + alt2:=0; bool(spur):=true; % for pronged terminals on G,a,b,g,q + alt3:=0; bool(like_lowercase):=false; % alternate U + alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X + alt5:=0; bool(beveled_join):=false; % on R,K,k + alt6:=0; bool(open_tail):=false; % for 3,5,6,9 + alt7:=0; bool(diagonal_three):=false; % for diagonal as opposed to round top 3 + alt8:=0; bool(inflection_two):=true; % for 2 with inflection + alt9:=0; bool(G_spur):=true; % spur on G + alt10:=0;bool(open_four):=true; % for top of 4 + +extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];"; +extra_beginchar:=extra_beginchar&"w#:=charwd;"; % for adjust def +extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;"; % for adjust def + +for x:="n": + wanted[byte x]:=true; endfor % test these characters +let iff=always_iff; % tests all chars in the file + let show_character=draw_outlines; + if (mode<>proof):let show_character=fill_all;fi + +input rotext % Roman Text character set + + + diff --git a/fonts/pandora/pnsl10.mf b/fonts/pandora/pnsl10.mf new file mode 100644 index 0000000000..270ba79f82 --- /dev/null +++ b/fonts/pandora/pnsl10.mf @@ -0,0 +1,199 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% pnsl10.mf Pandora Oblique 10 point + +font_identifier:="PNSL"; + +mode_setup; % general setup +input pandor % general definitions used in pandora + +designsize:= 10pt#; % intended "ideal" size for parameters +width#:= 10pt#; % width of an em +maxheight#:= 7.75pt#; % max height for delimiters,e.g., [,{,( +ascender#:= 7.5pt#; % height of ascenders, e.g., on l,h,k +cap#:= 7pt#; % height of uppercase, e.g., B,H,L +xheight#:= 5pt#; % xheight of lowercase, e.g., x,n,o +descender#:= 2pt#; % depth of descenders, e.g., on j,p,q +maxdepth#:= 2.25pt#; % max depth for delimiters,e.g., [,{,( +math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math + +accent_height#:=.3(ascender#-xheight#); % places bottom of accents +accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth + +define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender, + maxdepth,math_axis,accent_depth); + +fixed_pitch_characters(false)(0); % true/false, # of characters per inch +oblique:=10; % slant of character reference points + +bowlstem.uc#:=1.05 *fixed_pt; % uppercase (uc) bowl width +bowlstem.lc#:=1 *fixed_pt; % lowercase (lc) bowl width +stem.uc#:=1 *fixed_pt; % uppercase stem width +stem.lc#:=.95 *fixed_pt; % lowercase stem width +thin_stem.uc#:=.62 *fixed_pt; % width of thin uppercase stems +thin_stem.lc#:=.6 *fixed_pt; % width of thin lowercase stems +define_pixels + (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc); + +boldness:=1; +makeknown(fitbasis.lc#)(.21*width#); +makeknown(fitbasis.uc#)(.30*width#); + +apex.uc:=inlimit(.3stem.uc)(0,stem.uc); % apex flatness in uppercase +apex.lc:=inlimit(.3stem.lc)(0,stem.lc); % apex flatness in lowercase +ov_t.uc:=.02cap; % top curve overshoot for uppercase +ov_t.lc:=.02xheight; % top curve overshoot for lowercase +ov_b.uc:=.02cap; % bottom curve overshoot for uppercase +ov_b.lc:=.02xheight; % bottom curve overshoot for lowercase +ov_apex.uc:=.02cap; % apex overshoot for uppercase +ov_apex.lc:=.02xheight; % apex overshoot for lowercase +apex_angle:=oblique; % for changing the angle at apex +if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi +if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi + + % for SERIFS and ARMS +serif_thickness:=inlimit(.3stem.lc)(eps,.5xheight); % base thickness of h-serifs +terminal_thickness:=serif_thickness; % base thickness of terminal serifs +tip_thickness:= serif_thickness; % base thickness of arms +bulb_thickness:= 2*serif_thickness; % (base) thickness of bulbs +x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join +cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap); % uc bracket join +bool(ctrls):=false; % for explicit placement of control pts +onbase:=inlimit(0)(0,1); % places control pt along base of serif +onstem:=inlimit(0)(0,1); % places control pt along stem of serif +midbracket_pull:= inlimit(.4)(0,1); % pulls brackets in on arms and serifs +entasis:= inlimit(.1)(0,1); % amount of arc in horizontal serif base +terminal_entasis:= inlimit(.1)(0,1); % amount of arc in terminal serif base +arm_angle:= inlimit(10)(0,60); % global angle off of 90 degrees +asc_terminal_angle:= inlimit(0)(0,60); % at ascender height: from 0 deg...h,k,l +x_terminal_angle:= inlimit(10)(0,60); % at x-height: from 0 deg...m,n,r +base_terminal_angle:=inlimit(0)(0,60); % at base line: from 0 deg...u +diag_terminal_angle:=inlimit(10)(0,60); % on diagonals: from 0 deg...k,v,w,y +hs:=pt; % global horizontal serif length +ts:=pt; % global terminal serif length +as:=pt; % global arm length +cs:=pt; % global curvedarm length +serif_constant_amt:=0pt; % adds same length amount to all serifs +bool(bulbs):=true; % arms become bulbs if true +bool(bulb_taper):=false; % changes bulbs to tapering shape +taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end +bulb_taper_amt:=0; % taper length as a % of limb thickness +c_and_s.lc:=0; % c,s bulb length if bulb_taper=true +c_and_s.uc:=0; % C,G,S bulb length if bulb_taper=true +terminal_softness:=.2stem.lc; % softness in heel of the terminal serif +arm_softness:=.2thin_stem.lc; % softness in the heel of the arm + + % ARCHES +arch_thickness.uc:=.2[thin_stem.uc,stem.uc]; % uppercase arch thickness +arch_thickness.lc:=.2[thin_stem.lc,stem.lc]; % lowercase arch thickness +arch_tip.uc:=.5arch_thickness.uc; % thinnest part of the uc arch +arch_tip.lc:=.5arch_thickness.lc; % thinnest part of the lc arch +arch_reference:=inlimit(.7)(.4,.95); % puts ref pts between tip/stem +arch_inner_amt:=inlimit(.8)(.4,.95); % puts arch pts between tip/ref pts +r_arch:=l_arch:=inlimit(.6)(0,1); % y-value of max outer stress on r_arch +bool(ensure_min_archthickness):=true; % guarantees minimum thickness + + % BOWLS +major_curve.uc:=.9arch_thickness.uc; % uppercase major bowl curve thickness +major_curve.lc:=.9arch_thickness.lc; % lowercase major bowl curve thickness +minor_curve.uc:=.85arch_thickness.uc; % uppercase minor bowl curve thickness +minor_curve.lc:=.85arch_thickness.lc; % lowercase minor bowl curve thickness +major_bowl_tip.lc:=.9arch_tip.lc; % lowercase major bowl tip thickness +minor_bowl_tip.lc:=.8arch_tip.lc; % lowercase minor bowl tip thickness +major_bowl_reference:=inlimit(.6)(.4,.95); % puts ref pts between tip/bowlstem +minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem +major_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts +minor_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts + +define_minimums( % these values keep a one pixel minimum + bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc, + bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc, + major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc, + major_curve.uc,minor_curve.uc); + + % ARCHES and BOWLS and CIRCULAR SHAPES +v_stress:=.52; % places point of vert stress on bowl +h_stress:=.51; % places horzstress on circular shapes +ductal:=inlimit(.1)(0,1); % for more ductal strokes: value of 1 +minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join +circ1:=inlimit(.95)(.75,1.5); % tension of outer curve shapes +circ2:=inlimit(.95)(.75,1.5); % tension of inner curve shapes +circ3:=inlimit(.95)(.75,1.5); % tension of outer circular_shapes + + % JUNCTURES and NOTCHES +bool(softjuncture):=false; % are junctures soft? in junct macro +juncture_opening:=inlimit(.05stem.lc)(0,stem.lc);% indent into stem at juncture +stemcut_angle:=-2; % cut into stem at angle off of 90 +archcut_angle:=0; % cuts into regular arch path +notch_length.uc:=.05stem.uc; % length of corrective notching (uc) +notch_length.lc:=.05stem.lc; % length of corrective notching (lc) +notch_width:=1; % width of corrective notching in pixels +notch_pos:=.3; % positions the beginning of the notch +bool(center_notch):= % centers all notches + if(thin_stem.lc/stem.lc)>=.75:true else:false fi; +bool(nonotch):=if(xheight<15) % if real low resolution + or(xheight#>15pt#) % or large character size + or(thin_stem.uc/stem.uc<.5):true % or small thin/thick ratio + else:false fi; % this overrides notching + + % PUNCTUATION, ACCENTS, MATH and PENS +round_dot_diameter:=1.1stem.uc; % diameter of dots on ;: +accent_dot_diameter:=stem.lc; % diameter of dots(!?") and dot accents +comma_dot_indent=inlimit(.25)(0,1); % indent in the comma macro for the dot +bool(prime):=false; % changes commas to prime +prime_angle:=-20; % angle of prime-like comma +bool(realsoft_accents):=true; % make accents soft as possible +accent_thin_end:=max(1,.5thin_stem.lc); % thinnest end of accents +accent_thick_end:=max(1,.75stem.lc); % thickest end of accents +mathlines:=max(1,.45pt); % thickness of lines in math characters +head_thickness:=max(1,.9mathlines); % arrowhead thickness +def mathpen=pensquare scaled mathlines enddef; % for []/=+#%-\<>_|^ +blank_space_thickness:=max(1,.7mathlines); % for space char +def slashpen=pensquare scaled max(1,.5thin_stem.lc) enddef; % in O-slash chars +def dashpen=pensquare scaled max(1,.75mathlines) enddef; % for en em + + % MISCELLANEOUS +join_radius:=.1pt; % global softness for use with softjoin +bool(softpath):=true; % softens paths in macros +narrow_amt:=inlimit(.7)(0,1); % thins strokes if narrow condition=true +w_narrow_amt:=inlimit(.3)(0,1); % thins strokes especially for eMwW oe +ebar_angle:=0; % used on the lowercase e +bool(bold):=false; % changes accent shapes if bold + +rulepen:=pensquare scaled 1; % makes screenrules 1 pixel thick +if oblique=0:let //=relax % lets // do nothing if needed otherwise + else:def //=slanted sind(oblique/cosd oblique) enddef fi; % // slants ref pts +pair upward,downward; + upward=dir(90-oblique); % "up" along oblique angle + downward=dir(-90-oblique); % "down" along oblique angle + + % ALTERNATE character specs +bool(test_all_characters):=false; % allows testing of alternate characters + alt0:=0; bool(a_full_bowl):=false; % for half/double bowls on a + alt1:=0; bool(g_full_bowl):=false; % for half/double bowls on g + alt2:=0; bool(spur):=true; % for pronged terminals on G,a,b,g,q + alt3:=0; bool(like_lowercase):=false; % alternate U + alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X + alt5:=0; bool(beveled_join):=false; % on R,K,k + alt6:=0; bool(open_tail):=false; % for 3,5,6,9 + alt7:=0; bool(diagonal_three):=false; % for diagonal as opposed to round top 3 + alt8:=0; bool(inflection_two):=true; % for 2 with inflection + alt9:=0; bool(G_spur):=true; % spur on G + alt10:=0;bool(open_four):=true; % for top of 4 + +extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];"; +extra_beginchar:=extra_beginchar&"w#:=charwd;"; % for adjust def +extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;"; % for adjust def + +for x:="a": + wanted[byte x]:=true; endfor % test these characters +let iff=always_iff; % tests all chars in the file + let show_character=draw_outlines; + if (mode<>proof):let show_character=fill_all;fi + +input rotext % Roman Text character set + + diff --git a/fonts/pandora/pnss10.mf b/fonts/pandora/pnss10.mf new file mode 100644 index 0000000000..f4b5aac6c6 --- /dev/null +++ b/fonts/pandora/pnss10.mf @@ -0,0 +1,198 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% pnss10.mf Pandora Sans Serif 10 point + +font_identifier:="PNSS"; + +mode_setup; % general setup +input pandor % general definitions used in pandora + +designsize:= 10pt#; % intended "ideal" size for parameters +width#:= 10pt#; % width of an em +maxheight#:= 7.75pt#; % max height for delimiters,e.g., [,{,( +ascender#:= 7.5pt#; % height of ascenders, e.g., on l,h,k +cap#:= 7pt#; % height of uppercase, e.g., B,H,L +xheight#:= 5pt#; % xheight of lowercase, e.g., x,n,o +descender#:= 2pt#; % depth of descenders, e.g., on j,p,q +maxdepth#:= 2.25pt#; % max depth for delimiters,e.g., [,{,( +math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math + +accent_height#:=.3(ascender#-xheight#); % places bottom of accents +accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth + +define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender, + maxdepth,math_axis,accent_depth); + +fixed_pitch_characters(false)(0); % true/false, # of characters per inch +oblique:=0; % slant of character reference points + +bowlstem.uc#:=1.05 *fixed_pt; % uppercase (uc) bowl width +bowlstem.lc#:=1 *fixed_pt; % lowercase (lc) bowl width +stem.uc#:=1 *fixed_pt; % uppercase stem width +stem.lc#:=.95 *fixed_pt; % lowercase stem width +thin_stem.uc#:=.75 *fixed_pt; % width of thin uppercase stems +thin_stem.lc#:=.7 *fixed_pt; % width of thin lowercase stems +define_pixels + (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc); + +boldness:=1; +makeknown(fitbasis.lc#)(.19*width#); +makeknown(fitbasis.uc#)(.27*width#); + +apex.uc:=inlimit(.5stem.uc)(0,stem.uc); % apex flatness in uppercase +apex.lc:=inlimit(.5stem.lc)(0,stem.lc); % apex flatness in lowercase +ov_t.uc:=.02cap; % top curve overshoot for uppercase +ov_t.lc:=.02xheight; % top curve overshoot for lowercase +ov_b.uc:=.02cap; % bottom curve overshoot for uppercase +ov_b.lc:=.02xheight; % bottom curve overshoot for lowercase +ov_apex.uc:=.02cap; % apex overshoot for uppercase +ov_apex.lc:=.02xheight; % apex overshoot for lowercase +apex_angle:=oblique; % for changing the angle at apex +if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi +if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi + + % for SERIFS and ARMS +serif_thickness:=inlimit(eps)(eps,.5xheight); % base thickness of h-serifs +terminal_thickness:=serif_thickness; % base thickness of terminal serifs +tip_thickness:= serif_thickness; % base thickness of arms +bulb_thickness:= .2pt; % (base) thickness of bulbs +x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join +cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap); % uc bracket join +bool(ctrls):=false; % for explicit placement of control pts +onbase:=inlimit(0)(0,1); % places control pt along base of serif +onstem:=inlimit(0)(0,1); % places control pt along stem of serif +midbracket_pull:= inlimit(.4)(0,1); % pulls brackets in on arms and serifs +entasis:= inlimit(.1)(0,1); % amount of arc in horizontal serif base +terminal_entasis:= inlimit(.1)(0,1); % amount of arc in terminal serif base +arm_angle:= inlimit(10)(0,60); % global angle off of 90 degrees +asc_terminal_angle:= inlimit(0)(0,60); % at ascender height: from 0 deg...h,k,l +x_terminal_angle:= inlimit(0)(0,60); % at x-height: from 0 deg...m,n,r +base_terminal_angle:=inlimit(0)(0,60); % at base line: from 0 deg...u +diag_terminal_angle:=inlimit(0)(0,60); % on diagonals: from 0 deg...k,v,w,y +hs:=.6pt; % global horizontal serif length +ts:=.6pt; % global terminal serif length +as:=.6pt; % global arm length +cs:=.65pt; % global curvedarm length +serif_constant_amt:=0pt; % adds same length amount to all serifs +bool(bulbs):=false; % arms become bulbs if true +bool(bulb_taper):=true; % changes bulbs to tapering shape +taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end +bulb_taper_amt:=1; % taper length as a % of limb thickness +c_and_s.lc:=.75stem.lc; % c,s bulb length if bulb_taper=true +c_and_s.uc:=.85stem.uc; % C,G,S bulb length if bulb_taper=true +terminal_softness:=.2stem.lc; % softness in heel of the terminal serif +arm_softness:=.2thin_stem.lc; % softness in the heel of the arm + + % ARCHES +arch_thickness.uc:=.6stem.uc; % uppercase arch thickness +arch_thickness.lc:=.6stem.lc; % lowercase arch thickness +arch_tip.uc:=.8stem.uc; % thinnest part of the uc arch +arch_tip.lc:=.8stem.lc; % thinnest part of the lc arch +arch_reference:=inlimit(.7)(.4,.95); % puts ref pts between tip/stem +arch_inner_amt:=inlimit(.8)(.4,.95); % puts arch pts between tip/ref pts +r_arch:=l_arch:=inlimit(.6)(0,1); % y-value of max outer stress on r_arch +bool(ensure_min_archthickness):=true; % guarantees minimum thickness + + % BOWLS +major_curve.uc:=thin_stem.uc; % uppercase major bowl curve thickness +major_curve.lc:=arch_thickness.lc; % lowercase major bowl curve thickness +minor_curve.uc:=.9thin_stem.uc; % uppercase minor bowl curve thickness +minor_curve.lc:=.9arch_thickness.lc; % lowercase minor bowl curve thickness +major_bowl_tip.lc:=arch_tip.lc; % lowercase major bowl tip thickness +minor_bowl_tip.lc:=.8minor_curve.lc; % lowercase minor bowl tip thickness +major_bowl_reference:=inlimit(.6)(.4,.95); % puts ref pts between tip/bowlstem +minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem +major_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts +minor_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts + +define_minimums( % these values keep a one pixel minimum + bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc, + bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc, + major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc, + major_curve.uc,minor_curve.uc); + + % ARCHES and BOWLS and CIRCULAR SHAPES +v_stress:=.52; % places point of vert stress on bowl +h_stress:=.51; % places horzstress on circular shapes +ductal:=inlimit(.25)(0,1); % for more ductal strokes: value of 1 +minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join +circ1:=inlimit(1)(.75,1.5); % tension of outer curve shapes +circ2:=inlimit(1)(.75,1.5); % tension of inner curve shapes +circ3:=inlimit(circ1-.07)(.75,1.5); % tension of outer circular_shapes + + % JUNCTURES and NOTCHES +bool(softjuncture):=false; % are junctures soft? in junct macro +juncture_opening:=inlimit(.05stem.lc)(0,stem.lc);% indent into stem at juncture +stemcut_angle:=-2; % cut into stem at angle off of 90 +archcut_angle:=0; % cuts into regular arch path +notch_length.uc:=.05stem.uc; % length of corrective notching (uc) +notch_length.lc:=.05stem.lc; % length of corrective notching (lc) +notch_width:=1; % width of corrective notching in pixels +notch_pos:=.3; % positions the beginning of the notch +bool(center_notch):= % centers all notches + if(thin_stem.lc/stem.lc)>=.75:true else:false fi; +bool(nonotch):=if(xheight<15) % if real low resolution + or(xheight#>15pt#) % or large character size + or(thin_stem.uc/stem.uc<.5):true % or small thin/thick ratio + else:false fi; % this overrides notching + + % PUNCTUATION, ACCENTS, MATH and PENS +round_dot_diameter:=1.1stem.uc; % diameter of dots on ;: +accent_dot_diameter:=stem.lc; % diameter of dots(!?") and dot accents +comma_dot_indent=inlimit(.25)(0,1); % indent in the comma macro for the dot +bool(prime):=false; % changes commas to prime +prime_angle:=-20; % angle of prime-like comma +bool(realsoft_accents):=true; % make accents soft as possible +accent_thin_end:=max(1,.5thin_stem.lc); % thinnest end of accents +accent_thick_end:=max(1,.75stem.lc); % thickest end of accents +mathlines:=max(1,.45pt); % thickness of lines in math characters +head_thickness:=max(1,.9mathlines); % arrowhead thickness +def mathpen=pensquare scaled mathlines enddef; % for []/=+#%-\<>_|^ +blank_space_thickness:=max(1,.7mathlines); % for space char +def slashpen=pensquare scaled max(1,.5thin_stem.lc) enddef; % in O-slash chars +def dashpen=pensquare scaled max(1,.75mathlines) enddef; % for en em + + % MISCELLANEOUS +join_radius:=.1pt; % global softness for use with softjoin +bool(softpath):=true; % softens paths in macros +narrow_amt:=inlimit(.7)(0,1); % thins strokes if narrow condition=true +w_narrow_amt:=inlimit(.3)(0,1); % thins strokes especially for eMwW oe +ebar_angle:=0; % used on the lowercase e +bool(bold):=false; % changes accent shapes if bold + +rulepen:=pensquare scaled 1; % makes screenrules 1 pixel thick +if oblique=0:let //=relax % lets // do nothing if needed otherwise + else:def //=slanted sind(oblique/cosd oblique) enddef fi; % // slants ref pts +pair upward,downward; + upward=dir(90-oblique); % "up" along oblique angle + downward=dir(-90-oblique); % "down" along oblique angle + + % ALTERNATE character specs +bool(test_all_characters):=false; % allows testing of alternate characters + alt0:=0; bool(a_full_bowl):=false; % for half/double bowls on a + alt1:=0; bool(g_full_bowl):=true; % for half/double bowls on g + alt2:=0; bool(spur):=true; % for pronged terminals on G,a,b,g,q + alt3:=0; bool(like_lowercase):=false; % alternate U + alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X + alt5:=0; bool(beveled_join):=true; % on R,K,k + alt6:=0; bool(open_tail):=true; % for 3,5,6,9 + alt7:=0; bool(diagonal_three):=true; % for diagonal as opposed to round top 3 + alt8:=0; bool(inflection_two):=false; % for 2 with inflection + alt9:=0; bool(G_spur):=true; % spur on G + alt10:=0;bool(open_four):=true; % for top of 4 + +extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];"; +extra_beginchar:=extra_beginchar&"w#:=charwd;"; % for adjust def +extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;"; % for adjust def + +for x:="a": + wanted[byte x]:=true; endfor % test these characters +let iff=always_iff; % tests all chars in the file + let show_character=draw_outlines; + if (mode<>proof):let show_character=fill_all;fi + +input rotext % Roman Text character set + diff --git a/fonts/pandora/pnssb10.mf b/fonts/pandora/pnssb10.mf new file mode 100644 index 0000000000..46e06090a4 --- /dev/null +++ b/fonts/pandora/pnssb10.mf @@ -0,0 +1,199 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% pnssb10.mf Pandora Sans Serif Bold 10 point + +font_identifier:="PNSSB"; + +mode_setup; % general setup +input pandor % general definitions used in pandora + +designsize:= 10pt#; % intended "ideal" size for parameters +width#:= 10pt#; % width of an em +maxheight#:= 7.75pt#; % max height for delimiters,e.g., [,{,( +ascender#:= 7.5pt#; % height of ascenders, e.g., on l,h,k +cap#:= 7pt#; % height of uppercase, e.g., B,H,L +xheight#:= 5pt#*1.02; % xheight of lowercase, e.g., x,n,o +descender#:= 2pt#; % depth of descenders, e.g., on j,p,q +maxdepth#:= 2.25pt#; % max depth for delimiters,e.g., [,{,( +math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math + +accent_height#:=.3(ascender#-xheight#); % places bottom of accents +accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth + +define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender, + maxdepth,math_axis,accent_depth); + +fixed_pitch_characters(false)(0); % true/false, # of characters per inch +oblique:=0; % slant of character reference points + +bowlstem.uc#:=1.05*1.4 *fixed_pt; % uppercase (uc) bowl width +bowlstem.lc#:=1*1.4 *fixed_pt; % lowercase (lc) bowl width +stem.uc#:=1*1.4 *fixed_pt; % uppercase stem width +stem.lc#:=.95*1.4 *fixed_pt; % lowercase stem width +thin_stem.uc#:=.75*1.35*fixed_pt; % width of thin uppercase stems +thin_stem.lc#:=.7*1.35 *fixed_pt; % width of thin lowercase stems +define_pixels + (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc); + +boldness:=1/1.3; +makeknown(fitbasis.lc#)(.19*width#-.8fixed_pt); +makeknown(fitbasis.uc#)(.27*width#-.8fixed_pt); + +apex.uc:=inlimit(.6stem.uc)(0,stem.uc); % apex flatness in uppercase +apex.lc:=inlimit(.6stem.lc)(0,stem.lc); % apex flatness in lowercase +ov_t.uc:=.02cap; % top curve overshoot for uppercase +ov_t.lc:=.02xheight; % top curve overshoot for lowercase +ov_b.uc:=.02cap; % bottom curve overshoot for uppercase +ov_b.lc:=.02xheight; % bottom curve overshoot for lowercase +ov_apex.uc:=.01cap; % apex overshoot for uppercase +ov_apex.lc:=.01xheight; % apex overshoot for lowercase +apex_angle:=oblique; % for changing the angle at apex +if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi +if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi + + % for SERIFS and ARMS +serif_thickness:=inlimit(eps)(eps,.5xheight); % base thickness of h-serifs +terminal_thickness:=serif_thickness; % base thickness of terminal serifs +tip_thickness:= serif_thickness; % base thickness of arms +bulb_thickness:= .2pt; % (base) thickness of bulbs +x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join +cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap); % uc bracket join +bool(ctrls):=false; % for explicit placement of control pts +onbase:=inlimit(0)(0,1); % places control pt along base of serif +onstem:=inlimit(0)(0,1); % places control pt along stem of serif +midbracket_pull:= inlimit(.4)(0,1); % pulls brackets in on arms and serifs +entasis:= inlimit(.1)(0,1); % amount of arc in horizontal serif base +terminal_entasis:= inlimit(.1)(0,1); % amount of arc in terminal serif base +arm_angle:= inlimit(10)(0,60); % global angle off of 90 degrees +asc_terminal_angle:= inlimit(0)(0,60); % at ascender height: from 0 deg...h,k,l +x_terminal_angle:= inlimit(0)(0,60); % at x-height: from 0 deg...m,n,r +base_terminal_angle:=inlimit(0)(0,60); % at base line: from 0 deg...u +diag_terminal_angle:=inlimit(0)(0,60); % on diagonals: from 0 deg...k,v,w,y +hs:=.6pt; % global horizontal serif length +ts:=.6pt; % global terminal serif length +as:=.6pt; % global arm length +cs:=.65pt; % global curvedarm length +serif_constant_amt:=0pt; % adds same length amount to all serifs +bool(bulbs):=false; % arms become bulbs if true +bool(bulb_taper):=true; % changes bulbs to tapering shape +taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end +bulb_taper_amt:=1; % taper length as a % of limb thickness +c_and_s.lc:=.75stem.lc; % c,s bulb length if bulb_taper=true +c_and_s.uc:=.85stem.uc; % C,G,S bulb length if bulb_taper=true +terminal_softness:=.2stem.lc; % softness in heel of the terminal serif +arm_softness:=.2thin_stem.lc; % softness in the heel of the arm + + % ARCHES +arch_thickness.uc:=.6stem.uc; % uppercase arch thickness +arch_thickness.lc:=.6stem.lc; % lowercase arch thickness +arch_tip.uc:=.8stem.uc; % thinnest part of the uc arch +arch_tip.lc:=.8stem.lc; % thinnest part of the lc arch +arch_reference:=inlimit(.85)(.4,.95); % puts ref pts between tip/stem +arch_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts +r_arch:=l_arch:=inlimit(.6)(0,1); % y-value of max outer stress on r_arch +bool(ensure_min_archthickness):=true; % guarantees minimum thickness + + % BOWLS +major_curve.uc:=arch_thickness.uc; % uppercase major bowl curve thickness +major_curve.lc:=arch_thickness.lc; % lowercase major bowl curve thickness +minor_curve.uc:=.9arch_thickness.uc; % uppercase minor bowl curve thickness +minor_curve.lc:=.9arch_thickness.lc; % lowercase minor bowl curve thickness +major_bowl_tip.lc:=arch_tip.lc; % lowercase major bowl tip thickness +minor_bowl_tip.lc:=.8minor_curve.lc; % lowercase minor bowl tip thickness +major_bowl_reference:=inlimit(.63)(.4,.95); % puts ref pts between tip/bowlstem +minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem +major_bowl_inner_amt:=inlimit(.75)(.4,.95); % puts arch pts between tip/ref pts +minor_bowl_inner_amt:=inlimit(.75)(.4,.95); % puts arch pts between tip/ref pts + +define_minimums( % these values keep a one pixel minimum + bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc, + bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc, + major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc, + major_curve.uc,minor_curve.uc); + + % ARCHES and BOWLS and CIRCULAR SHAPES +v_stress:=.52; % places point of vert stress on bowl +h_stress:=.51; % places horzstress on circular shapes +ductal:=inlimit(.25)(0,1); % for more ductal strokes: value of 1 +minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join +circ1:=inlimit(1)(.75,1.5); % tension of outer curve shapes +circ2:=inlimit(1)(.75,1.5); % tension of inner curve shapes +circ3:=inlimit(circ1-.07)(.75,1.5); % tension of outer circular_shapes + + % JUNCTURES and NOTCHES +bool(softjuncture):=true; % are junctures soft? in junct macro +juncture_opening:=inlimit(.1stem.lc)(0,stem.lc);% indent into stem at juncture +stemcut_angle:=-2; % cut into stem at angle off of 90 +archcut_angle:=10; % cuts into regular arch path +notch_length.uc:=.05stem.uc; % length of corrective notching (uc) +notch_length.lc:=.05stem.lc; % length of corrective notching (lc) +notch_width:=1; % width of corrective notching in pixels +notch_pos:=.3; % positions the beginning of the notch +bool(center_notch):= % centers all notches + if(thin_stem.lc/stem.lc)>=.75:true else:false fi; +bool(nonotch):=if(xheight<15) % if real low resolution + or(xheight#>15pt#) % or large character size + or(thin_stem.uc/stem.uc<.5):true % or small thin/thick ratio + else:false fi; % this overrides notching + + % PUNCTUATION, ACCENTS, MATH and PENS +round_dot_diameter:=1.1stem.uc; % diameter of dots on ;: +accent_dot_diameter:=.9stem.lc; % diameter of dots(!?") and dot accents +comma_dot_indent=inlimit(.25)(0,1); % indent in the comma macro for the dot +bool(prime):=false; % changes commas to prime +prime_angle:=-20; % angle of prime-like comma +bool(realsoft_accents):=true; % make accents soft as possible +accent_thin_end:=max(1,.5thin_stem.lc); % thinnest end of accents +accent_thick_end:=max(1,.75stem.lc); % thickest end of accents +mathlines:=max(1,.45pt*1.4); % thickness of lines in math characters +head_thickness:=max(1,.9mathlines); % arrowhead thickness +def mathpen=pensquare scaled mathlines enddef; % for []/=+#%-\<>_|^ +blank_space_thickness:=max(1,.7mathlines); % for space char +def slashpen=pensquare scaled max(1,.6thin_stem.lc) enddef; % in O-slash chars +def dashpen=pensquare scaled max(1,.75mathlines) enddef; % for en em + + % MISCELLANEOUS +join_radius:=.1pt; % global softness for use with softjoin +bool(softpath):=true; % softens paths in macros +narrow_amt:=inlimit(.7)(0,1); % thins strokes if narrow condition=true +w_narrow_amt:=inlimit(.3)(0,1); % thins strokes especially for eMwW oe +ebar_angle:=0; % used on the lowercase e +bool(bold):=true; % changes accent shapes if bold + +rulepen:=pensquare scaled 1; % makes screenrules 1 pixel thick +if oblique=0:let //=relax % lets // do nothing if needed otherwise + else:def //=slanted sind(oblique/cosd oblique) enddef fi; % // slants ref pts +pair upward,downward; + upward=dir(90-oblique); % "up" along oblique angle + downward=dir(-90-oblique); % "down" along oblique angle + + % ALTERNATE character specs +bool(test_all_characters):=false; % allows testing of alternate characters + alt0:=0; bool(a_full_bowl):=false; % for half/double bowls on a + alt1:=0; bool(g_full_bowl):=true; % for half/double bowls on g + alt2:=0; bool(spur):=true; % for pronged terminals on G,a,b,g,q + alt3:=0; bool(like_lowercase):=false; % alternate U + alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X + alt5:=0; bool(beveled_join):=true; % on R,K,k + alt6:=0; bool(open_tail):=true; % for 3,5,6,9 + alt7:=0; bool(diagonal_three):=true; % for diagonal as opposed to round top 3 + alt8:=0; bool(inflection_two):=false; % for 2 with inflection + alt9:=0; bool(G_spur):=true; % spur on G + alt10:=0;bool(open_four):=true; % for top of 4 + +extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];"; +extra_beginchar:=extra_beginchar&"w#:=charwd;"; % for adjust def +extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;"; % for adjust def + +for x:="a": + wanted[byte x]:=true; endfor % test these characters +let iff=always_iff; % tests all chars in the file + let show_character=draw_outlines; + if (mode<>proof):let show_character=fill_all;fi + +input rotext % Roman Text character set + + diff --git a/fonts/pandora/pnssi10.mf b/fonts/pandora/pnssi10.mf new file mode 100644 index 0000000000..7450d78e78 --- /dev/null +++ b/fonts/pandora/pnssi10.mf @@ -0,0 +1,199 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% pnssi10.mf Pandora Sans Serif Oblique 10 point + +font_identifier:="PNSSI"; + +mode_setup; % general setup +input pandor % general definitions used in pandora + +designsize:= 10pt#; % intended "ideal" size for parameters +width#:= 10pt#; % width of an em +maxheight#:= 7.75pt#; % max height for delimiters,e.g., [,{,( +ascender#:= 7.5pt#; % height of ascenders, e.g., on l,h,k +cap#:= 7pt#; % height of uppercase, e.g., B,H,L +xheight#:= 5pt#; % xheight of lowercase, e.g., x,n,o +descender#:= 2pt#; % depth of descenders, e.g., on j,p,q +maxdepth#:= 2.25pt#; % max depth for delimiters,e.g., [,{,( +math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math + +accent_height#:=.3(ascender#-xheight#); % places bottom of accents +accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth + +define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender, + maxdepth,math_axis,accent_depth); + +fixed_pitch_characters(false)(0); % true/false, # of characters per inch +oblique:=10; % slant of character reference points + +bowlstem.uc#:=1.05 *fixed_pt; % uppercase (uc) bowl width +bowlstem.lc#:=1 *fixed_pt; % lowercase (lc) bowl width +stem.uc#:=1 *fixed_pt; % uppercase stem width +stem.lc#:=.95 *fixed_pt; % lowercase stem width +thin_stem.uc#:=.75 *fixed_pt; % width of thin uppercase stems +thin_stem.lc#:=.7 *fixed_pt; % width of thin lowercase stems +define_pixels + (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc); + +boldness:=1; +makeknown(fitbasis.lc#)(.19*width#); +makeknown(fitbasis.uc#)(.27*width#); + +apex.uc:=inlimit(.5stem.uc)(0,stem.uc); % apex flatness in uppercase +apex.lc:=inlimit(.5stem.lc)(0,stem.lc); % apex flatness in lowercase +ov_t.uc:=.02cap; % top curve overshoot for uppercase +ov_t.lc:=.02xheight; % top curve overshoot for lowercase +ov_b.uc:=.02cap; % bottom curve overshoot for uppercase +ov_b.lc:=.02xheight; % bottom curve overshoot for lowercase +ov_apex.uc:=.02cap; % apex overshoot for uppercase +ov_apex.lc:=.02xheight; % apex overshoot for lowercase +apex_angle:=oblique; % for changing the angle at apex +if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi +if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi + + % for SERIFS and ARMS +serif_thickness:=inlimit(eps)(eps,.5xheight); % base thickness of h-serifs +terminal_thickness:=serif_thickness; % base thickness of terminal serifs +tip_thickness:= serif_thickness; % base thickness of arms +bulb_thickness:= .2pt; % (base) thickness of bulbs +x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join +cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap); % uc bracket join +bool(ctrls):=false; % for explicit placement of control pts +onbase:=inlimit(0)(0,1); % places control pt along base of serif +onstem:=inlimit(0)(0,1); % places control pt along stem of serif +midbracket_pull:= inlimit(.4)(0,1); % pulls brackets in on arms and serifs +entasis:= inlimit(.1)(0,1); % amount of arc in horizontal serif base +terminal_entasis:= inlimit(.1)(0,1); % amount of arc in terminal serif base +arm_angle:= inlimit(10)(0,60); % global angle off of 90 degrees +asc_terminal_angle:= inlimit(0)(0,60); % at ascender height: from 0 deg...h,k,l +x_terminal_angle:= inlimit(0)(0,60); % at x-height: from 0 deg...m,n,r +base_terminal_angle:=inlimit(0)(0,60); % at base line: from 0 deg...u +diag_terminal_angle:=inlimit(0)(0,60); % on diagonals: from 0 deg...k,v,w,y +hs:=.6pt; % global horizontal serif length +ts:=.6pt; % global terminal serif length +as:=.6pt; % global arm length +cs:=.65pt; % global curvedarm length +serif_constant_amt:=0pt; % adds same length amount to all serifs +bool(bulbs):=false; % arms become bulbs if true +bool(bulb_taper):=true; % changes bulbs to tapering shape +taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end +bulb_taper_amt:=1; % taper length as a % of limb thickness +c_and_s.lc:=.75stem.lc; % c,s bulb length if bulb_taper=true +c_and_s.uc:=.85stem.uc; % C,G,S bulb length if bulb_taper=true +terminal_softness:=.2stem.lc; % softness in heel of the terminal serif +arm_softness:=.2thin_stem.lc; % softness in the heel of the arm + + % ARCHES +arch_thickness.uc:=.6stem.uc; % uppercase arch thickness +arch_thickness.lc:=.6stem.lc; % lowercase arch thickness +arch_tip.uc:=.8stem.uc; % thinnest part of the uc arch +arch_tip.lc:=.8stem.lc; % thinnest part of the lc arch +arch_reference:=inlimit(.7)(.4,.95); % puts ref pts between tip/stem +arch_inner_amt:=inlimit(.8)(.4,.95); % puts arch pts between tip/ref pts +r_arch:=l_arch:=inlimit(.6)(0,1); % y-value of max outer stress on r_arch +bool(ensure_min_archthickness):=true; % guarantees minimum thickness + + % BOWLS +major_curve.uc:=thin_stem.uc; % uppercase major bowl curve thickness +major_curve.lc:=arch_thickness.lc; % lowercase major bowl curve thickness +minor_curve.uc:=.9thin_stem.uc; % uppercase minor bowl curve thickness +minor_curve.lc:=.9arch_thickness.lc; % lowercase minor bowl curve thickness +major_bowl_tip.lc:=arch_tip.lc; % lowercase major bowl tip thickness +minor_bowl_tip.lc:=.8minor_curve.lc; % lowercase minor bowl tip thickness +major_bowl_reference:=inlimit(.6)(.4,.95); % puts ref pts between tip/bowlstem +minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem +major_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts +minor_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts + +define_minimums( % these values keep a one pixel minimum + bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc, + bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc, + major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc, + major_curve.uc,minor_curve.uc); + + % ARCHES and BOWLS and CIRCULAR SHAPES +v_stress:=.52; % places point of vert stress on bowl +h_stress:=.51; % places horzstress on circular shapes +ductal:=inlimit(.25)(0,1); % for more ductal strokes: value of 1 +minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join +circ1:=inlimit(1)(.75,1.5); % tension of outer curve shapes +circ2:=inlimit(1)(.75,1.5); % tension of inner curve shapes +circ3:=inlimit(circ1-.07)(.75,1.5); % tension of outer circular_shapes + + % JUNCTURES and NOTCHES +bool(softjuncture):=false; % are junctures soft? in junct macro +juncture_opening:=inlimit(.05stem.lc)(0,stem.lc);% indent into stem at juncture +stemcut_angle:=-2; % cut into stem at angle off of 90 +archcut_angle:=0; % cuts into regular arch path +notch_length.uc:=.05stem.uc; % length of corrective notching (uc) +notch_length.lc:=.05stem.lc; % length of corrective notching (lc) +notch_width:=1; % width of corrective notching in pixels +notch_pos:=.3; % positions the beginning of the notch +bool(center_notch):= % centers all notches + if(thin_stem.lc/stem.lc)>=.75:true else:false fi; +bool(nonotch):=if(xheight<15) % if real low resolution + or(xheight#>15pt#) % or large character size + or(thin_stem.uc/stem.uc<.5):true % or small thin/thick ratio + else:false fi; % this overrides notching + + % PUNCTUATION, ACCENTS, MATH and PENS +round_dot_diameter:=1.1stem.uc; % diameter of dots on ;: +accent_dot_diameter:=stem.lc; % diameter of dots(!?") and dot accents +comma_dot_indent=inlimit(.25)(0,1); % indent in the comma macro for the dot +bool(prime):=false; % changes commas to prime +prime_angle:=-20; % angle of prime-like comma +bool(realsoft_accents):=true; % make accents soft as possible +accent_thin_end:=max(1,.5thin_stem.lc); % thinnest end of accents +accent_thick_end:=max(1,.75stem.lc); % thickest end of accents +mathlines:=max(1,.45pt); % thickness of lines in math characters +head_thickness:=max(1,.9mathlines); % arrowhead thickness +def mathpen=pensquare scaled mathlines enddef; % for []/=+#%-\<>_|^ +blank_space_thickness:=max(1,.7mathlines); % for space char +def slashpen=pensquare scaled max(1,.5thin_stem.lc) enddef; % in O-slash chars +def dashpen=pensquare scaled max(1,.75mathlines) enddef; % for en em + + % MISCELLANEOUS +join_radius:=.1pt; % global softness for use with softjoin +bool(softpath):=true; % softens paths in macros +narrow_amt:=inlimit(.7)(0,1); % thins strokes if narrow condition=true +w_narrow_amt:=inlimit(.3)(0,1); % thins strokes especially for eMwW oe +ebar_angle:=0; % used on the lowercase e +bool(bold):=false; % changes accent shapes if bold + +rulepen:=pensquare scaled 1; % makes screenrules 1 pixel thick +if oblique=0:let //=relax % lets // do nothing if needed otherwise + else:def //=slanted sind(oblique/cosd oblique) enddef fi; % // slants ref pts +pair upward,downward; + upward=dir(90-oblique); % "up" along oblique angle + downward=dir(-90-oblique); % "down" along oblique angle + + % ALTERNATE character specs +bool(test_all_characters):=false; % allows testing of alternate characters + alt0:=0; bool(a_full_bowl):=false; % for half/double bowls on a + alt1:=0; bool(g_full_bowl):=true; % for half/double bowls on g + alt2:=0; bool(spur):=true; % for pronged terminals on G,a,b,g,q + alt3:=0; bool(like_lowercase):=false; % alternate U + alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X + alt5:=0; bool(beveled_join):=true; % on R,K,k + alt6:=0; bool(open_tail):=true; % for 3,5,6,9 + alt7:=0; bool(diagonal_three):=true; % for diagonal as opposed to round top 3 + alt8:=0; bool(inflection_two):=false; % for 2 with inflection + alt9:=0; bool(G_spur):=true; % spur on G + alt10:=0;bool(open_four):=true; % for top of 4 + +extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];"; +extra_beginchar:=extra_beginchar&"w#:=charwd;"; % for adjust def +extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;"; % for adjust def + +for x:="a": + wanted[byte x]:=true; endfor % test these characters +let iff=always_iff; % tests all chars in the file + let show_character=draw_outlines; + if (mode<>proof):let show_character=fill_all;fi + +input rotext % Roman Text character set + + diff --git a/fonts/pandora/pntt9.mf b/fonts/pandora/pntt9.mf new file mode 100644 index 0000000000..12167c9440 --- /dev/null +++ b/fonts/pandora/pntt9.mf @@ -0,0 +1,199 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% pntt9.mf Pandora Single Pitch 15 characters per inch fits with 9pt + +font_identifier:="PNTT"; + +mode_setup; % general setup +input pandor % general definitions used in pandora + +designsize:= 9pt#; % intended "ideal" size for parameters +width#:= 9pt#; % width of an em +maxheight#:= 7.75pt# *.85; % max height for delimiters,e.g., [,{,( +ascender#:= 7.5pt# *.85; % height of ascenders, e.g., on l,h,k +cap#:= 7pt# *.85; % height of uppercase, e.g., B,H,L +xheight#:= 5pt# *.85; % xheight of lowercase, e.g., x,n,o +descender#:= 2pt# *.85; % depth of descenders, e.g., on j,p,q +maxdepth#:= 2.25pt# *.85; % max depth for delimiters,e.g., [,{,( +math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math + +accent_height#:=.3(ascender#-xheight#); % places bottom of accents +accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth + +define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender, + maxdepth,math_axis,accent_depth); + +fixed_pitch_characters(true)(15); % true/false, # of characters per inch +oblique:=0; % slant of character reference points + +bowlstem.uc#:=.9 *fixed_pt; % uppercase (uc) bowl width +bowlstem.lc#:=.9 *fixed_pt; % lowercase (lc) bowl width +stem.uc#:=.9 *fixed_pt; % uppercase stem width +stem.lc#:=.9 *fixed_pt; % lowercase stem width +thin_stem.uc#:=.6 *fixed_pt; % width of thin uppercase stems +thin_stem.lc#:=.6 *fixed_pt; % width of thin lowercase stems +define_pixels + (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc); + +boldness:=1; +makeknown(fitbasis.lc#)(.21*width#); +makeknown(fitbasis.uc#)(.30*width#); + +apex.uc:=inlimit(.9stem.uc)(0,stem.uc); % apex flatness in uppercase +apex.lc:=inlimit(.9stem.lc)(0,stem.lc); % apex flatness in lowercase +ov_t.uc:=.01cap; % top curve overshoot for uppercase +ov_t.lc:=.01xheight; % top curve overshoot for lowercase +ov_b.uc:=.01cap; % bottom curve overshoot for uppercase +ov_b.lc:=.01xheight; % bottom curve overshoot for lowercase +ov_apex.uc:=0; % apex overshoot for uppercase +ov_apex.lc:=0; % apex overshoot for lowercase +apex_angle:=oblique; % for changing the angle at apex +if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi +if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi + + % for SERIFS and ARMS +serif_thickness:=inlimit(0)(eps,.5xheight); % base thickness of horz serifs +terminal_thickness:=serif_thickness; % base thickness of terminal serifs +tip_thickness:= serif_thickness; % base thickness of arms +bulb_thickness:= .5stem.lc; % (base) thickness of bulbs +x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join +cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap); % uc bracket join +bool(ctrls):=false; % for explicit placement of control pts +onbase:=inlimit(0)(0,1); % places control pt along base of serif +onstem:=inlimit(0)(0,1); % places control pt along stem of serif +midbracket_pull:= inlimit(.6)(0,1); % pulls brackets in on arms and serifs +entasis:= inlimit(0)(0,1); % amount of arc in horizontal serif base +terminal_entasis:= inlimit(0)(0,1); % amount of arc in terminal serif base +arm_angle:= inlimit(10)(0,60); % global angle off of 90 degrees +asc_terminal_angle:= inlimit(0)(0,60); % at ascender height: from 0 deg...h,k,l +x_terminal_angle:= inlimit(0)(0,60); % at x-height: from 0 deg...m,n,r +base_terminal_angle:=inlimit(0)(0,60); % at base line: from 0 deg...u +diag_terminal_angle:=inlimit(0)(0,60); % on diagonals: from 0 deg...k,v,w,y +hs:=0; % global horizontal serif length +ts:=0; % global terminal serif length +as:=0; % global arm length +cs:=.5pt; % global curvedarm length +serif_constant_amt:=0pt; % adds same length amount to all serifs +bool(bulbs):=false; % arms become bulbs if true +bool(bulb_taper):=true; % changes bulbs to tapering shape +taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end +bulb_taper_amt:=0; % taper length as a % of limb thickness +c_and_s.lc:=.65stem.lc; % c,s bulb length if bulb_taper=true +c_and_s.uc:=.85stem.uc; % C,G,S bulb length if bulb_taper=true +terminal_softness:=0; % softness in heel of the terminal serif +arm_softness:=0; % softness in the heel of the arm + + % ARCHES +arch_thickness.uc:=thin_stem.uc; % uppercase arch thickness +arch_thickness.lc:=thin_stem.lc; % lowercase arch thickness +arch_tip.uc:=arch_thickness.uc; % thinnest part of the uc arch +arch_tip.lc:=arch_thickness.lc; % thinnest part of the lc arch +arch_reference:=inlimit(.65)(.4,.95); % puts ref pts between tip/stem +arch_inner_amt:=inlimit(.8)(.4,.95); % puts arch pts between tip/ref pts +r_arch:=l_arch:=inlimit(.6)(0,1); % y-value of max outer stress on r_arch +bool(ensure_min_archthickness):=true; % guarantees minimum thickness + + % BOWLS +major_curve.uc:=arch_thickness.uc; % uppercase major bowl curve thickness +major_curve.lc:=arch_thickness.lc; % lowercase major bowl curve thickness +minor_curve.uc:=.9arch_thickness.uc; % uppercase minor bowl curve thickness +minor_curve.lc:=.9arch_thickness.lc; % lowercase minor bowl curve thickness +major_bowl_tip.lc:=major_curve.lc; % lowercase major bowl tip thickness +minor_bowl_tip.lc:=minor_curve.lc; % lowercase minor bowl tip thickness +major_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem +minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem +major_bowl_inner_amt:=inlimit(.9)(.4,.95); % puts arch pts between tip/ref pts +minor_bowl_inner_amt:=inlimit(.9)(.4,.95); % puts arch pts between tip/ref pts + +define_minimums( % these values keep a one pixel minimum + bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc, + bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc, + major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc, + major_curve.uc,minor_curve.uc); + + % ARCHES and BOWLS and CIRCULAR SHAPES +v_stress:=.52; % places point of vert stress on bowl +h_stress:=.53; % places horzstress on circular shapes +ductal:=inlimit(.15)(0,1); % for more ductal strokes: value of 1 +minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join +circ1:=inlimit(.9)(.75,1.5); % tension of outer curve shapes +circ2:=inlimit(.9)(.75,1.5); % tension of inner curve shapes +circ3:=inlimit(.9)(.75,1.5); % tension of outer circular_shapes + + % JUNCTURES and NOTCHES +bool(softjuncture):=false; % are junctures soft? in junct macro +juncture_opening:=inlimit(0)(0,stem.lc);% indent into stem at juncture +stemcut_angle:=0; % cut into stem at angle off of 90 +archcut_angle:=0; % cuts into regular arch path +notch_length.uc:=.05stem.uc; % length of corrective notching (uc) +notch_length.lc:=.05stem.lc; % length of corrective notching (lc) +notch_width:=1; % width of corrective notching in pixels +notch_pos:=.3; % positions the beginning of the notch +bool(center_notch):= % centers all notches + if(thin_stem.lc/stem.lc)>=.75:true else:false fi; +bool(nonotch):=if(xheight<15) % if real low resolution + or(xheight#>15pt#) % or large character size + or(thin_stem.uc/stem.uc<.5):true % or small thin/thick ratio + else:false fi; % this overrides notching + + % PUNCTUATION, ACCENTS, MATH and PENS +round_dot_diameter:=1.1stem.uc; % diameter of dots on ;: +accent_dot_diameter:=stem.lc; % diameter of dots(!?") and dot accents +comma_dot_indent=inlimit(.25)(0,1); % indent in the comma macro for the dot +bool(prime):=false; % changes comma to prime +prime_angle:=-20; % angle of prime-like comma +bool(realsoft_accents):=false; % make accents soft as possible +accent_thin_end:=max(1,.6thin_stem.lc); % thinnest end of accents +accent_thick_end:=max(1,.6stem.lc); % thickest end of accents +mathlines:=max(1,.45pt); % thickness of lines in math characters +head_thickness:=max(1,.9mathlines); % arrowhead thickness +def mathpen=pensquare scaled mathlines enddef; % for []/=+#%-\<>_|^ +blank_space_thickness:=max(1,.7mathlines); % for space char +def slashpen=pensquare scaled max(1,.5thin_stem.lc) enddef; % in O-slash chars +def dashpen=pensquare scaled max(1,.75mathlines) enddef; % for en em + + % MISCELLANEOUS +join_radius:=.1pt; % global softness for use with softjoin +bool(softpath):=true; % softens paths in macros +narrow_amt:=inlimit(.7)(0,1); % thins strokes if narrow condition=true +w_narrow_amt:=inlimit(.3)(0,1); % thins strokes especially for eMwW oe +ebar_angle:=0; % used on the lowercase e +bool(bold):=false; % changes accent shapes if bold + +rulepen:=pensquare scaled 1; % makes screenrules 1 pixel thick +if oblique=0:let //=relax % lets // do nothing if needed otherwise + else:def //=slanted sind(oblique/cosd oblique) enddef fi; % // slants ref pts +pair upward,downward; + upward=dir(90-oblique); % "up" along oblique angle + downward=dir(-90-oblique); % "down" along oblique angle + + % ALTERNATE character specs +bool(test_all_characters):=false; % allows testing of alternate characters + alt0:=0; bool(a_full_bowl):=false; % for half/double bowls on a + alt1:=0; bool(g_full_bowl):=true; % for half/double bowls on g + alt2:=0; bool(spur):=true; % for pronged terminals on G,a,b,g,q + alt3:=0; bool(like_lowercase):=false; % alternate U + alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X + alt5:=0; bool(beveled_join):=false; % on R,K,k + alt6:=0; bool(open_tail):=false; % for 3,5,6,9 + alt7:=0; bool(diagonal_three):=false; % for diagonal as opposed to round top 3 + alt8:=0; bool(inflection_two):=false; % for 2 with inflection + alt9:=0; bool(G_spur):=false; % spur on G + alt10:=0;bool(open_four):=true; % for top of 4 + +extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];"; +extra_beginchar:=extra_beginchar&"w#:=charwd;"; % for adjust def +extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;"; % for adjust def + +for x:="a": + wanted[byte x]:=true; endfor % test these characters +let iff=always_iff; % tests all chars in the file + let show_character=draw_outlines; + if (mode<>proof):let show_character=fill_all;fi + +input tttext % Typewriter Text character set + + diff --git a/fonts/pandora/punctr.mf b/fonts/pandora/punctr.mf new file mode 100644 index 0000000000..5a5bb6279b --- /dev/null +++ b/fonts/pandora/punctr.mf @@ -0,0 +1,139 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% punctr.mf punctuation: for roman text set + +% 8 characters + + +iff OK "x": "Cross for Polish l and L"; %******* 1 ACCENT WIDTH x 20 degrees + beginchar(oct"040",accent_w*width#+b_mono#,ascender#,0); + + save_num(theta)=max(0,20-.5oblique); % angle of the bar + save_num(thickness)=.5[accent_thin_end,accent_thick_end]*1/cosd theta; + min_limit(join_radius)(.5thickness); + bot lft z1l=(0,.4h)//; multpos(1,2)(thickness,90+ if bold:theta else:0 fi); + rt x2l=lft x1l+w; z2l=z1l+(whatever,0) rotated theta; + z0=.5[z1l,z2l]; + + p1=(z0 soften(z2l,z2r,z1r,z1l) z0)--cycle; + + showpoints(0,1,2); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + +% Theta here is the angle of the bar + + + + +iff OK "'": "Right quotes or closing quotes"; + beginchar(oct"042",accent_w*width#+b_mono#,cap#,0); + save_num(head)=accent_dot_diameter; + top z1=(.5head,.75[xheight,cap]-.5head)//; + top z2=(w-.5head,y1)//; + ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0); + ref2=comma(z2,head,min(.6xheight,1.5pt),accent_thin_end,0); + p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique); + p2=ref2 rotatedaround (z2,if prime:prime_angle fi -oblique); + showpoints(1,2); +adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + + + +iff OK "-": "Hyphen"; + beginchar(oct"055",.33width#+b_mono#,cap#,0); + pickup mathpen; + lft z1=(0,math_axis)//; + rt z2=lft z1+(w,0); + draw z1--z2; +adjust(v_f*fitbasis.uc#+m_a*b_mfit#,v_f*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% use different mathpen for softness +% character position, but not shape slants with obliqueness +% must make sure that the plus/minus have the same widths + + +% rotation and slant of position with obliqueness +iff OK "`": "Left quotes or open quotes"; + beginchar(oct"134",accent_w*width#+b_mono#,cap#,0); + save_num(head)=accent_dot_diameter; + top z1=(.5head,.75[xheight,cap]-.5head-min(.6xheight,2pt))//; + top z2=(w-.5head,y1)//; + ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0); + ref2=comma(z2,head,min(.6xheight,1.5pt),accent_thin_end,0); + p1=ref1 rotatedaround (z1,180 if prime:prime_angle fi -oblique); + p2=ref2 rotatedaround (z2,180 if prime:prime_angle fi -oblique); + showpoints(1,2); +adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + +% rotation and slant of position with obliqueness + + + +iff OK "x": "Dot accent"; + beginchar(oct"137",accent_w*width#+b_mono#, + accent_height#+xheight#+2/3accent_depth#,0); + bot z1=(.5w,h-accent_dot_diameter)//; + p1=dot.b(z1,accent_dot_diameter); + showpoints(1); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + +% no slant of shape with obliqueness + + +iff OK "-": "En-Dash"; + beginchar(oct"173",.5width#+.5mono#,cap#,0); + pickup dashpen; + lft z1=(0,math_axis)//; + rt z2=lft z1+(w,0); + draw z1--z2; +adjust(.25mono#,.25mono#); +show_character; endchar; + +% use different dashpen for softness +% character position, but not shape slants with obliqueness +% must make sure that the plus/minus have the same widths + + +iff OK "-": "Em-Dash"; + beginchar(oct"174",width#+mono#,cap#,0); + pickup dashpen; + lft z1=(0,math_axis)//; + rt z2=lft z1+(w,0); + draw z1--z2; +adjust(0,0); +show_character; endchar; + +% use different dashpen for softness +% character position, but not shape slants with obliqueness +% must make sure that the plus/minus have the same widths + + + +iff OK "x": "Long Hungarian umlaut accent"; + beginchar(oct"175",.8accent_w*width#+b_mono#, + accent_height#+xheight#+accent_depth#,0); + + top rt z1=(round(.45w),h)//; + bot lft z2=(0,h-max(1,accent_depth))//; + top rt z3=(w,h)//; + bot lft z4=(round(.55w),h-max(1,accent_depth))//; + p1=prime_accent(z1,z2,accent_thick_end,accent_thin_end); + p2=prime_accent(z3,z4,accent_thick_end,accent_thin_end); + showpoints(1,2,3,4); + +draw (0,xheight)--(w,xheight); +adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); +show_character; endchar; + diff --git a/fonts/pandora/puncts.mf b/fonts/pandora/puncts.mf new file mode 100644 index 0000000000..bd31a7b43a --- /dev/null +++ b/fonts/pandora/puncts.mf @@ -0,0 +1,77 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% puncts.mf punctuation: Spanish inverted !? + +% 2 characters + + +iff OK "!": "Inverted exclamation point (Spanish)"; + beginchar(inv_exclamation,I_w*width#+a_mono#,cap#,.5descender#); + + min_limit(join_radius)(.5thin_stem.uc); + bot z1=(round(.5w),0); + z0=bot z1+(0,.5accent_dot_diameter); + top z3=(x1,h)//; pos3(stem.uc,-oblique); + onaline(0,3)(2); bot y2=max(bot y1+accent_dot_diameter+2,.3y3); + pos2(thin_stem.uc,-oblique); + + ref1=dot.b(z1,accent_dot_diameter); + ref2=(z3--z3l)softjoin(z3l--z2l)softjoin(z2l--z2r)softjoin(z2r--z3r) + softjoin(z3r--z3)--cycle; + + z10=(.5w,.5(cap-d)); + p1=ref1 rotatedaround (z10,180); + p2=ref2 rotatedaround (z10,180); + + showpoints(0,1,2,3); +adjust(v_a*fitbasis.uc#+m_a*a_mfit#,v_a*fitbasis.uc#+m_a*a_mfit#); +show_character; endchar; + +% rotation of shape and slant of position with obliqueness + +% Shape taken exactly from the exclamation point character, but rotated by 180 +% degrees and shifted. This does throw the labels off though. +% Done this way, so that changes to one are more easily +% transferred to the other. Could also have altered reference points, which +% may still need to be done if the rounding turns out bad + + + +iff OK "?": "Inverted question mark (Spanish)"; + beginchar(inv_question_mark,.35width#+b_mono#,cap#,.5descender#); %.4width + min_limit(join_radius)(.5thin_stem.uc); + lft z1=(0,.9h)//; + rt z3r=(w,.75h)//; lft z3l=z3r-(stem.uc,0); + top y2r=bot y2l+max(1,major_curve.uc)=h+ov_t.uc; + good_x_for(2r)(z1,z3r,.5)a; good_x_for(2l)(z1+(bulb_thickness,0),z3l,.5)b; + bot z7=(.35w,0); + z8=bot z7+(0,.5accent_dot_diameter); + bot z6=(bot z7+(0,max(bot y7+accent_dot_diameter+2,.3y2r)))//; + multpos(5,6)(thin_stem.uc,-oblique); + onaline(6,8)(5); y5=max(y7+accent_dot_diameter+2,.35y2r); + z4l=.4[z5l,z3l]; z4r=.4[z5r,z3r]; + + ref1=(bulb.tl(z1,z2l,z2r,cs,max(1,.75bulb_thickness),90)soft i_t + z3l{downward} i_t z4l o_t z5l{downward}--z6l)softjoin(z6l--z6r) + softjoin(z6r-- z5r{upward} i_t z4r o_t z3r{upward} o_t z2r{left})--cycle; + ref2=dot.b(z7,accent_dot_diameter); + + z10=(.5w,.5(cap-d)); + p1=ref1 rotatedaround (z10,180); + p2=ref2 rotatedaround (z10,180); + + showpoints(1,2,3,4,5,6,7,8,10); +adjust(v_C*fitbasis.uc#+m_a*b_mfit#,v_C*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% Shape taken exactly from the question mark character, but rotated by 180 +% degrees and shifted. Fitting on left and right was switched. +% This does throw the labels off though. +% Done this way, so that changes to one are more easily +% transferred to the other. Could also have altered reference points, which +% may still need to be done if the rounding turns out bad + + diff --git a/fonts/pandora/punctt.mf b/fonts/pandora/punctt.mf new file mode 100644 index 0000000000..c6899e5d0f --- /dev/null +++ b/fonts/pandora/punctt.mf @@ -0,0 +1,183 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% punctt.mf punctuation: for typewriter text set + +% 8 characters + + +iff OK "-": "Minus sign"; + beginchar(oct"055",.5width#+b_mono#,cap#,0); + pickup mathpen; + lft z1=(0,math_axis)//; + rt z2=lft z1+(w,0); + draw z1--z2; +adjust(v_a*fitbasis.uc#+m_a*b_mfit#,v_a*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% use different mathpen for softness +% character position, but not shape slants with obliqueness +% must make sure that the plus/minus have the same widths + + +iff OK "<": "Less than"; + beginchar(oct"074",.4width#+b_mono#,cap#,0); + min_limit(join_radius)(.5mathlines); + lft z2r=lft z4r=(0,math_axis)//; + top z1r=(lft x2r+min(w,math_axis+.5h),math_axis+.4h); + bot z3r=(lft x2r+min(w,math_axis+.5h),math_axis-.4h); + multpos(1,2)(mathlines,angle(z1r-z2r)+90); + multpos(3,4)(mathlines,angle(z4r-z3r)+90); + z40=(z1l--z2l)intersectionpoint(z3l--z4l); + + p1=(z40 soften(z3l,z3r,z2r,z1r,z1l) z40)--cycle; + + showpoints(1,2,3,4,40); +adjust(v_F*fitbasis.uc#+m_a*b_mfit#,v_H*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + +iff OK ">": "Greater than"; + beginchar(oct"076",.4width#+b_mono#,cap#,0); + min_limit(join_radius)(.5mathlines); + rt z2r=rt z4r=(min(w,math_axis+.5h),math_axis)//; + top z1r=(0,math_axis+.4h); + bot z3r=(0,math_axis-.4h); + multpos(1,2)(mathlines,angle(z1r-z2r)-90); + multpos(3,4)(mathlines,angle(z4r-z3r)-90); + z40=(z1l--z2l)intersectionpoint(z3l--z4l); + + p1=(z40 soften(z3l,z3r,z2r,z1r,z1l) z40)--cycle; + + showpoints(1,2,3,4,40); +adjust(v_H*fitbasis.uc#+m_a*b_mfit#,v_F*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% character position, but not shape slants with obliqueness +% maximum width=1.5 math_axis + + +iff OK "\": "Left leaning slash"; % need to add shift if w>.45h + beginchar(oct"134",.45width#+b_mono#,maxheight#,maxdepth#); + pickup mathpen rotated angle((0,h)//-(min(w,.5(h+d)),-d)//); + top lft z1=(0,h)//; + bot rt z2=(min(w,.5(h+d)),-d)//; + x1:=min(x1,x2-2); + draw z1--z2; +adjust(v_H*fitbasis.uc#+m_a*b_mfit#,v_H*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + +% use different mathpen for softness +% limits character to vertical line minus 2 pixels + + +iff OK "_": "Underscore"; + beginchar(oct"137",.5width#+mono#,cap#,0); + pickup mathpen; + top lft z1=(0,0); + top rt z2=(w,0); + draw z1--z2; +adjust (0,0); show_character; endchar; + +% use different mathpen for softness +% no slant of shape with obliqueness +% placement just below the baseline; meant for computer programs where the +% underscore often has the same token value as a letter + + + + +iff OK "{": "Left curly brace"; + beginchar(oct"173",.4width#+b_mono#,maxheight#,maxdepth#); + + save_num(width_limit)=min(w,.4(h+d)); + z40=(width_limit,.5(h-d)); + z41=(width_limit,h)rotatedaround(z40//,-oblique); + z42=(width_limit,-d)rotatedaround(z40//,-oblique); + + pos0(max(1,.5thin_stem.uc),90-oblique); + pos1(max(1,.75thin_stem.uc),90-oblique); + multpos(2,4)(max(1,.75stem.uc),180-oblique); + pos3(max(1,.5stem.uc),180-oblique); + pos5(max(1,.75thin_stem.uc),-90-oblique); + pos6(max(1,.5thin_stem.uc),-90-oblique); + multpos(20,21)(2,90-oblique); + + lft z2r=.25[z41,z42]+.7(.95width_limit,0)rotated(180-oblique); + lft z3r=.5[z41,z42] + (.95width_limit,0)rotated(180-oblique); z20=z3r; + rt z21 =.5[z41,z42] + ( width_limit,0)rotated(180-oblique); + lft z4r=.75[z41,z42]+.7(.95width_limit,0)rotated(180-oblique); + top z1r=(x41-.2width_limit,h); + bot z5r=(x42-.2width_limit,-d); + z0r=whatever[z41,z42]; bot y0l=bot y1l; + z6r=whatever[z41,z42]; top y6l=top y5l; + + ref1=z3l{dir -oblique} i_t z4l{downward} i_t z5l{right}...z6l; + ref2=z6r...z5r{left} o_t z4r{upward} o_t z20l{-dir -oblique}--z21l-- + z21r--z20r{dir -oblique} o_t z2r{upward} o_t z1r{right}...z0r; + ref3=z0l...z1l{left} i_t z2l{downward} i_t z3l+(0,epsilon){-dir -oblique}; + + if softpath: + p1=ref1 softjoin(z6l--z6r)softjoin ref2 softjoin(z0r--z0l)softjoin ref3 + --cycle; + else:p1=ref1--ref2--ref3--cycle; fi + + showpoints(0,1,2,3,4,5,6,20,21,40,41,42); +adjust(v_H*fitbasis.uc#+m_a*b_mfit#,v_H*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + +iff OK "}": "Right curly brace"; + beginchar(oct"175",.4width#+b_mono#,maxheight#,maxdepth#); + + save_num(width_limit)=min(.95w,.4(h+d)); + z40=(0,.5(h-d)); + z41=(0,h)rotatedaround(z40//,-oblique); + z42=(0,-d)rotatedaround(z40//,-oblique);; + + pos0(max(1,.5thin_stem.uc),90-oblique); + pos1(max(1,.75thin_stem.uc),90-oblique); + multpos(2,4)(max(1,.75stem.uc),-oblique); + pos3(max(1,.5stem.uc),-oblique); + pos5(max(1,.75thin_stem.uc),-90-oblique); + pos6(max(1,.5thin_stem.uc),-90-oblique); + multpos(20,21)(2,90-oblique); + + rt z2r=.25[z41,z42]+ .7(width_limit,0)rotated(-oblique); + rt z3r=.5[z41,z42] + (width_limit,0)rotated(-oblique); z20=z3r; + rt z21=.5[z41,z42] +(min(w,.4(h+d)),0)rotated(-oblique); + rt z4r=.75[z41,z42]+ .7(width_limit,0)rotated(-oblique); + top z1r=(x41+.2width_limit,h); + bot z5r=(x42+.2width_limit,-d); + z0r=whatever[z41,z42]; bot y0l=bot y1l; + z6r=whatever[z41,z42]; top y6l=top y5l; + + ref1=z3l{-dir -oblique} i_t z4l{downward} i_t z5l{left}...z6l; + ref2=z6r...z5r{right} o_t z4r{upward} o_t z20l{dir -oblique}--z21l-- + z21r--z20r{-dir -oblique} o_t z2r{upward} o_t z1r{left}...z0r; + ref3=z0l...z1l{right} i_t z2l{downward} i_t z3l+(0,epsilon){dir -oblique}; + + if softpath: + p1=ref1 softjoin(z6l--z6r)softjoin ref2 softjoin(z0r--z0l)softjoin ref3 + --cycle; + else:p1=ref1--ref2--ref3--cycle; fi + + showpoints(0,1,2,3,4,5,6,20,40,41,42); +adjust(v_H*fitbasis.uc#+m_a*b_mfit#, v_H*fitbasis.uc#+m_a*b_mfit#); +show_character; endchar; + + +iff OK "|": "Vertical bar"; % need to add shift if w>.45h + beginchar(oct"174",I_w*width#+a_mono#,maxheight#,maxdepth#); + pickup mathpen; + z0=(.5w,.5[-d,h])//; + top z1=(x0,h); + bot z2=(x0,-d); + draw z1--z2; +adjust(v_A*fitbasis.uc#+m_a*a_mfit#,v_A*fitbasis.uc#+m_a*a_mfit#); +show_character; endchar; + +% use different mathpen for softness +% always vertical; no slant but shifts position with obliqueness diff --git a/fonts/pandora/rotext.mf b/fonts/pandora/rotext.mf new file mode 100644 index 0000000000..dde2ffa9cb --- /dev/null +++ b/fonts/pandora/rotext.mf @@ -0,0 +1,38 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% rotext.mf Roman Text character set + +font_coding_scheme:="TeX text"; + +inv_exclamation:=oct"074"; inv_question_mark:=oct"076"; + +font_slant oblique; % TeX fontdimen 1 slant +font_normal_space mono#+.3width#; % TeX fontdimen 2 normal word space +font_normal_stretch .15width#; % TeX fontdimen 3 interword stretch +font_normal_shrink .1width#; % TeX fontdimen 4 interword shrink +font_x_height xheight#; % Tex fontdinem 5 for accents +font_quad width#; % TeX fontdimen 6 quad width +font_extra_space .1width#; % TeX fontdimen 7 extra space(period) + + input widths % reference width and fitting information + input panlowers % (26) lowercase roman alphabet + input caps % (26) uppercase roman alphabet + input number % (10) numerals + input pangreeku % (11) uppercase greek + input panaccent % (19) accents and ligatures common in sets + input panpunct % (21) punctuation: common in all char sets + input punctr % ( 8) punctuation: for roman text set + input puncts % ( 2) punctuation: Spanish inverted ?! + input fligs % ( 5) ligatures with "f" + + input ligs % ligtable designations and kerning info +ligtable "?": "`"=:inv_question_mark; +ligtable "!": "`"=:inv_exclamation; + +bye + + + diff --git a/fonts/pandora/ttchar.mf b/fonts/pandora/ttchar.mf new file mode 100644 index 0000000000..efff587bcf --- /dev/null +++ b/fonts/pandora/ttchar.mf @@ -0,0 +1,76 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% ttchar.mf characters for typewriter text set + +% 5 characters + + +iff OK "x": "Up arrow"; + beginchar(oct"013",num_width_c#+c_mono#,cap#,0); + pickup mathpen rotated -oblique; + top z1=(.5w,h)//; bot z2=(.5w,-d)//; + arrow.t(z1,w,.2h); + draw z1--z2; +adjust(.5num_fit_c#+m_a*c_mfit#,.5num_fit_c#+m_a*c_mfit#); +show_character; endchar; + + +iff OK "x": "Down arrow"; + beginchar(oct"014",num_width_c#+c_mono#,cap#,0); + pickup mathpen rotated -oblique; + top z1=(.5w,h)//; bot z2=(.5w,-d)//; + arrow.b(z2,w,.2h); + draw z1--z2; +adjust(.5num_fit_c#+m_a*c_mfit#,.5num_fit_c#+m_a*c_mfit#); +show_character; endchar; + + +iff OK "x": "Single non-directional quote"; + beginchar(oct"015",I_w*width#+a_mono#,cap#,0); + save_num(head)=accent_dot_diameter; save_bool(prime)=true; + top z1=(round(.5w),.75[xheight,cap]-.5head)//; + ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,.5); + p1=ref1 rotatedaround (z1,-oblique); + showpoints(1); +adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#); +show_character; endchar; + +% rotation and slant of position with obliqueness + + +iff OK "x": "Blank space character"; + beginchar(oct"040",.5width#+mono#,math_axis#,descender#); + save_num(edge_distance)=max(1,round(.1w)); + pickup pensquare scaled blank_space_thickness rotated -oblique; + top lft z1=(edge_distance,.3h)//; + bot lft z2=(edge_distance,-.5d)//; + bot rt z3=(w-edge_distance,-.5d)//; + top rt z4=(w-edge_distance,.3h)//; + draw z1--z2--z3--z4; +adjust (0,0); show_character; endchar; + +% use different pen for softness +% no slant of shape with obliqueness + + +iff OK "x": "Double non-directional quotes"; + beginchar(oct"042",accent_w*width#+b_mono#,cap#,0); + save_num(head)=accent_dot_diameter; save_bool(prime)=true; + top z1=(round(.5head),.75[xheight,cap]-.5head)//; + top z2=(round(w-.5head),y1)//; + ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0); + ref2=comma(z2,head,min(.6xheight,1.5pt),accent_thin_end,0); + p1=ref1 rotatedaround (z1,-oblique); + p2=ref2 rotatedaround (z2,-oblique); + showpoints(1,2); +adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); +show_character; endchar; + + + + + + diff --git a/fonts/pandora/tttext.mf b/fonts/pandora/tttext.mf new file mode 100644 index 0000000000..4d2287a2ea --- /dev/null +++ b/fonts/pandora/tttext.mf @@ -0,0 +1,34 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% tttext.mf Typewriter Text character set + +font_coding_scheme:="TeX typewriter text"; + +inv_exclamation:=oct"016"; inv_question_mark:=oct"017"; + +font_slant oblique; % TeX fontdimen 1 slant +font_normal_space mono#; % TeX fontdimen 2 normal word monospace +font_normal_stretch 0; % TeX fontdimen 3 (no interword stretch) +font_normal_shrink 0; % TeX fontdimen 4 (no interword shrink) +font_x_height xheight#; % Tex fontdimen 5 for accents +font_quad width#; % TeX fontdimen 6 quad width +font_extra_space width#; % TeX fontdimen 7 extra space(period) + + input widths % reference width and fitting infor + input panlowers % (26) lowercase roman alphabet + input caps % (26) uppercase roman alphabet + input number % (10) numerals + input pangreeku % (11) uppercase greek + input panaccent % (19) accents and ligatures common in sets + input panpunct % (21) punctuation: common in all char sets + input puncts % ( 2) punctuation: Spanish inverted ?! + input punctt % ( 8) punctuation: for roman text set + input ttchar % ( 5) ligatures with "f" + +ligtable "?": "`"=:inv_question_mark; +ligtable "!": "`"=:inv_exclamation; + +bye diff --git a/fonts/pandora/widths.mf b/fonts/pandora/widths.mf new file mode 100644 index 0000000000..fc7cfcae11 --- /dev/null +++ b/fonts/pandora/widths.mf @@ -0,0 +1,136 @@ +%***************************************************************************** +% Copyright (c) 1989 by N. N. Billawala +%***************************************************************************** + + +% widths.mf a file containing width calculation information for the chars + +% Essentially all width information is contained in this file to eliminate +% the need to alter the individual character files if width changes are desired. + +% Parts of characters are separated so that amounts can be altered as shapes +% change for the lowercase, the stems are all generally of the same weight, +% with possible variation in diagonals. +% The uppercase has more variation in combination of thin/thick vertical +% stems, so the method for choosing widths was changed to depend on +% stem weights and an idea of proportions +% Fixed width characters and numbers have a constant total width, +% but reference and fitting proportions vary within this space +% Punctuation was partly based on uc/lc widths, but otherwise +% independent amounts given. + +vardef variable_character_reference_widths= + save thick,thin,thickk,thinn,bowll; + + thick=stem.uc#/max(width#,1); uc:=.35*boldness; + uc1=.35*boldness; uc4=.35; % always=.35; + uc2:=1+if boldness<1:.25 else:0 fi; % uc2 for diagonals + thin=thin_stem.uc#/max(width#,1); lc.arch_space:=.21*boldness; + thickk=stem.lc#/max(width#,1); lc.bowl_space:=.24*boldness; + thinn=thin_stem.lc#/max(width#,1); lc.o_space:=.27*boldness; + bowll=bowlstem.lc#/max(width#,1); lc.diagonal_space:=.3*boldness; + + i_w=thickk; % i l the "_w" is for "width" + j_w=thickk+.55*lc.arch_space; % j + s_w=uc2*(thickk+lc.o_space); % s t z *** + c_w=uc2*(bowll+lc.o_space); % c *** + a_w=thickk+bowll+lc.arch_space; % a(halfbowl) + b_w=thickk+bowll+lc.bowl_space; % b a d e g p q k ss-lig + r_w=2thickk+.5*lc.arch_space; % r f + n_w=2thickk+lc.arch_space; % n h u + m_w=3thickk+2*lc.arch_space; % m + o_w=2bowll+lc.bowl_space; % g(halfbowl) + oo_w=2bowll+lc.o_space; % o + v_w=(uc2)*(thickk+thinn)+lc.diagonal_space; % v x y *** + w_w=(uc2)*(thickk+thinn)+thickk+1.5lc.diagonal_space; % w *** + oe_w=oo_w+o_w-bowll; % oe + ae_w=2b_w-bowll; % ae + accent_w=.8n_w; % accents + + I_w=thick; % I + J_w=thick+.5uc; % J + E_w=thick+.85uc4; % E F L GAMMA **** + T_w=thick+1.25uc1; % T **** + B_w=2thick+.75uc; % B P + R_w=2thick+.85uc1; % R PI XI K ****SIGMA + H_w=2thick+uc; % H C + D_w=2thick+1.1uc; % D G + O_w=2thick+1.25uc; % O Q DELTA THETA + N_w=H_w; % N + S_w=thick+thin+.75uc; % S Z **** + U_w=thick+thin+uc; % U **** + A_w=(uc2)*(thick+thin)+1.25uc1; % A V Y LAMBDA X **** + M_w=(uc2)*2(thick+thin)+1.25uc; % M + W_w=(uc2)*(2thick+thin)+1.5uc1; % W **** + AE_w=E_w+2/3*A_w; % AEligature + OE_w=E_w+O_w-thick; % OEligature + + v_a=.50; % for straight strokes the "v_" is for "variable" + v_b=.42; % for arches + v_c=.28; % for bowls + v_d=.24; % for thick diagonals + v_e=v_d-(thickk-thinn); % for thin diagonals + v_f=.20; % for half open shapes + v_g=.10; % for open strokes + v_h=.08; % for open strokes + + v_A=.5; % for thick straight + v_B=v_A-(thick-thin); % for thin straight + v_C=.2; % for bowls + v_D=.16; % for thick diagonals + v_E=v_D-(thick-thin); % for thin diagonals + v_F=.2; % for half open sides + v_G=.16; % for half-very open sides + v_H=.12; % for very open sides + v_I=.1; % for the L + +enddef; + +variable_character_reference_widths; + +%***** for numbers ***** + +num_width_a#=.2width#; num_fit_a#+num_width_a#=.55width#; % 1 +num_width_b#=.4width#; num_fit_b#+num_width_b#=.55width#; % 2 3 5 7 $ +num_width_c#=.44width#; num_fit_c#+num_width_c#=.55width#; % 6 9 0 +num_width_d#=.47width#; num_fit_d#+num_width_d#=.55width#; % 8 +num_width_e#=.50width#; num_fit_e#+num_width_e#=.55width#; % 4 + +%***** for single pitch fonts ***** + +% *_*mono# gives the character reference width within the total per char width +% *_mfit# is the amount of space left after the reference width is taken away +% *_*mono#+*_mfit# give the total width of the character +% In the case of single pitch fonts, the total width is always the same. +% In cases where, e.g., three instead of only one width is desired, the +% value of 1*mono# can be changed + + a_mono#:=.6mono#; a_mfit#+a_mono#=mono#; % fjrJ',.:; + b_mono#:=.7mono#; b_mfit#+b_mono#=mono#; % "mid" width + c_mono#:=.75mono#; c_mfit#+c_mono#=mono#; % abdgkpq069 + d_mono#:=.8mono#; d_mfit#+d_mono#=mono#; % eotvxyz4689CDGKOQ%&*^ + e_mono#:=.9mono#; e_mfit#+e_mono#=mono#; % AVXY4 + f_mono#:=.9mono#; f_mfit#+f_mono#=mono#; % mwMW@ ae oe AE OE + +define_pixels(a_mono,b_mono,c_mono,d_mono,e_mono,f_mono, + a_mfit,b_mfit,c_mfit,d_mfit,e_mfit,f_mfit); + +% The following give fit adjustments for single pitch characters + + m_a=.5; % this amt is always .5 + m_b=.55; m_bb+m_b=1; % BDEFGKPR7 + m_c=.55; m_cc+m_c=1; % abdghkmnpqu() + m_d=.6; m_dd+m_d=1; % C + m_e=.65; m_ee+m_e=1; % cflrt AE [] + m_f=.75; m_ff+m_f=1; % JL + +%********** + +% need to account for serifs +% recognizing that a straight ascender may carry different visual value as +% straight of x-height + +%********** + + + |