| 1 |
% THIS IS THE OFFICIAL COMPUTER MODERN SOURCE FILE cscspu.mf BY D E KNUTH. |
| 2 |
% IT MUST NOT BE MODIFIED IN ANY WAY UNLESS THE FILE NAME IS CHANGED! |
| 3 |
|
| 4 |
% This file puts characters into code positions \0020, \0021, and \0031 |
| 5 |
% to take the place of dotless i, dotless j, and sharp s |
| 6 |
% in caps-and-small-caps fonts |
| 7 |
|
| 8 |
cmchar "The letter I"; % in code position \0020 |
| 9 |
beginchar(oct"020",max(6u#,4u#+cap_stem#),cap_height#,0); |
| 10 |
italcorr cap_height#*slant-.25u#; |
| 11 |
adjust_fit(cap_serif_fit#,cap_serif_fit#); |
| 12 |
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); |
| 13 |
lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0; |
| 14 |
filldraw stroke z1e--z2e; % stem |
| 15 |
if serifs: |
| 16 |
dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut); % upper serif |
| 17 |
dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut); fi % lower serif |
| 18 |
math_fit(0,.5ic#); penlabels(1,2); endchar; |
| 19 |
|
| 20 |
cmchar "The letter J"; % in code position \0021 |
| 21 |
beginchar(oct"021",9u#,cap_height#,0); |
| 22 |
italcorr cap_height#*slant-cap_serif_fit# |
| 23 |
+.75cap_jut#-2.5u#+min(.5cap_stem#,u#); |
| 24 |
adjust_fit(0,cap_serif_fit#); |
| 25 |
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0); |
| 26 |
top y1=h; rt x1r=hround(w-2u); x2=x1; y2=.21h; |
| 27 |
if serifs: pos3(vair,-90); pos4(cap_hair,-180); |
| 28 |
pos5(flare+(cap_stem-stem),-180); |
| 29 |
bot y3r=-o; x3=.5[x4,x2]; y5=1/6h; rt x5l=hround 2.75u; z5r=z4r; |
| 30 |
filldraw stroke z1e--z2e&super_arc.e(2,3); % stem and arc |
| 31 |
dish_serif(1,2,a,1/3,1.3cap_jut,b,1/3,.75cap_jut); % serif |
| 32 |
pickup tiny.nib; bulb(3,4,5); % bulb |
| 33 |
else: filldraw stroke z1e--z2e; % stem |
| 34 |
pickup fine.nib; pos3(cap_stem',0); z3=z2; |
| 35 |
pos4(flare,angle(6.5u,-h)); pos5(1.1flare,-100); |
| 36 |
bot y4r=-o; x4r=.5[x5r,x3r]; lft x5r=hround.75u; bot y5r=vround.06h-o; |
| 37 |
filldraw stroke z3e{down}....term.e(4,5,left,1,4); fi % arc and terminal |
| 38 |
math_fit(0,.5ic#-.5u#); penlabels(1,2,3,4,5); endchar; |
| 39 |
|
| 40 |
cmchar "Two letters S"; |
| 41 |
beginchar(oct"031",10u#,cap_height#,0); |
| 42 |
italcorr cap_height#*slant-u#; |
| 43 |
adjust_fit(0,0); |
| 44 |
numeric theta; theta=90-angle(50u,h); slope:=-h/50u; % angle at middle |
| 45 |
numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi; |
| 46 |
numeric ess'; ess'=max(fine.breadth,cap_ess); |
| 47 |
pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90); |
| 48 |
pos0(ess',theta); pos7(s_slab,-90); |
| 49 |
x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o; |
| 50 |
y0=.52h; lft x3l=hround u; rt x6r=hround(w-u); |
| 51 |
x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine; |
| 52 |
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r; |
| 53 |
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r; |
| 54 |
filldraw stroke super_arc.e(2,3) & z3e{down} |
| 55 |
..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke |
| 56 |
if serifs: pos1(hair,180); pos8(hair,180); |
| 57 |
rt x1l=hround(w-1.5u); lft x8r=hround u; |
| 58 |
bot y1=vround 2/3h+1; top y8=vround 1/3h-1; |
| 59 |
filldraw stroke z1e{x2-x1,10(y2-y1)}....{left}z2e; % upper arc |
| 60 |
filldraw stroke z7e{left}....{up}z8e; % lower arc |
| 61 |
path upper_arc, lower_arc; |
| 62 |
upper_arc=z1{x2-x1,10(y2-y1)}....{left}z2; |
| 63 |
lower_arc=z7{left}....{up}z8; |
| 64 |
pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0); |
| 65 |
x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r; |
| 66 |
x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8; |
| 67 |
numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1')); |
| 68 |
filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle; % upper barb |
| 69 |
t:=xpart(lower_arc intersectiontimes(z9r--z8')); |
| 70 |
filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle; % lower barb |
| 71 |
else: pos1(1.2flare,-100); pos8(1.2flare,-100); |
| 72 |
x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u; |
| 73 |
top y1l=vround .93h+o; bot y8r=vround .1h-o; |
| 74 |
filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal |
| 75 |
filldraw stroke term.e(7,8,left,1,4); fi % lower arc and terminal |
| 76 |
r:=r+w+shrink_fit; charwd:=2charwd; |
| 77 |
addto currentpicture also currentpicture shifted (w+shrink_fit,0); |
| 78 |
penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar; |