| 1 |
% Based on the Computer Modern source file slantms.mf by D E Knuth. |
| 2 |
|
| 3 |
% Edited by Ariel Barton to produce better sans serif symbols |
| 4 |
|
| 5 |
% Date: 2013/03/22 |
| 6 |
|
| 7 |
% This file contains miscellaneous symbols of math slant fonts. |
| 8 |
% The character codes are \0100, \0140, and \0173--\0177. |
| 9 |
|
| 10 |
cmchar "Partial differential sign"; |
| 11 |
beginchar(oct"100",10u#,asc_height#,0); |
| 12 |
italcorr .7asc_height#*slant+.5curve#-1.5u#; |
| 13 |
adjust_fit(0,0); |
| 14 |
numeric top_thickness,bot_thickness,side_thickness,pull; |
| 15 |
top_thickness=max(fine.breadth,vround(slab-2vair_corr)); |
| 16 |
bot_thickness=max(fine.breadth,vround(slab-vair_corr)); |
| 17 |
side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]); |
| 18 |
pull=min(.25,1.5superpull); |
| 19 |
pickup fine.nib; pos2(top_thickness,90); |
| 20 |
pos3(side_thickness,0); pos4(bot_thickness,-90); |
| 21 |
pos5(side_thickness,-180); pos6(vair,-270); |
| 22 |
lft x5r=w-rt x3r=hround max(.75u,1.5u-.5side_thickness); |
| 23 |
%x4=x6+.1u=x2+u=.5w; |
| 24 |
x4=x6+.1u=.5w; |
| 25 |
x2+if serifs: u else: 0.9u fi=.5w; |
| 26 |
top y2r=h+o; y3=.5[y2,y4]; bot y4r=-o; |
| 27 |
y5=.5[y4,y6]; top y6=vround 5/8h+o; |
| 28 |
path p; {{interim superness:=more_super; p=pulled_super_arc.l(3,4)(pull)}}; |
| 29 |
numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); |
| 30 |
pos7(thin_join,0); z7l=point t of p; |
| 31 |
(x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]); |
| 32 |
filldraw stroke pulled_super_arc.e(2,3)(pull) |
| 33 |
& {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} |
| 34 |
& {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} |
| 35 |
& z6e{right}...{direction t of p}z7e; % arc and bowl |
| 36 |
pos1(hair,180); pos0(flare,180); |
| 37 |
lft x0r=min(lft x2-eps,hround 1.2u); |
| 38 |
y0=vround min(.85h-.5flare,.8h+.5flare)+o; |
| 39 |
if serifs: {{less_tense; bulb(2,1,0)}}; % arc and bulb |
| 40 |
else: filldraw stroke z0e{z0-z5}..z2e{right}; fi |
| 41 |
math_fit(-.3x_height#*slant+.5curve#-u#,ic#-u#); |
| 42 |
penlabels(0,1,2,3,4,5,6,7); endchar; |
| 43 |
|
| 44 |
cmchar "Lowercase italic script l"; |
| 45 |
beginchar(oct"140",4.5u#+max(1.5u#,stem#),asc_height#,0); |
| 46 |
italcorr .8asc_height#*slant-u#; |
| 47 |
adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib; |
| 48 |
pos1(hair,-45); |
| 49 |
if hefty: pos2(0.5[vair,hair],0); else: pos2(hair,0); fi |
| 50 |
pos3(vair,90); |
| 51 |
pos4(stem,180); pos5(vair,270); pos6(hair,315); |
| 52 |
lft x1l=hround(lft x1l-x1); rt x2r=hround(w-1.5u); x3=.5w; |
| 53 |
lft x4r=hround .5u; x5=x3+.75u; x6=x1+w+1; |
| 54 |
y1=y6=.125h; y2=.8h; top y3r=h+oo; y4=.5[y3,y5]; bot y5=-oo; |
| 55 |
filldraw stroke z1e{10u,asc_height}...z2e{up}...pulled_arc.e(3,4) |
| 56 |
& pulled_arc.e(4,5)...z6e{10u,asc_height}; % bowl and hook |
| 57 |
math_fit(0,ic#); penlabels(1,2,3,4,5,6); endchar; |
| 58 |
|
| 59 |
% Dotless i and j are copied from romspl.mf |
| 60 |
% except that the math_fit has been added |
| 61 |
% and of course they are at different positions |
| 62 |
|
| 63 |
cmchar "Dotless letter i"; |
| 64 |
beginchar(oct"173",5u#,x_height#,0); |
| 65 |
italcorr x_height#*slant-serif_fit#+.5stem#-2u#; |
| 66 |
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#); |
| 67 |
pickup tiny.nib; pos1(stem',0); pos2(stem',0); |
| 68 |
if odd(w-stem'): change_width; fi |
| 69 |
lft x1l=hround(.5w-.5stem'); x1=x2; |
| 70 |
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0; |
| 71 |
filldraw stroke z1e--z2e; % stem |
| 72 |
if serifs: sloped_serif.l(1,2,a,1/3,.95jut,serif_drop); % upper serif |
| 73 |
dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi % lower serif |
| 74 |
math_fit(0,ic#); % What does this mean? |
| 75 |
penlabels(1,2); endchar; |
| 76 |
|
| 77 |
cmchar "Dotless letter j"; |
| 78 |
beginchar(oct"174",5.5u#,x_height#,desc_depth#); |
| 79 |
italcorr x_height#*slant-serif_fit#+.5stem#-2u#; |
| 80 |
adjust_fit(serif_fit#+2stem_shift# if monospace:+.5u# fi, |
| 81 |
serif_fit#-2stem_shift# if monospace:-.5u# fi); |
| 82 |
pickup tiny.nib; pos1(stem',0); pos2(stem',0); |
| 83 |
rt x1r=hround(.5w+.25u+.5stem'); x1=x2; |
| 84 |
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d; |
| 85 |
filldraw stroke z1e--z2e; % stem |
| 86 |
if serifs: sloped_serif.l(1,2,a,1/3,1.1jut,serif_drop); % upper serif |
| 87 |
pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180); |
| 88 |
x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d; |
| 89 |
if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi; |
| 90 |
(x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]); |
| 91 |
filldraw stroke z2e{down}...z5e{left}; bulb(5,6,7); % arc and bulb |
| 92 |
else: pickup fine.nib; pos2'(stem',0); z2'=z2; |
| 93 |
pos6(.2[vair,stem'],-90); pos7(vair,-90); |
| 94 |
lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo); |
| 95 |
x3r=x1r; top y4r=min(2x_height,h+1); |
| 96 |
(x,y7l)=whatever[z7r,(x1,min(h,asc_height))]; x7l:=x; |
| 97 |
z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r; |
| 98 |
x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo; |
| 99 |
filldraw stroke z2'e..{down}z5e & super_arc.e(5,6) |
| 100 |
& term.e(6,7,left,1,4); fi % arc and terminal |
| 101 |
math_fit(desc_depth#*slant,ic#); penlabels(1,2,5,6,7); endchar; |
| 102 |
|
| 103 |
cmchar "Weierstrass p"; |
| 104 |
beginchar(oct"175",if hefty: 11.5u# else: 11u# fi,x_height#,desc_depth#); |
| 105 |
italcorr .7x_height#*slant+.5stem#-u# if math_fitting:-.5u# fi; |
| 106 |
adjust_fit(0,0); pickup fine.nib; |
| 107 |
numeric midpoint; midpoint = w-5.5u; |
| 108 |
numeric theta; theta=90-angle(8u,h); slope:=-h/8u; % angle at middle |
| 109 |
if serifs: pos2(vair,-90); else: pos2(vair,0); fi |
| 110 |
pos1(vstem,theta); pos7(vair,-90); |
| 111 |
if serifs: top y2l=h+o; else: y2l = h; fi |
| 112 |
bot y7r=-d-o; y1=.4[-d,h]; |
| 113 |
x2+.5u=3u; |
| 114 |
x1=x7-.5u=w-8u; |
| 115 |
lft x3l=hround .5u; rt x6r=hround max(rt x7+.5,midpoint-.25u); |
| 116 |
x3r-x3l=x6r-x6l=(hround .5[vair,vstem])-fine; |
| 117 |
ellipse_set(2l,3l,4l,1l); ellipse_set(2r,3r,4r,1r); y3=y3r; |
| 118 |
ellipse_set(7l,6l,5l,1l); ellipse_set(7r,6r,5r,1r); y6=y6r; |
| 119 |
filldraw stroke |
| 120 |
if serifs: super_arc.e(2,3) & z3e{down} |
| 121 |
else: z2e..z3e{down} fi |
| 122 |
..z4e---z5e..z6e{down} & super_arc.e(6,7); % flourish |
| 123 |
pos8(hair,180); pos9(vair,90); pos10(stem,0); |
| 124 |
pos11(vair,-90); pos12(hair,-180); |
| 125 |
if hefty: pos13(vair,-180); |
| 126 |
else: pos13(.3[hair,flare],-180); |
| 127 |
fi |
| 128 |
rt x10r=hround(w-1.5u+.5stem); lft x12r=hround(midpoint-.5u); |
| 129 |
rt x8l=hround (midpoint-3.25u); |
| 130 |
x9=x11=max(x12l+eps,midpoint+1.5u); |
| 131 |
y8=0; top y9r=vround(.9h+o); y10=.5[y9,y11]; bot y11r=-oo; |
| 132 |
filldraw stroke z7e{left}...z8e{up}...pulled_arc.e(9,10) |
| 133 |
& pulled_arc.e(10,11); % stem and bowl |
| 134 |
y13-.5(.6[hair,flare])=.15h; |
| 135 |
if serifs: bulb(11,12,13); % bulb |
| 136 |
else: z13r = z12r; filldraw stroke z11e{left}..z13e{up}; fi |
| 137 |
math_fit(0,ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar; |
| 138 |
|
| 139 |
cmchar "Arrow (vector) accent"; |
| 140 |
beginchar(oct"176",9u#,asc_height#+.5rule_thickness#,0); |
| 141 |
italcorr .7[x_height#,asc_height#]*slant; |
| 142 |
adjust_fit(0,0); pickup rule.nib; |
| 143 |
lft x1=hround .5u; x2=w-x1; y1=y2=good.y .7[x_height,asc_height]; |
| 144 |
draw z1--z2; % bar |
| 145 |
rt x3=rt x4=hround(x2-u); |
| 146 |
y3=y2+.3(asc_height-x_height); y4=y2-.3(asc_height-x_height); |
| 147 |
draw z3{x2-x3,2(y2-y3)}...{2(x2-x3),y2-y3}z2; % upper point |
| 148 |
draw z4{x2-x4,2(y2-y4)}...{2(x2-x4),y2-y4}z2; % lower point |
| 149 |
labels(1,2,3,4); endchar; |
| 150 |
|
| 151 |
cmchar "Tie accent"; |
| 152 |
beginchar(oct"177",5u#,asc_height#,0); |
| 153 |
italcorr 4/9[x_height#,asc_height#]*slant+4.5u#+2letter_fit#+.5hair#; |
| 154 |
adjust_fit(if monospace:2u#,2u# else:serif_fit#,serif_fit# fi); |
| 155 |
pickup fine.nib; pos1(hair,180); pos2(vround 1/5[vair,stem],90); pos3(hair,0); |
| 156 |
lft x1r=hround(.5w-.5hair); x2=.5[x1,x3]; |
| 157 |
rt x3r=hround(w+4u+2letter_fit+.5hair); |
| 158 |
y1=y3=4/9[x_height,asc_height]; top y2r=vround 8/9[x_height,asc_height]; |
| 159 |
filldraw stroke super_arc.e(1,2) & super_arc.e(2,3); % arc |
| 160 |
penlabels(1,2,3); endchar; |