% Compute the font construction parameters for the Computer
% Modern Sans-Serif family. Some other Computer Modern families
% compute their parameters as modifications of these.
u#:= % unit width
(if design_size < 10: ((design_size*15)+50)
%elseif design_size < 12: ((design_size*17.5)+25)
else: (-(0.0624375624375*design_size*design_size) +
(18.873626373*design_size) +
(17.507492507))fi)/360pt#;
width_adj#:= % width adjustment for certain characters
(if design_size < 9: ((design_size*10)+40)
elseif design_size < 10: ((design_size*20)-50)
%elseif design_size < 12: ((design_size*10)+50)
else: (((0.44746919746*design_size*design_size) +
(0.15567765567*design_size) +
(103.696303696))+0.0008)fi)/360pt#;
serif_fit#:= % extra sidebar near lowercase serifs
(if design_size < 10: (-(design_size*5)-20)
elseif design_size < 12: (-(design_size*10)+30)
else: (-(design_size*5.6818181818)-21.8181818184)fi)/360pt#;
cap_serif_fit#:= % extra sidebar near uppercase serifs
(if design_size < 9: (-(design_size*5)-45)
elseif design_size < 10: (-design_size*10)
elseif design_size < 12: (-(design_size*15)+50)
else: (-(design_size*7.5757575757)-39.0909091)fi)/360pt#;
letter_fit#:= % extra space added to all sidebars
0pt#;
body_height#:= % height of tallest characters
(if design_size < 10: (design_size*270)
else: (-(0.14568764568*design_size*design_size) +
(273.205128205*design_size) -
(17.482517482))fi)/360pt#;
asc_height#:= % height of lowercase ascenders
(design_size*250)/360pt#;
cap_height#:= % height of caps
(design_size*250)/360pt#;
fig_height#:= % height of numerals
(if design_size < 9: ((design_size*230)+50)
elseif design_size < 10: ((design_size*240)-40)
%elseif design_size < 12: ((design_size*235)+10)
else: (((0.23934398934*design_size*design_size) +
(229.734432234*design_size) +
(38.721278721))-0.00068)fi)/360pt#;
x_height#:= % height of lowercase without ascenders
(if design_size < 10: (design_size*160)
else: (-(2.25815850815*design_size*design_size) +
(209.679487179*design_size) -
(270.979020979))fi)/360pt#;
math_axis#:= % axis of symmetry for math symbols
(if design_size < 10: (design_size*90)
else: ((-0.0052031302031*design_size*design_size) +
(90.11446864*design_size) -
(0.62437562437))fi)/360pt#;
bar_height#:= % height of crossbar in lowercase e
(if design_size < 10: ((design_size*80)-10)
elseif design_size < 12: ((design_size*90)-110)
else: ((design_size*73.863636363)+83.636363644)fi)/360pt#;
comma_depth#:= % depth of comma below baseline
(if design_size < 10: ((design_size*40)+50)
%elseif design_size < 12: (design_size*45)
else: ((0.0624375624375*design_size*design_size) +
(43.626373626*design_size) +
(7.4925074925))fi)/360pt#;
desc_depth#:= % depth of lowercase descenders
(if design_size < 10: (design_size*70)
else: ((0.0104062604062*design_size*design_size) +
(69.771062271*design_size) +
(1.24875124875))fi)/360pt#;
crisp#:= % diameter of serif corners
0pt#;
tiny#:= % diameter of rounded corners
0pt#;
fine#:= % diameter of sharply rounded corners
0pt#;
thin_join#:= % width of extrafine details
(if design_size < 10: ((design_size*10)+70)
%elseif design_size < 12: ((design_size*15)+20)
else: ((0.0208125208125*design_size*design_size) +
(14.542124542*design_size) +
(22.497502497))fi)/360pt#;
hair#:= % lowercase hairline breadth
(if design_size < 9: ((design_size*20)+90)
elseif design_size < 10: ((design_size*10)+180)
%elseif design_size < 12: ((design_size*25)+30)
else: (((0.20812520812*design_size*design_size) +
(20.421245421*design_size) +
(54.975024975))-0.0003)fi)/360pt#;
stem#:= % lowercase stem breadth
(if design_size < 9: ((design_size*20)+90)
elseif design_size < 10: ((design_size*10)+180)
%elseif design_size < 12: ((design_size*25)+30)
else: (((0.20812520812*design_size*design_size) +
(20.421245421*design_size) +
(54.975024975))-0.0003)fi)/360pt#;
curve#:= % lowercase curve breadth
(if design_size < 9: ((design_size*20)+90)
elseif design_size < 10: ((design_size*10)+180)
%elseif design_size < 12: ((design_size*25)+30)
else: (((0.20812520812*design_size*design_size) +
(20.421245421*design_size) +
(54.975024975))-0.0003)fi)/360pt#;
ess#:= % breadth in middle of lowercase s
(if design_size < 9: ((design_size*20)+90)
elseif design_size < 10: ((design_size*10)+180)
%elseif design_size < 12: ((design_size*25)+30)
else: (((0.20812520812*design_size*design_size) +
(20.421245421*design_size) +
(54.975024975))-0.0003)fi)/360pt#;
flare#:= % diameter of bulbs or breadth of terminals
(if design_size < 9: ((design_size*20)+60)
elseif design_size < 10: ((design_size*10)+150)
elseif design_size < 12: (design_size*25)
else: ((design_size*22.727272727)+27.272727276)fi)/360pt#;
dot_size#:= % diameter of dots
(if design_size < 10: ((design_size*20)+100)
%elseif design_size < 12: ((design_size*25)+50)
else: (((0.46828171828*design_size*design_size) +
(14.697802197*design_size) +
(106.193806193))+0.0007)fi)/360pt#;
cap_hair#:= % uppercase hairline breadth
(if design_size < 9: ((design_size*20)+90)
elseif design_size < 10: ((design_size*10)+180)
%elseif design_size < 12: ((design_size*25)+30)
else: (((0.20812520812*design_size*design_size) +
(20.421245421*design_size) +
(54.975024975))-0.0003)fi)/360pt#;
cap_stem#:= % uppercase stem breadth
(if design_size < 9: ((design_size*20)+130)
elseif design_size < 10: ((design_size*10)+220)
%elseif design_size < 12: ((design_size*25)+70)
else: ((0.46828171828*design_size*design_size) +
(14.697802197*design_size) +
(126.193806193))fi)/360pt#;
cap_curve#:= % uppercase curve breadth
(if design_size < 9: ((design_size*20)+130)
elseif design_size < 10: ((design_size*10)+220)
%elseif design_size < 12: ((design_size*25)+70)
else: ((0.46828171828*design_size*design_size) +
(14.697802197*design_size) +
(126.193806193))fi)/360pt#;
cap_ess#:= % breadth in middle of uppercase s
(if design_size < 9: ((design_size*30)+40)
elseif design_size < 10: ((design_size*10)+220)
%elseif design_size < 12: ((design_size*25)+70)
else: ((0.46828171828*design_size*design_size) +
(14.697802197*design_size) +
(126.193806193))fi)/360pt#;
rule_thickness#:= % thickness of lines in math symbols
(if design_size < 7: ((design_size*3)+13)
elseif design_size < 12: ((design_size*2)+20)
else: ((design_size*3.0303030303)+7.6363636364)fi)/100pt#;
dish#:= % amount erased at top or bottom of serifs
0pt#;
bracket#:= % vertical distance from serif base to tangent
0pt#;
jut#:= % protrusion of lowercase serifs
0pt#;
cap_jut#:= % protrusion of uppercase serifs
0pt#;
beak_jut#:= % horizontal protrusion of beak serifs
0pt#;
beak#:= % vertical protrusion of beak serifs
(if design_size < 9: ((design_size*1)-4)
elseif design_size < 10: (5)
%elseif design_size < 12: (design_size*0.5)
else: ((-(0.01665001665*design_size*design_size) +
(0.8663003663*design_size) -
(1.998001998))-0.00048)fi)/360pt#;
vair#:= % vertical diameter of hairlines
(if design_size < 9: ((design_size*20)+30)
elseif design_size < 10: ((design_size*10)+120)
%elseif design_size < 12: ((design_size*20)+20)
else: (((0.37462537462*design_size*design_size) +
(11.758241758*design_size) +
(64.955044955))+0.00106)fi)/360pt#;
notch_cut#:= % maximum breadth above or below notches
(if design_size < 10: ((design_size*10)+80)
else: (-(design_size*design_size*0.14568764568) +
(design_size*23.205128205) -
(37.482517482))fi)/360pt#;
bar#:= % lowercase bar thickness
(if design_size < 9: ((design_size*20)+20)
elseif design_size < 10: ((design_size*10)+110)
%elseif design_size < 12: ((design_size*20)+10)
else: ((0.11446886446*design_size*design_size) +
(17.481684981*design_size) +
(23.736263736))fi)/360pt#;
slab#:= % serif and arm thickness
(if design_size < 9: ((design_size*20)+40)
elseif design_size < 10: ((design_size*10)+130)
elseif design_size < 12: ((design_size*20)+30)
else: ((design_size*24.6212121212)-25.45454545)fi)/360pt#;
cap_bar#:= % uppercase bar thickness
(if design_size < 9: ((design_size*20)+30)
elseif design_size < 10: ((design_size*10)+120)
%elseif design_size < 12: ((design_size*20)+20)
else: (((0.37462537462*design_size*design_size) +
(11.758241758*design_size) +
(64.955044955))+0.00106)fi)/360pt#;
cap_band#:= % uppercase thickness above/below lobes
(if design_size < 9: ((design_size*20)+10)
elseif design_size < 10: ((design_size*10)+100)
%elseif design_size < 12: (design_size*20)
else: ((0.11446886446*design_size*design_size) +
(17.481684981*design_size) +
(13.736263736))fi)/360pt#;
cap_notch_cut#:= % max breadth above/below uppercase notches
(if design_size < 9: ((design_size*20)+60)
elseif design_size < 10: ((design_size*10)+150)
else: (-(design_size*design_size*0.218531468531) +
(design_size*34.8076923076) -
76.2237762237)fi)/360pt#;
serif_drop#:= % vertical drop of sloped serifs
20/360pt#;
stem_corr#:= % for small refinements of stem breadth
10/360pt#;
vair_corr#:= % for small refinements of hairline height
10/360pt#;
apex_corr#:= % extra width at diagonal junctions
(if design_size < 10: (design_size*5)
else: (-(0.426656676656*design_size*design_size) +
(14.3864468864*design_size) -
(51.1988011988))fi)/360pt#;
o#:= % amount of overshoot for curves
(if design_size < 7: ((design_size*5)+15)
elseif design_size < 10: ((design_size*10)-20)
%elseif design_size < 12: ((design_size*5)+30)
else: ((-(0.42665667665*design_size*design_size) +
(14.386446886*design_size) -
(21.198801198))-0.00082)fi)/360pt#;
apex_o#:= % amount of overshoot for diagonal junctions
0/360pt#;
slant:= % tilt ratio $(\Delta x/\Delta y)$
0;
fudge:= % factor applied to weights of heavy characters
(if design_size < 9: ((design_size*2)+77)
elseif design_size < 14: ((design_size*1)+86)
else: (100)fi)/100;
math_spread:= % extra openness of math symbols
(if design_size < 10: (-(design_size*20)+200)
else: ((design_size*design_size*0.853313353313) -
(design_size*28.7728937728) +
202.39760239)fi)/100;
superness:= % parameter for superellipses
1/sqrt2;
superpull:= % extra openness inside bowls
1/20;
beak_darkness:= % fraction of triangle inside beak serifs
0;
ligs:= % level of ligatures to be included
(if design_size < 6: (1)
else: (2)fi);
square_dots:= % should dots be square?
true;
hefty:= % should we try hard not to be overweight?
true;
serifs:= % should serifs and bulbs be attached?
false;
monospace:= % should all characters have the same width?
false;
variant_g:= % should an italic-style g be used?
false;
low_asterisk:= % should the asterisk be centered at the axis?
false;
math_fitting:= % should math-mode spacing be used?
false;
|