diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 23:38:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 23:38:21 +0000 |
commit | 215012a8d684889983ec2c0629e1c704e6853d9c (patch) | |
tree | ebf1271bd71869069824935ae8a5678745bf8bce /Master/texmf-dist/fonts/source/public/misc | |
parent | 1af3d19d6dbcbf309667d9cb4aa3cdda914914a9 (diff) |
trunk/Master/texmf-dist/fonts/source
git-svn-id: svn://tug.org/texlive/trunk@101 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/fonts/source/public/misc')
29 files changed, 4353 insertions, 0 deletions
diff --git a/Master/texmf-dist/fonts/source/public/misc/black.mf b/Master/texmf-dist/fonts/source/public/misc/black.mf new file mode 100644 index 00000000000..1837b50c66e --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/black.mf @@ -0,0 +1,4 @@ +if mode=ljfour: input blacklj; +elseif mode=cx: input blackcx; +elseif mode=aps: input blackaps; +fi diff --git a/Master/texmf-dist/fonts/source/public/misc/blackaps.mf b/Master/texmf-dist/fonts/source/public/misc/blackaps.mf new file mode 100644 index 00000000000..b3ea7720326 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/blackaps.mf @@ -0,0 +1,10 @@ +% Black font for APS with proofsheet resolution approx 90 pixels per inch +% (Used with output of GF2DVI for the METAFONTbook illustrations) + +if mode<>aps: errmessage "This file is for aps only"; fi + +font_identifier "BLACKAPS"; +picture pix_picture; pix_wd := pix_ht := 8; +pix_picture := unitpixel scaled 8; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/blackcx.mf b/Master/texmf-dist/fonts/source/public/misc/blackcx.mf new file mode 100644 index 00000000000..c920d897e5f --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/blackcx.mf @@ -0,0 +1,9 @@ +% Black font for CX with proofsheet resolution 75 pixels per inch. + +if mode<>cx: errmessage "This file is for cx only"; fi + +font_identifier "BLACKCX"; +picture pix_picture; pix_wd := pix_ht := 4; +pix_picture := unitpixel scaled 4; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/blackimagen.mf b/Master/texmf-dist/fonts/source/public/misc/blackimagen.mf new file mode 100644 index 00000000000..6171bdbbaa3 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/blackimagen.mf @@ -0,0 +1,9 @@ +% Black font for Imagen with proofsheet resolution 75 pixels per inch + +if mode<>imagen: errmessage "This file is for imagen only"; fi + +font_identifier "BLACKIMAGEN"; +picture pix_picture; pix_wd := pix_ht := 4; +pix_picture := unitpixel scaled 4; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/blacklino.mf b/Master/texmf-dist/fonts/source/public/misc/blacklino.mf new file mode 100644 index 00000000000..6bc06c41119 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/blacklino.mf @@ -0,0 +1,10 @@ +% Black font for LINO with proofsheet resolution approx 90 pixels per inch +% (Used with output of GF2DVI for the METAFONTbook illustrations) + +if mode<>linohi: errmessage "This file is for linotronic only"; fi + +font_identifier "BLACKLINO"; +picture pix_picture; pix_wd := pix_ht := 14; +pix_picture := unitpixel scaled 14; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/blacklj.mf b/Master/texmf-dist/fonts/source/public/misc/blacklj.mf new file mode 100644 index 00000000000..640f36ea508 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/blacklj.mf @@ -0,0 +1,9 @@ +% Black font for LJ with proofsheet resolution 150 pixels per inch. + +if mode<>ljfour: errmessage "This file is for ljfour only"; fi + +font_identifier "BLACKLJ"; +picture pix_picture; pix_wd := pix_ht := 4; +pix_picture := unitpixel scaled 4; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/cmman.mf b/Master/texmf-dist/fonts/source/public/misc/cmman.mf new file mode 100644 index 00000000000..3e0ccced4ff --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/cmman.mf @@ -0,0 +1,511 @@ +% Variants of Computer Modern, specially for the TeX/METAFONT manuals + +if unknown cmbase: input cmbase fi +mode_setup; + +def generate suffix t= enddef; + +inner cmchar; + +font_size 10pt#; +font_identifier "CMMAN"; +font_coding_scheme "PI"; + +input cmtt10; font_setup; + +cmchar "Cross between 0 and O"; +beginchar("0",9u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0); +superness:=.77; +x2r=round max(.7u,1.45u-.5curve); x4r=w-x2r; x1=x3=.5w; +y1r=h+o; y3r=-o; y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +penlabels(1,2,3,4); endchar; + +input cmssq8; slant:=sind 12/cosd 12; font_setup; + +cmchar "Lowercase Greek beta"; +beginchar(oct"014",9.5u#,asc_height#,desc_depth#); +italcorr .5[x_height#,asc_height#]*slant-u#; +adjust_fit(0,0); pickup fine.nib; +pos0(hair,180); pos1(hair,180); pos2(vair,90); +pos3(stem,0); pos4(vair,-90); pos5(hair,-180); +pos6(vair,-270); pos7(curve,-360); pos8(vair,-450); pos9(hair,-540); +x0=x1=x9; lft x0l=hround(1.5u-.5hair); x2=x4=x6=x8=.5w+.25u; +rt x3r=hround(w-1.5u); rt x7r=hround(w-1.5u+.5curve); rt x5l=hround(x4-u); +bot y0=-d; y1=top y6r=x_height; top y2r=h+oo; y3=.5[y2,y4]; +y5=.5[y4,y6]; top y6r-bot y4r=vstem+eps; bot y8=-oo; y7=y9=.5[y6,y8]; +if y6l<y4l: y6l:=y4l:=y5; fi +filldraw stroke z0e---z1e...pulled_arc.e(2,3) + & pulled_arc.e(3,4)...{up}z5e; % stem and upper bowl +filldraw stroke z5e{up}...pulled_arc.e(6,7) + & pulled_arc.e(7,8)...{up}z9e; % lower bowl +math_fit(desc_depth#*slant+.5hair#-u#,.7x_height#*slant+.5curve#-1.5u#); +penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +cmchar "Lowercase thorn"; +beginchar(oct"015",10u#+serif_fit#,asc_height#,desc_depth#); +italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); +adjust_fit(serif_fit#,0); +pickup tiny.nib; pos1(stem',0); pos2(stem,0); +pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; +lft x1l=hround(2.5u-.5stem'); top y1=h; +numeric edge; edge=rt x2r; +pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180); +pos4(vair',90); pos5(curve,0); pos6(vair,-90); +rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height]; +x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo; +rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height; +x6=x3; bot y6r=-oo; +(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]); +filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5) + &z5e{down}...{5(x6-x5),y6-y5}z6e; % bowl +y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); +pickup tiny.nib; bot y2=-d; +filldraw stroke z1e--z0'e--z0e--z2e; % stem +pickup crisp.nib; pos8(hair,0); pos7'(stem,0); +z7'=z2; x8l=x7'l; bot y8=0; +filldraw stroke z7'e--z8e; % point +if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif + dish_serif(2,0,b,1/3,jut,c,1/3,0); fi % lower serif +penlabels(0,1,2,3,4,5,6,8); endchar; + +input cmr10; font_setup; + +message "Parentheses"; +code:=ASCII "0"; % the characters will be 123456789: +for c=0,1,2,4,infinity: +cmchar "Left paren with curl "&decimal c; +beginchar(incr code,7u#,body_height#,paren_depth#); +italcorr body_height#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); +rt x1r=rt x3r=round(w-u); lft x2l=round(x1-4u if monospace: +4/3u fi); +top y1=h; y2=.5[y1,y3]=math_axis; +filldraw stroke z1e{curl c}..z2e..{curl c}z3e; % arc +penlabels(1,2,3); endchar; + +cmchar "Right paren with curl "&decimal c; +beginchar(incr code,7u#,body_height#,paren_depth#); +italcorr math_axis#*slant-.5u#; +adjust_fit(0,0); pickup fine.nib; +pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0); +lft x1l=lft x3l=round u; rt x2r=round(x1+4u if monospace: -4/3u fi); +top y1=h; y2=.5[y1,y3]=math_axis; +filldraw stroke z1e{curl c}..z2e..{curl c}z3e; % arc +penlabels(1,2,3); endchar; +endfor + +message "big G"; +u#:=50/36pt#; % unit width +width_adj#:=0pt#; % width adjustment for certain characters +serif_fit#:=0pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=0/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=0pt#; % extra space added to all sidebars + +body_height#:=12pt#+250/36pt#; % height of tallest characters +asc_height#:=body_height#; % height of lowercase ascenders +cap_height#:=body_height#; % height of caps +fig_height#:=body_height#; % height of numerals +x_height#:=155/250asc_height#; % height of lowercase without ascenders +math_axis#:=90/250asc_height#; % axis of symmetry for math symbols +bar_height#:=87/250asc_height#; % height of crossbar in lowercase e +comma_depth#:=70/250asc_height#;% depth of comma below baseline +desc_depth#:=comma_depth#; % depth of lowercase descenders + +crisp#:=0pt#; % diameter of serif corners +tiny#:=1.2/36pt#; % diameter of rounded corners +fine#:=1.1/36pt#; % diameter of sharply rounded corners +thin_join#:=1.1/36pt#; % width of extrafine details +hair#:=14/36pt#; % lowercase hairline breadth +stem#:=75/36pt#; % lowercase stem breadth +curve#:=90/36pt#; % lowercase curve breadth +ess#:=81/36pt#; % breadth in middle of lowercase s +flare#:=66/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=114/36pt#; % diameter of dots +cap_hair#:=17/36pt#; % uppercase hairline breadth +cap_stem#:=96/36pt#; % uppercase stem breadth +cap_curve#:=111/36pt#; % uppercase curve breadth +cap_ess#:=105/36pt#; % breadth in middle of uppercase s +rule_thickness#:=1pt#; % thickness of lines in math symbols + +dish#:=2/36pt#; % amount erased at top or bottom of serifs +bracket#:=50/36pt#; % vertical distance from serif base to tangent +jut#:=70/36pt#; % protrusion of lowercase serifs +cap_jut#:=2.5pt#; % protrusion of uppercase serifs +beak_jut#:=25/36pt#; % horizontal protrusion of beak serifs +beak#:=comma_depth#; % vertical protrusion of beak serifs +vair#:=12/36pt#; % vertical diameter of hairlines +notch_cut#:=22pt#; % maximum breadth above or below notches +bar#:=17/36pt#; % lowercase bar thickness +slab#:=17/36pt#; % serif and arm thickness +cap_bar#:=17/36pt#; % uppercase bar thickness +cap_band#:=17/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=22pt#; % max breadth above/below uppercase notches +serif_drop#:=10/36pt#; % vertical drop of sloped serifs +stem_corr#:=3/36pt#; % for small refinements of stem breadth +vair_corr#:=2/36pt#; % for small refinements of hairline height +apex_corr#:=0pt#; % extra width at diagonal junctions + +o#:=12/36pt#; % amount of overshoot for curves +apex_o#:=12/36pt#; % amount of overshoot for diagonal junctions + +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +fudge:=1; % factor applied to weights of heavy characters +math_spread:=0; % extra openness of math symbols +superness:=1/sqrt2; % parameter for superellipses +superpull:=1/6; % extra openness inside bowls +beak_darkness:=11/30; % fraction of triangle inside beak serifs +ligs:=2; % level of ligatures to be included + +square_dots:=false; % should dots be square? +hefty:=false; % should we try hard not to be overweight? +serifs:=true; % should serifs and bulbs be attached? +monospace:=false; % should all characters have the same width? +variant_g:=false; % should an italic-style g be used? +low_asterisk:=false; % should the asterisk be centered at the axis? +math_fitting:=false; % should math-mode spacing be used? + +font_setup; + +cmchar "The letter G"; +if serifs: beginchar("G",14u#,cap_height#,0); + italcorr cap_height#*slant-1.5u#-.5cap_serif_fit#; + adjust_fit(0,.5cap_serif_fit#); + pickup tiny.nib; pos0(cap_stem,0); pos7(cap_stem,0); + rt x0r=hround(w-2u); y0=good.y(.1[bar_height,x_height]+1); x7=x0; + pickup fine.nib; + if hefty: bot y7=0; pos5(cap_stem,0); x5=x0; top y5=tiny.top y0; + else: pos5(cap_hair,0); pos8(cap_stem,0); + y7=.5bar_height; z5l=z8l; z8=z7; x9=x8r; bot y9=0; + filldraw z8l{down}..{4(x9-x8),y9-y8}z9--z8r--cycle; fi % spur + pos1(cap_hair,0); pos2(cap_band,90); + pos3(cap_curve,180); pos4(cap_band,270); + rt x1r=hround(w-2u); lft x3r=hround u; x2=x4=.55[x3,x1]; + top y2r=h+o; bot y4r=-o; y3=.5[y2,y4]; + bot y1=vround max(.6h,x_height-.5vair); + (x2l',y2l)=whatever[z2r,z1l]; x2l:=x2l'; + (x4l',y4l)=whatever[z4r,z5l]; x4l:=x4l'; + filldraw stroke z1e{x2-x1,10(y2-y1)} + ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...z5e{up}; % arc + x6=x1r; top y6=h+o; x1r-x1'=2cap_curve-fine; y1'=y1; + path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..{left}z2; + numeric t; t=xpart(upper_arc intersectiontimes (z6--z1')); + filldraw subpath(0,t) of upper_arc--z6--z1r--z1--cycle; % barb + pickup tiny.nib; filldraw stroke z0e--z7e; % stem + dish_serif(0,7,a,1/3,max(cap_jut,2.25u),b,1/3,1.25u); % serif + math_fit(-.3cap_height#*slant-.5u#,ic#); +else: beginchar("G",12u#,cap_height#,0); + italcorr cap_height#*slant-.5u#; + adjust_fit(0,0); + pickup fine.nib; pos1(1.2flare,80); pos2(slab,90); + pos3(cap_curve,180); pos4(slab,270); pos5(flare,270); + rt x1r=hround(w-1.35u); x2=x4=.5w+u; + lft x3r=hround max(u,2u-.5cap_curve); rt x5l=hround(w-1.2u); + top y1r=vround .93h+o; top y2r=h+o; y3=.5h; + bot y4r=-o; bot y5r=vround .07h-o; + filldraw stroke rterm.e(2,1,right,.9,4)&super_arc.e(2,3) + & super_arc.e(3,4) & term.e(4,5,right,1,4); % arc and terminals + pos0(stem,0); pos7(stem,0); + z7r=z5r; x0=x7; top y0=1+vround .35[bar_height,x_height]; + filldraw stroke z0e--z7e; % stem + pos8(cap_bar,90); pos9(cap_bar,90); + z0r=z9r; y8=y9; lft x8=hround x4; + filldraw stroke z8e--z9e; % bar + math_fit(-.3cap_height#*slant-.5u#,.5ic#); fi +penlabels(0,1,1',2,3,4,5,6,7,8,9); endchar; + +message "The TeXbook title"; +f:=20/3; % magnification factor (based mostly on cmssdc10) +u#:=f*19/36pt#; % unit width +width_adj#:=f*15/36pt#; % width adjustment for certain characters +serif_fit#:=-f*8/36pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=-f*9/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=-.2u#; % extra space added to all sidebars + +body_height#:=f*270/36pt#; % height of tallest characters +asc_height#:=f*265/36pt#; % height of lowercase ascenders +cap_height#:=f*265/36pt#; % height of caps +fig_height#:=f*265/36pt#; % height of numerals +x_height#:=f*170/36pt#; % height of lowercase without ascenders +math_axis#:=f*95/36pt#; % axis of symmetry for math symbols +bar_height#:=f*95/36pt#; % height of crossbar in lowercase e +comma_depth#:=f*40/36pt#; % depth of comma below baseline +desc_depth#:=f*60/36pt#; % depth of lowercase descenders + +crisp#:=5*23/36pt#; % diameter of serif corners +tiny#:=5*23/36pt#; % diameter of rounded corners +fine#:=5*8/36pt#; % diameter of sharply rounded corners +thin_join#:=12*8/36pt#; % width of extrafine details +hair#:=5*40/36pt#; % lowercase hairline breadth +stem#:=5*40/36pt#; % lowercase stem breadth +curve#:=5*40/36pt#; % lowercase curve breadth +ess#:=5*37/36pt#; % breadth in middle of lowercase s +flare#:=5*31/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=5*38/36pt#; % diameter of dots +cap_hair#:=5*40/36pt#; % uppercase hairline breadth +cap_stem#:=5*44/36pt#; % uppercase stem breadth +cap_curve#:=5*44/36pt#; % uppercase curve breadth +cap_ess#:=5*42/36pt#; % breadth in middle of uppercase s +rule_thickness#:=5*25/36pt#; % thickness of lines in math symbols + +dish#:=0pt#; % amount erased at top or bottom of serifs +bracket#:=0pt#; % vertical distance from serif base to tangent +jut#:=0pt#; % protrusion of lowercase serifs +cap_jut#:=0pt#; % protrusion of uppercase serifs +beak_jut#:=0pt#; % horizontal protrusion of beak serifs +beak#:=f*1.5/36pt#; % vertical protrusion of beak serifs +vair#:=6*23/36pt#; % vertical diameter of hairlines +notch_cut#:=6*40/36pt#; % maximum breadth above or below notches +bar#:=6*23/36pt#; % lowercase bar thickness +slab#:=6*31/36pt#; % serif and arm thickness +cap_bar#:=6*29/36pt#; % uppercase bar thickness +cap_band#:=6*27/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=6*37/36pt#; % max breadth above/below uppercase notches +serif_drop#:=f*2/36pt#; % vertical drop of sloped serifs +stem_corr#:=5*1/36pt#; % for small refinements of stem breadth +vair_corr#:=5*2/36pt#; % for small refinements of hairline height +apex_corr#:=f*14/36pt#; % extra width at diagonal junctions + +o#:=f*7/36pt#; % amount of overshoot for curves +apex_o#:=0pt#; % amount of overshoot for diagonal junctions + +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +fudge:=.91; % factor applied to weights of heavy characters +math_spread:=-.3; % extra openness of math symbols +superness:=.74; % parameter for superellipses +superpull:=1/18; % extra openness inside bowls +beak_darkness:=0; % fraction of triangle inside beak serifs +ligs:=2; % level of ligatures to be included + +square_dots:=true; % should dots be square? +hefty:=true; % should we try hard not to be overweight? +serifs:=false; % should serifs and bulbs be attached? +monospace:=false; % should all characters have the same width? +variant_g:=true; % should an italic-style g be used? +low_asterisk:=false; % should the asterisk be centered at the axis? +math_fitting:=false; % should math-mode spacing be used? + +font_setup; + +cmchar "The letter T"; +beginchar("T",13u#-width_adj#,cap_height#,0); +italcorr cap_height#*slant-beak_jut#-.25u#; +adjust_fit(0,0); +h:=vround(h-2stem_corr); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.65u); y4=good.y(y3l-beak); +arm(3,4,e,beak_darkness,.7beak_jut); % right arm and beak +pos5(hair,180); x5=w-x4; y5=y4; +arm(3,5,f,beak_darkness,-.7beak_jut); % left arm and beak +if serifs: dish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); % upper bracketing + dish_serif(2,1,c,1/3,1.414cap_jut,d,1/3,1.414cap_jut); fi % lower serif +math_fit(-.75cap_height#*slant,ic#-2.5u#); penlabels(1,2,3,4,5,6); endchar; + +cmchar "The letter h"; +beginchar("h",10u#,asc_height#,0); +italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#; +adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#); +pickup tiny.nib; pos1(stem,0); pos2(stem,0); +pos1'(stem',0); pos2'(stem',0); pos3(stem,0); +lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1; +top y1=h; bot y2=0; y1=y1'; y2=y2'; +filldraw stroke z1'e--z2'e; % left stem +h_stroke(2,a,3,4); % arch and right stem +if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif + numeric inner_jut; pickup tiny.nib; + if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut; + else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi + dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif + dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif +penlabels(1,2,3,4); endchar; + +cmchar "The letter e"; +beginchar("e",7.25u#+max(.75u#,.5curve#),x_height#,0); +italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0); +adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi); +numeric left_curve,right_curve; +left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi; +if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi +if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi +pickup tiny.nib; pos1(right_curve,0); +pos2(vair,90); pos3(left_curve,180); +y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1; +rt x1r=hround min(w-.5u,w-u+.5right_curve); +lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u; +{{interim superness:=more_super; + filldraw stroke super_arc.e(1,2)}}; % right bowl +y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u; +if serifs: pos4(vair',270); pos5(hair,360); + y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r; + (x,y4l)=whatever[z4r,z5]; x4l:=x; + filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4) + ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal +else: pos4(vair,270); + filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc + pickup fine.nib; pos4'(vair,270); z4=z4'; + pos5(.5[vair,flare],275); rt x5r=hround(w-.6u); + y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l; + filldraw stroke term.e(4',5,right,1,4); fi % terminal +path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4); +y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1; +forsuffixes $=l,r: + x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor +fill stroke z0e--z1'e; % crossbar +penlabels(0,1,2,3,4,5); endchar; + +cmchar "The letter E"; +beginchar("E",12u#-width_adj#,cap_height#,0); +italcorr cap_height#*slant-beak_jut#-.5u#; +adjust_fit(cap_serif_fit#,0); +h:=vround(h-stem_corr); +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; +filldraw stroke z1e--z2e; % stem +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak); +arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak +pos5(cap_bar,-90); pos6(hair,0); +top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1; +pos0(cap_bar,90); pos7(hair,0); +z0=z5; x6=x7; y6-y5l=y0l-y7; +if serifs: rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak); + rt x9r=hround(w-.5u); +else: rt x6r=hround(w-1.5u); y6=y5l; rt x9r=hround(w-.75u); fi +arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif +pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0); +bot y8r=0; x8=x2; y9=y8l+7/6beak; +arm(8,9,h,beak_darkness,1.5beak_jut); % lower arm and beak +if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif + dish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif +math_fit(0,.5ic#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar; + +cmchar "The letter X"; +beginchar("X",13u#,cap_height#,0); +italcorr cap_height#*slant-.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +numeric stem[],outer_jut,xjut,alpha[]; +stem1=cap_stem-2stem_corr; stem2=min(cap_hair,stem1); +outer_jut=.75cap_jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi; +x1l=l+letter_fit+.5u+outer_jut; x2r=r-letter_fit-u-outer_jut-xjut; +x3l=l+letter_fit+.25u+outer_jut+xjut; x4r=r-letter_fit-.25u-outer_jut; +y1=y2=h; y3=y4=0; +alpha1=diag_ratio(1,stem1,h,x4r-x1l); +alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0); +penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0); +if hefty: z0=whatever[z1,z4]=whatever[z2,z3]; + x12=x34=x0; y13=y24=y0; + z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l]; + z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r]; + forsuffixes $=13,24,34: z$'=.1[z$,z0]; endfor + fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34' + --diag_end(34',4l,.5,1,4r,24')--z24' + --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals +else: fill diag_end(4r,1r,.5,1,1l,4l) + --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal + fill diag_end(2l,3l,.5,1,3r,2r) + --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi % right diagonal +if serifs: numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,4); prime_points_inside(2,3); + prime_points_inside(3,2); prime_points_inside(4,1); + if rt x1'r+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut; + else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + if rt x3'r+cap_jut+.5u+1<=lft x4'l-cap_jut-xjut: inner_jut2=cap_jut; + else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi + dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1); % upper left serif + dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut); % lower right serif + dish_serif(2',3,e,2/3,inner_jut1+xjut, + f,1/2,outer_jut+xjut)(dark); % upper right serif + dish_serif(3',2,g,1/2,outer_jut+xjut, + h,2/3,inner_jut2+xjut)(dark); fi % lower left serif +math_fit(0,.5ic#); penlabels(0,1,2,3,4,12,13,24,34); endchar; + +cmchar "The letter b"; +beginchar("b",10u#+serif_fit#,asc_height#,0); +italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#); +adjust_fit(serif_fit#,0); +pickup tiny.nib; pos1(stem',0); pos2(stem,0); +pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2; +lft x1l=hround(2.5u-.5stem'); top y1=h; +numeric edge; edge=rt x2r; +pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180); +pos4(vair,90); pos5(curve,0); +pos6(vair,-90); penpos7(x3l-x3r,-180); +rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height]; +x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo; +rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height; +x6l=x4l-.2u; bot y6r=-oo; +x7=x3; y7=min(y3,y6+y4-y3+.6vair); +(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x4,x5r]); +(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x6,x5r]); +filldraw stroke z3e{up}...pulled_arc.e(4,5)&pulled_arc.e(5,6)...{up}z7e; % bowl +y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l)); +y2=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{left}...{up}z7l)); +pickup tiny.nib; filldraw stroke z1e--z0'e--z0e--z2e; % stem +pickup crisp.nib; pos8(hair,0); pos7'(stem,0); +z7'=z2; x8l=x7'l; bot y8=0; +filldraw stroke z7'e--z8e; % point +if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); fi % upper serif +penlabels(0,1,2,3,4,5,6,7,8); endchar; + +cmchar "The letter o"; +beginchar("o",9u#,x_height#,0); +italcorr .7x_height#*slant; +adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); +penpos1(vair,90); penpos3(vair',-90); +penpos2(curve,180); penpos4(curve,0); +x2r=hround max(.5u,1.25u-.5curve); +x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3) + & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl +penlabels(1,2,3,4); endchar; + +cmchar "The letter k"; +beginchar("k",9.5u#,asc_height#,0); +italcorr x_height#*slant-.2u#; +adjust_fit(serif_fit#,serif_fit#); pickup tiny.nib; +numeric right_jut,stem[],alpha[]; +stem1=max(tiny.breadth,hround(fudged.stem-stem_corr)); +stem2=max(tiny.breadth,hround(fudged.stem-2stem_corr)); +stem3=max(tiny.breadth,hround(fudged.hair-4stem_corr)); +stem4=max(tiny.breadth,hround(fudged.stem-3stem_corr)); +if serifs: right_jut=.6jut; else: right_jut=.4tiny; fi +pos1(stem1,0); pos2(stem2,0); top y1=h; bot y2=0; +lft x1l=lft x2l=hround(2.5u-.5stem1); +top y3=x_height; rt x3r=hround(r-letter_fit-.7u-right_jut); +bot y6=0; rt x6r=hround(r-letter_fit-.3u-right_jut); +x4=x11=x1; y4=.7bar_height; y11=y3; +alpha1=diag_ratio(1,.5(stem3-tiny),y3-y4,x3r-x4); +alpha2=diag_ratio(1,.5(stem4-tiny),y11-y6,x6r-x1); +penpos3(alpha1*(stem3-tiny),0); penpos4(whatever,-90); +z5=.5[z5l,z5r]; penpos6(alpha2*(stem4-tiny),0); +forsuffixes $=l,r: y3'$=x_height; y6'$=0; z4$=z3'$+whatever*(z3-z4); + z5$=z6'$+whatever*(z11-z6)=whatever[z3,z4]; endfor +z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); +% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] +z6'r=z6r+penoffset z11-z6 of currentpen+whatever*(z11-z6); +z6'l=z6l+penoffset z6-z11 of currentpen+whatever*(z11-z6); +fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal +fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal +pos0(stem1,0); pos0'(stem2,0); y0=y0'; x0=x1; x0'=x2; +rt z0r=whatever[z3,z4]; filldraw stroke z1e..z0e--z0'e..z2e; % stem +if serifs: numeric inner_jut; + if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut; + else: rt x2r+inner_jut+.5u+1=lft x6l-inner_jut; fi + sloped_serif.l(1,0,a,1/3,jut,serif_drop); % upper stem serif + dish_serif(2,0',b,1/3,jut,c,1/3,inner_jut); % lower stem serif + dish_serif(3,4,d,2/3,1.4jut,e,1/2,right_jut)(dark); % upper diagonal serif + dish_serif(6,5,f,1/2,inner_jut,g,1/3,right_jut)(dark);fi % lower diagonal serif +penlabels(0,1,2,3,4,5,6,11); endchar; + +font_identifier "CMMAN"; % restore the clobbered value + +bye diff --git a/Master/texmf-dist/fonts/source/public/misc/dummy.mf b/Master/texmf-dist/fonts/source/public/misc/dummy.mf new file mode 100644 index 00000000000..cbc774ae888 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/dummy.mf @@ -0,0 +1,57 @@ +%% @metafontfile{ +%% filename="dummy.mf", +%% filetype="Metafont: driver", +%% author="K. Berry", +%% email="kb@cs.umb.edu" +%% codetable="ISO/ASCII", +%% checksum = "01077 57 290 1988" , +%% keywords="amsfonts, dummyfont, metafont , ams-tex, amstex ", +%% abstract="This file generates dummy.tfm as distributed with AMS-TeX." +%% docstring = "The checksum field above contains a CRC-16 +%% checksum as the first value, followed by the +%% equivalent of the standard UNIX wc (word +%% count) utility output of lines, words, and +%% characters. This is produced by Robert +%% Solovay's checksum utility.", +%% } +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +mode_def nullmode = % TFM files only + proofing := -1; + fontmaking := 1; +enddef; + +mode := nullmode; +mode_setup; + +% Defeat modes.mf's redefinition of font_face_byte -- it packs in the +% designsize per the Metafontbook, but dummy.pl doesn't. +let font_face_byte = gobble; + +% Make the string |s| be |n| bytes long. +def BCPL_string (expr s, n) = + for l := if length (s) >= n: n-1 else: length (s) fi: l + for k := 1 upto l: , substring (k - 1, k) of s endfor + for k := l + 2 upto n: , 0 endfor + endfor +enddef; + +headerbyte 1: 0, 5, hex "39", hex "77"; % checksum 1 234 567 in octal + +designsize := 10; % header bytes 5-8 + +% Use font_coding_scheme (from plain) in case end has been redefined to +% produce the Xerox-world info, as modes.mf does. But do the headerbyte +% ourselves as well, in case we're not using modes.mf. +font_coding_scheme := "NULL FONT FOR SYNTAX CHECKING"; +headerbyte 9: BCPL_string (font_coding_scheme_, 40); + +font_identifier := "UNSPECIFIED"; +headerbyte 49: BCPL_string (font_identifier_, 20); + +headerbyte 72: 0; % face is zero for mrr, + 254 - 2 * designsize + +fontdimen 22: 0; % 22 zero font dimens---enough for math fonts. + +end. diff --git a/Master/texmf-dist/fonts/source/public/misc/gray.mf b/Master/texmf-dist/fonts/source/public/misc/gray.mf new file mode 100644 index 00000000000..584361d12df --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/gray.mf @@ -0,0 +1,4 @@ +if mode=ljfour: input graylj; +elseif mode=cx: input graycx; +elseif mode=aps: input grayaps; +fi diff --git a/Master/texmf-dist/fonts/source/public/misc/grayaps.mf b/Master/texmf-dist/fonts/source/public/misc/grayaps.mf new file mode 100644 index 00000000000..44f1c4eab6c --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/grayaps.mf @@ -0,0 +1,9 @@ +% temporary kludge to make the APS font for proofmode with new MF +magnification 1.0; +tfmmode; +fontfacebyte 84; +ppi=722.909; % pixels per inch, according to DRF +fontidentifier "FIG"; +codingscheme "GFGRAY"; +input gray; +end diff --git a/Master/texmf-dist/fonts/source/public/misc/graycx.mf b/Master/texmf-dist/fonts/source/public/misc/graycx.mf new file mode 100644 index 00000000000..b1e75d6ee7f --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/graycx.mf @@ -0,0 +1,10 @@ +% Gray font for CX with proofsheet resolution 75 pixels per inch. +% Each pixel is represented by a 4x4 square, with 4/16 of the dots on. + +if mode<>cx: errmessage "This file is for cx only"; fi + +font_identifier "GRAYCX"; + +boolean lightweight; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/grayf.mf b/Master/texmf-dist/fonts/source/public/misc/grayf.mf new file mode 100644 index 00000000000..1a34e18fd1b --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/grayf.mf @@ -0,0 +1,82 @@ +% More-or-less general gray font generator +% See Appendix H of The METAFONTbook for how to use it + +forsuffixes m = mag,rep: + if unknown m: m := 1; + elseif (m<1) or (m<>floor m): + errmessage "Sorry, " & str m & " must be a positive integer"; + m := 1; fi endfor + +mg := mag; mag := 1; mode_setup; +if mg>1: hppp := hppp*mg; vppp := vppp*mg; + extra_endchar:= + "if charcode>0:currentpicture:=currentpicture scaled mg;fi" + & extra_endchar; fi; + +if picture pix_picture: rep := 1; + cull pix_picture keeping (1,infinity); +else: for z=(0,2),(1,0),(2,3),(3,1): + fill unitsquare shifted z; endfor + if not boolean lightweight: addto currentpicture also + currentpicture rotated 90 xscaled -1; fi + if unknown scale: scale := max(1,round(pixels_per_inch/300)); fi + pix_wd := pix_ht := 4scale; + if rep>1: picture pix; + currentpicture := currentpicture shifted-(1,1); pix := currentpicture; + for r=1 upto rep-1: addto currentpicture also pix shifted(4r,0); endfor + cullit; pix := currentpicture; + for r=1 upto rep-1: addto currentpicture also pix shifted(0,4r); endfor + unfill unitsquare xscaled 4rep yscaled 2 shifted-(1,1); + unfill unitsquare yscaled 4rep xscaled 2 shifted-(1,1); cullit; fi + picture pix_picture; pix_picture := currentpicture scaled scale; + pix_wd := pix_ht := 4scale*rep; fi + +def # = *72.27/pixels_per_inch enddef; +if unknown dotsize: dotsize := 2.5pix_wd/rep; fi + +beginchar(0,1.2dotsize#,1.2dotsize#,0); +fill fullcircle scaled dotsize scaled mg; endchar; + +numeric a[]; newinternal b,k; +def next_binary = + k := 0; forever: if k>b: a[incr b] := 0; fi + exitif a[k]=0; a[k] := 0; k := k+1; endfor + a[k] := 1 enddef; +def next_special_binary = + if a[0]=1: for k=0 upto b: a[k] := 0; endfor a[incr b] + else: k := 0; forever: exitif a[incr k]=1; endfor + a[k-1] fi := 1 enddef; + +def make_char = + clearit; next_binary; + for k=0 upto b: if a[k]=1: + addto currentpicture also pix_picture shifted(0,-k*pix_ht); fi endfor + charcode := charcode+1; chardp := b*charht; + scantokens extra_endchar; shipout currentpicture enddef; + +charwd := pix_wd#; charht := pix_ht#; chardx := pix_wd*mg; +b := -1; + +if boolean large_pixels: + for k=1 upto 7: make_char; charlist k:k+120; endfor + charcode := 120; b := -1; + addto pix_picture also pix_picture shifted (chardx,0); + charwd := 2charwd; chardx := 2chardx; + for k=1 upto 7: make_char; endfor +else: for k=1 upto 63: make_char; endfor + let next_binary = next_special_binary; + for k=64 upto 120: make_char; endfor + for k=121,122: charcode := k; + addto currentpicture also currentpicture shifted (chardx,0); + charwd := 2charwd; chardx := 2chardx; + scantokens extra_endchar; shipout currentpicture; endfor + charlist 120:121:122; fi + +font_coding_scheme "GFGRAY"; +font_size 8(pix_wd#); +font_normal_space pix_wd#; +font_x_height pix_ht#; +font_quad pix_wd#; +fontdimen 8: if known rulethickness: rulethickness + else: pix_wd#/(2rep) fi; +bye. diff --git a/Master/texmf-dist/fonts/source/public/misc/grayimagen.mf b/Master/texmf-dist/fonts/source/public/misc/grayimagen.mf new file mode 100644 index 00000000000..63381aa0afe --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/grayimagen.mf @@ -0,0 +1,10 @@ +% Gray font for Imagen 8/300; proofsheet resolution is 75 pixels per inch. +% Each pixel is represented by a 4x4 square, with 4/16 of the dots on. + +if mode<>imagen: errmessage "This file is for imagen only"; fi + +font_identifier "GRAYIMAGEN"; + +boolean lightweight; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/grayimagen3.mf b/Master/texmf-dist/fonts/source/public/misc/grayimagen3.mf new file mode 100644 index 00000000000..d60fab3f9a0 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/grayimagen3.mf @@ -0,0 +1,7 @@ +% Gray font for Imagen with proofsheet resolution 25 pixels per inch + +if mode<>imagen: errmessage "This file is for imagen only"; fi + +font_identifier "GRAY3IMAGEN"; +rep=3; boolean large_pixels; +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/grayimagenlight.mf b/Master/texmf-dist/fonts/source/public/misc/grayimagenlight.mf new file mode 100644 index 00000000000..5625d2554bf --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/grayimagenlight.mf @@ -0,0 +1,12 @@ +% Light gray font for Imagen 8/300; proofsheet resolution is 60 pixels per inch. +% Each pixel is represented by a 5x5 square, with 5/25 of the dots on. + +if mode<>imagen: errmessage "This file is for imagen only"; fi + +font_identifier "GRAYIMAGEN"; +picture pix_picture; pix_picture := nullpicture; +for z=(0,1),(1,4),(2,2),(3,0),(4,3): + addto pix_picture also unitpixel shifted z; endfor +pix_wd := pix_ht := 5; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/graylj.mf b/Master/texmf-dist/fonts/source/public/misc/graylj.mf new file mode 100644 index 00000000000..e4596221361 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/graylj.mf @@ -0,0 +1,10 @@ +% Gray font for LJ with proofsheet resolution 150 pixels per inch. +% Each pixel is represented by a 4x4 square, with 4/16 of the dots on. + +if mode<>ljfour: errmessage "This file is for ljfour only"; fi + +font_identifier "GRAYLJ"; + +boolean lightweight; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/manfnt.mf b/Master/texmf-dist/fonts/source/public/misc/manfnt.mf new file mode 100644 index 00000000000..0c85e0864b0 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/manfnt.mf @@ -0,0 +1,788 @@ +% Special font for the TeX and METAFONT manuals +% This file was prepared "hastily" and hasn't been "polished". +% In particular, some characters won't work when aspect_ratio<>1. + +font_size 10pt#; +em#:=10pt#; ht#:=250/36pt#; +mode_setup; + +font_identifier "MANFNT"; +font_coding_scheme "PI"; + +message "Hex symbols"; +width1#=.4pt#*(ht#/(100/36pt#)); +width2#=.6pt#*(ht#/(100/36pt#)); +define_blacker_pixels(width1,width2); + +beginchar(1,2ht#,ht#,0); "Original hex"; % \hexa +pickup pencircle scaled width1; +w:=2good.x .5w; +x1=x4=good.x 0; x2=x5=.5w; x3=x6=good.x w; +y1=y2=y3=good.y h; y4=y5=y6=good.y 0; +draw z1..z6; draw z2..z5; draw z3..z4; +for k=1 upto 6: drawdot z[k]; endfor +labels (1,2,3,4,5,6); endchar; + +beginchar(2,2ht#,ht#,0); "Top/bot adjusted hex"; % \hexb +pickup pencircle scaled width1; +w:=2good.x .5w; +x1=x4=good.x 0; x2=x5=.5w; x3=x6=good.x w; +top y1=h; y1=y2=y3; bot y4=0; y4=y5=y6; +draw z1..z6; draw z2..z5; draw z3..z4; +for k=1 upto 6: drawdot z[k]; endfor +labels (1,2,3,4,5,6); endchar; + +beginchar(3,2ht#,ht#,0); "Bold top/bot adjusted hex"; % \hexc +pickup pencircle scaled width2; +w:=2good.x .5w; +x1=x4=good.x 0; x2=x5=.5w; x3=x6=good.x w; +top y1=h; y1=y2=y3; bot y4=0; y4=y5=y6; +draw z1..z6; draw z2..z5; draw z3..z4; +for k=1 upto 6: drawdot z[k]; endfor +labels (1,2,3,4,5,6); endchar; + +beginchar(4,2ht#,ht#,0); "Bold top/bot/lft/rt adjusted hex"; % \hexd +pickup pencircle scaled width2; +w:=2good.x .5w; +lft x1=0; x1=x4; x2=x5=.5w; rt x3=w-1; x3=x6; +top y1=h; y1=y2=y3; bot y4=0; y4=y5=y6; +draw z1..z6; draw z2..z5; draw z3..z4; +for k=1 upto 6: drawdot z[k]; endfor +labels (1,2,3,4,5,6); endchar; + +beginchar(5,2ht#,ht#,0); "Hex corrected for darkness in the center"; % \hexe +pickup pencircle scaled width1; +w:=2good.x .5w; +top z1=(0,h); top z2=(.5w,h); top z3=(w,h); +bot z4=(0,0); bot z5=(.5w,0); bot z6=(w,0); +for k=1 upto 6: drawdot z[k]; endfor +z1'=.25[z1,z6]; z6'=.75[z1,z6]; theta1:=angle(z6-z1)+90; +z3'=.25[z3,z4]; z4'=.75[z3,z4]; theta3:=angle(z4-z3)+90; +z7=z8=.5[z1,z6]; +penpos1'(width1,theta1); penpos6'(width1,theta1); penpos7(.6width1,theta1); +penpos3'(width1,theta3); penpos4'(width1,theta3); penpos8(.6width1,theta3); +draw z1..z1'; penstroke z1'e{z6'-z1'}..z7e..{z6'-z1'}z6'e; draw z6'..z6; +draw z2..z5; +draw z3..z3'; penstroke z3'e{z4'-z3'}..z8e..{z4'-z3'}z4'e; draw z4'..z4; +penlabels(1,1',7,2,3,3',8,4,4',5,6,6'); endchar; + +message "Stick A's"; +b#:=250/36pt#; a#:=150/36pt#; s#:=30/36pt#; +standardwidth#:=.4pt#; +darkwidth#:=.8pt#; lightwidth#:=.2pt#; +define_blacker_pixels(standardwidth,darkwidth,lightwidth); +define_pixels(b,a,s); +def stick_A(expr alpha)(text pentype)= +beginchar (incr(charcode),s#+a#+s#,b#,0); +pickup pentype; +bot z1=(good.x s,0); z5=z1+(a,0); +z3=(1/2[x1,x5],good.y b); +z2=alpha[z1,z3]; z4=alpha[z5,z3]; +draw z1..z3; draw z3..z5; draw z2..z4; +drawdot z1; drawdot z5; drawdot z3; +labels(1,2,3,4,5); endchar; enddef; +charcode:=5; % the first A will be number 6 + +stick_A((3-sqrt5)/2, % (area above bar / area below) = golden ratio % \Aa + pencircle scaled standardwidth); + +for alpha=.2 step .05 until .5+10epsilon: + stick_A(alpha,pencircle scaled standardwidth); endfor % chars 7..13 + +beginchar(14,s#+a#+s#,b#,0); +pickup pencircle scaled standardwidth; +bot z1=(good.x s,0); z5=z1+(a,0); +z3=(1/2[x1,x5],good.y b); +z4-z2=whatever*dir20; 1/2[y2,y4]=2/3[y3,y1]; +z2=whatever[z1,z3]; z4=whatever[z3,z5]; +draw z1..z3; draw z3..z5; draw z2..z4; +drawdot z1; drawdot z5; drawdot z3; +labels(1,2,3,4,5); endchar; + +stick_A((3-sqrt5)/2,pencircle xscaled darkwidth yscaled lightwidth); % \Ab=15 +stick_A((3-sqrt5)/2, + pencircle xscaled darkwidth yscaled lightwidth rotated 30); % \Ac=16 + +message "Kidney beans"; +standardwidth#:=.4pt#; +darkwidth#:=.8pt#; lightwidth#:=.2pt#; +define_blacker_pixels(standardwidth,darkwidth,lightwidth); +b#:=100/36pt#; +define_pixels(b); +def bean(text pentype)= +beginchar (incr(charcode),2b#,1.5b#,0); +pickup pentype; +z1=(0,b); z2=(b,b); z3=(2b,b); +z4=(0,0); z5=(b,0); z6=(2b,0); +draw z5..z4..z1..z3..z6..cycle; +labels(1,2,3,4,5,6); endchar; enddef; +charcode:=16; % the first bean will be number 17 + +bean(pencircle scaled standardwidth); % \beana=17 +bean(pencircle scaled darkwidth); % \beanb=18 +bean(pencircle xscaled darkwidth yscaled lightwidth); % \beanc=19 +bean(pencircle xscaled darkwidth yscaled lightwidth rotated 30); % \beand=20 + +message "Pen nibs"; +bigthickwidth#:=8pt#; littlethickwidth#:=2pt#; +define_blacker_pixels(bigthickwidth,littlethickwidth); + +beginchar(21,bigthickwidth#,0,0); % \niba +pickup pencircle xscaled bigthickwidth yscaled littlethickwidth; +lft z1=(0,good.y 0); +drawdot z1; +labels(1); endchar; + +beginchar(22,bigthickwidth#,0,0); % \nibb +pickup pencircle xscaled bigthickwidth yscaled littlethickwidth rotated 30; +lft z1=(0,good.y 0); +drawdot z1; +labels(1); endchar; + +beginchar(23,littlethickwidth#,0,0); % \nibc +pickup pencircle yscaled bigthickwidth xscaled littlethickwidth; +lft z1=(0,good.y 0); +drawdot z1; +labels(1); endchar; + +message "Ionian letters"; +em#:=10pt#; cap#:=7pt#; +thin#:=1/3pt#; thick#:=5/6pt#; +slab#:=.8pt#; +stem#:=.9pt#; +o#:=1/5pt#; + +define_pixels(em,cap); +define_blacker_pixels(thin,thick,slab,stem); +define_corrected_pixels(o); + +curve_sidebar=round 1/18em; + +%vardef pentaper@#(expr lt,rt) = % dropped from PLAIN +% x@#l:=lt[x@#l,x@#]; x@#r:=rt[x@#r,x@#]; +% y@#l:=lt[y@#l,y@#]; y@#r:=rt[y@#r,y@#] enddef; + + +% ill-fated example wasn't attractive enough by itself: +%bar:=slab; +%beginchar(24,0.6em#,cap#,0); % "The letter T"; \IOT=24 +%penpos1(bar,70); +%penpos2(bar,35); +%penpos4(bar,35); +%penpos5(bar,55); +%x1=0; y1r=h; y2r=y4r=.2[y1r,y1]; y5l=.3[y1l,y1]; +%x2l=1/3[x1l,x5l]; x4l=2/3[x1l,x5l]; x5=w; +%penpos6(stem,20); pentaper6(.1,0); +%penpos3(x6r-x6l,0); +%penpos7(stem,10); +%y3=y2; x3=.5w; +%x6r=x3r; y6=2/3h; +%x7=x6; y7=0; +%penstroke z1e{curl infinity}..z2e..z4e..{curl infinity}z5e; +%penstroke z3e..z6e{down}..z7e; +%labels.top(1r,2l,2,2r,4l,4,4r,6); +%labels.lft(1,1l,6l); +%labels.rt(5,5r,5l,6r); +%labels.bot(3l,3,3r,7,7r,7l); +%endchar; + +beginchar(25,5/9em#,cap#,0); % "The letter S"; /IOS=25 +penpos1(slab,70); +penpos2(.5slab,80); +penpos3(.5[slab,thick],200); +penpos5(.5[slab,thick],210); +penpos6(.7slab,80); +penpos7(.25[slab,thick],72); +x1=x5; y1r=.94h+o; +x2=x4=x6=.5w; y2r=h+o; y4=.54h; y6l=-o; +x3r=.04em; y3=.5[y4,y2]; +x5l=w-.03em; y5=.5[y4,y6]; +.5[x7l,x7]=.04em; y7l=.12h-o; +path trial; trial=z3{down}..z4..{down}z5; +pair dz; dz=direction 1 of trial; +penpos4(thick,angle dz-90); +penstroke z1e..z2e{left}..z3e{down}..z4e{dz}..z5e{down}..z6e{left}..z7e; +labels.lft(2,3r,5r,6,7); +labels.rt(1,3l,4,5l); +labels.top(1r,2r,3,4l,5,6r,7r); +labels.bot(1l,2l,4r,6l,7l); +endchar; + +beginchar(26,0.8em#,cap#,0); % "The letter O"; \IOO=26 + penpos1(thick,10); penpos2(.1[thin,thick],90-10); + penpos3(thick,180+10); penpos4(thin,270-10); + x1l=w-x3l=curve_sidebar; x2=x4=.5w; + y1=.49h; y2l=-o; y3=.51h; y4l=h+o; + penstroke z1e{down}..z2e{right}..z3e{up}..z4e{left}..cycle; + penlabels(1,2,3,4); endchar; + +beginchar(27,.35em#,cap#,0); % "The letter I"; \IOI=27 + penpos1(stem,15); penpos2(.9stem,12); penpos3(stem,10); + x1=x2=x3=.5w; y1=h; y2=.55h; y3=0; x2l:=1/6[x2l,x2]; + penstroke z1e..z2e{down}..z3e; + penlabels(1,2,3); endchar; + +%ligtable 24: 24 kern .05em#, 26 kern -.05em#; % TT and TO are adjusted + +message "Cubes and such"; +s#:=5pt#; define_pixels(s); % side of the square +beginchar(28,5/3s#,4/3s#,0); % "Possible cube"; \cubea=28 +z1=(-epsilon,-epsilon); z2=(s+epsilon,-epsilon); + z3=(-epsilon,s+epsilon); z4=(s+epsilon,s+epsilon); +for k=1 upto 4: z[k+4]=z[k]+(2/3s,1/3s); endfor +pickup pencircle scaled .4pt; +draw z5--z6--z8--z7--cycle; +pickup pencircle scaled 1.6pt; +erase draw z2--z4--z3; +pickup pencircle scaled .4pt; +draw z1--z2--z4--z3--cycle; +for k=1 upto 4: draw z[k]--z[k+4]; endfor +labels.top(1,2,5,6); +labels.bot(3,4,7,8); +endchar; + +beginchar(29,5/3s#,4/3s#,0); % "Impossible cube"; \cubeb=29 +z1=(-epsilon,-epsilon); z2=(s+epsilon,-epsilon); + z3=(-epsilon,s+epsilon); z4=(s+epsilon,s+epsilon); +for k=1 upto 4: z[k+4]=z[k]+(2/3s,1/3s); endfor +pickup pencircle scaled .4pt; +draw z3--z4; draw z5--z6; +cullit; pickup pencircle scaled 1.6pt; +undraw z7--1/2[z7,z5]; + undraw z2--1/2[z2,z4]; +cullit; pickup pencircle scaled .4pt; +draw z3--z1--z2--z4; + draw z5--z7--z8--z6; +for k=1 upto 4: draw z[k]--z[k+4]; endfor +labels.top(1,2,5,6); +labels.bot(3,4,7,8); +endchar; + +beginchar(30,10pt#,7pt#,2pt#); % bicentennial star +pair center; center=(.5w,2pt); +numeric radius; radius=5pt; +for k=0 upto 4: z[k]=center+(radius,0) rotated(90+360/5k); endfor +def :: = ..tension 5.. enddef; +path star; star=z0::z2::z4::z1::z3::cycle; +pickup pencircle scaled .4pt; draw star; +cullit; pickup pencircle scaled 1.6pt; +for k=0 upto 4: undraw subpath(k+.55,k+.7) of star; endfor +cullit; pickup pencircle scaled .4pt; +for k=0 upto 4: draw subpath(k+.47,k+.8) of star; endfor +labels(0,1,2,3,4); endchar; + +beginchar(31,2/3*11pt#,.5*11pt#,0); % \oneu=31 +pickup pencircle scaled 3/4pt yscaled 1/3 rotated 30; +save ww; ww=3/2w; +save t; transform t; +t=identity rotatedaround((.5ww,h),-90); +x2=.35ww; x3=good.x .6ww; +y2=good.y .2h; top y3=round .8h+eps; +save p; path p; p=z2{right}...{up}z3; +top z1=point .5 of p transformed t; +draw (z1...p); +labels(1,2,3); endchar; + +beginchar(38,11pt#,11pt#,0); % \fouru=38 +pickup pencircle scaled 3/4pt yscaled 1/3 rotated 30; +save t; transform t; +t=identity rotatedaround((.5w,.5h),-90); +x2=.35w; x3=good.x .6w; +y2=good.y .1h; top y3=round .4h+eps; +save p; path p; p=z2{right}...{up}z3; +top z1=point .5 of p transformed t; +draw (z1...p); +addto currentpicture also currentpicture transformed t; +addto currentpicture also currentpicture transformed(t transformed t); +labels.bot(1,3); labels.rt(2); endchar; + +beginchar(39,11pt#,11pt#,0); % \fourc=39 +pickup pencircle scaled 3/4pt yscaled 1/3 rotated 30; +save t; transform t; +t=identity rotatedaround((.5w,.5h),-90); +x2=.35w; x3=good.x .6w; +y2=good.y .1h; top y3=round .4h+eps; +save p; path p; p=z2{right}...{up}z3; +top z1=point .5 of p transformed t; +draw (z1...p) rotatedaround((.5w,.5h),-45) + withpen pencircle scaled 3/4pt yscaled 1/3 rotated-15; +addto currentpicture also currentpicture transformed t; +addto currentpicture also currentpicture transformed(t transformed t); +labels.bot(1,3); labels.rt(2); endchar; + +message "Circle variations"; + +beginchar(32,5pt#,5pt#,0); "Quarter circle"; % \circa +pickup pencircle scaled (.4pt+blacker); +draw quartercircle scaled 10pt; endchar; + +beginchar(33,5pt#,5pt#,0); "Filled quarter circle"; % \circb +fill ((0,0)--quartercircle--cycle) scaled 10pt; endchar; + +beginchar(34,5pt#,5pt#,0); "Rotated quarter circle"; % \circc +pickup pencircle scaled (.4pt+blacker); +draw quartercircle rotated 90 scaled 10pt shifted (5pt,0); endchar; + +beginchar(35,5pt#*sqrt2,5pt#,0); "Cone"; % \circd +pickup pencircle scaled (.4pt+blacker); +draw ((0,0)--quartercircle--cycle) + rotated 45 scaled 10pt shifted (.5w,0); endchar; + +beginchar(36,10pt#,7.5pt#,2.5pt#); "Concentric circles"; % \circe +pickup pencircle scaled (.4pt+blacker); +for D=.2w,.6w,w: + draw fullcircle scaled D shifted (.5w,.5[-d,h]); + endfor endchar; + +beginchar(37,10pt#,7.5pt#,2.5pt#); "Concentric diamonds"; % \circf +pickup pencircle scaled (.4pt+blacker); +for D=.2w,.6w,w: + draw unitsquare shifted -(.5,.5) rotated 45 + scaled (D/sqrt2) shifted (.5w,.5[-d,h]); + endfor endchar; + +message "Miscellaneous symbols"; % mostly from the old manfnt + +beginchar(oct"171",15pt#,7.5pt#,2.5pt#); % arrow for errata lists +curve#:=30/36pt#; dcurve#:=60/36pt#; bar#:=25/36pt#; +define_whole_blacker_pixels(curve,dcurve,bar); +penpos1(curve,90); penpos2(curve,90); penpos3(dcurve,90); +penpos4(dcurve,90); penpos5(curve,90); penpos6(curve,90); +y1r=vround(y1r-(y1-.5[-d,h])); y2=y5=y6=y1=y0; y4l=-d; y3r=h; +x1=0; x2=.1w; x3=.2w; x4=.55w; x5=.65w; +x2l:=x2l+.25curve; x5r:=x5r-.25curve; +penstroke z1e--z2e--z3e--z4e--z5e; % crooked arrow +penpos13(bar,0); penpos14(bar,0); x0=w; +y13-y0=y0-y14=.24h+eps; x13=x14=7/8w-eps; +penpos15(.5bar,angle(z14-z0)); z15l=z0; penpos16(.5bar,angle(z13-z0)); z16l=z0; +z19=.381966[.5[z13,z14],z0]; +numeric t; path p; p=z14l{z19-z14}..z16r; +t=xpart(p intersectiontimes((0,y6l)--(w,y6l))); x6=xpart point t of p; +filldraw z0..{z14-z19}z14r--subpath (0,t) of\\(z14l{z19-z14}..z16r) + --z6l--z5l--z5r--z6r--subpath (t,0) of\\(z13l{z19-z13}..z15r) + --z13r{z19-z13}..z0 & cycle; % arrowhead and link +penlabels(range 1 thru 19); endchar; + +beginchar(oct"170", 5pt#, 6.25pt#, 0); "Triangle for exercises"; +x1=x2=w-x3=round .43pt; y3=.5+floor.5h; +z1-z2=(z3-z2) rotated 60; +y1:=.5sqrt3+round(y1-.5sqrt3); y2:=h-y1; +fill z1--z2--z3--cycle; +labels(1,2,3); endchar; + +beginchar("6",256/36pt#,250/36pt#,0); % upper triangle for Addison-Wesley logo +x1=round 5/36pt; x2=round .5w; x2-x1=x3-x2=(y2-y1)/(sqrt 3); +y1=y3=0; fill z1--z2--z3--cycle; labels(1,2,3); endchar; + +beginchar("7",256/36pt#,250/36pt#,0); % lower triangle for Addison-Wesley logo +x1=round 5/36pt; x2=round .5w; x2-x1=x3-x2=(y1-y2)/(sqrt 3); +y1=y3; y2=0; fill z1--z2--z3--cycle; labels(1,2,3); endchar; + +def font_setup= +define_pixels(u,tiny,axis,hheight,border); +define_blacker_pixels(hair,thin,thick,rulethickness); +pickup if tiny<.5: nullpen else: pencircle scaled tiny fi; +tinypen:=savepen; +currenttransform:=identity yscaled aspect_ratio slanted slant; +enddef; + +% typical cmr10 parameters +u#:=20/36pt#; +tiny#:=0; +axis#:=90/36pt#; +hheight#:=250/36pt#; +border#:=20/36pt#; +hair#:=8/36pt#; +thin#:=9/36pt#; +thick#:=25/36pt#; +fixwidth:=0; +slant:=0; +rulethickness#:=.4pt#; + +baselinedistance#:=11pt#; +heavyline#:=50/36pt#; +font_setup; +define_whole_pixels(baselinedistance); +define_blacker_pixels(heavyline); + +beginchar(127,25u#,hheight#+border#,0); "Dangerous bend sign"; +pickup pencircle scaled rulethickness; +top y1=25/27h; lft x4=0; +x1+x1=x1a+x1b=x4b+x2a=x4+x2=x4a+x2b=x3b+x3a=x3+x3=w; +x4a=x4b=x4+u; x3b=x1a=x1-2u; +y4+y4=y4a+y4b=y3b+y1a=y3+y1=y3a+y1b=y2b+y2a=y2+y2=0; +y1a=y1b=y1-2/27h; y4b=y2a=y4+4/27h; +draw z1a..z1..z1b---z2a..z2..z2b--- + z3a..z3..z3b---z4a..z4..z4b---cycle; % signboard +x10=x11=x12=x13=good.x(.5w-u); x14=x15=x16=x17=w-x10; +y10=y14=28/27h+epsilon; bot y13=-baselinedistance; +z11=(z10..z13) intersectionpoint (z1a{z1a-z4b}..z1{right}); +y15=y11; y16=y12=-y11; y17=y20=y21=y13; +draw z11--z10--z14--z15; draw z12--z13; draw z16--z17; % signpost +x20=w-x21; x21-x20=16u; draw z20--z21; % ground level +x38=w-x31; x38-x31=8u; x32=x34=x38; x31=x35=x37; +y31=-y38=12/27h; y32=-y37=9/27h; y34=-y35=3/27h; +pickup pencircle scaled heavyline; +draw z32{z32-z31}..z34---z35..z37{z38-z37}; % the dangerous bend +pickup penrazor xscaled heavyline rotated (angle(z32-z31)+90); +draw z31--z32; draw z37--z38; % upper and lower bars +labels(1,1a,1b,2,2a,2b,3,3a,3b,4,4a,4b,10,11,12,13,14,15,16,17,20,21, + 31,32,33,34,35,36,37,38); +picture dbend; dbend=currentpicture; +endchar; +beginchar(126,25u#,hheight#+border#,0); "Lefthanded ditto"; +currentpicture:=dbend reflectedabout((.5w,0),(.5w,h)); +endchar; +beginchar(0,25u#,hheight#+border#,0); "Reverse video ditto"; +fill (0,-11pt)--(w,-11pt)--(w,h)--(0,h)--cycle; +addto currentpicture also -dbend; +endchar; + +beginchar(oct"140",3.75pt#,7pt#,4/3pt#); "special 1/7 for a quotation"; +currenttransform:=currenttransform slanted(2/7/aspect_ratio); +y3=y4=.5[h,-d]=.5[y2,y5]; y5=y6; +x1=x2=x7=.5w; x5+x6=x3+x4=w; x5=x3+1/6pt; +pickup pencircle xscaled .5pt yscaled .35pt; +bot y2=top y3+pt; top y1=h; bot y7=-d; lft x3=0; % y2 moved up 1/3pt (Feb 5) +draw z1..z2; draw z3..z4; +draw z5--z6..{down}z7; +labels(1,2,3,4,5,6,7); +endchar; +currenttransform:=currenttransform slanted(-2/7/aspect_ratio); + +% Circumscribed circles +pickup pencircle scaled(.4pt+blacker); rpen:=savepen; +def begincircle(expr code,units,depth,asp,superness)= +beginchar(code,units*20/36pt#,0,0); pickup rpen; +aa:=.5(w++depth*pt/asp); +x2=x4=.5[x1,x3]=.5w; y1=y3=.5[y2,y4]=-.5round(depth*pt); +x1=good.x(x2+aa); y2=good.y(y1+asp*aa); +draw superellipse(z1,z2,z3,z4,superness); labels(1,2,3,4) enddef; + +"Ellipse for floating-point mod operator"; % also for pseudo coin top +begincircle(oct"130",29,5,.5,.75786); endchar; + +"Edge and bottom of pseudo coin"; +begincircle(oct"133",29,5,.5,.75786); charht:=2pt#; +erase fill rt z1--(rt x1,top y2)--(lft x3,top y2)--lft z3--cycle; +x0=x1; x5=x3; y0=y5=y1+2pt; draw z0--z1; draw z3--z5; labels(0,5); endchar; + +"Circle to enclose two digits"; +begincircle(oct"131",19,7.5,1,.75786); endchar; + +"Circle to enclose an exponent of 2"; +begincircle(oct"132",9,6,1,1/sqrt2); endchar; + +% Now we do the \qc font from TeXbook Appendix D +pickup pencircle scaled ceiling pt; ptpen:=savepen; + +beginchar("a",10pt#,5.5pt#,4.5pt#); pickup ptpen; % W to S +bot y1=lft x2=0; x2=.5[x1,x1+w]; y1=.5[y2,y2+h+d]; +draw z1{right}..{down}z2; labels(1,2); endchar; + +beginchar("b",10pt#,5.5pt#,4.5pt#); pickup ptpen; % W to N +bot y1=lft x2=0; x2=.5[x1,x1+w]; y1=.5[y2,y2-h-d]; +draw z1{right}..{up}z2; labels(1,2); endchar; + +beginchar("c",10pt#,5.5pt#,4.5pt#); pickup ptpen; % E to N +bot y1=lft x2=0; x2=.5[x1,x1-w]; y1=.5[y2,y2-h-d]; +draw z1{left}..{up}z2; labels(1,2); endchar; + +beginchar("d",10pt#,5.5pt#,4.5pt#); pickup ptpen; % E to S +bot y1=lft x2=0; x2=.5[x1,x1-w]; y1=.5[y2,y2+h+d]; +draw z1{left}..{down}z2; labels(1,2); endchar; + +fontdimen 8: pt#; % rule thickness in \qc + +message "METAFONT logo"; + +def arc(suffix i,j) = + (z.i{0,y.j-y.i}.. + (beta[x.i,x.j],beta[y.j,y.i]){z.j-z.i}.. + z.j{x.j-x.i,0}) enddef; + +def double_arc(suffix i,j,k) = + arc(i,j) & reverse arc(k,j) enddef; + +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls + +def setparameters(text parameter_equations) = + string code.M,code.E,code.T,code.A,code.F,code.O,code.N; + numeric h#, xx#, yy#, o#, s#, u#, px#, py#; + numeric leftstemloc, barheight; + parameter_equations; + yy#=(h#/13.5u#)*xx#; define_whole_pixels(xx,yy); + define_pixels(s,u); + define_corrected_pixels(o); + py#=.9px#; define_blacker_pixels(px,py); + pickup pencircle xscaled px yscaled py; + logo_pen:=savepen; + leftstemloc:=good.x((2.5u#+s#)*pt); + barheight:=good.y(alpha*h#*pt); + ligtable code.T: code.A kern -.5u#; + ligtable code.F: code.O kern -u#; +enddef; + +def beginlogochar(suffix c)(expr n) = % code c; width is n units plus sidebars + beginchar(code.c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +def do_it = +beginlogochar(M,18); +x1=x2=leftstemloc; x4=x5=w-x1; x3=w-x3; +y1=y5; y2=y4; bot.y1=-o; top y2=h+o; y3=y1+yy; +draw z1--z2--z3--z4--z5; +labels(1,2,3,4,5); +endchar; + +beginlogochar(E,14); +x1=x2=x3=leftstemloc; x4=x6=w-x1+o; x5=x4-xx; +y1=y6; y2=y5; y3=y4; bot.y1=0; top.y3=h; y2=barheight; +draw z6--z1--z3--z4; draw z2..z5; +labels(1,2,3,4,5,6); +endchar; + +beginlogochar(T,13); +italcorr h#*slant+.5u#; +if odd(w-px): w:=w+1; fi % allows a symmetric stem +lft x1=-epsilon; x2=w-x1; x3=x4=.5w; % I tried lft x1=s-o; not as good +y1=y2=y3; top.y1=h; bot.y4=-o; +draw z1..z2; draw z3..z4; +labels(1,2,3,4); +endchar; + +beginlogochar(A,15); % changed from 16 on Oct 16! +x1+x4=x2+x3=2x5=w; x1=x2=leftstemloc; +y1=y4; y2=y3; bot.y1=-o; top.y5=h+o; y2=barheight; +draw double_arc(2,5,3); draw z1--z2--z3--z4; +labels(1,2,3,4,5); +endchar; + +beginlogochar(F,14); +x1=x2=x3=leftstemloc; x4=w-x1+o; x5=x4-xx; +y2=y5; y3=y4; bot.y1=-o; top.y3=h; y2=barheight; +draw z1--z3--z4; draw z2..z5; +labels(1,2,3,4,5); +endchar; + +beginlogochar(O,15); +x1+x2=x3+x4=w; x1=good.x(1.5u+s); x3=x4; +bot.y3=-o; top.y4=h+o; y1=y2=barheight; +draw double_arc(1,4,2); draw double_arc(2,3,1); +labels(1,2,3,4); +endchar; + +beginlogochar(N,15); +x1+x4=x1+x3=x2+x5=w; x1=x2=leftstemloc; +y1=y4=y3-yy; bot.y1=-o; y2=y5; top.y5=h+o; +draw z1--z2--z3; draw z4..z5; +labels(1,2,3,4,5); +endchar; +enddef; % the end of "do_it" + +% ten-point size +message " ten point"; +setparameters(h#=6; % height of characters, in pt +slant:=0; + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + px#=2/3; % horizontal thickness of pen, in pt + code.M="M"; code.E="E"; code.T="T"; code.A="A"; + code.F="F"; code.O="O"; code.N="N") +do_it; + +currenttransform:=currenttransform slanted(.25/aspect_ratio); +% ten-point size, slanted: 89:;<=>: = METAFONT! +message " slanted ten point"; +setparameters(h#=6; % height of characters, in pt +slant:=.25; + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + px#=2/3; % horizontal thickness of pen, in pt + code.M="8"; code.E="9"; code.T=":"; code.A=";"; + code.F="<"; code.O="="; code.N=">") +do_it; +currenttransform:=currenttransform slanted(-.25/aspect_ratio); + +% nine-point size: hijklmnj = METAFONT! +message " nine point"; +setparameters(h#=.9*6; % height of characters, in pt +slant:=0; + xx#=.9*0.6; % extra length of certain features, in pt + u#=.91*4/9; % unit width, in pt + s#=.08; % extra sidebar, in pt + o#=1/10; % overshoot of curves, in pt + px#=.9*2/3; % horizontal thickness of pen, in pt + code.M="h"; code.E="i"; code.T="j"; code.A="k"; + code.F="l"; code.O="m"; code.N="n") +do_it; +font_quad 18u#+2s#; % we take spacing from the 9-point logo font +font_normal_space 6u#+2s#; +font_normal_stretch 3u#; +font_normal_shrink 2u#; + +% eight-point size: opqrstuq = METAFONT! +message " eight point"; +setparameters(h#=.8*6; % height of characters, in pt +slant:=0; + xx#=.8*0.6; % extra length of certain features, in pt + u#=.82*4/9; % unit width, in pt + s#=.2; % extra sidebar, in pt + o#=1/12; % overshoot of curves, in pt + px#=.8*2/3; % horizontal thickness of pen, in pt + code.M="o"; code.E="p"; code.T="q"; code.A="r"; + code.F="s"; code.O="t"; code.N="u") +do_it; + +% eight-point size, magnified 10/8: /0123451 = METAFONT! +message " magnified eight point"; +setparameters(h#=.8*6*10/8; % height of characters, in pt +slant:=0; + xx#=.8*0.6*10/8; % extra length of certain features, in pt + u#=.82*4/9*10/8; % unit width, in pt + s#=.2*10/8; % extra sidebar, in pt + o#=1/12*10/8; % overshoot of curves, in pt + px#=.8*2/3*10/8; % horizontal thickness of pen, in pt + code.M="/"; code.E="0"; code.T="1"; code.A="2"; + code.F="3"; code.O="4"; code.N="5") +do_it; + +currenttransform:=currenttransform slanted(2/7/aspect_ratio); +% eight-point size, slanted: \]^_efg^ = METAFONT! +message " slanted eight point"; +slant:=2/7; +setparameters(h#=.8*6; % height of characters, in pt + xx#=.8*0.6; % extra length of certain features, in pt + u#=.82*4/9; % unit width, in pt + s#=.2; % extra sidebar, in pt + o#=1/12; % overshoot of curves, in pt + px#=.8*2/3; % horizontal thickness of pen, in pt + code.M="\"; code.E="]"; code.T="^"; code.A="_"; + code.F="e"; code.O="f"; code.N="g") +do_it; +currenttransform:=currenttransform slanted(-2/7/aspect_ratio); + +% special size for the title page: ()*+,-.* = METAFONT! +message " title page size"; +setparameters(h#=250/9; % height of characters, in pt (same as cmssc40) +slant:=0; + xx#=2.9; % extra length of certain features, in pt + u#=(1+sqrt5)/2; % unit width, in pt + s#=.2; % extra sidebar, in pt + o#=4/9; % overshoot of curves, in pt + px#=4; % horizontal thickness of pen, in pt + code.M="("; code.E=")"; code.T="*"; code.A="+"; + code.F=","; code.O="-"; code.N=".") +do_it; + +currenttransform:=currenttransform slanted(-1/9/aspect_ratio); +% backslanted skinny bold: BCDGHIJD = METAFONT! +message " weird skinny bold condensed"; +setparameters(h#=25; % height of characters, in pt +slant:=-1/9; % leftward bias + xx#=1.5; % extra length of certain features, in pt + u#=3/9; % unit width, in pt + s#=1/3; % extra sidebar, in pt + o#=2/9; % overshoot of curves, in pt + px#=1; % horizontal thickness of pen, in pt + code.M="B"; code.E="C"; code.T="D"; code.A="G"; + code.F="H"; code.O="I"; code.N="J") +do_it; +currenttransform:=currenttransform slanted(+1/9/aspect_ratio); + +% ultrawide light: KLUVWvwU = METAFONT! +message " weird light extended"; +setparameters(h#=6; % height of characters, in pt +slant:=0; + xx#=2; % extra length of certain features, in pt + u#=4/3; % unit width, in pt + s#=-2/3; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + px#=1/3; % horizontal thickness of pen, in pt + code.M="K"; code.E="L"; code.T="U"; code.A="V"; + code.F="W"; code.O="v"; code.N="w") +do_it; + +message "Pixel symbols"; + +beginchar("P",722.7/722.909pt#,722.7/722.909pt#,0); % 1pt pixel +pickup pencircle scaled .2pt; +top lft z1=(0,.8h); top rt z2=(.8w,.8h); +bot lft z3=(0,0); bot rt z4=(.8w,0); +draw z1--z4; draw z2--z3; endchar; + +beginchar("Q",722.7/722.909pt#,722.7/722.909pt#,0); % 1pt nonpixel +pickup pencircle scaled .2pt; +drawdot(.4w,.4h); endchar; + +beginchar("R",3*722.7/722.909pt#,3*722.7/722.909pt#,0); % 3pt pixel +pickup pencircle scaled .3pt; +interim autorounding:=0; +top lft z1=(0,.9h); top z2=(.45w,.9h); top rt z3=(.9w,.9h); +lft z4=(0,.45h); rt z5=(.9w,.45h); +bot lft z6=(0,0); bot z7=(.45w,0); bot rt z8=(.9w,0); +draw z1+(-50epsilon,50epsilon)--z8+(50epsilon,-50epsilon); +draw z2+(0,50epsilon)--z7-(0,50epsilon); +draw z3+(50epsilon,50epsilon)--z6-(50epsilon,50epsilon); +draw z4-(50epsilon,0)--z5+(50epsilon,0); endchar; + +beginchar("S",3*722.7/722.909pt#,3*722.7/722.909pt#,0); % 3pt nonpixel +pickup pencircle scaled .3pt; +drawdot(.45w,.45h); endchar; + +message "Gothic d"; + +beginchar("?",4pt#,8pt#,0); + % taken from NB, but my changes may have spoiled it +stem_length#:=10/6.7pt#; define_blacker_pixels(stem_length); +xheight:=6pt; +penpos1 (2*stem_length,30); % normal points +penpos2 (2*stem_length,30); % normal points +penpos3 (2*stem_length,30); % normal points +penpos4 (2*stem_length,30); % normal points + +x1l=x2=0; y1r=xheight; y2l=0; + penpos40(stem_length,30); z40r=round z1; + penpos41(stem_length,40); x40r=x41r=x42r; y41=.5[y40,y42]; + penpos42(stem_length,30); y42l=y2; +fill z40r--(x40r,y42l)--z42l...z41l{up}...z40l--cycle; % left stem + +x3=x4r=w; y3=y1; y4=y2; + penpos50(stem_length,30); z50l=round z3l; + penpos51(stem_length,40); x50l=x51l=x52l; y51=.5[y50,y52]; + penpos52(stem_length,30); y52l=y4; +fill z52l--(x52l,y50r)--z50r...z51r{down}...z52r--cycle; % right stem + + penpos10(stem_length,30); z10=z42; + penpos11(stem_length,25); x11=.5[x10,x12]; y10l=y11=y12r; + penpos12(stem_length,30); x12r=x4; % redundant: y12l=0; + penpos14(stem_length*(1+cosd30),30); z14l=z12l; + penpos15(.07stem_length,120); z15l=z14r; +fill z10l...z11l{z12-z10}...z12l--z14r + --z15r{z14l-z14r}...z11r{z10-z12}...z10r--cycle; % lower join + +numeric ch; ch=10; % Neenie's version was more like ch=7.5 (steeper) +numeric s_length[]; + s_length0*cosd(30-ch)=stem_length*cosd 30; + s_length1*cosd(40-ch)=stem_length*cosd 40; +pair corner; corner=z50r; +vardef f(expr theta)= + save x,y; penpos60(s_length0,theta); y60r=h; x60l=0; + angle(z60r-corner)<theta+60+ch enddef; +numeric theta; theta=solve f(90,0); + penpos60(s_length0,theta); y60r=h; x60l=0; + penpos61(s_length1,theta+10); z61l=.5[z60l,z62l]; + penpos62(s_length0,theta); z62r=corner; +fill z60l--((z60l--z62l)intersectionpoint((x4,0)--(x4,h))) + --z62r...z61r{z60-z62}...z60r--cycle; % diagonal + +charwd:=charwd+1.03277pt#; w:= w + round(1.03277pt); +penlabels(1,2,3,4,10,11,12,13,14,15,40,41,42,50,51,52,60,61,62); +interim xoffset:=.46687pt; interim yoffset:=-.3pt; +endchar; + +bye diff --git a/Master/texmf-dist/fonts/source/public/misc/mfman.mf b/Master/texmf-dist/fonts/source/public/misc/mfman.mf new file mode 100644 index 00000000000..0bbe24f9de6 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/mfman.mf @@ -0,0 +1,2474 @@ +% This file generates most of the figures for The METAFONTbook + +def clear_all = clearit; clearxy; pickup standardpen; +proofrulethickness 0; +enddef; + +def heavy_dot expr z = + makelabel.top("",z-(1,0)); + makelabel.top("",z+(1,0)); + makelabel.top("",z-(0,1)); + makelabel.top("",z+(0,1)); + makelabel.top("",z+(1,1)/sqrt2); + makelabel.top("",z+(1,-1)/sqrt2); + makelabel.top("",z-(1,1)/sqrt2); + makelabel.top("",z-(1,-1)/sqrt2); + enddef; + +def font_setup= +define_pixels(u,tiny,axis,hheight,border); +define_blacker_pixels(hair,thin,thick,rulethickness); +pickup if tiny<.5: nullpen else: pencircle scaled tiny fi; +tinypen:=savepen; +currenttransform:=identity slanted slant yscaled aspect_ratio; +enddef; + +mode=proof; mode_setup; +standardpen=savepen; + +"Figure 2a"; % 6 points and a grid +clear_all; +pair offset; offset=(.5,.5); +z1=(0,100)+offset; +z2=(100,100)+offset; +z3=(200,100)+offset; +z4=(0,0)+offset; +z5=(100,0)+offset; +z6=(200,0)+offset; +proofrulethickness .8; +proofrule (z1+(0,5),z4-(0,5)); proofrule (z4-(5,0),z6+(5,0)); +makelabel.top("1 ",z1); +makelabel.top("2 ",z2); +makelabel.top("3 ",z3); +makelabel.bot("4 ",z4); +makelabel.bot("5 ",z5); +makelabel.bot("6 ",z6); +for k=1 upto 6: heavy_dot z[k]; endfor; +pickup pencircle; +for x=10 step 10 until 200: draw (x,-5)+offset..(x,105)+offset; endfor +for y=10 step 10 until 100: draw (-5,y)+offset..(205,y)+offset; endfor +showit; +shipit; + +"Figure A2a"; % 6 points and a grid and two more points +clear_all; +proofoffset(30,0); +pair offset; offset=(.5,.5); +z1=(0,100)+offset; +z2=(100,100)+offset; +z3=(200,100)+offset; +z4=(0,0)+offset; +z5=(100,0)+offset; +z6=(200,0)+offset; +proofrulethickness .8; +proofrule (z1+(0,5),z4-(0,5)); proofrule (z4-(5,0),z6+(5,0)); +makelabel.top("1 ",z1); +makelabel.top("2 ",z2); +makelabel.top("3 ",z3); +makelabel.bot("4 ",z4); +makelabel.bot("5 ",z5); +makelabel.bot("6 ",z6); +for k=1 upto 6: heavy_dot z[k]; endfor; +makelabel.lft("(-5,15)",(-5,15)+offset); +makelabel.top("(60,30) ",(60,30)+offset); +%makelabel.top(" ,30) ",(60,30)+offset); +%makelabel.top("(60 ",(60,30)+offset); +heavy_dot (-5,15)+offset; +heavy_dot (60,30)+offset; +pickup pencircle; +for x=10 step 10 until 200: draw (x,-5)+offset..(x,105)+offset; endfor +for y=10 step 10 until 100: draw (-5,y)+offset..(205,y)+offset; endfor +showit; +shipit; + +"Figure 2b"; % 6 points and a line +clear_all; +z1=(0,100); +z2=(100,100); +z3=(200,100); +z4=(0,0); +z5=(100,0); +z6=(200,0); +draw (x1-epsilon,y1)..(x6,y6); +makelabel.lft("1 ",z1); +makelabel.lft("2",z2); +makelabel.rt("3",z3); +makelabel.lft("4",z4); +makelabel.lft("5",z5); +makelabel.rt(" 6",z6); +showit; +shipit; + +"Figure 2c"; % 6 points and three lines (hex symbol, version 1) +clear_all; +z1=(0,100); +z2=(100,100); +z3=(200,100); +z4=(0,0); +z5=(100,0); +z6=(200,0); +draw z1..z6; draw z2..z5; draw z3..z4; +for k=1 upto 6: drawdot z[k]; endfor +makelabel.lft("1 ",z1); +makelabel.lft("2 ",z2); +makelabel.rt(" 3",z3); +makelabel.lft("4 ",z4); +makelabel.lft("5 ",z5); +makelabel.rt(" 6",z6); +showit; +shipit; + +"Figure 2d"; % hex symbols with top and bottom adjusted +clear_all; +top z1=(0,100); +top z2=(100,100); +top z3=(200,100); +bot z4=(0,0); +bot z5=(100,0); +bot z6=(200,0); +draw z1..z6; draw z2..z5; draw z3..z4; +for k=1 upto 6: drawdot z[k]; endfor +makelabel.lft("1 ",z1); +makelabel.lft("2 ",z2); +makelabel.rt(" 3",z3); +makelabel.lft("4 ",z4); +makelabel.lft("5 ",z5); +makelabel.rt(" 6",z6); +showit; +clearxy; pair offset; offset=(250,0); +pickup pencircle scaled .6pt; +top z1=(0,100)+offset; +top z2=(100,100)+offset; +top z3=(200,100)+offset; +bot z4=(0,0)+offset; +bot z5=(100,0)+offset; +bot z6=(200,0)+offset; +draw z1..z6; draw z2..z5; draw z3..z4; +for k=1 upto 6: drawdot z[k]; endfor +makelabel.lft("1 ",z1); +makelabel.lft("2 ",z2); +makelabel.rt(" 3",z3); +makelabel.lft("4 ",z4); +makelabel.lft("5 ",z5); +makelabel.rt(" 6",z6); +proofrule ((-5,100),(210,100)+offset); +proofrule ((-5,0),(210,0)+offset); +showit; +shipit; + +"Figure 2e"; % stick-letter A +b#:=250/36pt#; a#:=150/36pt#; s#:=30/36pt#; +define_pixels(b,a,s); +def A(expr alpha)= +beginchar (incr(charcode),s#+a#+s#,b#,0); +pickup standardpen; +bot z1=(good.x s,0); z5=z1+(a,0); +z3=(1/2[x1,x5],good.y b); +z2=alpha[z1,z3]; z4=alpha[z5,z3]; +draw z1..z3; draw z3..z5; draw z2..z4; +drawdot z1; drawdot z5; drawdot z3; +makelabel.lft("1 ",z1); +makelabel.lft("2 ",z2); +makelabel.top("3 ",z3); +makelabel.rt(" 4",z4); +makelabel.rt(" 5",z5); +endchar; enddef; + +A((3-sqrt5)/2); % (area above bar / area below) = golden ratio + +"Figure 3a"; % 4 points and 3 midpoints +clear_all; +z1=(.5,.5); z2=(40.5,80.5); z3=(150.5,100.5); z4=(300.5,.5); +z12=1/2[z1,z2]; z23=1/2[z2,z3]; z34=1/2[z3,z4]; +pickup pencircle; +draw z1--z2--z3--z4; +heavy_dot z1; heavy_dot z2; heavy_dot z3; heavy_dot z4; +makelabel.lft("1",z1); +makelabel.lft("2",z2); +makelabel.top(" 3",z3); +makelabel.rt("4",z4); +makelabel.rt("12",z12); +makelabel.bot(" 23",z23); +makelabel.bot("34 ",z34); +showit; +shipit; + +"Figure 3b"; % 4 points and 6 midpoints +clear_all; +z1=(.5,.5); z2=(40.5,80.5); z3=(150.5,100.5); z4=(300.5,.5); +z12=1/2[z1,z2]; z23=1/2[z2,z3]; z34=1/2[z3,z4]; +z123=1/2[z12,z23]; z234=1/2[z23,z34]; z1234=1/2[z123,z234]; +heavy_dot z1; heavy_dot z2; heavy_dot z3; heavy_dot z4; +pickup pencircle; +draw z1--z2--z3--z4; draw z12--z23--z34; draw z123--z234; +makelabel.lft("1",z1); +makelabel.lft("2",z2); +makelabel.top(" 3",z3); +makelabel.rt("4",z4); +makelabel.lft("12",z12); +makelabel.top("23 ",z23); +makelabel.rt("34",z34); +makelabel.bot(" 123",z123); +makelabel.bot("234 ",z234); +makelabel.bot("1234",z1234); +showit; +shipit; + +"Figure 3c"; % 4 points and infinitely many midpoints +clear_all; +z1=(.5,.5); z2=(40.5,80.5); z3=(150.5,100.5); z4=(300.5,.5); +heavy_dot z1; heavy_dot z2; heavy_dot z3; heavy_dot z4; +pickup pencircle; + +def makedot(expr x)= special " 1"; + numspecial xpart x; numspecial ypart x enddef; + +def recurse(expr a,b,c,d)= +dist:=abs(a-d); +if dist>4: +begingroup save e,f,g,h,i,j; pair e,f,g,h,i,j; +e=(a+b)/2; makedot(e); +f=(b+c)/2; makedot(f); +g=(c+d)/2; makedot(g); +h=(e+f)/2; makedot(h); +i=(f+g)/2; makedot(i); +j=(h+i)/2; makedot(j); +if dist>20: draw a--b--c--d; draw e--f--g; draw h--i; fi +recurse(a,e,h,j); recurse(j,i,g,d); +endgroup; +fi enddef; + +makedot(z1); makedot(z2); makedot(z3); makedot(z4); recurse(z1,z2,z3,z4); +shipit; + +"Figure 3d"; % 4 points and various cubics +clear_all; +z1=(0,0); z2=5/6(40,80); z3=5/6(150,100); z4=5/6(300,0); +draw z1..controls z2 and z3..z4; +drawdot z1; drawdot z4; +makelabel.lft("1 ",z1); +makelabel.lft("2",z2); +makelabel.rt("3",z3); +makelabel.rt(" 4",z4); +pair offset; offset:=(325,0); +draw (z1..controls z3 and z2..z4) shifted offset; +drawdot z1+offset; drawdot z4+offset; +makelabel.lft("1 ",z1+offset); +makelabel.lft("3",z2+offset); +makelabel.rt("2",z3+offset); +makelabel.rt(" 4",z4+offset); +offset:=(0,-100); +draw (z2..controls z1 and z3..z4) shifted offset; +drawdot z2+offset; drawdot z4+offset; +makelabel.lft("2",z1+offset); +makelabel.lft("1 ",z2+offset); +makelabel.rt("3",z3+offset); +makelabel.rt(" 4",z4+offset); +offset:=(325,-100); +draw (z1..controls z4 and z2..z3) shifted offset; +drawdot z1+offset; drawdot z3+offset; +makelabel.lft("1 ",z1+offset); +makelabel.lft("3",z2+offset); +makelabel.rt(" 4",z3+offset); +makelabel.rt("2",z4+offset); +showit; +shipit; + +"Figure 3e"; % example curves with automatic control points +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z4..z1..z2..z6; +draw p; +drawdot z4; drawdot z6; +makelabel.bot.nodot(" 1",z1); +makelabel.top.nodot(" 2",z2); +makelabel.rt.nodot("3",z3+(2,0)); +makelabel.rt.nodot(" 4",z4); +makelabel.rt.nodot("5",z5+(2,0)); +makelabel.rt.nodot(" 6",z6); +for k=1 upto 6: heavy_dot z[k]; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +pair offset; offset=(325,0); +p:=(z5..z4..z1..z3..z6..z5) shifted offset; draw p; +drawdot z5+offset; +makelabel.bot.nodot(" 1",z1+offset); +makelabel.top.nodot("2",z2+offset+(0,2)); +makelabel.bot.nodot("3 ",z3+offset); +makelabel.top.nodot(" 4",z4+offset); +makelabel.top.nodot("5",z5+offset+(0,5)); +makelabel.top.nodot("6 ",z6+offset); +for k=1 upto 6: heavy_dot z[k]+offset; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +showit; +shipit; + +"Figure 3f"; % bean shape with automatic control points +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4..z1..z3..z6..cycle; +draw p; +makelabel.bot.nodot(" 1",z1); +makelabel.bot.nodot("2",z2-(0,2)); +makelabel.bot.nodot("3 ",z3); +makelabel.top.nodot(" 4",z4+(-1,1)); +makelabel.top.nodot("5",z5+(0,5)); +makelabel.top.nodot("6 ",z6+(1,1)); +for k=1 upto 6: heavy_dot z[k]; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +showit; +shipit; + +"Figure 3g"; % bean shape with more tension between 1 and 3 +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4..z1..tension1.2..z3..z6..cycle; +draw p; +makelabel.bot.nodot(" 1",z1); +makelabel.bot.nodot("2",z2-(0,2)); +makelabel.bot.nodot("3 ",z3); +makelabel.top.nodot(" 4",z4+(-1,1)); +makelabel.top.nodot("5",z5+(0,5)); +makelabel.top.nodot("6 ",z6+(1,1)); +for k=1 upto 6: heavy_dot z[k]; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +showit; +shipit; + +"Figure 3h"; % bean shape with more tension before and after 1 +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4..tension 1 and 1.5..z1..tension 1.5 and 1..z3..z6..cycle; +draw p; +makelabel.bot.nodot(" 1",z1); +makelabel.bot.nodot("2",z2-(0,2)); +makelabel.bot.nodot("3 ",z3); +makelabel.top.nodot(" 4",z4+(-1,1)); +makelabel.top.nodot("5",z5+(0,5)); +makelabel.top.nodot("6 ",z6+(1,1)); +for k=1 upto 6: heavy_dot z[k]; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +showit; +shipit; + +"Figure 3i"; % bean shape with straight bottom +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4{left}..z1..z3..z6{left}..cycle; +draw p; +makelabel.bot.nodot(" 1",z1-(1,1)); +makelabel.bot.nodot("2",z2-(0,2)); +makelabel.bot.nodot("3 ",z3+(1,-1)); +makelabel.top.nodot(" 4",z4+(0,5)); +makelabel.top.nodot("5",z5+(0,5)); +makelabel.top.nodot("6 ",z6+(0,5)); +for k=1 upto 6: heavy_dot z[k]; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +showit; +shipit; + +"Figure 3j"; % example with direction specified +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z4..z2{z3-z4}..z3; +draw p; +makelabel.rt.nodot("1",z1+(0,-9)); +makelabel.rt.nodot("2",z2+(1,-11)); +makelabel.rt.nodot("3",z3+(1,-11)); +makelabel.rt.nodot("4",z4+(1,-11)); +makelabel.rt.nodot("5",z5+(0,-9)); +makelabel.rt.nodot("6",z6+(0,-9)); +for k=1 upto 6: heavy_dot z[k]; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +showit; +shipit; + +"Figure 3k"; % wiggly shape for exercise +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4{z4-z2}..z1..z3..z6{z2-z6}..cycle; +draw p; +makelabel.bot.nodot(" 1",z1-(2,2)); +makelabel.bot.nodot("2",z2-(0,2)); +makelabel.bot.nodot("3 ",z3+(2,-2)); +makelabel.bot.nodot(" 4",z4); +makelabel.top.nodot("5",z5+(0,5)); +makelabel.bot.nodot("6 ",z6); +for k=1 upto 6: heavy_dot z[k]; endfor; +showit; +shipit; + +"Figure 3l"; % examples of varying curl +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z4{curl0}..z2{z3-z4}..{curl0}z3; +draw p; +drawdot z4; drawdot z3; +makelabel.rt.nodot("1",z1+(0,-9)); +makelabel.rt.nodot("2",z2+(1,-11)); +makelabel.rt.nodot("3",z3+(1,-11)); +makelabel.rt.nodot("4",z4+(1,-11)); +makelabel.rt.nodot("5",z5+(0,-9)); +makelabel.rt.nodot("6",z6+(0,-9)); +for k=1 upto 6: heavy_dot z[k]; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +pair offset; offset=(325,0); +p:=(z4{curl2}..z2{z3-z4}..{curl2}z3) shifted offset; draw p; +drawdot z4+offset; drawdot z3+offset; +makelabel.rt.nodot("1",z1+(0,-9)+offset); +makelabel.rt.nodot("2",z2+(1,-11)+offset); +makelabel.rt.nodot("3",z3+(1,-11)+offset); +makelabel.rt.nodot("4",z4+(1,-11)+offset); +makelabel.rt.nodot("5",z5+(0,-9)+offset); +makelabel.rt.nodot("6",z6+(0,-9)+offset); +for k=1 upto 6: heavy_dot z[k]+offset; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +showit; +shipit; + +"Figure 3m"; % two directions specified +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z4{z2-z4}..z6{down}; +draw p; +drawdot z4; drawdot z6; +makelabel.rt.nodot("1",z1+(2,0)); +makelabel.rt.nodot("2",z2+(2,0)); +makelabel.rt.nodot("3",z3+(2,0)); +makelabel.bot.nodot(" 4",z4); +makelabel.rt.nodot("5",z5+(2,0)); +makelabel.rt.nodot(" 6",z6); +for k=1 upto 6: heavy_dot z[k]; endfor; +for k=1 upto length p: heavy_dot postcontrol k-1 of p; + heavy_dot precontrol k of p; endfor +showit; +shipit; + +"Figure 3n"; % two control points specified +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z4..controls z1 and z2..z6; +draw p; +drawdot z4; drawdot z6; +makelabel.rt.nodot("1",z1+(2,0)); +makelabel.rt.nodot("2",z2+(2,0)); +makelabel.rt.nodot("3",z3+(2,0)); +makelabel.rt.nodot(" 4",z4); +makelabel.rt.nodot("5",z5+(2,0)); +makelabel.rt.nodot(" 6",z6); +for k=1 upto 6: heavy_dot z[k]; endfor; +showit; +shipit; + +"Figure 4a"; % bean shape with elliptical pens +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4..z1..z3..z6..cycle; +pickup pencircle xscaled .8pt yscaled .2pt rotated 30; +draw p; +makelabel.bot(" 1",z1); +makelabel.bot("2",z2); +makelabel.bot(" 3",z3); +makelabel.top("4 ",z4); +makelabel.top("",z5); makelabel.top.nodot("5",z5+(0,5)); +makelabel.top("",z6); makelabel.top.nodot("6 ",z6+(1,1)); +pair offset; offset=(325,0); +pickup pencircle xscaled .8pt rotated 30; +draw p shifted offset; +makelabel.bot(" 1",z1+offset); +makelabel.bot("2",z2+offset); +makelabel.bot(" 3",z3+offset); +makelabel.top("4 ",z4+offset); +makelabel.top("",z5+offset); makelabel.top.nodot("5",z5+(0,5)+offset); +makelabel.top("",z6+offset); makelabel.top.nodot("6 ",z6+(1,1)+offset); +showit; +shipit; + +"Figure 4b"; % T of METAFONT logo +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(suffix c)(expr n) = % code c; width is n units plus sidebars + beginchar(str c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +beginlogochar(T,13); +if odd(w-ph): w:=w+1; fi % allows a symmetric stem +x1+x2=2x3=2x4=w; lft.x1=-epsilon; % I tried s-o instead; was not as good +y1=y2=y3; top.y1=h; bot.y4=-o; +draw z1..z2; draw z3..z4; +labels.rt(2,3); +makelabel.top("1",z1); +makelabel.top("4",z4); +endchar; + +"Figure 4c"; % M of METAFONT logo +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(suffix c)(expr n) = % code c; width is n units plus sidebars + beginchar(str c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +beginlogochar(M,18); +x1+x5=x2+x4=2x3=w; x1=x2=leftstemloc; +y1=y5; y2=y4; bot.y1=-o; top y2=h+o; y3=y1+yy; +draw z1--z2--z3--z4--z5; +labels.rt(3,5); +makelabel.lft("1",z1); +makelabel.bot("2",z2); +makelabel.bot("4",z4); +endchar; + +"Figure 4d"; % solid kidney bean +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4..z1..z3..z6..cycle; +fill p; +makelabel.bot(" 1",z1); +makelabel.bot("2",z2); +makelabel.bot("3 ",z3); +makelabel.top(" 4",z4); +makelabel.top("5",z5); +makelabel.top("6 ",z6); +showit; +shipit; + +"Figure 4e"; % black triangle character for exercises +beginchar(oct"170", 5pt#, 6.25pt#, 0); +t:=(2-sqrt3)/2; +x1=x2=w-x3+.5-t=round .43pt; y3=.5+floor.5h; % MANUAL font has it different! +%x1=x2=w-x3=round .43pt; y3=.5+floor.5h; +z1-z2=(z3-z2) rotated 60; +y2:=t+round(y2-t); y1:=h-y2; +fill z1--z2--z3--cycle; +labels.lft(1,2); labels.rt(3); endchar; + +"Figure 4f"; % black bean with white holes +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4..z1..z3..z6..cycle; +fill p; +unfill 1/4[z4,z2]..3/4[z4,z2]..cycle; +unfill 1/4[z6,z2]..3/4[z6,z2]..cycle; +makelabel.bot(" 1",z1); +makelabel.bot("2",z2); +makelabel.bot("3 ",z3); +makelabel.top(" 4",z4); +makelabel.top("5",z5); +makelabel.top("6 ",z6); +showit; +shipit; + +"Figure 4g"; % black bean with skewed interior cutout +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z5..z4..z1..z3..z6..cycle; +fill p; +z0=(.8[x1,x2],.5[y1,y4]); +for k=1 upto 6: z[k]'=.2[z[k],z0]; endfor +unfill z5'..z4'..z1'..z3'..z6'..cycle; +makelabel.bot("0",z0); +makelabel.top("1 ",z1); +makelabel.top("2",z2); +makelabel.top(" 3",z3); +makelabel.bot("4 ",z4); +makelabel.bot("5",z5); +makelabel.bot(" 6",z6); +makelabel.bot(" 1'",z1'); +makelabel.bot(" 2'",z2'); +makelabel.bot("3' ",z3'); +makelabel.top(" 4'",z4'); +makelabel.top("5'",z5'); +makelabel.top("6' ",z6'); +showit; +shipit; + +"Figure 4h"; % sample penstroke +clear_all; +penpos1(1.2pt,30); penpos2(1.0pt,45); penpos3(0.8pt,90); +z1=(0,2pt); z2=(4pt,0); x3=9pt; y3l=y2r; +penstroke z1e..z2e{right}..z3e{right}; +labels.top(2r,3r); +labels.bot(2l,3l); +labels.rt(3,1r); +labels.lft(1l,2); +makelabel.top("1 ",z1); +showit; +shipit; + +"Figure 4i"; % cyclic penstroke example +clear_all; +d:=25; +penpos1(d,30); +penpos2(d,60); +penpos3(d,210); +penpos4(d,240); +y1=.51y2r; y2r=175; y3=.49y2r; y4r=0; +x1r=175; x2=x4=.5x1r; x3r=0; +penstroke z1e{up}..z2e{left}..z3e{down}..z4e{right}..cycle; +labels.lft(1l,2,3r,4); +labels.rt(1r,3l); +labels.top(2r,3,4l); +labels.bot(1,2l,4r); +showit; +shipit; + +"Figure 4j"; % I from IOnian font +clear_all; +em#:=10pt#; cap#:=7pt#; +bar#:=.8pt#; +stem#:=.9pt#; +thin#:=.8pt#; +thick#:=1pt#; +define_pixels(em,cap); +define_blacker_pixels(thin,thick,bar,stem); +beginchar(27,.35em#,cap#,0); % "The letter I"; \IOI=27 + penpos1(stem,15); penpos2(.9stem,12); penpos3(stem,10); + x1=x2=x3=.5w; y1=h; y2=.55h; y3=0; + x2l:=1/6[x2l,x2]; + penstroke z1e..z2e{down}..z3e; +labels.top(1,2,1r); +labels.lft(2l); +labels.rt(2r); +labels.bot(3,3l); +makelabel("",z1l); makelabel("",z3r); +makelabel.lft.nodot("1l",z1l-(0,2)); +makelabel.rt.nodot("3r",z3r+(0,2)); +endchar; + +"Figure 4k"; % fixed pens versus penstrokes +clear_all; +z1=(0,0); z2=(150,0); +pickup pencircle xscaled 0.8pt rotated 25; +draw z1..z2..cycle; +labels.lft(1,2); +clearxy; +pair offset; offset=(250,0); +penpos1(0.8pt,25); penpos2(0.8pt,25); +z1=(0,0)+offset; z2=(150,0)+offset; +penstroke z1e..z2e..cycle; +labels.lft(1l,2l); +labels.rt(1r,2r); +labels.bot(1,2); +showit; +shipit; + +"Figure 4l"; % hex symbol with pen-pressure adjustments +%b#:=1.0pt#; define_blacker_pixels(b); % FOR INITIAL TESTS ONLY +%beginchar(0,500/36pt#,250/36pt#,0); % that's magnified 2.5 as in the type +b#:=0.4pt#; define_blacker_pixels(b); +beginchar(0,200/36pt#,100/36pt#,0); +pickup pencircle scaled b; +w:=2good.x .5w; +top z1=(0,h); top z2=(.5w,h); top z3=(w,h); +bot z4=(0,0); bot z5=(.5w,0); bot z6=(w,0); +draw z2..z5; +for k=1 upto 6: drawdot z[k]; endfor +z1'=.25[z1,z6]; z6'=.75[z1,z6]; +z3'=.25[z3,z4]; z4'=.75[z3,z4]; + theta1:=angle(z6-z1)+90; + theta3:=angle(z4-z3)+90; +penpos1'(b,theta1); penpos6'(b,theta1); penpos7(.6b,theta1); +penpos3'(b,theta3); penpos4'(b,theta3); penpos8(.6b,theta3); +z7=z8=.5[z1,z6]; +draw z1..z1'; draw z6'..z6; + penstroke z1'e{z6'-z1'}..z7e..{z6'-z1'}z6'e; +draw z3..z3'; draw z4'..z4; + penstroke z3'e{z4'-z3'}..z8e..{z4'-z3'}z4'e; +labels.top(1'r,3'l,4'l,6'r); +labels.bot(1'l,3'r,4'r,6'l); +forsuffixes $=1',3',4',6': makelabel("",z$); endfor +makelabel.lft("1 ",z1); +makelabel.lft("2 ",z2); +makelabel.rt(" 3",z3); +makelabel.lft("4 ",z4); +makelabel.lft("5 ",z5); +makelabel.rt(" 6",z6); +makelabel.top("8l ",z8l); +makelabel.top(" 7r",z7r); +makelabel.bot("7l ",z7l); +makelabel.bot(" 8r",z8r); +endchar; + +"Figure 4m"; % same, cut sharp at the terminals, and inside the box +%b#:=1.0pt#; define_blacker_pixels(b); % FOR INITIAL TESTS ONLY +%beginchar(0,500/36pt#,250/36pt#,0); % that's magnified 2.5 as in the type +b#:=0.4pt#; define_blacker_pixels(b); +beginchar(0,200/36pt#,100/36pt#,0); +pickup pencircle scaled b; +w:=2good.x .5w; +x1l=x4l=0;x2=x5=.5w;x3r=x6r=w; +y1r=y2=y3l=h; y4r=y5=y6l=0; +z1'=.25[z1,z6]; z6'=.75[z1,z6]; theta1:=angle(w,-h)+90; +z3'=.25[z3,z4]; z4'=.75[z3,z4]; theta3:=angle(-w,-h)+90; +z7=z8=.5[z1,z6]; +penpos1(b,theta1); penpos6(b,theta1); +penpos1'(b,theta1); penpos6'(b,theta1); penpos7(.6b,theta1); +penpos3(b,theta3); penpos4(b,theta3); +penpos3'(b,theta3); penpos4'(b,theta3); penpos8(.6b,theta3); +penstroke z1e..z1'e{z6'-z1'}..z7e..{z6'-z1'}z6'e..z6e; +penpos2(b,0); penpos5(b,0); penstroke z2e..z5e; +penstroke z3e..z3'e{z4'-z3'}..z8e..{z4'-z3'}z4'e..z4e; +penlabels(1,1',2,3,3',4,4',5,6,6'); +labels.top(1r,1'r,2,3l,3'l,4l,4'l,6r,6'r); +labels.bot(1l,1'l,3r,3'r,4r,4'r,5,6l,6'l); +labels.lft(2l,5l); +labels.rt(2r,5r); +forsuffixes $=1,1',3,3',4,4',6,6': makelabel("",z$); endfor +makelabel.top("8l ",z8l); +makelabel.top(" 7r",z7r); +makelabel.bot("7l ",z7l); +makelabel.bot(" 8r",z8r); +endchar; + +"Figure A5a"; % S from IOnian font +clear_all; +em#:=10pt#; cap#:=7pt#; +slab#:=.8pt#; +stem#:=.9pt#; +thin#:=.8pt#; +thick#:=5/6pt#; + o#:=1/5pt#; +define_corrected_pixels(o); +define_pixels(em,cap); +define_blacker_pixels(thin,thick,slab,stem); +beginchar(25,5/9em#,cap#,0); % "The letter S"; /IOS=25 +penpos1(slab,70); +penpos2(.5slab,80); +penpos3(.5[slab,thick],200); +penpos5(.5[slab,thick],210); +penpos6(.7slab,80); +penpos7(.25[slab,thick],72); +x1=x5; y1r=.94h+o; +x2=x4=x6=.5w; y2r=h+o; y4=.54h; y6l=-o; +x3r=.04em; y3=.5[y4,y2]; +x5l=w-.03em; y5=.5[y4,y6]; +.5[x7l,x7]=.04em; y7l=.12h-o; +path trial; trial=z3{down}..z4..{down}z5; +pair dz; dz=direction 1 of trial; +penpos4(thick,angle dz-90); +penstroke z1e..z2e{left}..z3e{down}..z4e{dz}..z5e{down}..z6e{left}..z7e; +labels.lft(2,3r,5r,6,7); +labels.rt(1,3l,4,5l); +labels.top(1r,2r,3,4l,5,6r,7r); +labels.bot(1l,2l,4r,6l,7l); +endchar; + +"Figure 8a"; % twenty points on p2 +clear_all; +path p[]; p1=(0,0)..(3,3); p2=(0,0)..(3,3)..cycle; +transform t; t=identity scaled 60 shifted (50,0); +pair zz; +z=(1.5,1.5) transformed t; +pickup pencircle; +draw p2 transformed t; +for n=0 upto 19: zz:=point n/10 of p2 transformed t; + heavy_dot zz; + makelabel.top.nodot(decimal(n/10) if n mod 10=0:&".0" fi, +.09[zz,z] shifted(.05xpart(z-zz),-6.5)); endfor +%.1[zz,z] shifted(.1xpart(z-zz),-8)); endfor +shipit; +showit; + +"Figure 11a"; % E of METAFONT logo +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(suffix c)(expr n) = % code c; width is n units plus sidebars + beginchar(str c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +beginlogochar(E,14); +x1=x2=x3=leftstemloc; x4=x6=w-x1+o; x5=x4-xx; +y1=y6; y2=y5; y3=y4; bot.y1=0; top.y3=h; y2=barheight; +draw z6--z1--z3--z4; draw z2..z5; +labels.rt(1,2,3); +labels.lft(4,5,6); +endchar; + +"Figure 12a"; % cmr10 left parenthesis +u#:=20/36pt#; +tiny#:=0; +axis#:=90/36pt#; +hheight#:=250/36pt#; +border#:=20/36pt#; +hair#:=8/36pt#; +thin#:=9/36pt#; +thick#:=25/36pt#; +slant:=0; +rulethickness:=.4pt#; + +font_setup; +beginchar("(",7u#, hheight#+border#, hheight#+border#-2axis#); +italcorr (hheight#+border#)*slant-.5u#; +pickup tinypen; +penpos1(hair-tiny,0); penpos3(hair-tiny,0); +penpos2(.75[thin,thick]-tiny,0); +rt x1r = rt x3r = w-u; lft x2l = x1-4u; +top y1=h; y2=.5[y1,y3]=axis; +filldraw z1l{curl 4}..z2l..{curl 4}z3l-- + z3r{curl 4}..z2r..{curl 4}z1r--cycle; +labels.top(3,2); +labels.bot(1); +labels.lft(1l,2l,3l); +labels.rt(1r,2r,3r); +endchar; + +"Figure 12b"; % cmbx10 left parenthesis +u#:=23/36pt#; +tiny#:=0; +axis#:=90/36pt#; +hheight#:=250/36pt#; +border#:=20/36pt#; +hair#:=13/36pt#; +thin#:=17/36pt#; +thick#:=41/36pt#; +slant:=0; + +font_setup; +beginchar("(",7u#, hheight#+border#, hheight#+border#-2axis#); +italcorr (hheight#+border#)*slant-.5u#; +pickup tinypen; +penpos1(hair-tiny,0); penpos3(hair-tiny,0); +penpos2(.75[thin,thick]-tiny,0); +rt x1r = rt x3r = w-u; lft x2l = x1-4u; +top y1=h; y2=.5[y1,y3]=axis; +filldraw z1l{curl 4}..z2l..{curl 4}z3l-- + z3r{curl 4}..z2r..{curl 4}z1r--cycle; +labels.top(3,2); +labels.bot(1); +labels.lft(1l,2l,3l); +labels.rt(1r,2r,3r); +endchar; + +"Figure 12c"; % cmvtt10 left parenthesis +u#:=21/36pt#; +tiny#:=22/36pt#; +axis#:=110/36pt#; +hheight#:=220/36pt#; +border#:=30/36pt#; +hair#:=22/36pt#; +thin#:=25/36pt#; +thick#:=25/36pt#; +slant:=0; + +font_setup; +beginchar("(",7u#, hheight#+border#, hheight#+border#-2axis#); +italcorr (hheight#+border#)*slant-.5u#; +pickup tinypen; +penpos1(hair-tiny,0); penpos3(hair-tiny,0); +penpos2(.75[thin,thick]-tiny,0); +rt x1r = rt x3r = w-u; lft x2l = x1-4u; +top y1=h; y2=.5[y1,y3]=axis; +filldraw z1l{curl 4}..z2l..{curl 4}z3l-- + z3r{curl 4}..z2r..{curl 4}z1r--cycle; +labels.top(3,2); +labels.bot(1); +labels.lft(1l,2l,3l); +labels.rt(1r,2r,3r); +endchar; + +"Figure 12d"; % cmssdc10 left parenthesis +u#:=19/36pt#; +tiny#:=8/36pt#; +axis#:=95/36pt#; +hheight#:=250/36pt#; +border#:=20/36pt#; +hair#:=23/36pt#; +thin#:=40/36pt#; +thick#:=40/36pt#; +slant:=0; + +font_setup; +beginchar("(",7u#, hheight#+border#, hheight#+border#-2axis#); +italcorr (hheight#+border#)*slant-.5u#; +pickup tinypen; +penpos1(hair-tiny,0); penpos3(hair-tiny,0); +penpos2(.75[thin,thick]-tiny,0); +rt x1r = rt x3r = w-u; lft x2l = x1-4u; +top y1=h; y2=.5[y1,y3]=axis; +filldraw z1l{curl 4}..z2l..{curl 4}z3l-- + z3r{curl 4}..z2r..{curl 4}z1r--cycle; +labels.top(3,2); +labels.bot(1); +labels.lft(1l,2l,3l); +labels.rt(1r,2r,3r); +endchar; + +"Figure 12e"; % cmti10 left parenthesis +u#:=18.4/36pt#; +tiny#:=7/36; +axis#:=90/36pt#; +hheight#:=250/36pt#; +border#:=20/36pt#; +hair#:=8/36pt#; +thin#:=11/36pt#; +thick#:=23/36pt#; +slant:=.25; + +font_setup; +beginchar("(",7u#, hheight#+border#, hheight#+border#-2axis#); +italcorr (hheight#+border#)*slant-.5u#; +pickup tinypen; +penpos1(hair-tiny,0); penpos3(hair-tiny,0); +penpos2(.75[thin,thick]-tiny,0); +rt x1r = rt x3r = w-u; lft x2l = x1-4u; +top y1=h; y2=.5[y1,y3]=axis; +filldraw z1l{curl 4}..z2l..{curl 4}z3l-- + z3r{curl 4}..z2r..{curl 4}z1r--cycle; +labels.top(3,2); +labels.bot(1); +labels.lft(1l,2l,3l); +labels.rt(1r,2r,3r); +endchar; +currenttransform:=identity yscaled aspect_ratio; + +"Figure 12f"; % Dangerous bend symbol +def font_setup= +define_pixels(u,tiny,axis,hheight,border); +define_blacker_pixels(hair,thin,thick,rulethickness); +pickup if tiny<.5: nullpen else: pencircle scaled tiny fi; +tinypen:=savepen; +currenttransform:=identity slanted slant; +enddef; + +% typical cmr10 parameters +u#:=20/36pt#; +tiny#:=0; +axis#:=90/36pt#; +hheight#:=250/36pt#; +border#:=20/36pt#; +hair#:=8/36pt#; +thin#:=9/36pt#; +thick#:=25/36pt#; +fixwidth:=0; +slant:=0; +rulethickness#:=.4pt#; + +baselinedistance#:=11pt#; +heavyline#:=50/36pt#; +font_setup; +define_whole_pixels(baselinedistance); +define_blacker_pixels(heavyline); + +beginchar(127,25u#,hheight#+border#,0); +pickup pencircle scaled rulethickness; +top y1=25/27h; lft x4=0; +x1+x1=x1a+x1b=x4b+x2a=x4+x2=x4a+x2b=x3b+x3a=x3+x3=w; +x4a=x4b=x4+u; x3b=x1a=x1-2u; +y4+y4=y4a+y4b=y3b+y1a=y3+y1=y3a+y1b=y2b+y2a=y2+y2=0; +y1a=y1b=y1-2/27h; y4b=y2a=y4+4/27h; +draw z1a..z1..z1b---z2a..z2..z2b--- + z3a..z3..z3b---z4a..z4..z4b---cycle; % signboard +x10=x11=x12=x13=good.x(.5w-u); x14=x15=x16=x17=w-x10; +y10=y14=28/27h+epsilon; bot y13=-baselinedistance; +z11=(z10..z13) intersectionpoint (z1a{z1a-z4b}..z1{right}); +y15=y11; y16=y12=-y11; y17=y20=y21=y13; +draw z11--z10--z14--z15; draw z12--z13; draw z16--z17; % signpost +x20=w-x21; x21-x20=16u; draw z20--z21; % ground level +x36=w-x31; x36-x31=8u; x32=x33=x36; x31=x34=x35; +y31=-y36=12/27h; y32=-y35=9/27h; y33=-y34=3/27h; +pickup pencircle scaled heavyline; +draw z32{z32-z31}..z33---z34..z35{z36-z35}; % the dangerous bend +pickup penrazor xscaled heavyline rotated (angle(z32-z31)+90); +draw z31--z32; draw z35--z36; % upper and lower bars +labels.top(11,15,2a,4b,4,2,32,34); +labels.bot(10,14,2b,4a,33,35); +labels.lft(1a,3b,12,13,21,36); +labels.rt(1,1b,3a,3,16,20,17,31); +endchar; + +"Figure 13a"; % Possible cube +clear_all; +fudge_factor:=1/2; +s#:=5pt#*fudge_factor; define_pixels(s); % side of the square +z1=(-epsilon,-epsilon); z2=(s+epsilon,-epsilon); + z3=(-epsilon,s+epsilon); z4=(s+epsilon,s+epsilon); +for k=1 upto 4: z[k+4]=z[k]+(2/3s,1/3s); endfor +pickup pencircle scaled (.4pt*fudge_factor); +draw z5--z6--z8--z7--cycle; +pickup pencircle scaled (1.6pt*fudge_factor); +erase draw z2--z4--z3; +pickup pencircle scaled (.4pt*fudge_factor); +draw z1--z2--z4--z3--cycle; +for k=1 upto 4: draw z[k]--z[k+4]; endfor +labels.top(1,2,5,6); +labels.bot(3,4,7,8); +showit; +shipit; + +"Figure 14a"; % El Palo Alto +begingroup save flex; clear_all; +def flex(text t) = % puts dots into normal flex + hide(n_:=0; + for z=t: z_[incr n_]:=z; makelabel("",z); endfor + dz_:=z_[n_]-z_1) + z_1 for k=2 upto n_-1: ...z_[k]{dz_} endfor ...z_[n_] enddef; + +def grid= proofoffset (30,0); + for y:=0 step 50 until 650: proofrule((-110,y),(110,y)); + makelabel.lft.nodot(str[y],(100,y+5)); + endfor; + for x:=-100 step 50 until 100: proofrule((x,-10),(x,660));endfor enddef; + +path branch[],trunk; + +branch1= + flex((0,660),(-9,633),(-22,610)) + &flex((-22,610),(-3,622),(17,617)) + &flex((17,617),(7,637),(0,660)) + &cycle; + +branch2= + flex((30,570),(10,590),(-1,616)) + &flex((-1,616),(-11,592),(-29,576),(-32,562)) + &flex((-32,562),(-10,577),(30,570)) + &cycle; + +branch3= + flex((-1,570),(-17,550),(-40,535)) + &flex((-40,535),(-45,510),(-60,477)) + &flex((-60,477),(-20,505),(40,512)) + &flex((40,512),(31,532),(8,550),(-1,570)) + &cycle; + +branch4= + flex((0,509),(-14,492),(-32,481)) + &flex((-32,481),(-42,455),(-62,430)) + &flex((-62,430),(-20,450),(42,448)) + &flex((42,448),(38,465),(4,493),(0,509)) + &cycle; + +branch5= + flex((-22,470),(-23,435),(-44,410)) + &flex((-44,410),(-10,421),(35,420)) + &flex((35,420),(15,455),(-22,470)) + &cycle; + +branch6= + flex((18,375),(9,396),(5,420)) + &flex((5,420),(-5,410),(-50,375),(-50,350)) + &flex((-50,350),(-25,375),(18,375)) + &cycle; + +branch7= + flex((0,400),(-13,373),(-30,350)) + &flex((-30,350),(0,358),(30,350)) + &flex((30,350),(13,373),(0,400)) + &cycle; + +branch8= + flex((50,275),(45,310),(3,360)) + &flex((3,360),(-20,330),(-70,300),(-100,266)) + &flex((-100,266),(-75,278),(-60,266)) + &flex((-60,266),(0,310),(50,275)) + &cycle; + +branch9= + flex((10,333),(-15,290),(-43,256)) + &flex((-43,256),(8,262),(58,245)) + &flex((58,245),(34,275),(10,333)) + &cycle; + +branch10= + flex((8,262),(-21,249),(-55,240)) + &flex((-55,240),(-51,232),(-53,220)) + &flex((-53,220),(-28,229),(27,235)) + &flex((27,235),(16,246),(8,262)) + &cycle; + +branch11= + flex((0,250),(-25,220),(-70,195)) + &flex((-70,195),(-78,180),(-90,170)) + &flex((-90,170),(-5,188),(74,183)) + &flex((74,183),(34,214),(0,250)) + &cycle; + +branch12= + flex((8,215),(-35,175),(-72,155)) + &flex((-72,155),(-75,130),(-92,110),(-95,88)) + &flex((-95,88),(-65,117),(-54,104)) + &flex((-54,104),(10,151),(35,142))..flex((42,130),(60,123),(76,124)) + &flex((76,124),(62,146),(26,180),(8,215))&cycle; + +trunk=(0,660)---(-12,70)..{curl 5}(-28,-8) + &flex((-28,-8),(-16,-4),(-10,-11)) + &flex((-10,-11),(0,-5),(14,-10)) + &flex((14,-10),(20,-6),(29,-11)) + &(29,-11){curl 4}..(10,100)---cycle; + +makelabel("",(-12,70)); +makelabel("",(10,100)); + +pickup pencircle scaled 2; +draw trunk; +for n=1 upto 12: draw branch[n]; endfor +grid; +showit;shipit; +endgroup; + +"Figure 14b"; % Detail of one branch +clear_all; +pair zz[]; +zz1=(0,509); +zz2=(-14,492); +zz3=(-32,481); +zz4=(-42,455); +zz5=(-62,430); +zz6=(-20,450); +zz7=(42,448); +zz8=(38,465); +zz9=(4,493); +for n=1 upto 9: z[n]=(zz[n]+(62,-430)) scaled 2.5; endfor +pickup pencircle; +filldraw flex(z1,z2,z3)&flex(z3,z4,z5) + &flex(z5,z6,z7)&flex(z7,z8,z9,z1)&cycle; +labels.lft(2,3,4,5); +labels.rt(1,7,8,9); +labels.bot(6); +showit; shipit; + +"Figure 14c"; % superellipses +clear_all; +w:=100; h:=150; +pickup pencircle xscaled 0.7pt yscaled 0.2pt rotated 30; +forsuffixes ss=65,70,75,80: s:=ss/100; +draw superellipse((w,.5h),(.5w,h),(0,.5h),(.5w,0),s) shifted (150/.05(s-.65),0); +makelabel.top.nodot("."&str ss,(.5w,.45h) shifted (150/.05(s-.65),0)); +endfor +showit; +shipit; + +"Figure 14d"; % demo of joinery +clear_all; +pickup standardpen; +z0=(0,100); z1=(50,0); z2=(180,0); +for n=3 upto 9: z[n]=z[n-3]+(200,0); endfor +draw z0..z1---z2...{up}z3 + & z3..z4--z5...{up}z6 + & z6...z7---z8..{up}z9; +makelabel.bot("0 ",z0); +makelabel.bot("6 ",z6); +labels.bot(3,9); +labels.rt(1,4,7); +labels.lft(2,5,8); +showit; +shipit; + +"Figure 14e"; % JofA logo +beginchar("A",29mm#*.22,25mm#*.22,0); +interim autorounding:=0; interim smoothing:=0; +if odd(w-h): h:=h-1; fi +thick#:=2mm#*.22; thin#:=5/4mm#*.22; +define_whole_blacker_pixels(thick,thin); +forsuffixes @=a,b,c: transform @; + forsuffixes e=l,r: path @e,@'e; numeric t@[]e; endfor endfor +penpos1(thick,0); penpos2(thick,90); penpos3(thick,180); penpos4(thick,270); +penpos5(thick,0); penpos6(thick,90); penpos7(thick,180); penpos8(thick,270); +x2=x4=x6=x8=.5[x5,x7]=.5w; x1r=w; x3r=0; x5-x7=y6-y8; +y1=y3=y5=y7=.5[y6,y8]=.5h; y2r=h; y4r=0; y6r=round.75h; +forsuffixes e=l,r: a.e=b'e=c'e=superellipse(z1e,z2e,z3e,z4e,.75); + a'e=b.e=c.e=superellipse(z5e,z6e,z7e,z8e,.72); endfor +penpos.a1(thin,0); penpos.a5(whatever,-90); penpos.a9(thin,180); +x.a1l-x.a9l=1/3(x5l-x7l); x.a5=.5w; y.a1=y.a9; y.a5r=4/7h; +x.a3l=x.a1l; x.a3r=x.a1r; x.a4r=1/6[x.a3r,x1l]; x0=.5w; y0=.52h; +x.a6l+x.a4l=x.a6r+x.a4r=x.a7l+x.a3l=x.a7r+x.a3r=x.a9+x.a1=w; +y.a3r=y.a4r=y.a6r=y.a7r=.2[y2l,y0]; y.a3l=y.a4l=y.a6l=y.a7l=y.a3r-thin; +z.a4l=z.a4r+(thin,0)rotated(angle(z.a4r-z.a5r)+90) + +whatever*(z.a4r-z.a5r); z.a4l-z.a5l=whatever*(z.a4r-z.a5r); +z=a.r intersectionpoint (z0--(w,0)); y.a1-y.a5=length(z-z0); +b=identity shifted(0,y0-y.a1)rotatedaround(z0,90-angle(z0-(w,0))); +c=b reflectedabout (z2,z4); +for n=1,3,4,5,6,7,9: forsuffixes e=l,,r: forsuffixes @=b,c: + z@[n]e=z.a[n]e transformed @; endfor endfor endfor +forsuffixes e=l,r: forsuffixes @=a,b,c: + z@2e=@r intersectionpoint (z@1e--z@3e); + z@8e=@r intersectionpoint (z@9e--z@7e); + t@1e=xpart(@e intersectiontimes (z@1l--z@3l)); + t@9e=xpart(@e intersectiontimes (z@9l--z@7l)); + t@4e=xpart(@'e intersectiontimes (z@5r--z@4l)); + t@6e=xpart(@'e intersectiontimes (z@5r--z@6l)); endfor endfor +penstroke subpath(t.a9e,t.b6e) of a.e; +penstroke subpath(t.b4e,t.c4e) of b'e; +penstroke subpath(t.c6e,t.a1e+8) of c'e; +penstroke subpath(t.a6e,t.b9e) of a'e; +penstroke subpath(t.b1e,t.c1e) of b.e; +penstroke subpath(t.c9e,t.a4e+8) of c.e; +forsuffixes @=a,b,c: + penstroke z@2e--z@3e--z@4e--z@5e--z@6e--z@7e--z@8e; endfor +labels.lft(0,1l,3r,3,5l,7r,7,a1l,a2l,a3l,a6l, + a6r,a8r,a9r,b2l,b5,b5r,b9,c1,c2r,c5l); +labels.rt(1,1r,3l,5,5r,7l,a1r,a2r,a4l,a4r,a7l, + a9l,b1,b2r,b5l,c2l,c5,c5r,c9); +labels.top(2r,2,2l,4l,6r,6,6l,8l,a3r,a7r,a8l, + b1l,b3l,b3r,b6r,b6l,b8r,b9r,c1l,c3l,c3r,c6r,c6l,c8r,c9r); +labels.bot(2r,2,2l,4,4r,8,8r,a1,a5l,a5,a5r,a9, + b1r,b4l,b4r,b7l,b7r,b8l,c1r,c4l,c4r,c7l,c7r,c8l); +makelabel("",z.b9l); +makelabel("",z.c9l); +makelabel.lft.nodot("b9l",z.b9l-(0,3)); +makelabel.rt.nodot("c9l",z.c9l-(0,3)); +endchar; + +"Figure 15a"; % four u's +beginchar("4",11pt#,11pt#,0); +pickup pencircle scaled 3/4pt yscaled 1/3 rotated 30; +save t; transform t; +t=identity rotatedaround((.5w,.5h),-90); +x2=.35w; x3=good.x .6w; +y2=good.y .1h; top y3=round .4h+eps; +save p; path p; p=z2{right}...{up}z3; +top z1=point .5 of p transformed t; +draw z1...z2{right}...{up}z3; +addto currentpicture also currentpicture transformed t; +addto currentpicture also currentpicture transformed(t transformed t); +labels.bot(1,3); labels.rt(2); endchar; + +"Figure 16a"; % circular pen polygon +clear_all; +path p; +p=makepath(pencircle scaled 20) scaled 10 shifted (110,110); +if length p<>32: error; fi +fill p; +for k=1 upto length p: heavy_dot point k of p; endfor +for x=0 step 10 until 220: proofrule((x,0),(x,220)); endfor +for y=0 step 10 until 220: proofrule((0,y),(220,y)); endfor +proofrulethickness .8; +proofrule ((0,110),(220,110)); proofrule ((110,0),(110,220)); +showit; +shipit; + +"Figure 16b"; % elliptical pen polygon +clear_all; +path p; +p=makepath(pencircle xscaled 30 yscaled 20) scaled 10 shifted (160,110); +if length p<>40: error; fi +fill p; +for k=1 upto length p: heavy_dot point k of p; endfor +for x=0 step 10 until 320: proofrule((x,0),(x,220)); endfor +for y=0 step 10 until 220: proofrule((0,y),(320,y)); endfor +proofrulethickness .8; +proofrule ((0,110),(320,110)); proofrule ((160,0),(160,220)); +showit; +shipit; + +"Figure 16c"; % elliptical pen hexagon +clear_all; +path p; +p=makepath((pencircle xscaled 30) yscaled 20) scaled 10 shifted (160,110); +if length p<>6: error; fi +fill p; +for k=1 upto length p: heavy_dot point k of p; endfor +for x=0 step 10 until 320: proofrule((x,0),(x,220)); endfor +for y=0 step 10 until 220: proofrule((0,y),(320,y)); endfor +proofrulethickness .8; +proofrule ((0,110),(320,110)); proofrule ((160,0),(160,220)); +showit; +shipit; + +"Figure 16d"; % cutoff version of Figure 3n +clear_all; +z1=(0,100); z2=(100,100); z3=(200,100); +z4=(0,0); z5=(100,0); z6=(200,0); +path p; p=z4..controls z1 and z2..z6; +cutdraw p; +makelabel.rt.nodot("1",z1+(2,0)); +makelabel.rt.nodot("2",z2+(2,0)); +makelabel.rt.nodot("3",z3+(2,0)); +makelabel.rt.nodot(" 4",z4); +makelabel.rt.nodot("5",z5+(2,0)); +makelabel.rt.nodot(" 6",z6); +for k=1 upto 6: heavy_dot z[k]; endfor; +showit; +shipit; + +"Figure 16e"; % cutoff version of Figure 4b +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(suffix c)(expr n) = % code c; width is n units plus sidebars + beginchar(str c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +beginlogochar(T,13); +if odd(w-ph): w:=w+1; fi % allows a symmetric stem +x1+x2=2x3=2x4=w; lft.x1=0; +y1=y2=y3; top.y1=h; y4=0; +draw z1--z2; +cutoff(z1,170); +cutoff(z2,-10); +draw z3--z4; +cutoff(z4,-80); +labels.rt(1); +labels.lft(2); +labels.bot(3); +makelabel.top("4",z4); +endchar; + +"Figure 16f"; % tilde with pencircle +clear_all; +pickup pencircle xscaled .8pt yscaled .2pt rotated 50; +z1=(0,0); z4=(200,30); +z2-z1=z4-z3=whatever*dir 50; +y2-y1=3(y4-y1); +draw z1..controls z2 and z3..z4; +makelabel.lft("1 ",z1); +makelabel.rt(" 4",z4); +showit; +shipit; + +"Figure 16g"; % tilde with pensquare +clear_all; +pickup pensquare xscaled .8pt yscaled .2pt rotated 50; +z1=(0,0); z4=(200,30); +z2-z1=z4-z3=whatever*dir 50; +y2-y1=3(y4-y1); +draw z1..controls z2 and z3..z4; +makelabel.lft("1 ",z1); +makelabel.rt(" 4",z4); +showit; +shipit; + +"Figure 16h"; % fancy serif with pencircle +clear_all; +pickup pencircle xscaled .8pt yscaled .2pt rotated 20; +z1=(20,175); bot z3=(0,0); +z4=(50,0); z6=(25,175); +x2=x1; z2=z3+whatever*dir 20; +x5=x6; z5=z4+whatever*dir -20; +pair dishing; dishing=(8,0) rotated 20; +filldraw z1..controls z2..z3 +--(flex(z3,.5[z3,z4]+dishing,z4))shifted(0,-epsilon) +-- z4..controls z5..z6--cycle; +showit; +labels.lft(1,2,3); +labels.rt(4,5,6); +shipit; + +"Figure 16i"; % fancy serif with pensquare +clear_all; +pickup pensquare xscaled .8pt yscaled .2pt rotated 20; +z1=(20,175); bot z3=(0,0); +z4=(50,0); z6=(25,175); +x2=x1; z2=z3+whatever*dir 20; +x5=x6; z5=z4+whatever*dir -20; +pair dishing; dishing=(8,0) rotated 20; +filldraw z1..controls z2..z3 +--(flex(z3,.5[z3,z4]+dishing,z4))shifted(0,-epsilon) +-- z4..controls z5..z6--cycle; +showit; +labels.lft(1,2,3); +labels.rt(4,5,6); +shipit; + +"Figure 18a"; % O of METAFONT logo +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(expr c)(expr n) = % code c; width is n units plus sidebars + beginchar(c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +def super_half(suffix i,j,k) = + draw z.i{0,y.j-y.i} + ... (.8[x.j,x.i],.8[y.i,y.j]){z.j-z.i} + ... z.j{x.k-x.i,0} + ... (.8[x.j,x.k],.8[y.k,y.j]){z.k-z.j} + ... z.k{0,y.k-y.j} enddef; + +beginlogochar("O",15); +x1=x4=.5w; top y1=h+o; bot y4=-o; +x2=w-x3=good.x(1.5u+s); +y2=y3=barheight; +super_half(2,1,3); super_half(3,4,2); +labels.lft(2); labels.rt(1,3,4); endchar; + +"Figure A18a"; % A of METAFONT logo +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(expr c)(expr n) = % code c; width is n units plus sidebars + beginchar(c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +def super_half(suffix i,j,k) = + draw z.i{0,y.j-y.i} + ... (.8[x.j,x.i],.8[y.i,y.j]){z.j-z.i} + ... z.j{x.k-x.i,0} + ... (.8[x.j,x.k],.8[y.k,y.j]){z.k-z.j} + ... z.k{0,y.k-y.j} enddef; + +beginlogochar("A",15); +x1=.5w; +x2=x4=leftstemloc; +x3=x5=w-x2; +top y1=h+o; +y2=y3=barheight; +bot y4=bot y5=-o; +draw z4--z2--z3--z5; +super_half(2,1,3); +labels.top(2,3,4,5); +labels.rt(1); +endchar; + +"Figure 18b"; % serif points +clear_all; +def serif(suffix $)(expr breadth,theta,left_jut,right_jut)= + penpos$(breadth/abs sind theta,0); +z$a-z$l=z$f-z$r=(bracket/abs sind theta)*dir theta; +y$c=y$d; y$b=y$e=y$; y$b-y$c=if theta<0:-fi slab; +x$b=x$c=x$l-left_jut; x$d=x$e=x$r+right_jut; +enddef; + +def serif_edge suffix $ = + (serif_bracket($a,$l,$b)--z$c + --z$d--reverse serif_bracket($f,$r,$e)) enddef; + +def serif_bracket(suffix i,j,k) = + (z.i{z.j-z.i}...serif_darkness[z.j,.5[z.i,z.k] ]{z.k-z.i} + ...z.k{z.k-z.j}) enddef; + +serif_darkness:=1/4; slab:=50; bracket:=175; +z$=(150,slab); +serif($,100,75,80,90); +pickup pencircle scaled 2; draw serif_edge $; +labels.lft($l,$a); +labels.rt($,$r,$f); +labels.top($b,$e); +labels.bot($c,$d); +showit; +shipit; + +"Figure 18c"; % AI by outlines +clear_all; +def serif(suffix $)(expr breadth,theta,left_jut,right_jut)= + penpos$(breadth/abs sind theta,0); +z$a-z$l=z$f-z$r=(bracket/abs sind theta)*dir theta; +y$c=y$d; y$b=y$e=y$; y$b-y$c=if theta<0:-fi slab; +x$b=x$c=x$l-left_jut; x$d=x$e=x$r+right_jut; +enddef; + +def serif_edge suffix $ = + (serif_bracket($a,$l,$b)--z$c + --z$d--reverse serif_bracket($f,$r,$e)) enddef; + +def serif_bracket(suffix i,j,k) = + (z.i{z.j-z.i}...serif_darkness[z.j,.5[z.i,z.k] ]{z.k-z.i} + ...z.k{z.k-z.j}) enddef; + +serif_darkness:=1/3; +slab#:=1/4pt#; +bracket#:=1pt#; +jut#:=.9pt#; +u#:=3/5pt#; +ht#:=7pt#; +thin#:=.5pt#; +thick#:=1.1pt#; +define_pixels(slab,bracket,jut,u,ht,thin,thick); + +beginchar("A",13u#,ht#,0); +z1=(.5w,round 1.05h); x4l=w-x5r=u; y4l=y5r=slab; +numeric theta[]; theta4=angle(z1-z4l); theta5=angle(z1-z5r); +serif(4,thin,theta4,.6jut,jut); serif(5,thick,theta5,jut,.6jut); +z0=z4r+whatever*dir theta4=z5l+whatever*dir theta5; +fill z1--serif_edge4--z0 & z0--serif_edge5--z1 & cycle; +penpos2(whatever,theta4); penpos3(whatever,theta5); +y2r=y3r=.5[y4,y0]; y2l=y3l=y2r-thin; +z2=whatever[z1,z4r]; z3=whatever[z1,z5l]; +penstroke z2e--z3e; +labels.lft(3,5l,5,4a,5a); +labels.rt(2,4r,4f,5f); +labels.top(1,2r,3r,4l,5r,4b,4e,5b,5e); +labels.bot(0,2l,3l,4,4c,4d,5c,5d); + +ww:=w; % special hacks to get two on one +picture tmp; tmp:=currentpicture; +proofrule((w,-d.o_),(w,h.o_)); +endgroup; + +beginchar("I",6u#,ht#,0); +currentpicture:=tmp; +currenttransform:=currenttransform shifted(ww,0); +x1=x2=.5w; y1=h-y2; y2=slab; +serif(1,thick,-90,1.1jut,1.1jut); serif(2,thick,90,1.1jut,1.1jut); +fill serif_edge 2 -- reverse serif_edge 1 -- cycle; +w:=w+ww; +labels.lft(1a,2a,1l); +labels.rt(1f,2f,1,1r); +labels.top(2l,2,2r,2e,1c,1d); +labels.bot(2d,1b,1e); +makelabel("",z2b); makelabel("",z2c); +makelabel.rt.nodot("2b",z2b+(0,3)); +makelabel.rt.nodot("2c",z2c-(0,3)); +endchar; + +currenttransform:=identity yscaled aspect_ratio; + +"Figure A18b"; % H by outlines +clear_all; +def serif(suffix $)(expr breadth,theta,left_jut,right_jut)= + penpos$(breadth/abs sind theta,0); +z$a-z$l=z$f-z$r=(bracket/abs sind theta)*dir theta; +y$c=y$d; y$b=y$e=y$; y$b-y$c=if theta<0:-fi slab; +x$b=x$c=x$l-left_jut; x$d=x$e=x$r+right_jut; +enddef; + +def serif_edge suffix $ = + (serif_bracket($a,$l,$b)--z$c + --z$d--reverse serif_bracket($f,$r,$e)) enddef; + +def serif_bracket(suffix i,j,k) = + (z.i{z.j-z.i}...serif_darkness[z.j,.5[z.i,z.k] ]{z.k-z.i} + ...z.k{z.k-z.j}) enddef; + +serif_darkness:=1/3; +slab#:=1/4pt#; +bracket#:=1pt#; +jut#:=.9pt#; +u#:=3/5pt#; +ht#:=7pt#; +thin#:=.5pt#; +thick#:=1.1pt#; +define_pixels(slab,bracket,jut,u,ht,thin,thick); + +beginchar("H",13u#,ht#,0); +x1=x2=x5=3u; x3=x4=x6=w-x1; y1c=y3c=h; y2c=y4c=0; +serif(1,thick,-90,jut,jut); +serif(2,thick,90,jut,jut); +serif(3,thick,-90,jut,jut); +serif(4,thick,90,jut,jut); +fill serif_edge 2 -- reverse serif_edge 1 -- cycle; +fill serif_edge 4 -- reverse serif_edge 3 -- cycle; +penpos5(thin,90); penpos6(thin,90); +y5=y6=.52h; penstroke z5e--z6e; +labels.lft(1a,2a,3a,4a,5,1,2,1l,2l,3l,4l); +labels.rt(1f,2f,3f,4f,6,3,4,1r,2r,3r,4r); +labels.top(1c,1d,2b,2e,4b,4e,3c,3d,5r,6r); +labels.bot(1b,1e,2c,2d,4c,4d,3b,3e,5l,6l); +endchar; + +"Figure 18d"; % AI by broadpen +clear_all; +def bot_serif(suffix $)(expr xx,theta,left_jut,right_jut)= + penpos$(xx,0); +z$a-z$l=z$f-z$r=(bracket/abs sind theta)*dir theta; +y$c=top y$l; y$d=y$r; x$c=x$l-left_jut; x$d=x$r+right_jut; +z$b=z$l+whatever*dir theta=z$c+whatever*dir phi; +z$e=z$r+whatever*dir theta=z$d+whatever*dir -phi; +enddef; + +def top_serif(suffix $)(expr xx,theta,left_jut,right_jut)= + penpos$(xx,0); +z$a-z$l=z$f-z$r=(bracket/abs sind theta)*dir theta; +%y$c=top y$l; y$d=y$r; x$c=x$l-left_jut; x$d=x$r+right_jut; +y$c=y$d=y$; x$c=x$l-left_jut; x$d=x$r+right_jut; +z$b=z$l+whatever*dir theta=z$c+whatever*dir -phi; +z$e=z$r+whatever*dir theta=z$d+whatever*dir phi; +enddef; + +def bot_serif_edge suffix $ = + (z$a..controls z$b..z$c + --(flex(z$c,.5[z$c,z$d]+dishing,z$d)) shifted (0,-epsilon) + -- z$d..controls z$e..z$f) enddef; + +def top_serif_edge suffix $ = + (z$a..controls z$b..z$c + --(flex(z$c,.5[z$c,z$d]-dishing,z$d)) shifted (0,+epsilon) + -- z$d..controls z$e..z$f) enddef; + +phi:=20; +pair dishing; dishing:=(1/4pt,0) rotated phi; +bracket#:=1pt#; +jut#:=.9pt#; +u#:=3/5pt#; +ht#:=7pt#; +px#:=.8pt#; +py#:=.2pt#; +xx#:=.3pt#; +define_pixels(bracket,jut,u,ht,px,py,xx); + +pickup pensquare xscaled px yscaled py rotated phi; broad_pen:=savepen; + +beginchar("A",13u#,ht#,0); pickup broad_pen; +z1=(.5w,top h); lft x4l=w-rt x5r=1.2u; y4l=y5r=0; +numeric theta[]; theta4=angle(z1-z4l); theta5=angle(z1-z5r); +numeric xxx; +px*sind(theta5-phi)+xxx*sind theta5 = px*cosd phi+xx; +bot_serif(4,0,theta4,.8jut,.8jut); +bot_serif(5,xxx,theta5,.6jut,.8jut); +z0=z4r+whatever*dir theta4=z5l+whatever*dir theta5; +filldraw z1--bot_serif_edge4--z0 & z0--bot_serif_edge5--z1 & cycle; +top y2=top y3=.45 bot y0; z2=whatever[z1,z4r]; z3=whatever[z1,z5l]; +draw z2--z3; +labels.lft(4a,4b,4c,4,5l,5a,5c); +labels.rt(4f,4e,5r,5d,5e,5f); +labels.top(1,2,3,5b); +labels.bot(0,4d,5); + +ww:=w; % special hacks to get two on one +picture tmp; tmp:=currentpicture; +proofrule((w,-d.o_),(w,h.o_)); +endgroup; + +beginchar("I",6u#,ht#,0); pickup broad_pen; +currentpicture:=tmp; +currenttransform:=currenttransform shifted(ww,0); +x1=x2=.5w; y1=h; y2=0; +top_serif(1,xx,-90,1.1jut,1.1jut); +bot_serif(2,xx,90,1.1jut,1.1jut); +filldraw bot_serif_edge 2 -- reverse top_serif_edge 1 -- cycle; +labels.lft(1l,2l,1a,1b,1c,2a,2b); +labels.rt(1r,2r,1d,1e,1f,2d,2e,2f); +labels.top(1); +labels.bot(2,2c); +w:=w+ww; +endchar; + +currenttransform:=identity yscaled aspect_ratio; + +"Figure A18c"; % H by broadpen +clear_all; +def bot_serif(suffix $)(expr xx,theta,left_jut,right_jut)= + penpos$(xx,0); +z$a-z$l=z$f-z$r=(bracket/abs sind theta)*dir theta; +y$c=top y$l; y$d=y$r; x$c=x$l-left_jut; x$d=x$r+right_jut; +z$b=z$l+whatever*dir theta=z$c+whatever*dir phi; +z$e=z$r+whatever*dir theta=z$d+whatever*dir -phi; +enddef; + +def top_serif(suffix $)(expr xx,theta,left_jut,right_jut)= + penpos$(xx,0); +z$a-z$l=z$f-z$r=(bracket/abs sind theta)*dir theta; +y$c=y$d=y$; x$c=x$l-left_jut; x$d=x$r+right_jut; +z$b=z$l+whatever*dir theta=z$c+whatever*dir -phi; +z$e=z$r+whatever*dir theta=z$d+whatever*dir phi; +enddef; + +def bot_serif_edge suffix $ = + (z$a..controls z$b..z$c + --(flex(z$c,.5[z$c,z$d]+dishing,z$d))shifted (0,-epsilon) + -- z$d..controls z$e..z$f) enddef; + +def top_serif_edge suffix $ = + (z$a..controls z$b..z$c + --(flex(z$c,.5[z$c,z$d]-dishing,z$d))shifted (0,+epsilon) + -- z$d..controls z$e..z$f) enddef; + +phi:=20; +pair dishing; dishing:=(1/4pt,0) rotated phi; +bracket#:=1pt#; +jut#:=.9pt#; +u#:=3/5pt#; +ht#:=7pt#; +px#:=.8pt#; +py#:=.2pt#; +xx#:=.3pt#; +define_pixels(bracket,jut,u,ht,px,py,xx); + +pickup pensquare xscaled px yscaled py rotated phi; broad_pen:=savepen; + +beginchar("H",13u#,ht#,0); pickup broad_pen; +x1=x2=x5=3u; x3=x4=x6=w-x1; y1=y3=h; y2=y4=0; +top_serif(1,xx,-90,jut,jut); +bot_serif(2,xx,90,jut,jut); +top_serif(3,xx,-90,jut,jut); +bot_serif(4,xx,90,jut,jut); +filldraw bot_serif_edge 2 -- reverse top_serif_edge 1 -- cycle; +filldraw bot_serif_edge 4 -- reverse top_serif_edge 3 -- cycle; +y5=y6=.52h; draw z5--z6; +labels.lft(l1,2l,3l,4l,1a,1b,1c,2a,2b,2c,3a,3b,3c,4a,4b,4c); +labels.rt(1r,2r,3r,4r,1d,1e,1f,2d,2e,2f,3d,3e,3f,4d,4e,4f); +labels.top(1,3); +labels.bot(2,4,5,6); +endchar; + +currenttransform:=identity yscaled aspect_ratio; + +"Figure 20a"; % example of `solve' +clear_all; +z1=(0,25); z2=(100,100); z3=(300,100); z4=(320,0); +vardef upward(expr x)= + ypart direction 1 of (z1{z2-z1}..(x,y2)..{z4-z3}z4)>0 enddef; +z=(solve upward(x2,x3),y2); +pickup pencircle scaled 4; +draw z1{z2-z1}..z..{z4-z3}z4; +pickup pencircle scaled 2; +draw z1--z2; draw z3--z4; +makelabel.lft("z1 ",z1); +makelabel.lft("z2 ",z2); +makelabel.rt(" z3",z3); +makelabel.rt(" z4",z4); +makelabel.top.nodot("z",z+(0,2)); +forsuffixes $=1,2,3,4,: heavy_dot z$; endfor +showit; +shipit; + +"Figure 21a"; % N of METAFONT logo +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(expr c)(expr n) = % code c; width is n units plus sidebars + beginchar(c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +beginlogochar("N",15); +x1+x4=x1+x3=x2+x5=w; x1=x2=leftstemloc; +y1=y4=y3-yy; bot.y1=-o; y2=y5; top.y5=h+o; +draw z1--z2--z3; draw z4..z5; +labels.top(1,3,4); +labels.bot(2,5); +endchar; + +"Figure 21b"; % random N of METAFONT logo, nine-point size +randomseed:=1; + +vardef noise=normaldeviate*.1pt enddef; + +ht#:=.9*6pt#; +xgap#:=.9*0.6pt#; +u#:=.91*4/9pt#; +s#:=.08pt#; +o#:=1/10pt#; +px#:=.9*2/3pt#; +ygap#:=(ht#/13.5u#)*xgap#; +leftstemloc#:=2.5u#+s#; +barheight#:=.45ht#; +define_pixels(s,u,xgap,ygap,leftstemloc,barheight); +py#:=.9px#; define_blacker_pixels(px,py); +pickup pencircle xscaled px yscaled py; logo_pen:=savepen; +define_corrected_pixels(o); + +def beginlogochar(expr c,n) = + beginchar(c,n*u#+2s#,ht#,0); pickup logo_pen enddef; + +beginlogochar("N",15); +x1=leftstemloc+noise; +x2=leftstemloc+noise; +x4=w-leftstemloc+noise; +x5=w-leftstemloc+noise; +bot y1=noise-o; +top y2=h+o+noise; +y3=y4+ygap+noise; +bot y4=noise-o; +top y5=h+o+noise; +z3=whatever[z4,z5]; +draw z1--z2--z3; draw z4--z5; +labels.top(1,3,4); +labels.bot(2,5); +endchar; + +"Figure 21c"; % random N of METAFONT logo, nine-point size +randomseed:=2; + +vardef noise=normaldeviate*.1pt enddef; + +ht#:=.9*6pt#; +xgap#:=.9*0.6pt#; +u#:=.91*4/9pt#; +s#:=.08pt#; +o#:=1/10pt#; +px#:=.9*2/3pt#; +ygap#:=(ht#/13.5u#)*xgap#; +leftstemloc#:=2.5u#+s#; +barheight#:=.45ht#; +define_pixels(s,u,xgap,ygap,leftstemloc,barheight); +py#:=.9px#; define_blacker_pixels(px,py); +pickup pencircle xscaled px yscaled py; logo_pen:=savepen; +define_corrected_pixels(o); + +def beginlogochar(expr c,n) = + beginchar(c,n*u#+2s#,ht#,0); pickup logo_pen enddef; + +beginlogochar("N",15); +x1=leftstemloc+noise; +x2=leftstemloc+noise; +x4=w-leftstemloc+noise; +x5=w-leftstemloc+noise; +bot y1=noise-o; +top y2=h+o+noise; +y3=y4+ygap+noise; +bot y4=noise-o; +top y5=h+o+noise; +z3=whatever[z4,z5]; +draw z1--z2--z3; draw z4--z5; +labels.top(1,3,4); +labels.bot(2,5); +endchar; + +"Figure 21d"; % random N of METAFONT logo, nine-point size +randomseed:=3; + +vardef noise=normaldeviate*.1pt enddef; + +ht#:=.9*6pt#; +xgap#:=.9*0.6pt#; +u#:=.91*4/9pt#; +s#:=.08pt#; +o#:=1/10pt#; +px#:=.9*2/3pt#; +ygap#:=(ht#/13.5u#)*xgap#; +leftstemloc#:=2.5u#+s#; +barheight#:=.45ht#; +define_pixels(s,u,xgap,ygap,leftstemloc,barheight); +py#:=.9px#; define_blacker_pixels(px,py); +pickup pencircle xscaled px yscaled py; logo_pen:=savepen; +define_corrected_pixels(o); + +def beginlogochar(expr c,n) = + beginchar(c,n*u#+2s#,ht#,0); pickup logo_pen enddef; + +beginlogochar("N",15); +x1=leftstemloc+noise; +x2=leftstemloc+noise; +x4=w-leftstemloc+noise; +x5=w-leftstemloc+noise; +bot y1=noise-o; +top y2=h+o+noise; +y3=y4+ygap+noise; +bot y4=noise-o; +top y5=h+o+noise; +z3=whatever[z4,z5]; +draw z1--z2--z3; draw z4--z5; +labels.top(1,3,4); +labels.bot(2,5); +endchar; + +"Figure 24a"; % Ionian O at 200 pixels/inch +ss:=10; +begingroup interim hppp:=200/72.27; % lowres parameters +interim blacker:=.65; % make pens a bit blacker +interim o_correction:=.4; % but don't overshoot as much + em#:=10pt#; cap#:=7pt#; + thin#:=1/3pt#; thick#:=5/6pt#; + o#:=1/5pt#; +define_pixels(em,cap); +define_blacker_pixels(thin,thick); +define_corrected_pixels(o); + curve_sidebar:=round 1/18em; +pair u,uu,v; +beginchar("O",0.8em#,cap#,0); + penpos1(thick,10); penpos2(.1[thin,thick],90-10); + penpos3(thick,180+10); penpos4(thin,270-10); + x1l=w-x3l=curve_sidebar; x2=x4=.5w; + y1=.49h; y2l=-o; y3=.51h; y4l=h+o; + penstroke (z1e{down}..z2e{right} + ..z3e{up}..z4e{left}..cycle) scaled ss; +for m=0 upto w: proofrule((m*ss,0),(m*ss,h*ss)); endfor +for n=0 upto h: proofrule((0,n*ss),(w*ss,n*ss)); endfor +proofrulethickness 1; +forsuffixes e=l,r: + u:=round((point 0 of path_.e)/ss); + for t=0 step 1/64 until 4: + v:=round((point t of path_.e)/ss); + if u<>v: if abs(u-v)=1: proofrule(u*ss,v*ss); + else: del:=1/128; tt:=t-del; + forever: uu:=round((point tt of path_.e)/ss); + exitif abs(u-uu)=1; + if del=epsilon:ddt;fi + del:=del/2; + tt:=tt if uu=u:+ else:-fi del; endfor + proofrule(u*ss,uu*ss); proofrule(uu*ss,v*ss); fi + u:=v; fi endfor + endfor +showit; +shipit; +endgroup; +endgroup; +numeric u,uu,v; + +"Figure 24b"; % Ionian O at 200 pixels/inch, unrounded position +ss:=10; +begingroup interim hppp:=200/72.27; % lowres parameters +interim blacker:=.65; % make pens a bit blacker +interim o_correction:=.4; % but don't overshoot as much + em#:=10pt#; cap#:=7pt#; + thin#:=1/3pt#; thick#:=5/6pt#; + o#:=1/5pt#; +define_pixels(em,cap); +define_blacker_pixels(thin,thick); +define_corrected_pixels(o); + curve_sidebar:= 1/18em; +pair u,uu,v; +beginchar("O",0.8em#,cap#,0); + penpos1(thick,10); penpos2(.1[thin,thick],90-10); + penpos3(thick,180+10); penpos4(thin,270-10); + x1l=w-x3l=curve_sidebar; x2=x4=.5w; + y1=.49h; y2l=-o; y3=.51h; y4l=h+o; + penstroke (z1e{down}..z2e{right} + ..z3e{up}..z4e{left}..cycle) scaled ss; +for m=0 upto w: proofrule((m*ss,0),(m*ss,h*ss)); endfor +for n=0 upto h: proofrule((0,n*ss),(w*ss,n*ss)); endfor +proofrulethickness 1; +forsuffixes e=l,r: + u:=round((point 0 of path_.e)/ss); + for t=0 step 1/64 until 4: + v:=round((point t of path_.e)/ss); + if u<>v: if abs(u-v)=1: proofrule(u*ss,v*ss); + else: del:=1/128; tt:=t-del; + forever: uu:=round((point tt of path_.e)/ss); + exitif abs(u-uu)=1; + if del=epsilon:ddt;fi + del:=del/2; + tt:=tt if uu=u:+ else:-fi del; endfor + proofrule(u*ss,uu*ss); proofrule(uu*ss,v*ss); fi + u:=v; fi endfor + endfor +showit; +shipit; +endgroup; +endgroup; +numeric u,uu,v; + +"Figure 24c"; % Fig 24b shifted right .05 pixel +ss:=10; +begingroup interim hppp:=200/72.27; % lowres parameters +interim blacker:=.65; % make pens a bit blacker +interim o_correction:=.4; % but don't overshoot as much + em#:=10pt#; cap#:=7pt#; + thin#:=1/3pt#; thick#:=5/6pt#; + o#:=1/5pt#; +define_pixels(em,cap); +define_blacker_pixels(thin,thick); +define_corrected_pixels(o); + curve_sidebar:= 1/18em; +pair u,uu,v; +beginchar("O",0.8em#,cap#,0); + penpos1(thick,10); penpos2(.1[thin,thick],90-10); + penpos3(thick,180+10); penpos4(thin,270-10); + x1l=w-x3l=curve_sidebar; x2=x4=.5w; + y1=.49h; y2l=-o; y3=.51h; y4l=h+o; + penstroke (z1e{down}..z2e{right} + ..z3e{up}..z4e{left}..cycle) shifted (.05,0) scaled ss; +for m=0 upto w: proofrule((m*ss,0),(m*ss,h*ss)); endfor +for n=0 upto h: proofrule((0,n*ss),(w*ss,n*ss)); endfor +proofrulethickness 1; +forsuffixes e=l,r: + u:=round((point 0 of path_.e)/ss); + for t=0 step 1/64 until 4: + v:=round((point t of path_.e)/ss); + if u<>v: if abs(u-v)=1: proofrule(u*ss,v*ss); + else: del:=1/128; tt:=t-del; + forever: uu:=round((point tt of path_.e)/ss); + exitif abs(u-uu)=1; + if del=epsilon:ddt;fi + del:=del/2; + tt:=tt if uu=u:+ else:-fi del; endfor + proofrule(u*ss,uu*ss); proofrule(uu*ss,v*ss); fi + u:=v; fi endfor + endfor +showit; +shipit; +endgroup; +endgroup; +numeric u,uu,v; + +"Figure 24d"; % Fig 24c shifted right .05 pixel +ss:=10; +begingroup interim hppp:=200/72.27; % lowres parameters +interim blacker:=.65; % make pens a bit blacker +interim o_correction:=.4; % but don't overshoot as much + em#:=10pt#; cap#:=7pt#; + thin#:=1/3pt#; thick#:=5/6pt#; + o#:=1/5pt#; +define_pixels(em,cap); +define_blacker_pixels(thin,thick); +define_corrected_pixels(o); + curve_sidebar:= 1/18em; +pair u,uu,v; +beginchar("O",0.8em#,cap#,0); + penpos1(thick,10); penpos2(.1[thin,thick],90-10); + penpos3(thick,180+10); penpos4(thin,270-10); + x1l=w-x3l=curve_sidebar; x2=x4=.5w; + y1=.49h; y2l=-o; y3=.51h; y4l=h+o; + penstroke (z1e{down}..z2e{right} + ..z3e{up}..z4e{left}..cycle) shifted (.1,0) scaled ss; +for m=0 upto w: proofrule((m*ss,0),(m*ss,h*ss)); endfor +for n=0 upto h: proofrule((0,n*ss),(w*ss,n*ss)); endfor +proofrulethickness 1; +forsuffixes e=l,r: + u:=round((point 0 of path_.e)/ss); + for t=0 step 1/64 until 4: + v:=round((point t of path_.e)/ss); + if u<>v: if abs(u-v)=1: proofrule(u*ss,v*ss); + else: del:=1/128; tt:=t-del; + forever: uu:=round((point tt of path_.e)/ss); + exitif abs(u-uu)=1; + if del=epsilon:ddt;fi + del:=del/2; + tt:=tt if uu=u:+ else:-fi del; endfor + proofrule(u*ss,uu*ss); proofrule(uu*ss,v*ss); fi + u:=v; fi endfor + endfor +showit; +shipit; +endgroup; +endgroup; +numeric u,uu,v; + +"Figure 24e"; % hash mark +numeric u; +u#:=10/18pt#; define_pixels(u); +beginchar(0,15u#,250/36pt#,70/36pt#); +pickup pencircle scaled (.4pt+blacker); +lft x1=round u-eps; x3=x1; x2=x4=w-x1; +y1=y2=good.y(.5[-d,h]+1.1pt); y3=y4=h-d-y1; +draw z1--z2; draw z3--z4; +lft x6=round 3u; x7=w-x6; +x8=good.x .5w; x5-x6=x7-x8; +top y5=top y7=h+eps; bot y6=bot y8=-d-eps; +draw z5--z6; draw z7--z8; +labels.top(6,8); +labels.bot(5,7); +labels.lft(2,4); +labels.rt(1,3); +endchar; + +"Figure 24f"; % Ionian O at 200 pixels/inch, autorounding=1 +ss:=10; +begingroup interim hppp:=200/72.27; % lowres parameters +interim blacker:=.65; % make pens a bit blacker +interim o_correction:=.4; % but don't overshoot as much + em#:=10pt#; cap#:=7pt#; + thin#:=1/3pt#; thick#:=5/6pt#; + o#:=1/5pt#; +define_pixels(em,cap); +define_blacker_pixels(thin,thick); +define_corrected_pixels(o); + curve_sidebar:= 1/18em; +interim autorounding:=1; +interim granularity:=10; +beginchar("O",0.8em#,cap#,0); + penpos1(thick,10); penpos2(.1[thin,thick],90-10); + penpos3(thick,180+10); penpos4(thin,270-10); + x1l=w-x3l=curve_sidebar; x2=x4=.5w; + y1=.49h; y2l=-o; y3=.51h; y4l=h+o; + penstroke (z1e{down}..z2e{right} + ..z3e{up}..z4e{left}..cycle) scaled ss; +for m=0 upto w: proofrule((m*ss,0),(m*ss,h*ss)); endfor +for n=0 upto h: proofrule((0,n*ss),(w*ss,n*ss)); endfor +proofrulethickness 1; +pair u; +for v= % pairs gotten from tracingedges on a separate run! +(2,9), (2,6), (3,6), (3,4), (4,4), (4,3), (5,3), (5,2), (6,2), +(6,1), (8,1), (8,0), (14,0), (14,1), (16,1), (16,2), (17,2), (17,3), +(18,3), (18,4), (19,4), (19,7), (20,7), (20,13), (19,13), (19,15), +(18,15), (18,16), (17,16), (17,17), (16,17), (16,18), (14,18), (14,19), +(8,19), (8,18), (6,18), (6,17), (5,17), (5,16), (4,16), (4,15), (3,15), +(3,12), (2,12), (2,9) +:if known u: proofrule(u*ss,v*ss) ; fi +u:=v; endfor + +pair u; +for v= +(4,9), (4,7), (5,7), (5,5), (6,5), +(6,4), (7,4), (7,3), (9,3), (9,2), (14,2), (14,3), (15,3), (15,4), (16,4), +(16,5), (17,5), (17,7), (18,7), (18,12), (17,12), (17,14), (16,14), +(16,15), (15,15), (15,16), (13,16), (13,17), (8,17), (8,16), (7,16), +(7,15), (6,15), (6,14), (5,14), (5,12), (4,12), (4,9) +:if known u: proofrule(u*ss,v*ss) ; fi +u:=v; endfor +showit; +shipit; +endgroup; +endgroup; +numeric u; + +"Figure 24g"; % Ionian O at 200 pixels/inch, autorounding=2 +ss:=10; +begingroup interim hppp:=200/72.27; % lowres parameters +interim blacker:=.65; % make pens a bit blacker +interim o_correction:=.4; % but don't overshoot as much + em#:=10pt#; cap#:=7pt#; + thin#:=1/3pt#; thick#:=5/6pt#; + o#:=1/5pt#; +define_pixels(em,cap); +define_blacker_pixels(thin,thick); +define_corrected_pixels(o); + curve_sidebar:= 1/18em; +interim autorounding:=2; +interim granularity:=10; +beginchar("O",0.8em#,cap#,0); + penpos1(thick,10); penpos2(.1[thin,thick],90-10); + penpos3(thick,180+10); penpos4(thin,270-10); + x1l=w-x3l=curve_sidebar; x2=x4=.5w; + y1=.49h; y2l=-o; y3=.51h; y4l=h+o; + penstroke (z1e{down}..z2e{right} + ..z3e{up}..z4e{left}..cycle) scaled ss; +for m=0 upto w: proofrule((m*ss,0),(m*ss,h*ss)); endfor +for n=0 upto h: proofrule((0,n*ss),(w*ss,n*ss)); endfor +proofrulethickness 1; +pair u; +for v= +(2,9), (2,6), (3,6), +(3,4), (4,4), (4,3), (5,3), (5,2), (6,2), (6,1), (8,1), (8,0), (14,0), +(14,1), (16,1), (16,2), (17,2), (17,3), (18,3), (18,4), (19,4), (19,7), +(20,7), (20,13), (19,13), (19,15), (18,15), (18,16), (17,16), (17,17), +(16,17), (16,18), (14,18), (14,19), (8,19), (8,18), (6,18), (6,17), +(5,17), (5,16), (4,16), (4,15), (3,15), (3,12), (2,12), (2,9) +:if known u: proofrule(u*ss,v*ss) ; fi +u:=v; endfor + +pair u; +for v= +(4,9), (4,7), (5,7), (5,5), (6,5), +(6,4), (7,4), (7,3), (9,3), (9,2), (13,2), (13,3), (15,3), (15,4), (16,4), +(16,5), (17,5), (17,7), (18,7), (18,12), (17,12), (17,14), (16,14), +(16,15), (15,15), (15,16), (13,16), (13,17), (9,17), (9,16), (7,16), +(7,15), (6,15), (6,14), (5,14), (5,12), (4,12), (4,9) +:if known u: proofrule(u*ss,v*ss) ; fi +u:=v; endfor +showit; +shipit; +endgroup; +endgroup; +numeric u; + +"Figure 24h"; % Ionian O at 200 pixels/inch, autorounding=0, smoothing=1 +ss:=10; +begingroup interim hppp:=200/72.27; % lowres parameters +interim blacker:=.65; % make pens a bit blacker +interim o_correction:=.4; % but don't overshoot as much + em#:=10pt#; cap#:=7pt#; + thin#:=1/3pt#; thick#:=5/6pt#; + o#:=1/5pt#; +define_pixels(em,cap); +define_blacker_pixels(thin,thick); +define_corrected_pixels(o); + curve_sidebar:= 1/18em; +beginchar("O",0.8em#,cap#,0); + penpos1(thick,10); penpos2(.1[thin,thick],90-10); + penpos3(thick,180+10); penpos4(thin,270-10); + x1l=w-x3l=curve_sidebar; x2=x4=.5w; + y1=.49h; y2l=-o; y3=.51h; y4l=h+o; + penstroke (z1e{down}..z2e{right} + ..z3e{up}..z4e{left}..cycle) scaled ss; +for m=0 upto w: proofrule((m*ss,0),(m*ss,h*ss)); endfor +for n=0 upto h: proofrule((0,n*ss),(w*ss,n*ss)); endfor +proofrulethickness 1; +pair u; +for v= +(2,9), (2,5), (3,5), +(3,3), (4,3), (4,2), (6,2), (6,1), (8,1), (8,0), (14,0), (14,1), (16,1), +(16,2), (17,2), (17,3), (18,3), (18,4), (19,4), (19,6), (20,6), (20,14), +(19,14), (19,16), (18,16), (18,17), (16,17), (16,18), (14,18), (14,19), +(8,19), (8,18), (6,18), (6,17), (5,17), (5,16), (4,16), (4,15), (3,15), +(3,13), (2,13), (2,9) +:if known u: proofrule(u*ss,v*ss) ; fi +u:=v; endfor + +pair u; +for v= +(4,10), (4,9), (5,9), (5,5), (6,5), +(6,4), (7,4), (7,3), (8,3), (8,2), (14,2), (14,3), (15,3), (15,4), (16,4), +(16,6), (17,6), (17,8), (18,8), (18,10), (17,10), (17,13), (16,13), +(16,15), (15,15), (15,16), (14,16), (14,17), (8,17), (8,16), (7,16), +(7,15), (6,15), (6,13), (5,13), (5,11), (4,11), (4,10) +:if known u: proofrule(u*ss,v*ss) ; fi +u:=v; endfor +showit; +shipit; +endgroup; +endgroup; +numeric u; + +"Figure 27a"; % Modification of Fig. 14b +clear_all; +pair zz[]; +zz1=(0,509); +zz2=(-14,492); +zz3=(-32,481); +zz4=(-42,455); +zz5=(-62,430); +zz6=(-20,452); +zz7=(42,448); +zz8=(38,465); +zz9=(4,493); +for n=1 upto 9: z[n-1]=(zz[n]+(62,-430)) scaled 2.5; heavy_dot z[n-1]; endfor +pickup pencircle scaled 3; +draw flex(z0,z1,z2)&flex(z2,z3,z4) + &flex(z4,z5,z6)&flex(z6,z7,z8,z0)&cycle; +labels.lft(1,2,3,4); +labels.rt(0,6,7,8); +labels.bot(5); +showit; shipit; + +"Figure Da"; % Neenie's problem +clear_all; +z1l=(0,240-y); z1r=(15,288-y); +z0l-z0r=z1l-z1r; z0r=(144,189-y); y0l=0; +pickup pencircle scaled 2; +numeric a,b,c,d; +a=x1l; b=y1r; (c,d)=z0r; +draw z0l--z0r--z1r--z1l--cycle; +proofrule((a,d),(a,b)); proofrule((a,b),(a-d+b,b)); +for z=z0l,z0r,z1l,z1r,(a,b): heavy_dot z; endfor +makelabel.bot.nodot("<=",z1r+(3,-8)); +makelabel.lft("(a,b)",(a,b)); +makelabel.top("z1r",z1r); +makelabel.lft("z1l",z1l); +makelabel.rt("(c,d)",z0r); +makelabel.lft("z0r ",z0r); +makelabel.lft("z0l ",z0l); +showit; shipit; + +"Figure Ea"; % T of METAFONT logo, with italic correction +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(suffix c)(expr n) = % code c; width is n units plus sidebars + beginchar(str c,n*u#+2s#,h#,0); pickup logo_pen enddef; +slant:=0; + +beginlogochar(T,13); +italcorr h#*slant+.5u#; +if odd(w-ph): w:=w+1; fi % allows a symmetric stem +x1+x2=2x3=2x4=w; lft.x1=-epsilon; % I tried s-o instead; was not as good +y1=y2=y3; top.y1=h; bot.y4=-o; +draw z1..z2; draw z3..z4; +labels.rt(2,3); +makelabel.top("1",z1); +makelabel.top("4",z4); +endchar; + +"Figure Eb"; % F of METAFONT logo +alpha:=.45; % controls bar location and similar things +beta:=.2; % controls squareness of bowls +numeric h#, xx#, yy#, o#, s#, u#, ph#, pv#; +numeric leftstemloc, barheight; + h#=6; % height of characters, in pt + xx#=0.6; % extra length of certain features, in pt + u#=4/9; % unit width, in pt + s#=0; % extra sidebar, in pt + o#=1/9; % overshoot of curves, in pt + ph#=2/3; % horizontal thickness of pen, in pt +yy#=xx#; define_whole_pixels(xx,yy); +define_pixels(s,u); +define_corrected_pixels(o); +pv#=.9ph#; define_blacker_pixels(ph,pv); +pickup pencircle xscaled ph yscaled pv; +logo_pen:=savepen; +leftstemloc:=good.x((2.5u#+s#)*pt); +barheight:=good.y(alpha*h#*pt); +def beginlogochar(suffix c)(expr n) = % code c; width is n units plus sidebars + beginchar(str c,n*u#+2s#,h#,0); pickup logo_pen enddef; + +beginlogochar(F,14); +x1=x2=x3=leftstemloc; x4=w-x1+o; x5=x4-xx; +y2=y5; y3=y4; bot.y1=-o; top.y3=h; y2=barheight; +draw z1--z3--z4; draw z2--z5; +labels.rt(2,3); +labels.lft(4,5); +labels.top(1); +endchar; + +"Figure Ec"; % cmr10 period +u#:=20/36pt#; +dot_diam#:=38/36pt#; +body_height#:=270/36pt#; % height of tallest characters +asc_height#:=250/36pt#; % height of lowercase ascenders +x_height#:=155/36pt#; % height of lowercase without ascenders +bar_height#:=87/36pt#; % height of crossbar in lowercase e +desc_depth#:=70/36pt#; % depth of lowercase descenders +body_depth#:=90/36pt#; +fine#:=7/36pt#; + +define_pixels(u); +define_whole_blacker_pixels(dot_diam,fine); +define_whole_vertical_pixels(body_height,asc_height,x_height,bar_height, + desc_depth,body_depth); + +beginchar(".",5u#,dot_diam#,0); +def makebox(text rule) = + for y=0,asc_height,body_height,x_height,bar_height,-desc_depth,-body_depth: + rule((0,y),(w,y)); endfor % horizontals + for x=0,w: rule((x,-body_depth),(x,body_height)); endfor % verticals + for x=u step u until w-1: + rule((x,-body_depth),(x,body_height)); endfor % more verticals + if charic<>0: + rule((w+charic*pt,h.o_),(w+charic*pt,.5h.o_)); fi % italic correction + enddef; +pickup pencircle scaled fine; +penpos1(dot_diam-fine,0); penpos2(dot_diam-fine,90); +x1l=good.x(x1l+.5w-x1); bot y2l=0; z1=z2; +filldraw z1l...z2l...z1r...z2r...cycle; % roundish dot +labels.lft(1,1l); +labels.rt(2,1r); +labels.top(2r); +labels.bot(2l); +endchar; + +"Figure Ed"; % cmr10 emdash +u#:=20/36pt#; +dot_diam#:=38/36pt#; +body_height#:=270/36pt#; % height of tallest characters +asc_height#:=250/36pt#; % height of lowercase ascenders +x_height#:=155/36pt#; % height of lowercase without ascenders +bar_height#:=87/36pt#; % height of crossbar in lowercase e +desc_depth#:=70/36pt#; % depth of lowercase descenders +body_depth#:=90/36pt#; +vair#:=8/36pt#; % vertical diameter of hairlines + +define_pixels(u); +define_whole_blacker_pixels(dot_diam,vair); +define_whole_vertical_pixels(body_height,asc_height,x_height,bar_height, + desc_depth,body_depth); + +beginchar(oct"174",18u#,x_height#,0); +def makebox(text rule) = + for y=0,asc_height,body_height,x_height,bar_height,-desc_depth,-body_depth: + rule((0,y),(w,y)); endfor % horizontals + for x=0,w: rule((x,-body_depth),(x,body_height)); endfor % verticals + for x=u step u until w-1: + rule((x,-body_depth),(x,body_height)); endfor % more verticals + if charic<>0: + rule((w+charic*pt,h.o_),(w+charic*pt,.5h.o_)); fi % italic correction + enddef; +italcorr .61803x_height#*0 + .5u#; +pickup nullpen; +penpos1(vair,90); penpos2(vair,90); +y1r=y2r=good.y(y1r+.61803h-y1); +lft x1=-eps; rt x2=w+eps; +penstroke z1e--z2e; % crossbar +labels.lft(1); +labels.rt(2); +labels.top(1r,2r); +labels.bot(1l,2l); +endchar; + +bye diff --git a/Master/texmf-dist/fonts/source/public/misc/oneone.mf b/Master/texmf-dist/fonts/source/public/misc/oneone.mf new file mode 100644 index 00000000000..09975533ce0 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/oneone.mf @@ -0,0 +1,10 @@ +% Black font for CX with proofsheet resolution 300 pixels per inch + +if mode<>cx: errmessage "This file is for cx only"; fi + +font_identifier "BLACKCX"; +picture pix_picture; pix_wd := pix_ht := 1; +pix_picture := unitpixel; +dotsize:=10; + +input grayf diff --git a/Master/texmf-dist/fonts/source/public/misc/random.mf b/Master/texmf-dist/fonts/source/public/misc/random.mf new file mode 100644 index 00000000000..cc433a8d1fb --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/random.mf @@ -0,0 +1,198 @@ +% Font for examples in Chapter 21 of The METAFONTbook + +font_size 10pt#; +mode_setup; + +font_identifier "RANDOM"; +font_coding_scheme "PI"; + +% uniforms (characters 0--9) +randomseed:=3.14159; +for code=0 upto 9: +beginchar(code,10pt#,10pt#,0); +pickup pencircle scaled .3pt; draw unitsquare scaled w; +pickup pencircle scaled 1pt; +for k=1 upto 100: drawdot(uniformdeviate w,uniformdeviate w); endfor +endchar; +endfor + +% normals (characters 10--19) +randomseed:=3.14159; +for code=10 upto 19: +beginchar(code,10pt#,10pt#,0); +pickup pencircle scaled .3pt; draw unitsquare scaled w; +pickup pencircle scaled 1pt; +for k=1 upto 100: drawdot(1/6w*normaldeviate+.5w,1/6w*normaldeviate+.5w); endfor +endchar; +endfor + +% both (characters 20--29) +randomseed:=3.14159; +for code=20 upto 29: +beginchar(code,10pt#,10pt#,0); +pickup pencircle scaled .3pt; draw unitsquare scaled w; +pickup pencircle scaled 1pt; +for k=1 upto 100: drawdot(uniformdeviate w,1/6w*normaldeviate+.5w); endfor +endchar; +endfor + +% METAFONT logo (characters 30--109) +randomseed:=ASCII"M"+epsilon*ASCII"F"; +vardef noise=normaldeviate*craziness enddef; + +ht#:=6pt#; +xgap#:=0.6pt#; +u#:=4/9pt#; +s#:=0; +o#:=1/9pt#; +px#:=2/3pt#; +ygap#:=xgap#; +leftstemloc#:=2.5u#+s#; +barheight#:=.45ht#; +define_pixels(s,u,xgap,ygap,leftstemloc,barheight); +py#:=.9px#; define_blacker_pixels(px,py); +pickup pencircle xscaled px yscaled py; logo_pen:=savepen; +define_corrected_pixels(o); + +def beginlogochar(expr c,n) = + beginchar(incr code,n*u#+2s#,ht#,0); pickup logo_pen enddef; + +def NN= +beginlogochar("N",15); +x1=leftstemloc+noise; +x2=leftstemloc+noise; +x4=w-leftstemloc+noise; +x5=w-leftstemloc+noise; +bot y1=noise-o; +top y2=h+o+noise; +y3=y4+ygap+noise; +bot y4=noise-o; +top y5=h+o+noise; +z3=whatever[z4,z5]; +draw z1--z2--z3; draw z4--z5; labels(1,2,3,4,5); endchar; +enddef; + +def MM= +beginlogochar("M",18); +x1=leftstemloc+noise; +x2=leftstemloc+noise; +x3=.5w+noise; +x4=w-leftstemloc+noise; +x5=w-leftstemloc+noise; +bot y1=noise-o; +top y2=h+o+noise; +bot y3=ygap+noise; +top y4=h+o+noise; +bot y5=noise-o; +draw z1--z2--z3--z4--z5; labels(1,2,3,4,5); endchar; +enddef; + +def EE= +beginlogochar("E",14); +x1=leftstemloc+noise; +x3=leftstemloc+noise; +x4=w-leftstemloc+o+noise; +x5=w-leftstemloc+o-xgap+noise; +x6=w-leftstemloc+o+noise; +bot y1=noise; +y2=barheight+noise; +top y3=h+noise; +top y4=h+noise; +y5=barheight+noise; +bot y6=noise; +z2=whatever[z1,z3]; +draw z6--z1--z3--z4; draw z2--z5; labels(1,2,3,4,5,6); endchar; +enddef; + +def FF= +beginlogochar("F",14); +x1=leftstemloc+noise; +x3=leftstemloc+noise; +x4=w-leftstemloc+o+noise; +x5=w-leftstemloc+o-xgap+noise; +bot y1=noise-o; +y2=barheight+noise; +top y3=h+noise; +top y4=h+noise; +y5=barheight+noise; +bot y6=noise; +z2=whatever[z1,z3]; +draw z1--z3--z4; draw z2--z5; labels(1,2,3,4,5); endchar; +enddef; + +def TT= +beginlogochar("T",13); +lft x1=noise; +rt x2=w+noise; +x3=.5w+noise; +x4=.5w+noise; +top y1=h+noise; +top y2=h+noise; +bot y4=noise-o; +z3=whatever[z1,z2]; +draw z1--z2; draw z3--z4; labels(1,2,3,4); endchar; +enddef; + +def AA= +beginlogochar("A",15); +x1=.5w+noise; +x2'=leftstemloc+noise; +x3'=w-leftstemloc+noise; +x4=leftstemloc+noise; +x5=w-leftstemloc+noise; +top y2'=h+o+noise; +top y3'=h+o+noise; +y2=barheight+noise; +y3=barheight+noise; +bot y4=noise-o; +bot y5=noise-o; +z1=whatever[z2',z3']; +z2=whatever[z4,z2']; +z3=whatever[z5,z3']; +draw z4--z2--z3--z5; +draw z2{z2'-z2}...z2+.8(z2'-z2)-.2(z2'-z1){z1-z2} + ...z1{z3'-z2'}...z3+.8(z3'-z3)-.2(z3'-z1){z3-z1}...z3{z3-z3'}; +labels(1,2,3,4,5,2',3'); endchar; +enddef; + +def OO= +beginlogochar("O",15); +x1'=1.5u+s+noise; +x2'=1.5u+s+noise; +x3'=w-1.5u-s+noise; +x4'=w-1.5u-s+noise; +bot y1'=noise-o; +top y2'=h+o+noise; +top y3'=h+o+noise; +bot y4'=noise-o; +z1=.5[z1',z2']; z2=.5[z2',z3']; z3=.5[z3',z4']; z4=.5[z4',z1']; +draw z2{z2'-z3'}...z2+.8(z2'-z2)-.2(z2'-z1){z1-z2} + ...z1{z1'-z2'}...z1+.8(z1'-z1)-.2(z1'-z4){z4-z1} + ...z4{z4'-z1'}...z4+.8(z4'-z4)-.2(z4'-z3){z3-z4} + ...z3{z3'-z4'}...z3+.8(z3'-z3)-.2(z3'-z2){z2-z3}...cycle; +labels(1,2,3,4,5,2',3'); endchar; +enddef; + + +code:=29; +for c=10 downto 1:craziness:=c*.05pt; + MM; EE; TT; AA; FF; OO; NN; TT; endfor + +% histogram (character 126) +randomseed:=0; +beginchar(126,24pt#,10pt#,0); +%pickup pencircle scaled .3pt; draw unitsquare xscaled w yscaled h; + numeric count[]; pickup pencircle scaled 1pt; +for n:=1 upto 100: x:=normaldeviate*4pt+12pt; +y:=floor(x/pt); if unknown count[y]: count[y]:=-1; fi +drawdot(x,pt*incr count[y]); endfor endchar; + +% skyline (character 127) +randomseed:=2.71828; +beginchar(127,100pt#,10pt#,0); +for n:=0 upto 99: +fill unitsquare xscaled 1pt yscaled uniformdeviate h shifted (n*pt,0); +endfor +endchar; + +bye diff --git a/Master/texmf-dist/fonts/source/public/misc/slant.mf b/Master/texmf-dist/fonts/source/public/misc/slant.mf new file mode 100644 index 00000000000..3763222bce2 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slant.mf @@ -0,0 +1,32 @@ +% more-or-less general slant font generator for GFtoDVI + +% the calling file should set the font_identifier and +% n = number of characters +% s = slant ratio +% r# = rule thickness (in sharp units) +% u = vertical unit (in pixels) + +if unknown mag: mag := 1; +elseif (mag<1) or (mag<>floor mag): + errmessage "Sorry, mag must be a positive integer"; mag := 1; fi + +mg := mag; mag := 1; mode_setup; u# := u*72.27/pixels_per_inch; +pixels_per_inch := pixels_per_inch*mg; fix_units; + +define_whole_pixels(u); define_blacker_pixels(r); +pickup pencircle scaled r; ruler := savepen; + +for k=1 upto n: + beginchar(k,k*u#*s,n*u#,0); + pickup ruler; draw origin--(k*u*s,k*u); + unfill (lft-1,bot -1)--(rt 1,bot -1) + --(rt 1,0)--(lft-1,0)--cycle; + unfill ((lft -1,0)--(rt 1,0) + --(rt 1,top 1)--(lft -1,top 1)--cycle) shifted (k*u*s,k*u); + endchar; endfor + +font_size 16pt#; +font_slant s; +fontdimen 8: r#; +font_coding_scheme "GFSLANT"; +bye. diff --git a/Master/texmf-dist/fonts/source/public/misc/slantaps4.mf b/Master/texmf-dist/fonts/source/public/misc/slantaps4.mf new file mode 100644 index 00000000000..1d7ecbd4928 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slantaps4.mf @@ -0,0 +1,11 @@ +% slant font for slope 1/4 on the APS + +if mode<>aps: errmessage "This file is for aps only"; fi + +s=1/4; +n=30; +r#=.4; +u=4; % an approximation to r in pixels + +font_identifier "SLANTAPS4"; +input slant diff --git a/Master/texmf-dist/fonts/source/public/misc/slantcx4.mf b/Master/texmf-dist/fonts/source/public/misc/slantcx4.mf new file mode 100644 index 00000000000..34df2b82c85 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slantcx4.mf @@ -0,0 +1,11 @@ +% slant font for slope 1/4 on the CX + +if mode<>cx: errmessage "This file is for cx only"; fi + +s=1/4; +n=30; +r#=.4; +u=2; % an approximation to r in pixels + +font_identifier "SLANTCX4"; +input slant diff --git a/Master/texmf-dist/fonts/source/public/misc/slantcx6.mf b/Master/texmf-dist/fonts/source/public/misc/slantcx6.mf new file mode 100644 index 00000000000..6c43be0bda1 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slantcx6.mf @@ -0,0 +1,11 @@ +% slant font for slope 1/6 on the CX + +if mode<>cx: errmessage "This file is for cx only"; fi + +s=1/6; +n=30; +r#=.4; +u=2; % an approximation to r in pixels + +font_identifier "SLANTCX6"; +input slant diff --git a/Master/texmf-dist/fonts/source/public/misc/slantimagen4.mf b/Master/texmf-dist/fonts/source/public/misc/slantimagen4.mf new file mode 100644 index 00000000000..ffe19c7b90b --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slantimagen4.mf @@ -0,0 +1,11 @@ +% slant font for slope 1/4 on the Imagen + +if mode<>imagen: errmessage "This file is for imagen only"; fi + +s=1/4; +n=30; +r#=.4; +u=2; % an approximation to r in pixels + +font_identifier "SLANTIMAGEN4"; +input slant diff --git a/Master/texmf-dist/fonts/source/public/misc/slantimagen6.mf b/Master/texmf-dist/fonts/source/public/misc/slantimagen6.mf new file mode 100644 index 00000000000..3859b471fd8 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slantimagen6.mf @@ -0,0 +1,11 @@ +% slant font for slope 1/6 on the Imagen + +if mode<>imagen: errmessage "This file is for imagen only"; fi + +s=1/6; +n=30; +r#=.4; +u=2; % an approximation to r in pixels + +font_identifier "SLANTIMAGEN6"; +input slant diff --git a/Master/texmf-dist/fonts/source/public/misc/slantlino4.mf b/Master/texmf-dist/fonts/source/public/misc/slantlino4.mf new file mode 100644 index 00000000000..02ef790a035 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slantlino4.mf @@ -0,0 +1,11 @@ +% slant font for slope 1/4 on the Linotronic + +if mode<>linohi: errmessage "This file is for lino only"; fi + +s=1/4; +n=30; +r#=.4; +u=7; % an approximation to r in pixels + +font_identifier "SLANTLINO4"; +input slant diff --git a/Master/texmf-dist/fonts/source/public/misc/slantlj4.mf b/Master/texmf-dist/fonts/source/public/misc/slantlj4.mf new file mode 100644 index 00000000000..49dc12e236a --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slantlj4.mf @@ -0,0 +1,11 @@ +% slant font for slope 1/4 on the LJ + +if mode<>ljfour: errmessage "This file is for ljfour only"; fi + +s=1/4; +n=30; +r#=.4; +u=2; % an approximation to r in pixels + +font_identifier "SLANTLJ4"; +input slant diff --git a/Master/texmf-dist/fonts/source/public/misc/slantlj6.mf b/Master/texmf-dist/fonts/source/public/misc/slantlj6.mf new file mode 100644 index 00000000000..4611c455124 --- /dev/null +++ b/Master/texmf-dist/fonts/source/public/misc/slantlj6.mf @@ -0,0 +1,11 @@ +% slant font for slope 1/6 on the LJ + +if mode<>ljfour: errmessage "This file is for ljfour only"; fi + +s=1/6; +n=30; +r#=.4; +u=2; % an approximation to r in pixels + +font_identifier "SLANTLJ6"; +input slant |