Debian Codegraph @

texmf-dist/fonts/source/public/cm/romanp.mf

raw
1 % THIS IS THE OFFICIAL COMPUTER MODERN SOURCE FILE romanp.mf BY D E KNUTH.
2 % IT MUST NOT BE MODIFIED IN ANY WAY UNLESS THE FILE NAME IS CHANGED!
3
4 % This file contains `\$' and `\&' and `?' in the so-called roman style.
5
6 % Codes \0044, \0046, and \0077 are generated, as well as code |spanish_query|
7 % (for a Spanish question mark) if that code value is known.
8
9 cmchar "Dollar sign";
10 beginchar("$",9u#,body_height#,body_height#-asc_height#);
11 italcorr fig_height#*slant-.5u#; % same as for digits
12 adjust_fit(0,0);
13 numeric theta; theta=90-angle(50u,asc_height); slope:=-asc_height/50u;
14 pickup fine.nib; pos2(slab,-90);
15 pos0(cap_stem,theta); pos7(slab,-90);
16 x2=x0=x7=.5w; top y2l=asc_height+oo; bot y7r=-oo;
17 y0=.52asc_height; lft x3l=hround u; rt x6r=hround(w-u);
18 x3r-x3l=x6r-x6l=hround .35[slab,cap_stem]-fine;
19 ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
20 ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
21 filldraw stroke super_arc.e(2,3) & z3e{down}
22 ..z4e---z5e..z6e{down} & super_arc.e(6,7); % main stroke
23 if serifs: pos1(hair,0); pos8(hair,180);
24 pos10(flare,0); pos9(flare,180);
25 rt x1r=hround(w-u); lft x8r=hround u; y1=.5[y0,y2]; y8=.5[y0,y7];
26 {{less_tense; pos2'(slab,90); z2'=z2; bulb(2',1,10); % upper arc and bulb
27 bulb(7,8,9)}}; % lower arc and bulb
28 else: pos1(.6[slab,flare],-100); pos8(flare,-100);
29 rt x1l=hround(w-1.3u); lft x8r=hround .8u;
30 top y1l=vround .92asc_height+oo; bot y8r=vround .1asc_height-oo;
31 filldraw stroke term.e(2,1,right,.9,4); % upper arc and terminal
32 filldraw stroke term.e(7,8,left,1,4); fi % lower arc and terminal
33 pickup crisp.nib; pos12(bar,0); pos11(bar,0);
34 lft x12l=lft x11l=hround(.5w-.5bar); top y12=h; bot y11=-d;
35 filldraw stroke z12e--z11e; % vertical crossbar
36 penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar;
37
38 cmchar "Ampersand";
39 beginchar("&",14u#,asc_height#,0);
40 italcorr x_height#*slant-serif_fit# - if serifs: .4u# else: 1.5u# fi;
41 adjust_fit(0,serif_fit#);
42 pickup tiny.nib; pos2(slab,-90); x2=4u; bot y2r=-o;
43 if not hefty:(x,y2l)=whatever[z2r,(w-5u,x_height)]; x2l:=x; fi
44 if serifs: pos0(fudged.hair,0);
45 rt x0r+jut=hround(w-.9u); top y0=x_height;
46 pos1(fudged.hair,0); z1=whatever[z0,(.6[x0,x2],0)];
47 y1=max(y0-1.5bracket-.2x_height,2/3x_height);
48 filldraw stroke z0e---z1e...{left}z2e; % short diagonal
49 else: pickup fine.nib; pos1(.25[slab,flare],-15); rt x1r=hround(w-2u);
50 y1r=good.y .75[bar_height,x_height]; x1l:=good.x x1l; y1l:=good.y y1l;
51 top z2'l=(x2l,tiny.top y2l); bot z2'r=(x2r,tiny.bot y2r);
52 filldraw stroke term.e(2',1,right,1,4); fi % short diagonal and terminal
53 pickup tiny.nib; numeric slope,theta,reduced_hair;
54 slope=(h-2vair-slab)/10.5u; theta=angle(-slope,1);
55 reduced_hair=max(tiny.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
56 lft x3r=hround .75u; x5=.5[x3r,x6l]; lft x6r=hround .5(w-u);
57 x3l-x3r=curve-tiny; pos6(reduced_hair,180);
58 pos5(vair,theta); y5=.5h;
59 ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r);
60 pos7(vair,270); top y7l=h+o; x7=.45[x6r,x8r];
61 pos8(fudged.stem,30); x8l=good.x(x8l+3.5u-x8); y8r=y6;
62 ellipse_set(7l,6l,5',5l);
63 filldraw stroke z2e{left}...z3e{up}...z4e---z5e...{up}z6e
64 ...z7e{left}...z8e{down}; % bowls
65 pos10(slab,90); x10=w-3.5u; bot y10l=-o;
66 pos9(fudged.stem,angle(z8-z10)-90);
67 z9=.5[z8,z10]+(1.75u,0) rotated(angle(z8-z10)+90);
68 filldraw stroke z8e{down}...z9e{z10-z8}...{right}z10e; % long diagonal
69 if serifs: pickup crisp.nib; pos10'(slab,90); z10'=z10;
70 pos11(fudged.hair,180); rt x11l=hround(w-u); y11=.5bar_height;
71 filldraw stroke z10'e{right}...{up}z11e; % terminal
72 numeric inner_jut; if rt x6l+.5u<lft x0l-1.5jut: inner_jut=1.5jut;
73 else: rt x6l+.5u=lft x0l-inner_jut; fi
74 dish_serif(0,1,a,.6,inner_jut,b,.5,jut)(dark); % serif
75 else: pickup fine.nib; pos10'(slab,90); z10'=z10;
76 pos11(Vround .5[slab,flare],90);
77 rt x11=hround(r-letter_fit-u); bot y11l=vround .07bar_height-o;
78 filldraw stroke term.e(10',11,right,1,4); fi % terminal
79 penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
80
81 cmchar "Question mark";
82 beginchar("?",8.5u#,asc_height#,0);
83 italcorr .8asc_height#*slant;
84 adjust_fit(0,0);
85 pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
86 lft x7l=hround(.5w-.25u-.5dot_size); bot y8l=0; z7=z8; dot(7,8); % dot
87 numeric bot_width;
88 bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
89 pickup fine.nib; pos2(vair,90); pos3(curve,0);
90 pos4(vair,-90); pos5(bot_width,0); pos6(bot_width,0);
91 x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.25[top y8r,x_height];
92 top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
93 {{interim superness:=more_super;
94 filldraw stroke pulled_super_arc.e(2,3)(superpull)
95 & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}}; % arc and stem
96 if serifs: pos1(hair,180); pos0(flare,180);
97 lft x1r=hround u; y1=y3; bulb(2,1,0); % bulb
98 else: pos1(Vround 5/7[vair,flare],110);
99 lft x1r=hround u; top y1r=vround .9[y6,top y2r];
100 filldraw stroke term.e(2,1,left,1,4); fi % terminal
101 penlabels(0,1,2,3,4,5,6,7,8); endchar;
102
103 iff known spanish_query: cmchar "Spanish open question mark";
104 beginchar(spanish_query,8.5u#,asc_height#-desc_depth#,desc_depth#);
105 adjust_fit(0,0);
106 pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
107 lft x7l=hround(.5w-.25u-.5dot_size); top y8r=h; z7=z8; dot(7,8); % dot
108 numeric top_width;
109 top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
110 pickup fine.nib; pos2(vair,270); pos3(curve,180);
111 pos4(vair,90); pos5(top_width,180); pos6(top_width,180);
112 x2=x4=x5=x6=x7; lft x3r=hround u; top y6=.25[bot y8l,h-x_height]-1;
113 bot y2r=-d-oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
114 {{interim superness:=more_super;
115 filldraw stroke pulled_super_arc.e(2,3)(superpull)
116 & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}}; % arc and stem
117 if serifs: pos1(hair,0); pos0(flare,0);
118 rt x1r=hround(w-u); y1=y3; bulb(2,1,0); % bulb
119 else: pos1(Vround 5/7[vair,flare],-70);
120 rt x1r=hround(w-u); bot y1r=vround .9[y6,bot y2r];
121 filldraw stroke term.e(2,1,right,1,4); fi % terminal
122 penlabels(0,1,2,3,4,5,6,7,8); endchar;