% File:       MF Inputs sromanu.mf
% Author:     Pierre A. MacKay
% Internet:   mackay@cs.washington.edu
% Date:       June 25, 1991
%
% This for the SLITeX fonts: lcmss8, lcmssb8, lcmssi8.
% All characters in romanu.mf except I are generated
% A special I with slab serifs is then substituted for the
% normal, confusing, sans-serif I of cmss* fonts.
% Based on the macros in the METAFONTbook, Appendix E,
% page 307 & 312.  Just as in the case of the iff
% macro, this depends on the expectation that every
% character program will end with endchar.

string currenttitle;
def exclude_I expr t =
  currenttitle:= t;
  if t = "The letter I" : let next_ = lose_it_
  else: let next_ = use_it_ fi; next_ enddef;
% Add _ to the macro names used by iff to avoid confusion.
def use_it_ = relax; enddef;
def lose_it_ = let endchar = fi; let ; = fix_ semi_
  if false: enddef;
let cmchar = exclude_I;
input romanu
let cmchar=relax;

% Uppercase I provided by Pierre A. MacKay, in June l986.
% The I has slab serifs based on the proportions of
% the upper and lower horizontals of upper case E.

cmchar "The 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 based on proportions of uppercase E
pos3(slab,90); pos4(slab if not serifs:+2stem_corr fi,-90);
x3=x4=x1; top y3r=h; bot y4r=0;
pos5(hair,0); pos6(hair,0); % top and bottom right arms
rt x5r=rt x6r=hround(w-u);
pos7(hair,180); pos8(hair,180); % top and bottom left arms
lft x7r=lft x8r=hround(u);
y5=y7=good.y(y3l-beak)-eps; % beak in case we ever want a beaked serif!
y6=y8=good.y(y4l+beak)+eps; % watch that this doesn't get too heavy
arm(3,5,a,darkness,jut); arm(3,7,b,darkness,jut); % top left and right arms
arm(4,6,c,darkness,jut); arm(4,8,d,darkness,jut); % bottom left and right
if serifs: dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut);  % upper serif
 dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut);  fi % lower serif
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8); endchar;

endinput;
