summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/lxfonts/lroman.mf
blob: e45809ba84dfd1ac33d3b3cdbf41a3e4df9b968c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
% This is the driver file lroman.mf based on roman.mf in the
% Computer Modern Roman family of fonts (by D. E. Knuth, 1979--1985)
% It differs from roman.mf only in that it has been
% adjusted to change capital I with a special uppercase I
% for the Slides fonts: llcmss8, llcmssb8, llcmssi8 and llcmsso8.
% Also the lower case l has been modified in order to avoid confusions
% with other glyphs.
% Written by Pierre A. MacKay, 16 Sept. 1986
% and modified by Claudio Beccari, 1999

if ligs>1: font_coding_scheme:="TeX text";
 spanish_shriek=oct"074"; spanish_query=oct"076";
else: font_coding_scheme:=if ligs=0: "TeX typewriter text"
  else: "TeX text without f-ligatures" fi;
 spanish_shriek=oct"016"; spanish_query=oct"017"; fi

mode_setup; font_setup;

 input romanu;  % upper case (majuscules)
 input romanl;  % lower case (minuscules)
 input greeku;  % upper case Greek letters
 input romand;  % numerals
 input romanp;  % ampersand, question marks, currency sign
 input romspl;  % lowercase specials (dotless \i, ligature \ae, etc.)
 input romspu;  % uppercase specials (\AE, \OE, \O)
 input punct;  % punctuation symbols common to roman and italic text
 input accent;  % accents common to roman and italic text



if ligs>1: input romlig; fi  % letter ligatures
if ligs>0: input comlig; fi  % ligatures common with italic text
if ligs<=1: input romsub; fi  % substitutes for ligatures

% Redrawing capital I

cmchar "The modified letter I";
beginchar("I",max(6u#,4u#+cap_stem#),cap_height#,0);
italcorr cap_height#*slant-.25u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
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;           % arms
pos5(hair,90); pos6(hair,90); % top arm
lft x5= hround(u);rt x6=hround(w-u); top y5r=top y6r= top y1;
filldraw stroke z5e--z6e;
pos7(hair,-90); pos8(hair,-90); % bottom arm
x7=x5; x6=x8;
bot y7r= bot y8r= bot y2;
filldraw stroke z7e--z8e;
math_fit(0,.5ic#); penlabels(1,2,5,6,7,8); endchar;

% Redrawing lower case l

cmchar "The modified letter l";
beginchar("l",6u#+max(u#,.5stem#),
 min(asc_height#,if hefty:9/7 else:10/7 fi\\ x_height#),0);
italcorr x_height#*slant  -.4u#;
adjust_fit(-(u#-stem#/5.5), -.5u#);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib;
pos1(shaved_stem,180);
pos2(shaved_stem,180);
pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2.5u-.5shaved_stem);
y2=x_height;
y3=max(.5bar_height,2vair);
top y1=h; x1=x2;
interim superness:=more_super;
pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u);
 pos5(vair,-75); top y5l=vround .2[top y4l,bar_height];
 x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair;
 filldraw stroke z1e--z2e..super_arc.e(3,4);  % stem and hook
 path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e;  % terminal
 if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0):
  filldraw stroke z4e{right}...{up}z5e;
 else: filldraw p; fi;
penlabels(1,2,3,4,5,6,7,8); endchar;

% Redrawing ligature fl

cmchar "The modified ligature fl";
beginchar(oct"015",12u#+2letter_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib;
pos1(stem',0);
lft x1l=hround(2.5u-.5stem');
pickup fine.nib; numeric bulb_diam, inner_jut; % letter f
pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u;
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
pos3(bar,90); pos4(bar,90);
rt x4= hround 5.3u;
pickup crisp.nib; filldraw stroke z3e--z4e;  % bar
%
pos11(stem',180);pos12(stem',180);pos13(stem',180); %letter l
lft x12r=lft x13r=hround(x2+1.5u);y12=x_height;
y13=max(.5bar_height,2vair);top y11=h; x11=x12;
interim superness:=more_super;
pos14(vair',-90); bot y14r=-oo; rt x15r=hround(w-u);
 pos15(vair,-75); top y15l=vround .2[top y14l,bar_height];
 x15l:=good.x x15l; x14l=1/3[x13l,x15l]; x14r:=1/3[x13r,x15r]; y13l:=y13l+.2vair;
 filldraw stroke z11e--z12e..super_arc.e(13,14);  % stem and hook
 path p; p=stroke z14e{right}..tension .9 and atleast 1..z15e;  % terminal
 if (xpart(z15l-precontrol 1 of p)<0) or (xpart(z15r-postcontrol 2 of p)<0):
  filldraw stroke z14e{right}...{up}z15e;
 else: filldraw p; fi;
penlabels(1,2,3,4,11,12,13,14,15); endchar;

% Redrawing ligature ffl

cmchar "The modified ligature ffl";
beginchar(oct"017",15u#+4letter_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,2u#+serif_fit#);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem'); % the double f
pos11(stem',0); lft x11l=hround(.5w-.5stem');
pickup fine.nib; numeric bulb_diam, inner_jut;
 pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.75u;
 pos12(5/7[vair,flare],90); y12=y2; rt x12=hround(.5w+2.8u);
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal
f_stroke(11,12,d,e,f,inner_jut,inner_jut); % middle ditto
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround.5u-1;
pos3(bar,90); pos4(bar,90);
rt x4=hround(.5w+2.8u);
pos3'(bar,90); x3'-x1=x4-x11; y3'=y3;
 pos4'(bar,90); x4'=x11; y4'=y4;
 filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e;  % bars
%
pos21(stem',180);pos22(stem',180);pos23(stem',180); %letter l
lft x22r=lft x23r=hround(x12+1.5u);y22=x_height;
y23=max(.5bar_height,2vair);top y21=h; x21=x22;
interim superness:=more_super;
pos24(vair',-90); bot y24r=-oo; rt x25r=hround(x23r+4u);
 pos25(vair,-75); top y25l=vround .2[top y24l,bar_height];
 x25l:=good.x x25l; x24l=1/3[x23l,x25l]; x24r:=1/3[x23r,x25r]; y23l:=y23l+.2vair;
 filldraw stroke z21e--z22e..super_arc.e(23,24);  % stem and hook
 path p; p=stroke z24e{right}..tension .9 and atleast 1..z25e;  % terminal
 if (xpart(z25l-precontrol 1 of p)<0) or (xpart(z25r-postcontrol 2 of p)<0):
  filldraw stroke z24e{right}...{up}z25e;
 else: filldraw p; fi;
penlabels(1,2,3,4,11,12,21,22,23,24,25); endchar;

%% Modified accents

cmchar "Breve accent";
beginchar(oct"025",9u#,min(asc_height#,2x_height#),0);
italcorr h#*slant+.5vair#-1.5u#;
adjust_fit(0,0);
pickup crisp.nib; pos1(vair,-180); pos3(vair,0);
numeric mid_thickness; mid_thickness=vround 1/3[vair,stem];
pos2(mid_thickness,-90); x2=.5w;
bot y2r=vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness);
top y1=top y3=max(h,top y2l+.8vair); lft x1r=w-rt x3r=hround(2u-.5vair);
filldraw stroke z1e{down}...z2e{right}...{up}z3e;  % stroke
penlabels(1,2,3); endchar;


cmchar "Scandinavian circle accent";
beginchar(oct"027",13u#+4/3(asc_height#-x_height#)*slant,asc_height#,0);
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric circ_hair,circ_vair;
circ_hair=hround min(hair,u+.5); %circ_vair=vround min(vair,(h-x_height)/6+.5);
circ_vair=circ_hair;
penpos1(circ_vair,90); penpos3(circ_vair,-90);
penpos2(circ_hair,180); penpos4(circ_hair,0);
x2r=hround(.5w-u-.5circ_hair);
x4r=w-x2r; x1=x3=.5w;
y2=y4=.5[y1,y3];
y3r=vround(1/3[x_height,h]+apex_o); y1r-y3r=x4r-x2r;
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;

iff ligs>0: cmchar "Dot accent";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar(oct"137",5u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant+.5dot_diam#-2u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
x1=x2=.5w; z1=z2;
y2l= vround(.5[x_height,h]+apex_o);
dot(1,2);  % dot
penlabels(1,2); endchar;

cmchar "Umlaut (double dot) accent";
numeric dot_diam#,dot_diam;
dot_diam#=max(dot_size#,cap_curve#);
beginchar(oct"177",9u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
dot_diam=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr));
italcorr h#*slant+.5dot_diam#-2.25u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
x1=x2=2.75u; z1=z2;
y2l= vround(.5[x_height,h]+apex_o);
dot(1,2);  % left dot
pos3(dot_diam,0); penpos4(y2r-y2l,90); y3=y4=y1; x3=x4=w-x1;
dot(3,4);  % right dot
penlabels(1,2,3,4); endchar;


ligtable "!": "`" =: spanish_shriek;
ligtable "?": "`" =: spanish_query;
font_slant slant; font_x_height x_height#;
if monospace: font_normal_space 9u#; % no stretching or shrinking
 font_quad 18u#;
 font_extra_space 9u#;
else: font_normal_space 6u#+2letter_fit#;
 font_normal_stretch 3u#; font_normal_shrink 2u#;
 font_quad 18u#+4letter_fit#;
 font_extra_space 2u#;
 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
 ligtable "k": if serifs: "v": "a" kern -u#, fi\\"w": "e" kern k#,
  "a" kern k#, "o" kern k#, "c" kern k#;
 ligtable "P": "A" kern kk#,
  "y": "o" kern k#, "e" kern k#, "a" kern k#, "." kern kk#, "," kern kk#;
 ligtable "F": "V": "W": if serifs: "o" kern kk#, "e" kern kk#, "u" kern kk#,
    "r" kern kk#, "a" kern kk#, "A" kern kkk#,
   else: "o" kern k#, "e" kern k#, "u" kern k#,
    "r" kern k#, "a" kern k#, "A" kern kk#, fi
  "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#;
 ligtable "T": "y" kern if serifs: k# else: kk# fi,
  "Y": "e" kern kk#, "o" kern kk#,
   "r" kern kk#, "a" kern kk#, "A" kern kk#, "u" kern kk#;
 ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#,
   "V" kern k#, "Y" kern k#;
 if serifs: ligtable "h": "m": "n":
   "t" kern k#, "u" kern k#, "b" kern k#, "y" kern k#, "v" kern k#, "w" kern k#;
  ligtable "c": "h" kern k#, "k" kern k#; fi
 ligtable "o": "b": "p": "e" kern -k#, "o" kern -k#, "x" kern k#,
   "d" kern -k#, "c" kern -k#, "q" kern -k#,
  "a": if serifs: "v" kern k#, "j" kern u#, else: "r" kern k#, fi
  "t": "y" kern k#,
  "u": "w" kern k#;
 ligtable "A": if serifs: "R": fi\\ "t" kern k#,
  "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#,
  "L": "T" kern kk#, "Y" kern kk#, "V" kern kkk#, "W" kern kkk#;
 ligtable "g": "j" kern -k#; % logjam
 ligtable "I": "I" kern -k#; fi % Richard III
 ligtable "l": "e" kern k#, "o" kern k#;
 % there are ligature/kern programs for |"f"| in the {\tt romlig} file
 % and for |"-"|, |"`"|, and |"'"| in the {\tt comlig} file
bye.