home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
useful
/
dist
/
text
/
tex
/
pastex
/
mf
/
inputs
/
eubase.mf
< prev
next >
Wrap
Text File
|
1991-07-03
|
14KB
|
412 lines
%% @metafontfile{
%% filename="eubase.mf",
%% version="2.1",
%% date="30-MAY-1991",
%% filetype="Metafont: base",
%% copyright="Copyright (C) American Mathematical Society,
%% all rights reserved. Copying of this file is
%% authorized only if either:
%% (1) you make absolutely no changes to your copy
%% including name; OR
%% (2) if you do make changes, you first rename it to some
%% other name.",
%% author="American Mathematical Society",
%% address="American Mathematical Society,
%% Technical Support Group,
%% P. O. Box 6248,
%% Providence, RI 02940,
%% USA",
%% telephone="401-455-4080 or (in the USA) 800-321-4AMS",
%% email="Internet: Tech-Support@Math.AMS.com",
%% codetable="ISO/ASCII",
%% checksumtype="line count",
%% checksum="412",
%% keywords="amsfonts, tex, metafont , euler ",
%% abstract="This is the base file for use with
%% the euler fonts in AMSFonts 2.1."
%% }
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% base file for Euler Fonts, by David Siegel and John Hobby
%def define_euler_pixels(text t) =
%forsuffixes $=t: $=$.#*hppp; endfor enddef;
pixperem = ptsize*pt;
% Beginning of change for version 2.1
% replaced the next four lines:
%h#=ptsize/programem;
%v#=h#*aspect_ratio;
% define_euler_pixels(h,v);
%v#:=h#; % DEK (I doubt if aspect_ratio<>1 will work, but this does help)
% with the following five lines:
if unknown xscale_factor: xscale_factor := 1; fi
h# = ptsize * xscale_factor / programem;
v# = ptsize / programem;
h = h#*hppp;
v = v#*vppp;
% end of change for version 2.1 4/4/91 NGB
define_pixels(leftside, rightside);
% h = pixperem/programem;
% v = pixperem/programem*aspect_ratio;
dandch = 3.94h; % dandch = (pixperem/935);
dandcv = 3.94v; % dandcv = (pixperem/935);
nwdh# = h#*programem/925; % h*3.784
nwdv# = v#*programem/925; % v*3.784
nwdh = h*programem/925;
nwdv = v*programem/925;
% dandc == dan mills and carol twombly; nwd == dave siegel -- DEK
adjustx:= 3.92;
adjusty:= 3.92;
save_leftside#:=leftside#; save_rightside#:=rightside#; % DEK
def more_side(expr s_sharp) =
leftside#:=save_leftside#+s_sharp; rightside#:=save_rightside#+s_sharp;
define_pixels(leftside,rightside);
enddef;
% ----- Fontbegin, Charbegin -----------------------------------
% --------------------------------------------------------------
transform rot;
def charbegin(expr c,w_sharp,h_sharp,d_sharp) =
begingroup
charcode:=if known c: byte c else: 0 fi;
W := w_sharp*pt;
chardx:=round(W+leftside+rightside); % desired width of character in pixels
charwd:=w_sharp+leftside#+rightside#; charht:=h_sharp; chardp:=d_sharp;
% charic:=0; clearxy; clearit; clearpen; scantokens extra_beginchar;
% rot := identity;
charic:=0; clearxy; clearit; clearpen; % DEK
rot := identity; scantokens extra_beginchar;
pair tiept[];
enddef;
def endchar(expr addwidth_sharp) =
scantokens extra_endchar;
%if proofing>0: makebox(proofrule); fi
addwidth:=addwidth_sharp*pt;
%currentpicture := currentpicture shifted (leftside+addwidth,0);
xoffset:=leftside+addwidth;
H:=charht*pt; D:=chardp*pt;
if known nohashmarks:;
else:
if proofing>0:
for y=0,H,-D*pt:
proofrule((-xoffset,y),(10-xoffset,y));
proofrule((chardx-10-xoffset,y),(chardx-xoffset,y)); endfor % horizontals
for x=-xoffset,chardx-xoffset:
proofrule((x,10-D),(x,-D)); proofrule((x,H-10),(x,H)); endfor % verticals fi
fi
fi
shipit;
%if displaying>0: makebox(screenrule); showit; fi
endgroup enddef;
def mathcorr(expr subwidth_sharp) = % DEK
charic:=subwidth_sharp; charwd:=charwd-charic;
enddef;
% ----- TeX Information: ----------------------------------------
fontdimen 1:
0, % italic correction degrees
ptsize/3, % default spacing (3em) points
0, % stretch "
0, % shrink "
(lcbody*v#), % xheight "
ptsize, % quad "
0, % math space
(1400*v#), % num1 baseline raise, for numerators, display style
(1000*v#), % num2 baseline raise, for numerators, non-atop
(1100*v#), % num3 baseline raise, for numerators, atop styles
(1400*v#), % denom1 amount to lower baselines in display style
(600*v#), % denom1 amount to lower baselines in non-display
(1500*v#), % sup1
(1400*v#), % sup2 guess at superscript raising again
(1200*v#), % sup3
(depthy*v#), % sub1 subscripts with no super
(900*v#), % sub2 maybe this is off by a little.
(1500*v#), % supdrop how much to drop below a large box
(100*v#), % supdrop how much to raise above a large box
2.2(programem*v#), % size of \comb delimiters for display
(programem*v#), % size of \comb delimiters for non-display
(950*v#); % axisheight center for fraction line
font_size ptsize;
% Adjusting stems
% revised by DEK to allow highres adjustments, 11 Aug 87
vardef set_stem_round(expr slo,s,shi,clo,c,chi) =
stem_lo:=slo*h; stem_hi:=shi*h; stem_norm:=s*h;
curve_lo:=clo*h; curve_hi:=chi*h; curve_norm:=c*h;
save a,b;
a-b = round (stem_norm - curve_norm);
a = round(.5(stem_norm + curve_norm + a - b));
stem_norm_corr := a-stem_norm; % a is normal stem width in pixels
curve_norm_corr := b-curve_norm; % b is normal curve width in pixels
enddef;
def no_stem_round = set_stem_round(-1,-1,-1,-1,-1,-1) enddef;
no_stem_round; % default is to do ordinary rounding
% The |stem_round| macro rounds its argument, forcing numbers that look like
% stem widths to round near to |stem_norm|, and similarly forcing vertical curve
% weights to round near to |curve_norm|.
def stem_round primary w = if w<0: -stem_rnd(-w) else: stem_rnd(w) fi enddef;
def stem_rnd(expr w) =
round(w
if (stem_lo<=w) and (w<=stem_hi): +stem_norm_corr
elseif (curve_lo<=w) and (w<=curve_hi): +curve_norm_corr
fi)
enddef;
% Filling cyclic paths with step width adjustment and rounding
% Before calling the |adj_fill| macro, the user should set up an
% array |t[]| and a nonnegative integer |n| so that |t[1]| through |t[n]|
% are time values on some cyclic path |p|. It should be true that |t[i]<t[j]|
% whenever |i<j|. Also |t[n]-t[1]| should be less than the length of |p|.
% The |adj_fill| macro takes four lists of time values given as indices into
% the |t| array. The avoids the necessity of writing \MF\ macros to sort
% the time values.
% Groups of paths are allowed to have points ``tied together.'' This is
% implemented by saving coordinates in a special array of type |pair|
% called |tiept|. If a path contains a point that is tied to a point in
% an already computed path, then the adjusted coordinates of that point will
% be saved in the |tiept| array. This array should be made unknown before
% starting a new group of paths; e.g., in |beginchar|.
% Make |y'a| and |y'b| rounded versions of |y.a| and |y.b|, so that
% |y'a-y'b| is as close as possible to |y.a-y.b|.
% If a time value is given as both fixed and vertical or horizontal then
% |y'a| or |y'b| or both may already be known. Then we just round what
% we can.
vardef rnd_pr_y(suffix a, b) =
if known y'a: if unknown y'b: y'b-y'a=round(y.b-y.a); fi
elseif known y'b: y'b-y'a=round(y.b-y.a);
else:
y'a-y'b = round(y.a-y.b);
y'a = round(.5(y.a + y.b + y'a - y'b));
fi
enddef;
% Rounding |x| coordinates is similar except we use the special |stem_round|
% routine.
vardef rnd_pr_x(suffix a, b) =
% use the next line if you want to see what channel settings are reasonable
% (also set tracingtitles:=1 in such a case)
% message decimal t.a&","&decimal t.b&":"&decimal((x.b-x.a)/h);
if known x'a: if unknown x'b: x'b-x'a=stem_round(x.b-x.a); fi
elseif known x'b: x'b-x'a=stem_round(x.b-x.a);
else:
x'a-x'b = stem_round(x.