From: W. Trevor King Date: Wed, 28 Apr 2010 21:22:27 +0000 (-0400) Subject: Add dsfont files to src/packages/ X-Git-Tag: v1.0~402 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=56cd95a3bf3461758e704917289e2393d4f89a81;p=thesis.git Add dsfont files to src/packages/ --- diff --git a/tex/src/packages/Udsrom.fd b/tex/src/packages/Udsrom.fd new file mode 100644 index 0000000..565af29 --- /dev/null +++ b/tex/src/packages/Udsrom.fd @@ -0,0 +1,9 @@ +\ProvidesFile{Udsrom.fd} + [1995/08/01 v0.1 Double stroke roman font definitions] +\DeclareFontFamily{U}{dsrom}{} +\DeclareFontShape{U}{dsrom}{m}{n}{ + <-10> dsrom8 + <10-12> dsrom10 + <12-> dsrom12 +}{} +\endinput diff --git a/tex/src/packages/Udsss.fd b/tex/src/packages/Udsss.fd new file mode 100644 index 0000000..303b3a2 --- /dev/null +++ b/tex/src/packages/Udsss.fd @@ -0,0 +1,9 @@ +\ProvidesFile{Udsss.fd} + [1995/08/01 v0.1 Double stroke sans serif font definitions] +\DeclareFontFamily{U}{dsss}{} +\DeclareFontShape{U}{dsss}{m}{n}{ + <-10> dsss8 + <10-12> dsss10 + <12-> dsss12 +}{} +\endinput diff --git a/tex/src/packages/dsfont.sty b/tex/src/packages/dsfont.sty new file mode 100644 index 0000000..8be0422 --- /dev/null +++ b/tex/src/packages/dsfont.sty @@ -0,0 +1,9 @@ +\ProvidesPackage{dsfont} + [1995/08/01 v0.1 Double stroke roman fonts] + +\def\ds@whichfont{dsrom} +\DeclareOption{sans}{\def\ds@whichfont{dsss}} +\ProcessOptions\relax + +\DeclareMathAlphabet{\mathds}{U}{\ds@whichfont}{m}{n} +\endinput diff --git a/tex/src/packages/dsrom.mf b/tex/src/packages/dsrom.mf new file mode 100644 index 0000000..4440391 --- /dev/null +++ b/tex/src/packages/dsrom.mf @@ -0,0 +1,42 @@ +% The Computer Modern Roman family of fonts (by D. E. Knuth, 1979--1985) +% Modified for Double Stroke Characters (by Olaf Kummer, 1995) + +% This file was renamed from {\tt roman.mf} to {\tt dsrom.mf} +% and modified for double stroke characters by Olaf Kummer, 1995. +% The parameters doublestroke_curvedist and doublestroke_twist +% were added by Olaf Kummer, 1996. +% Version 1.0 + +mode_setup; font_setup; + +% New parameters +if unknown doublestroke_thin#: doublestroke_thin#:=cap_hair#; fi +if unknown doublestroke_thick#: doublestroke_thick#:=cap_stem#; fi +if unknown doublestroke_dist#: doublestroke_dist#:=0.9cap_stem#; fi +if unknown doublestroke_curvedist#: doublestroke_curvedist#:=1.1cap_stem#; fi + +if unknown doublestroke_twist: + boolean doublestroke_twist; doublestroke_twist:=serifs; +fi + +% Calculate new parameters +define_whole_blacker_pixels(doublestroke_thick,doublestroke_thin); +define_whole_pixels(doublestroke_dist,doublestroke_curvedist); + +% Add new macros + +% Fit stroke to curve +def curve_stroke(suffix @)(expr xpos,width,patha,pathb) = +x@1l=x@2l=xpos=x@1r-width=x@2r-width; +y@1l=y@1r=2h; y@2l=y@2r=-h; +z@3=(patha)intersectionpoint(z@1l..z@2l); +z@4=(pathb)intersectionpoint(z@1l..z@2l); +z@5=(pathb)intersectionpoint(z@1r..z@2r); +z@6=(patha)intersectionpoint(z@1r..z@2r); +fill z@3--z@4--z@5--z@6--cycle; +enddef; + +input dsromu; % upper case (majuscules) +input dsromo; % other characters + +bye. diff --git a/tex/src/packages/dsrom10.mf b/tex/src/packages/dsrom10.mf new file mode 100644 index 0000000..6518af9 --- /dev/null +++ b/tex/src/packages/dsrom10.mf @@ -0,0 +1,75 @@ +% Double Stroke Computer Modern Roman 10 point +if unknown cmbase: input cmbase fi + +font_identifier:="DSROM"; font_size 10pt#; + +u#:=20/36pt#; % unit width +width_adj#:=0pt#; % width adjustment for certain characters +serif_fit#:=0pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=0pt#; % extra space added to all sidebars + +body_height#:=270/36pt#; % height of tallest characters +asc_height#:=250/36pt#; % height of lowercase ascenders +cap_height#:=246/36pt#; % height of caps +fig_height#:=232/36pt#; % height of numerals +x_height#:=155/36pt#; % height of lowercase without ascenders +math_axis#:=90/36pt#; % axis of symmetry for math symbols +bar_height#:=87/36pt#; % height of crossbar in lowercase e +comma_depth#:=70/36pt#; % depth of comma below baseline +desc_depth#:=70/36pt#; % depth of lowercase descenders + +crisp#:=0pt#; % diameter of serif corners +tiny#:=8/36pt#; % diameter of rounded corners +fine#:=7/36pt#; % diameter of sharply rounded corners +thin_join#:=7/36pt#; % width of extrafine details +hair#:=9/36pt#; % lowercase hairline breadth +stem#:=25/36pt#; % lowercase stem breadth +curve#:=30/36pt#; % lowercase curve breadth +ess#:=27/36pt#; % breadth in middle of lowercase s +flare#:=33/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=38/36pt#; % diameter of dots +cap_hair#:=11/36pt#; % uppercase hairline breadth +cap_stem#:=32/36pt#; % uppercase stem breadth +cap_curve#:=37/36pt#; % uppercase curve breadth +cap_ess#:=35/36pt#; % breadth in middle of uppercase s +rule_thickness#:=.4pt#; % thickness of lines in math symbols + +dish#:=1/36pt#; % amount erased at top or bottom of serifs +bracket#:=20/36pt#; % vertical distance from serif base to tangent +jut#:=28/36pt#; % protrusion of lowercase serifs +cap_jut#:=37/36pt#; % protrusion of uppercase serifs +beak_jut#:=10/36pt#; % horizontal protrusion of beak serifs +beak#:=70/36pt#; % vertical protrusion of beak serifs +vair#:=8/36pt#; % vertical diameter of hairlines +notch_cut#:=10pt#; % maximum breadth above or below notches +bar#:=11/36pt#; % lowercase bar thickness +slab#:=11/36pt#; % serif and arm thickness +cap_bar#:=11/36pt#; % uppercase bar thickness +cap_band#:=11/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=10pt#; % max breadth above/below uppercase notches +serif_drop#:=4/36pt#; % vertical drop of sloped serifs +stem_corr#:=1/36pt#; % for small refinements of stem breadth +vair_corr#:=1/36pt#; % for small refinements of hairline height +apex_corr#:=0pt#; % extra width at diagonal junctions + +o#:=8/36pt#; % amount of overshoot for curves +apex_o#:=8/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? + +generate dsrom % switch to the driver file diff --git a/tex/src/packages/dsrom10.tfm b/tex/src/packages/dsrom10.tfm new file mode 100644 index 0000000..757d40c Binary files /dev/null and b/tex/src/packages/dsrom10.tfm differ diff --git a/tex/src/packages/dsrom12.mf b/tex/src/packages/dsrom12.mf new file mode 100644 index 0000000..7dd0ece --- /dev/null +++ b/tex/src/packages/dsrom12.mf @@ -0,0 +1,75 @@ +% Double Stroke Computer Modern Roman 12 point +if unknown cmbase: input cmbase fi + +font_identifier:="DSROM"; font_size 12pt#; + +u#:=23.5/36pt#; % unit width +width_adj#:=0pt#; % width adjustment for certain characters +serif_fit#:=0pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=5.8/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=0pt#; % extra space added to all sidebars + +body_height#:=324/36pt#; % height of tallest characters +asc_height#:=300/36pt#; % height of lowercase ascenders +cap_height#:=295.2/36pt#; % height of caps +fig_height#:=278.4/36pt#; % height of numerals +x_height#:=186/36pt#; % height of lowercase without ascenders +math_axis#:=108/36pt#; % axis of symmetry for math symbols +bar_height#:=104.4/36pt#; % height of crossbar in lowercase e +comma_depth#:=84/36pt#; % depth of comma below baseline +desc_depth#:=84/36pt#; % depth of lowercase descenders + +crisp#:=0pt#; % diameter of serif corners +tiny#:=8/36pt#; % diameter of rounded corners +fine#:=7/36pt#; % diameter of sharply rounded corners +thin_join#:=7.5/36pt#; % width of extrafine details +hair#:=9.5/36pt#; % lowercase hairline breadth +stem#:=28/36pt#; % lowercase stem breadth +curve#:=33/36pt#; % lowercase curve breadth +ess#:=30/36pt#; % breadth in middle of lowercase s +flare#:=36/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=42/36pt#; % diameter of dots +cap_hair#:=11.5/36pt#; % uppercase hairline breadth +cap_stem#:=35/36pt#; % uppercase stem breadth +cap_curve#:=40/36pt#; % uppercase curve breadth +cap_ess#:=38/36pt#; % breadth in middle of uppercase s +rule_thickness#:=.44pt#; % thickness of lines in math symbols + +dish#:=1/36pt#; % amount erased at top or bottom of serifs +bracket#:=24/36pt#; % vertical distance from serif base to tangent +jut#:=33/36pt#; % protrusion of lowercase serifs +cap_jut#:=41/36pt#; % protrusion of uppercase serifs +beak_jut#:=11.4/36pt#; % horizontal protrusion of beak serifs +beak#:=84/36pt#; % vertical protrusion of beak serifs +vair#:=8.5/36pt#; % vertical diameter of hairlines +notch_cut#:=12pt#; % maximum breadth above or below notches +bar#:=12.5/36pt#; % lowercase bar thickness +slab#:=12.5/36pt#; % serif and arm thickness +cap_bar#:=12.5/36pt#; % uppercase bar thickness +cap_band#:=12.5/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=12pt#; % max breadth above/below uppercase notches +serif_drop#:=4.8/36pt#; % vertical drop of sloped serifs +stem_corr#:=1/36pt#; % for small refinements of stem breadth +vair_corr#:=1/36pt#; % for small refinements of hairline height +apex_corr#:=0pt#; % extra width at diagonal junctions + +o#:=9/36pt#; % amount of overshoot for curves +apex_o#:=9/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.2; % 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? + +generate dsrom % switch to the driver file diff --git a/tex/src/packages/dsrom12.tfm b/tex/src/packages/dsrom12.tfm new file mode 100644 index 0000000..0e2a5b0 Binary files /dev/null and b/tex/src/packages/dsrom12.tfm differ diff --git a/tex/src/packages/dsrom8.mf b/tex/src/packages/dsrom8.mf new file mode 100644 index 0000000..42d5817 --- /dev/null +++ b/tex/src/packages/dsrom8.mf @@ -0,0 +1,75 @@ +% Double Stroke Computer Modern Roman 8 point +if unknown cmbase: input cmbase fi + +font_identifier:="DSROM"; font_size 8pt#; + +u#:=17/36pt#; % unit width +width_adj#:=0pt#; % width adjustment for certain characters +serif_fit#:=0pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=4.1/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=0pt#; % extra space added to all sidebars + +body_height#:=216/36pt#; % height of tallest characters +asc_height#:=200/36pt#; % height of lowercase ascenders +cap_height#:=196.8/36pt#; % height of caps +fig_height#:=185.6/36pt#; % height of numerals +x_height#:=124/36pt#; % height of lowercase without ascenders +math_axis#:=72/36pt#; % axis of symmetry for math symbols +bar_height#:=69.6/36pt#; % height of crossbar in lowercase e +comma_depth#:=56/36pt#; % depth of comma below baseline +desc_depth#:=56/36pt#; % depth of lowercase descenders + +crisp#:=0pt#; % diameter of serif corners +tiny#:=8/36pt#; % diameter of rounded corners +fine#:=7/36pt#; % diameter of sharply rounded corners +thin_join#:=7/36pt#; % width of extrafine details +hair#:=9/36pt#; % lowercase hairline breadth +stem#:=22/36pt#; % lowercase stem breadth +curve#:=25.5/36pt#; % lowercase curve breadth +ess#:=23/36pt#; % breadth in middle of lowercase s +flare#:=27/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=32/36pt#; % diameter of dots +cap_hair#:=9.5/36pt#; % uppercase hairline breadth +cap_stem#:=26.5/36pt#; % uppercase stem breadth +cap_curve#:=30/36pt#; % uppercase curve breadth +cap_ess#:=27/36pt#; % breadth in middle of uppercase s +rule_thickness#:=.36pt#; % thickness of lines in math symbols + +dish#:=1/36pt#; % amount erased at top or bottom of serifs +bracket#:=16/36pt#; % vertical distance from serif base to tangent +jut#:=22/36pt#; % protrusion of lowercase serifs +cap_jut#:=29/36pt#; % protrusion of uppercase serifs +beak_jut#:=8.4/36pt#; % horizontal protrusion of beak serifs +beak#:=56/36pt#; % vertical protrusion of beak serifs +vair#:=8/36pt#; % vertical diameter of hairlines +notch_cut#:=8pt#; % maximum breadth above or below notches +bar#:=9.5/36pt#; % lowercase bar thickness +slab#:=9.5/36pt#; % serif and arm thickness +cap_bar#:=9.5/36pt#; % uppercase bar thickness +cap_band#:=9.5/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=8pt#; % max breadth above/below uppercase notches +serif_drop#:=3.2/36pt#; % vertical drop of sloped serifs +stem_corr#:=1/36pt#; % for small refinements of stem breadth +vair_corr#:=1/36pt#; % for small refinements of hairline height +apex_corr#:=0pt#; % extra width at diagonal junctions + +o#:=6/36pt#; % amount of overshoot for curves +apex_o#:=6/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:=.4; % 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? + +generate dsrom % switch to the driver file diff --git a/tex/src/packages/dsrom8.tfm b/tex/src/packages/dsrom8.tfm new file mode 100644 index 0000000..e4c5727 Binary files /dev/null and b/tex/src/packages/dsrom8.tfm differ diff --git a/tex/src/packages/dsromo.mf b/tex/src/packages/dsromo.mf new file mode 100644 index 0000000..bcb15fc --- /dev/null +++ b/tex/src/packages/dsromo.mf @@ -0,0 +1,157 @@ +% Double Stroke Roman others: +% These letters were originally coded by D. E. Knuth in November, 1979, +% inspired by the Monotype faces used in {\sl The Art of Computer Programming}. +% Sans serif designs by Richard Southall were added in April, 1982. +% The programs were revised for the new \MF\ conventions in 1985. + +% This file {\tt dsromo.mf} was compiled from various Computer +% Modern sources and modified for double stroke characters by +% Olaf Kummer, 1996. +% Version 1.0 + +cmchar "The numeral 1"; +beginchar("1",11u#,fig_height#,0); +italcorr fig_height#*slant-.5u#; +adjust_fit(0,0); +pickup tiny.nib; +pos1(cap_stem,0); pos2(cap_stem,0); +pos11(doublestroke_thin,0); pos12(doublestroke_thin,0); +lft x1l=lft x2l=w-rt x11r; +y11=y1; lft x11l=rt x1r+doublestroke_dist; +y12=y2; lft x12l=rt x2r+doublestroke_dist; +top y1=h+o; bot y2=0; +filldraw stroke z1e--z2e; % stem +filldraw stroke z11e--z12e; % stroke +z13=whatever[z11,z12]; z14=whatever[z1,z2]; +y13=y14=top y11-slab; +fill top z11--top z1--z14--z13--cycle; % top closure +if not serifs: save slab; slab=bar; fi +nodish_serif(2,1,a,1/3,min(2u,lft x2l-1.5u), + b,0,min(2u,w-1.25u-rt x2r)+doublestroke_dist); % left serif +nodish_serif(12,11,c,0,min(2u,lft x2l-1.5u)+doublestroke_dist, + d,1/3,min(2u,w-1.25u-rt x2r)); % stroke serif +pickup crisp.nib; pos3(slab,-90); pos4(bar,-90); +top y3l=h+o; top y4l=if monospace: .75 else: .85 fi\\ h+o; +lft x4=max(1u,tiny.lft x1l-2.75u); +tiny.rt x1r=lft x3+.25[tiny,hair]; +erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left} + --(x4l,h+o+1)--(x3l,h+o+1)--cycle; % erase excess at top +filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left}; % point +penlabels(1,2,3,4); endchar; + + +cmchar "A variant of letter A"; +beginchar("a",14.5u#,cap_height#,0); +adjust_fit(cap_serif_fit#,cap_serif_fit#); +numeric left_stem,right_stem,outer_jut,alpha; +right_stem=cap_stem-stem_corr; +left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem); +outer_jut=.8cap_jut; +y11=y1=y4=0; y12=y2=y3=h+0.4*apex_o; +x11l=w-x4r=l+letter_fit+outer_jut+.5u; +alpha=diag_ratio(2,left_stem+doublestroke_thick+doublestroke_dist, + y2-y11,x4r-x11l-apex_corr); +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +penpos11(alpha*doublestroke_thick,0); penpos12(alpha*doublestroke_thick,0); +x1l=x11r+alpha*doublestroke_dist; +x2l=x12r+alpha*doublestroke_dist; +x2l-x1l=x4r-x3r; +x3r=x2r+apex_corr; +z0=whatever[z1r,z2r]=whatever[z3l,z4l]; +if y0lower_notch: {left}(x4'-1,lower_notch){up}... fi + {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal +else: penpos5(whatever,0); penpos6(whatever,90); + z5l=z1l; z6l=z4l; + z7=z6l+(max(eps,cap_stem-3stem_corr-tiny),0) rotated (angle(z5l-z6l)-90); + z5r=z7+whatever*(z5l-z6l); z6r=z7+whatever*(z5l-z6l); + filldraw stroke z5e..z6e; fi % diagonal +if serifs: if hefty: serif(1,2,a,0,-cap_jut-doublestroke_dist); % upper left serif + serif(11,12,g,1/3,-cap_jut); % upper stroke serif + else: serif(5,6,a,0,-cap_jut-doublestroke_dist); % upper left serif + serif(11,12,g,1/3,-cap_jut); fi % upper stroke serif + nodish_serif(2,1,b,0,cap_jut+doublestroke_dist,c,1/3,cap_jut)(dark); % lower left serif + nodish_serif(12,11,h,1/3,cap_jut,i,0,cap_jut+doublestroke_dist)(dark); % lower stroke serif + nodish_serif(3,4,e,1/2,cap_jut,f,1/2,cap_jut)(dark); fi % upper right serif +math_fit(0,max(.5ic#-.5u#,0)); penlabels(1,1',2,3,4,4',5,6,7); endchar; + +cmchar "The letter O"; +beginchar("O",14u#-width_adj#,cap_height#,0); +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90); +penpos2(cap_curve,180); penpos4(cap_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"O"|, not |"0"| +else: x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o; +y2=y4=.5h-vair_corr; y2l:=y4l:=.52h; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +curve_stroke(s,rt x2l+doublestroke_curvedist,doublestroke_thin, + pulled_super_arc.r(4,1)(.5superpull) + & pulled_super_arc.r(1,2)(.5superpull), + pulled_super_arc.r(2,3)(.5superpull) + & pulled_super_arc.r(3,4)(.5superpull)); % stroke +math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#); penlabels(1,2,3,4); endchar; + +cmchar "The letter P"; +beginchar("P",13u#,cap_height#,0); +italcorr .75cap_height#*slant-.5u#; +adjust_fit(cap_serif_fit#,0); +pickup tiny.nib; penpos1(cap_stem-tiny,0); penpos2(cap_stem-tiny,0); +lft x1l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0; x1l=x2l; +filldraw stroke z1e--z2e; % stem +pos21(doublestroke_thin,0); pos22(doublestroke_thin,0); +lft x21l=lft x22l=rt x1r+doublestroke_dist; y21=y1; y22=y2; +filldraw stroke z21e--z22e; % stroke +penpos3(cap_band,90); penpos4(cap_band,90); +penpos5(cap_curve if hefty:-3stem_corr fi,0); +penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90); +z3r=top z21; y4=y3; y5=.5[y4l,y6l]; y6=y7; +x7=x22; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u); +x4l:=x6l:=x4-.25cap_curve; +fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe +if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,0,.5cap_jut+doublestroke_dist); % upper serif + nodish_serif(21,22,e,0,cap_jut+doublestroke_dist,f,1/3,.5cap_jut); % upper stroke serif + nodish_serif(2,1,c,1/3,cap_jut,d,0,cap_jut+doublestroke_dist); % lower stroke serif + nodish_serif(22,21,g,0,cap_jut+doublestroke_dist,h,1/3,cap_jut); fi % lower serif +math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7); endchar; + +cmchar "The letter Q"; +beginchar("Q",14u#-width_adj#,cap_height#,comma_depth#); +italcorr .7cap_height#*slant-.5u#; +adjust_fit(0,0); +numeric light_curve; light_curve=cap_curve-hround stem_corr; +penpos1(vair',90); penpos3(vair',-90); +penpos2(light_curve,180); penpos4(light_curve,0); +if monospace: x2r=hround 1.5u; + interim superness:=sqrt superness; % make |"Q"| like |"O"| +else: x2r=hround u; fi +x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o; +penstroke pulled_super_arc.e(1,2)(.5superpull) + & pulled_super_arc.e(2,3)(.5superpull) + & pulled_super_arc.e(3,4)(.5superpull) + & pulled_super_arc.e(4,1)(.5superpull) & cycle; % bowl +curve_stroke(s,rt x2l+doublestroke_curvedist,doublestroke_thin, + pulled_super_arc.r(4,1)(.5superpull) + & pulled_super_arc.r(1,2)(.5superpull), + pulled_super_arc.r(2,3)(.5superpull) + & pulled_super_arc.r(3,4)(.5superpull)); % stroke +pickup tiny.nib; +if hefty: penpos5(1.2(.5[cap_bar,light_curve]),0); penpos6(1.2light_curve,0); + x5=.5w; x6r=hround(w-1.5u); + y5=vround .28h; y6=-d; + fill diag_end(6r,5r,.25,1,5l,6l)--diag_end(5l,6l,.5,1,6r,5r)--cycle; % tail +else: pos3'(vair,270); pos5(vair,180); pos6(vair,90); + pos7(cap_curve,85); penpos8(eps,180); + z3'=z3; x6=x3; top y6r=vround(.2h+.5vair); + lft x5r=hround(.5w-1.25u-.5vair); y5=.5[y3,y6]; + bot y7l=-d; x7l=2/3[x6,x8]; y8=0; rt x8=hround(x4r+.1u); + filldraw stroke z3'e{left}...z5e{up}...z6e{right} + ..z7e{right}...z8e{up}; fi % tail +math_fit(-.3cap_height#*slant-.5u#,ic#); +penlabels(1,2,3,4,5,6,7,8); endchar; + +cmchar "The letter R"; +beginchar("R",if serifs: 13u#+.5max(2u#,cap_curve#) + else:13.5u#-.5width_adj# fi,cap_height#,0); +italcorr .75cap_height#*slant- if serifs: 1.75 else: .5 fi\\ u#; +adjust_fit(cap_serif_fit#,0); +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 +pos21(doublestroke_thin,0); pos22(doublestroke_thin,0); +lft x21l=lft x22l=rt x1r+doublestroke_dist; y21=y1; y22=y2; +filldraw stroke z21e--z22e; % stroke +penpos3(cap_band,90); penpos4(cap_band,90); +penpos5(cap_curve if hefty:-3stem_corr fi,0); +penpos6(vair,-90); penpos7(vair,-90); +z3r=top z21; y4=y3; y5=.5[y4l,y6l]; y6=y7; +x7=x22; y7l=vround(.5h+.5vair); x4=x6; +if serifs: x4=.5w-.5u; x5r=hround(w-2.25u); +else: x4=.5w+.5u; x5r=hround(w-u); fi +x4l:=x6l:=x4-.125cap_curve; +fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe +if serifs: pos6'(vair,-90); pos0(cap_stem,180); + pos8(cap_curve,180); pos9(vair,-90); pos10(hair,0); + z6'=z6; lft x0r=lft x8r=hround(x5-2/3u-.5cap_curve); + y8=1/3[y2,y7]; y0=3/5[y2,y7]; x9=.5[x8l,x10r]; + bot y9r=-o; rt x10r=hround(w-.05u); y10=1/4[y2,y7]; + filldraw stroke z6'e{right}..z0e---z8e....z9e{right}..z10e{up}; % tail + nodish_serif(1,2,a,1/3,cap_jut,b,0,.5cap_jut+doublestroke_dist); % upper serif + nodish_serif(21,22,e,0,cap_jut+doublestroke_dist,f,1/3,.5cap_jut); % upper stroke serif + nodish_serif(2,1,c,1/3,cap_jut,d,0,cap_jut+doublestroke_dist); % lower serif + nodish_serif(22,21,g,0,cap_jut+doublestroke_dist,h,1/3,cap_jut); % lower stroke serif +else: penpos8(cap_stem-2stem_corr,0); penpos9(cap_stem,0); + x8=x6+.5u; y8=y6; x9r=hround(w-.5u); y9=0; + fill z8l--diag_end(8l,9l,.5,1,9r,8r)--z8r--cycle; fi % tail +math_fit(0,.75ic#); penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar; + +cmchar "The letter S"; +beginchar("S",10u#,cap_height#,0); +italcorr cap_height#*slant-u#; +adjust_fit(0,0); +numeric theta; theta=90-angle(50u,h); slope:=-h/50u; % angle at middle +numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi; +numeric ess'; ess'=max(fine.breadth,cap_ess); +pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90); +pos0(ess',theta); pos7(s_slab,-90); +x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o; +y0=.52h; lft x3l=hround u; rt x6r=hround(w-u); +x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine; +ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; +ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; +filldraw stroke super_arc.e(2,3) & z3e{down} + ..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke +if serifs: pos1(hair,180); pos8(hair,180); + rt x1l=hround(w-1.5u); lft x8r=hround u; + bot y1=vround 2/3h+1; top y8=vround 1/3h-1; + filldraw stroke z1e{x2-x1,10(y2-y1)}....{left}z2e; % upper arc + filldraw stroke z7e{left}....{up}z8e; % lower arc + if rt x3r+2doublestroke_curvedist+doublestroke_thin>lft x6l: + curve_stroke(s,x0-0.5doublestroke_thin,doublestroke_thin, + z1l{x2-x1,10(y2-y1)}....{left}z2l & super_arc.l(2,3), + super_arc.r(6,7) & z7r{left}....{up}z8r); % stroke + else: + curve_stroke(s,rt x3r+doublestroke_curvedist,doublestroke_thin, + z1l{x2-x1,10(y2-y1)}....{left}z2l & super_arc.l(2,3), + z3l{down}..z4l---z5l..z6l{down}); % left stroke + curve_stroke(t,lft x6l-doublestroke_curvedist,-doublestroke_thin, + super_arc.r(6,7) & z7r{left}....{up}z8r, + z3r{down}..z4r---z5r..z6r{down}); % right stroke + fi + path upper_arc, lower_arc; + upper_arc=z1{x2-x1,10(y2-y1)}....{left}z2; + lower_arc=z7{left}....{up}z8; + pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0); + x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r; + x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8; + numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1')); + filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle; % upper barb + t:=xpart(lower_arc intersectiontimes(z9r--z8')); + filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle; % lower barb +else: pos1(1.2flare,-100); pos8(1.2flare,-100); + x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u; + top y1l=vround .93h+o; bot y8r=vround .1h-o; + filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal + filldraw stroke term.e(7,8,left,1,4); % lower arc and terminal + if rt x3r+2doublestroke_curvedist+doublestroke_thin>lft x6l: + curve_stroke(s,x0-0.5doublestroke_thin,doublestroke_thin, + (reverse(term.l(2,1,right,.9,4))) & super_arc.l(2,3), + super_arc.r(6,7) & term.r(7,8,left,1,4)); % stroke + else: + curve_stroke(s,rt x3r+doublestroke_curvedist,doublestroke_thin, + (reverse(term.l(2,1,right,.9,4))) & super_arc.l(2,3), + z3l{down}..z4l---z5l..z6l{down}); % left stroke + curve_stroke(t,lft x6l-doublestroke_curvedist,-doublestroke_thin, + super_arc.r(6,7) & term.r(7,8,left,1,4), + z3r{down}..z4r---z5r..z6r{down}); fi % right stroke + fi +math_fit(0,.5ic#); penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar; + +cmchar "The letter T"; +beginchar("T",13.5u#-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); +pos21(doublestroke_thin,0); pos22(doublestroke_thin,0); +lft x1l=lft x2l=w-rt x21r; +top y1=h; bot y2=0; +lft x21l=lft x22l=rt x1r+doublestroke_dist; y21=y1; y22=y2; +filldraw stroke z1e--z2e; % stem +filldraw stroke z21e--z22e; % stroke +pickup crisp.nib; pos3(slab,90); pos4(hair,0); +top y3r=h; x3=x1; rt x4r=hround(w-.65u); y4=good.y(y3l-beak)-eps; +arm(3,4,e,beak_darkness,.7beak_jut); % right arm and beak +pos5(hair,180); x5=w-x4; y5=y4; +pos6(slab,90); top y6r=h; x6=x21; +arm(6,5,f,beak_darkness,-.7beak_jut); % left arm and beak +if serifs: nodish_serif(2,1,c,1/3,1.05cap_jut, + d,0,1.05cap_jut+doublestroke_dist); % lower serif + nodish_serif(22,21,g,0,1.05cap_jut+doublestroke_dist, + h,1/3,1.05cap_jut); % lower stroke serif + nodish_serif(1,2,a,1/3,.5cap_jut, + b,0,.5cap_jut+doublestroke_dist); % upper bracketing + nodish_serif(21,22,i,0,.5cap_jut+doublestroke_dist, + j,1/3,.5cap_jut); fi % upper stroke bracketing +math_fit(-.75cap_height#*slant,ic#-2.5u#); penlabels(1,2,3,4,5,6); endchar; + +cmchar "The letter U"; +beginchar("U",14u#+.5width_adj#,cap_height#,0); +italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); +if monospace: adjust_fit(cap_serif_fit#-.5u#,cap_serif_fit#-.5u#) +else: adjust_fit(cap_serif_fit#,cap_serif_fit#) fi; +pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); +pos2'(cap_stem,180); z2'=z2; +pos3(cap_band,-90); +pos4(cap_hair,0); pos5(cap_hair,0); +x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r; +top y1=top y5=h; y2=y4=1/3h; bot y3r=-o; +lft x1l=hround max(2u,3u-.5cap_stem); +filldraw stroke z1e--z2e; % left stem +filldraw stroke pulled_arc.e(2',3) + & pulled_arc.e(3,4)&z4e--z5e; % arc and right stem +z21=0.5[z21l,z21r]; z22=0.5[z22l,z22r]; z23=0.5[z23l,z23r]; +y21l=y21r=y1; lft x22l=lft x21l=rt x1r+doublestroke_dist; +y22r=y22l=-h; rt x22r=rt x21r=lft x22l+doublestroke_thin; +z23l=(pulled_arc.r(2',3) & pulled_arc.r(3,4))intersectionpoint(z21l..z22l); +z23r=(pulled_arc.r(2',3) & pulled_arc.r(3,4))intersectionpoint(z21r..z22r); +filldraw stroke z21e--z23e; % stroke +if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,0,cap_jut+doublestroke_dist); % left serif + nodish_serif(21,23,e,0,cap_jut+doublestroke_dist,f,1/3,cap_jut); % stroke serif + nodish_serif(5,4,c,1/2,cap_jut,d,1/2,cap_jut)(dark); fi % right serif +math_fit(-cap_serif_fit#-.3cap_height#*slant-min(cap_height#*slant,u#), + max(.5ic#-.5u#,0)); penlabels(1,2,3,4,5); endchar; + +cmchar "The letter V"; +beginchar("V",14u#,cap_height#,0); +italcorr cap_height#*slant+.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +numeric left_stem,right_stem,outer_jut,alpha; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; +y1=y4=y11=h; y2=y3=y12=-0.4*apex_o; +if doublestroke_twist: + alpha=diag_ratio(2,left_stem,y11-y12,x4r-x1l); +else: + alpha=diag_ratio(2,left_stem+doublestroke_dist+right_stem, + y11-y12,x4r-x1l-apex_corr); +fi +penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +penpos11(alpha*doublestroke_thin,0); penpos12(alpha*doublestroke_thin,0); +x12-x11=x4-x3; +if doublestroke_twist: + x2r=x3r; +else: + x12l+apex_corr=x3l; +fi +x1r+alpha*doublestroke_dist=x11l; x2r+alpha*doublestroke_dist=x12l; +z0=whatever[z11r,z12r]=whatever[z3l,z4l]; +if doublestroke_twist: + z15=whatever[z11l,z12l]=whatever[z3l,z4l]; + z16=whatever[z1r,z2r]=whatever[z3l,z4l]; + fill z16--diag_end(16,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l) + --diag_end(2l,1l,1,1,1r,16)--cycle; % stroke and right diagonal + fill z15--diag_end(15,11l,1,1,11r,0) + --z0--cycle; % left diagonal +else: + fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,12l,11l) + --diag_end(12l,11l,1,1,11r,0)--cycle; % left and right diagonals + fill diag_end(2l,1l,1,1,1r,2r) + --diag_end(1r,2r,1,1,2l,1l)--cycle; % stroke +fi +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); + prime_points_inside(11,12); + if rt x11'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut; + else: rt x11'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + nodish_serif(1',2,a,1/3,outer_jut, + b,0,inner_jut+alpha*doublestroke_dist); % left serif + nodish_serif(11',12,e,0,outer_jut+alpha*doublestroke_dist, + f,1/2,inner_jut); % left stroke serif + nodish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % right serif + if not doublestroke_twist: + z13=whatever[z11,z12]; z14=whatever[z1,z2]; + y13=y14=y12+slab; + fill z12--z2--z14--z13--cycle; fi % bottom closure + fi +math_fit(.75u#-cap_height#*slant,ic#-4u#); penlabels(0,1,2,3,4); endchar; + +cmchar "The letter W"; +beginchar("W",19u#,cap_height#,0); +italcorr cap_height#*slant+.25u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +numeric stem[],outer_jut,upper_notch,alpha,mid_corr; +outer_jut=.7cap_jut; x1l=w-x8r=l+letter_fit+outer_jut+.25u; +stem1=fudged.cap_stem-stem_corr; +stem4=min(fudged.hair if hefty:-2stem_corr fi,stem1); +stem2=stem4 if hefty:-2stem_corr fi; +stem3=stem1 if hefty:-2stem_corr fi; +mid_corr=if monospace or hefty:-apex_corr else: 1/3jut fi; +y1=y8=y11=h; y2=y3=y12=-0.4*apex_o; y6=y7=-if doublestroke_twist:0.4 fi apex_o; +if doublestroke_twist: + alpha=diag_ratio(4,stem1,y1-y2,x8r-x1l+mid_corr-2apex_corr); +else: + alpha=diag_ratio(4,stem1+stem2-stem3+stem4+doublestroke_dist, + y1-y2,x8r-x1l+mid_corr-2apex_corr); +fi +penpos1(alpha*stem1,0); penpos2(alpha*stem1,0); +penpos3(alpha*stem2,0); penpos4(alpha*stem2,0); +penpos5(alpha*stem3,0); penpos6(alpha*stem3,0); +penpos7(alpha*stem4,0); penpos8(alpha*stem4,0); +penpos11(alpha*doublestroke_thin,0); penpos12(alpha*doublestroke_thin,0); +x11l=x1r+alpha*doublestroke_dist; x12l=x2r+alpha*doublestroke_dist; +x12-x11=x4-x3=x6-x5=x8-x7; +if doublestroke_twist: + x2r=x3r; x6r=x7r; +else: + x12l+apex_corr=x3l; x6l+apex_corr=x7l; +fi +y4=y5=if monospace: vround .6 fi\\ h; +x4l-x1l=floor(x4l-x1l+.5(x5r+mid_corr-x4r)); % |x5r+mid_corr| $\approx$ |x4r| +z45=whatever[z3r,z4r]=whatever[z5l,z6l]; +z67=whatever[z5r,z6r]=whatever[z7l,z8l]; upper_notch=y4-cap_notch_cut; +if doublestroke_twist: + z23=whatever[z11r,z12r]=whatever[z3l,z4l]; + z15=whatever[z11l,z12l]=whatever[z3l,z4l]; + z16=whatever[z1r,z2r]=whatever[z3l,z4l]; + fill diag_end(1l,2l,1,1,3r,4r){z4-z3}...z45&z45 + ...{z6-z5}diag_end(5l,6l,1,1,7r,8r)--diag_end(7r,8r,1,1,8l,7l){z7-z8} + ...z67&z67...{z5-z6}special_diag_end(6,5,4,3){z3-z4}...z16&z16 + ...{z1-z2}diag_end(2r,1r,1,1,1l,2l)--cycle; % Stroke and diagonals + fill z15--diag_end(15,11l,1,1,11r,23) + --z23--cycle; % left stem +else: + z23=whatever[z11r,z12r]=whatever[z3l,z4l]; + fill diag_end(11l,12l,1,1,3r,4r){z4-z3}...z45&z45 + ...{z6-z5}diag_end(5l,6l,1,1,7r,8r)--diag_end(7r,8r,1,1,8l,7l){z7-z8} + ...z67&z67...{z5-z6}special_diag_end(6,5,4,3){z3-z4}...z23&z23 + ...{z11-z12}diag_end(12r,11r,1,1,11l,12l)--cycle; % Stroke and diagonals + fill diag_end(2r,1r,1,1,1l,2l) + --diag_end(1l,2l,1,1,2r,1r)--cycle; % left stem +fi +if serifs: numeric inner_jut[]; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(5,6); prime_points_inside(8,7); + prime_points_inside(11,12); + if monospace: inner_jut1=inner_jut4=1.5cap_jut; + elseif hefty: inner_jut1=inner_jut4=cap_jut; + else: fill diag_end(6r,5r,1,1,5l,6l)--.9[z5l,z6l] + ..{z5-z6}.1[z5r,z6r]--cycle; % middle stem + inner_jut2=.7inner_jut1; inner_jut4=1.1inner_jut3; + if rt x11'r+cap_jut+.5u+1<=lft x5'l-.7cap_jut: inner_jut1=cap_jut; + else: rt x11'r+inner_jut1+.5u+1=lft x5'l-inner_jut2; fi + if rt x5'r+1.1cap_jut+.5u+1<=lft x8'l-1.21cap_jut: inner_jut3=cap_jut; + else: rt x5'r+inner_jut3+.5u+1=lft x8'l-inner_jut4; fi + nodish_serif(5',6,e,1/3,inner_jut2,f,1/2,inner_jut3); fi % middle serif + nodish_serif(1',2,a,1/3,outer_jut, + b,0,inner_jut1+alpha*doublestroke_dist); % left serif + nodish_serif(11',12,g,0,outer_jut+alpha*doublestroke_dist, + h,1/2,inner_jut1); % stroke serif + nodish_serif(8',7,c,.6,inner_jut4,d,1/2,outer_jut)(dark); % right serif + if not doublestroke_twist: + z13=whatever[z11,z12]; z14=whatever[z1,z2]; + y13=y14=y12+slab; + fill z12--z2--z14--z13--cycle; fi % bottom closure + fi +math_fit(.75u#-cap_height#*slant,ic#-2.5u#); +penlabels(0,1,2,3,4,5,6,7,8,23,45,67); endchar; + +cmchar "The letter X"; +beginchar("X",15u#,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; +x2r=r-letter_fit-1u-outer_jut-xjut; +x3l=l+letter_fit+.75u+outer_jut+xjut; +y1=y2=h; y3=y4=0; +y21=y1; y22=y4; +x1l=l+letter_fit+.25u+outer_jut; x22r=r-letter_fit-.25u-outer_jut; +alpha1=diag_ratio(1,stem1+doublestroke_dist,h,x22r-x1l); +alpha2=diag_ratio(1,stem2,h,x2r-x3l); +penpos1(alpha1*stem1,0); penpos4(alpha1*stem1,0); +penpos21(alpha1*doublestroke_thin,0); penpos22(alpha1*doublestroke_thin,0); +penpos3(alpha2*stem2,0); penpos2(alpha2*stem2,0); +x21l=x1r+alpha1*doublestroke_dist; x4r+alpha1*doublestroke_dist=x22l; +z31l=whatever[z2l,z3l]=whatever[z21,z22]; +z31r=whatever[z2r,z3r]=whatever[z21,z22]; +z32l=whatever[z2l,z3l]=whatever[z1,z4]; +z32r=whatever[z2r,z3r]=whatever[z1,z4]; +fill diag_end(4r,1r,.5,1,1l,4l) + --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal +fill diag_end(22r,21r,.5,1,21l,22l) + --diag_end(21l,22l,.5,1,22r,21r)--cycle; % stroke diagonal +fill diag_end(2l,3l,.5,1,3r,2r)--z32r--z32l--cycle; % right diagonal, lower part +fill diag_end(3r,2r,.5,1,2l,3l)--z31l--z31r--cycle; % right diagonal, upper part +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); + prime_points_inside(21,22); prime_points_inside(22,21); + if rt x21'r+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut; + else: rt x21'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi + if rt x3'r+cap_jut+.5u+1<=lft x22'l-cap_jut-xjut: inner_jut2=cap_jut; + else: rt x3'r+inner_jut2+.5u+1=lft x22'l-inner_jut2-xjut; fi + nodish_serif(1',4,a,1/3,outer_jut, + b,0,inner_jut1+doublestroke_dist); % upper left serif + nodish_serif(21',22,i,0,outer_jut+doublestroke_dist, + j,2/3,inner_jut1); % upper left stroke serif + nodish_serif(4',1,c,2/3,inner_jut2, + d,0,outer_jut+doublestroke_dist); % lower right serif + nodish_serif(22',21,k,0,inner_jut2+doublestroke_dist, + l,1/3,outer_jut); % lower right stroke serif + nodish_serif(2',3,e,2/3,inner_jut1+xjut, + f,1/2,outer_jut+xjut)(dark); % upper right serif + nodish_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 Y"; +beginchar("Y",14u#,cap_height#,0); +italcorr cap_height#*slant+.45u#; +adjust_fit(cap_serif_fit#,cap_serif_fit#); +numeric left_stem,right_stem,outer_jut,dy,alpha; +left_stem=cap_stem-stem_corr; +right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem); +outer_jut=.75cap_jut; +penpos6(left_stem,0); penpos16(doublestroke_thin,0); +x6l=w-x16r; x6r+doublestroke_dist=x16l; +x1l=w-x4r=l+letter_fit+outer_jut+.05u; +penpos15(doublestroke_thin,0); x15=x16; y16=0; y15l=.4h; y1l=h; +alpha=diag_ratio(1,left_stem+doublestroke_dist,y1l-y15l,x15l-x1l); +penpos1(alpha*left_stem,0); penpos11(alpha*doublestroke_thin,0); +penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); +penpos12(alpha*doublestroke_thin,0); +x1r+alpha*doublestroke_dist=x11l; +x3r=x15r; x12l=x15l; +y6=y16; y1=y4=y11; y3=y12=y15; +z1l-z2l=whatever*(z11-z12); z6l-z2l=whatever*(z15-z16); +z1r-z2r=whatever*(z11-z12); z6r-z2r=whatever*(z15-z16); +z2=0.5[z2l,z2r]; +z0=whatever[z11r,z12r]=whatever[z3l,z4l]; +if y0>y12+cap_notch_cut: y0:=y12+cap_notch_cut; + fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z15r + --diag_end(15r,16r,1,1,16l,15l)--z15l--diag_end(12l,11l,1,1,11r,12r){z12-z11} + ...{down}z0+.5left--cycle; % diagonals and stroke +else: fill z0--diag_end(0,4l,1,1,4r,3r)--z15r + --diag_end(15r,16r,1,1,16l,15l)--z15l + --diag_end(12l,11l,1,1,11r,0)--cycle; fi % diagonal and stroke +fill z2r--diag_end(2r,6r,1,1,6l,2l)--z2l + --diag_end(2l,1l,1,1,1r,2r)--cycle; % stem +if serifs: numeric inner_jut; pickup tiny.nib; + prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,2); + prime_points_inside(11,12); prime_points_inside(16,15); + if rt x11'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut; + else: rt x11'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi + nodish_serif(1',2,a,1/3,outer_jut,b,0,inner_jut+doublestroke_dist); % upper left serif + nodish_serif(11',12,g,0,outer_jut+doublestroke_dist,h,1/2,inner_jut); % upper stroke serif + nodish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % upper right serif + nodish_serif(6',2,e,1/3,cap_jut,f,0,cap_jut+doublestroke_dist); % lower serif + nodish_serif(16',15,i,0,cap_jut+doublestroke_dist,j,1/3,cap_jut); fi % lower stroke serif +math_fit(.5u#-cap_height#*slant,ic#-4u#); +penlabels(0,1,2,3,4,5,6); endchar; + +cmchar "The letter Z"; +beginchar("Z",13.5u#,cap_height#,0); +italcorr cap_height#*slant-.5u#; +adjust_fit(0,0); +numeric arm_thickness[],z_stem; +if hefty: arm_thickness1=Vround(slab-vair_corr); arm_thickness2=slab; + z_stem=.8[vair,cap_stem]; +else: arm_thickness1=slab; arm_thickness2=vround(slab+vair_corr); + z_stem=.9[vair,cap_stem]; fi +pickup tiny.nib; x3l=x4l=w-x1r=w-x2r; lft x3l=hround u; +top y1=h; y2=min(y1,h-2/3arm_thickness1); +bot y4=0; y3=max(y4,2/3arm_thickness2); +y11=y1; y12=y2; y13=y3; y14=y4; +numeric alpha; alpha=diag_ratio(1, + z_stem-tiny+doublestroke_dist+doublestroke_thin,y2-y3,x2r-x3l); +penpos1(alpha*(doublestroke_thin-tiny),0); penpos2(alpha*(doublestroke_thin-tiny),0); +penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0); +penpos11(alpha*(z_stem-tiny),0); penpos12(alpha*(z_stem-tiny),0); +penpos13(alpha*(doublestroke_thin-tiny),0); penpos14(alpha*(doublestroke_thin-tiny),0); +rt x11r=lft x1l-alpha*doublestroke_dist; rt x12r=lft x2l-alpha*doublestroke_dist; +lft x13l=rt x3r+alpha*doublestroke_dist; lft x14l=rt x4r+alpha*doublestroke_dist; +pair delta; delta=penoffset z3-z2 of currentpen; +fill top lft z11l--z12l+delta---z3l+delta..lft z3l---lft z4l..bot z4l + ---bot rt z4r--z3r-delta---z12r-delta..rt z12r---rt z11r..top z11r + ---cycle; % diagonal +fill top lft z1l--z2l+delta---z13l+delta..lft z13l---lft z14l..bot z14l + ---bot rt z14r--z13r-delta---z2r-delta..rt z2r---rt z1r..top z1r + ---cycle; % diagonal +pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180); +top y5r=h; x5=x1; lft x6r=hround 1.25u; y6=good.y(y5l-beak)-eps; +arm(5,6,a,beak_darkness**.8,-.4beak_jut); % upper arm and beak +pos7(arm_thickness2,-90); pos8(hair,0); +bot y7r=0; x7=x4; rt x8r=hround(w-.9u); y8=good.y(y7l+1.2beak)+eps; +arm(7,8,b,beak_darkness**.9,.6beak_jut); % lower arm and beak +math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8); endchar; + diff --git a/tex/src/packages/dsss10.mf b/tex/src/packages/dsss10.mf new file mode 100644 index 0000000..c48409e --- /dev/null +++ b/tex/src/packages/dsss10.mf @@ -0,0 +1,75 @@ +% Double Stroke Computer Modern Sans Serif 10 pt +if unknown cmbase: input cmbase fi + +font_identifier:="CMSS"; font_size 10pt#; + +u#:=20/36pt#; % unit width +width_adj#:=15/36pt#; % width adjustment for certain characters +serif_fit#:=-7/36pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=-10/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=0pt#; % extra space added to all sidebars + +body_height#:=270/36pt#; % height of tallest characters +asc_height#:=250/36pt#; % height of lowercase ascenders +cap_height#:=250/36pt#; % height of caps +fig_height#:=236/36pt#; % height of numerals +x_height#:=160/36pt#; % height of lowercase without ascenders +math_axis#:=90/36pt#; % axis of symmetry for math symbols +bar_height#:=79/36pt#; % height of crossbar in lowercase e +comma_depth#:=45/36pt#; % depth of comma below baseline +desc_depth#:=70/36pt#; % depth of lowercase descenders + +crisp#:=0pt#; % diameter of serif corners +tiny#:=0pt#; % diameter of rounded corners +fine#:=0pt#; % diameter of sharply rounded corners +thin_join#:=17/36pt#; % width of extrafine details +hair#:=28/36pt#; % lowercase hairline breadth +stem#:=28/36pt#; % lowercase stem breadth +curve#:=28/36pt#; % lowercase curve breadth +ess#:=28/36pt#; % breadth in middle of lowercase s +flare#:=25/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=30/36pt#; % diameter of dots +cap_hair#:=28/36pt#; % uppercase hairline breadth +cap_stem#:=32/36pt#; % uppercase stem breadth +cap_curve#:=32/36pt#; % uppercase curve breadth +cap_ess#:=32/36pt#; % breadth in middle of uppercase s +rule_thickness#:=.4pt#; % 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#:=.5/36pt#; % vertical protrusion of beak serifs +vair#:=22/36pt#; % vertical diameter of hairlines +notch_cut#:=18/36pt#; % maximum breadth above or below notches +bar#:=21/36pt#; % lowercase bar thickness +slab#:=23/36pt#; % serif and arm thickness +cap_bar#:=22/36pt#; % uppercase bar thickness +cap_band#:=20/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=25/36pt#; % max breadth above/below uppercase notches +serif_drop#:=2/36pt#; % vertical drop of sloped serifs +stem_corr#:=1/36pt#; % for small refinements of stem breadth +vair_corr#:=1/36pt#; % for small refinements of hairline height +apex_corr#:=5/36pt#; % extra width at diagonal junctions + +o#:=8/36pt#; % amount of overshoot for curves +apex_o#:=0pt#; % amount of overshoot for diagonal junctions + +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +fudge:=.96; % factor applied to weights of heavy characters +math_spread:=0; % extra openness of math symbols +superness:=1/sqrt 2; % parameter for superellipses +superpull:=1/20; % 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:=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? + +generate dsrom % switch to the driver file diff --git a/tex/src/packages/dsss10.tfm b/tex/src/packages/dsss10.tfm new file mode 100644 index 0000000..1eb4b28 Binary files /dev/null and b/tex/src/packages/dsss10.tfm differ diff --git a/tex/src/packages/dsss12.mf b/tex/src/packages/dsss12.mf new file mode 100644 index 0000000..742827e --- /dev/null +++ b/tex/src/packages/dsss12.mf @@ -0,0 +1,75 @@ +% Double Stroke Computer Modern Sans Serif 12 pt +if unknown cmbase: input cmbase fi + +font_identifier:="DSSS"; font_size 12pt#; + +u#:=23.5/36pt#; % unit width +width_adj#:=17/36pt#; % width adjustment for certain characters +serif_fit#:=-9/36pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=-13/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=0pt#; % extra space added to all sidebars + +body_height#:=324/36pt#; % height of tallest characters +asc_height#:=300/36pt#; % height of lowercase ascenders +cap_height#:=300/36pt#; % height of caps +fig_height#:=283/36pt#; % height of numerals +x_height#:=192/36pt#; % height of lowercase without ascenders +math_axis#:=108/36pt#; % axis of symmetry for math symbols +bar_height#:=97/36pt#; % height of crossbar in lowercase e +comma_depth#:=54/36pt#; % depth of comma below baseline +desc_depth#:=84/36pt#; % depth of lowercase descenders + +crisp#:=0pt#; % diameter of serif corners +tiny#:=0pt#; % diameter of rounded corners +fine#:=0pt#; % diameter of sharply rounded corners +thin_join#:=20/36pt#; % width of extrafine details +hair#:=33/36pt#; % lowercase hairline breadth +stem#:=33/36pt#; % lowercase stem breadth +curve#:=33/36pt#; % lowercase curve breadth +ess#:=33/36pt#; % breadth in middle of lowercase s +flare#:=30/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=35/36pt#; % diameter of dots +cap_hair#:=33/36pt#; % uppercase hairline breadth +cap_stem#:=37/36pt#; % uppercase stem breadth +cap_curve#:=37/36pt#; % uppercase curve breadth +cap_ess#:=37/36pt#; % breadth in middle of uppercase s +rule_thickness#:=.44pt#; % 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#:=.6/36pt#; % vertical protrusion of beak serifs +vair#:=26/36pt#; % vertical diameter of hairlines +notch_cut#:=22/36pt#; % maximum breadth above or below notches +bar#:=25/36pt#; % lowercase bar thickness +slab#:=27/36pt#; % serif and arm thickness +cap_bar#:=26/36pt#; % uppercase bar thickness +cap_band#:=24/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=31/36pt#; % max breadth above/below uppercase notches +serif_drop#:=2/36pt#; % vertical drop of sloped serifs +stem_corr#:=1/36pt#; % for small refinements of stem breadth +vair_corr#:=1/36pt#; % for small refinements of hairline height +apex_corr#:=6/36pt#; % extra width at diagonal junctions + +o#:=9/36pt#; % amount of overshoot for curves +apex_o#:=0pt#; % amount of overshoot for diagonal junctions + +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +fudge:=.98; % factor applied to weights of heavy characters +math_spread:=-0.2; % extra openness of math symbols +superness:=1/sqrt 2; % parameter for superellipses +superpull:=1/20; % 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:=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? + +generate dsrom % switch to the driver file diff --git a/tex/src/packages/dsss12.tfm b/tex/src/packages/dsss12.tfm new file mode 100644 index 0000000..5e5942d Binary files /dev/null and b/tex/src/packages/dsss12.tfm differ diff --git a/tex/src/packages/dsss8.mf b/tex/src/packages/dsss8.mf new file mode 100644 index 0000000..f512d19 --- /dev/null +++ b/tex/src/packages/dsss8.mf @@ -0,0 +1,75 @@ +% Double Stroke Computer Modern Sans Serif 8 pt +if unknown cmbase: input cmbase fi + +font_identifier:="DSSS"; font_size 8pt#; + +u#:=17/36pt#; % unit width +width_adj#:=12/36pt#; % width adjustment for certain characters +serif_fit#:=-6/36pt#; % extra sidebar near lowercase serifs +cap_serif_fit#:=-8.5/36pt#; % extra sidebar near uppercase serifs +letter_fit#:=0pt#; % extra space added to all sidebars + +body_height#:=216/36pt#; % height of tallest characters +asc_height#:=200/36pt#; % height of lowercase ascenders +cap_height#:=200/36pt#; % height of caps +fig_height#:=189/36pt#; % height of numerals +x_height#:=128/36pt#; % height of lowercase without ascenders +math_axis#:=72/36pt#; % axis of symmetry for math symbols +bar_height#:=63/36pt#; % height of crossbar in lowercase e +comma_depth#:=37/36pt#; % depth of comma below baseline +desc_depth#:=56/36pt#; % depth of lowercase descenders + +crisp#:=0pt#; % diameter of serif corners +tiny#:=0pt#; % diameter of rounded corners +fine#:=0pt#; % diameter of sharply rounded corners +thin_join#:=15/36pt#; % width of extrafine details +hair#:=25/36pt#; % lowercase hairline breadth +stem#:=25/36pt#; % lowercase stem breadth +curve#:=25/36pt#; % lowercase curve breadth +ess#:=25/36pt#; % breadth in middle of lowercase s +flare#:=22/36pt#; % diameter of bulbs or breadth of terminals +dot_size#:=26/36pt#; % diameter of dots +cap_hair#:=25/36pt#; % uppercase hairline breadth +cap_stem#:=29/36pt#; % uppercase stem breadth +cap_curve#:=29/36pt#; % uppercase curve breadth +cap_ess#:=28/36pt#; % breadth in middle of uppercase s +rule_thickness#:=.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#:=.4/36pt#; % vertical protrusion of beak serifs +vair#:=19/36pt#; % vertical diameter of hairlines +notch_cut#:=16/36pt#; % maximum breadth above or below notches +bar#:=18/36pt#; % lowercase bar thickness +slab#:=20/36pt#; % serif and arm thickness +cap_bar#:=19/36pt#; % uppercase bar thickness +cap_band#:=17/36pt#; % uppercase thickness above/below lobes +cap_notch_cut#:=22/36pt#; % max breadth above/below uppercase notches +serif_drop#:=2/36pt#; % vertical drop of sloped serifs +stem_corr#:=1/36pt#; % for small refinements of stem breadth +vair_corr#:=1/36pt#; % for small refinements of hairline height +apex_corr#:=4/36pt#; % extra width at diagonal junctions + +o#:=6/36pt#; % amount of overshoot for curves +apex_o#:=0pt#; % amount of overshoot for diagonal junctions + +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +fudge:=.93; % factor applied to weights of heavy characters +math_spread:=.4; % extra openness of math symbols +superness:=1/sqrt 2; % parameter for superellipses +superpull:=1/20; % 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:=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? + +generate dsrom % switch to the driver file diff --git a/tex/src/packages/dsss8.tfm b/tex/src/packages/dsss8.tfm new file mode 100644 index 0000000..40752ab Binary files /dev/null and b/tex/src/packages/dsss8.tfm differ