home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD2.bin
/
bbs
/
text
/
pastex-1.3-7of9.lha
/
PasTeX
/
MF
/
inputs
/
dc
/
dxbase.mf
< prev
next >
Wrap
Text File
|
1994-04-12
|
58KB
|
1,488 lines
% This is DXBASE.MF in text format, as of March 24, 1992
%
% DC fonts Version 1.1 (prerelease of EC fonts)
%
% [ heavily borrowed from the Computer Modern Roman family of
% fonts by D. E. Knuth ]
%
% Content:
%
% The base file needed for generation of the DC fonts
%
%
% This is DXBASE.MF in text format, as of May 5, 1986.
% The base file for Computer Modern (a supplement to {\tt plain.mf})
dxbase:=1; % when |dcbase| or |dxbase| is known, this file has been input
dcbase:=1;
boolean classic_serif; classic_serif := false;
boolean suppress_i_dot; suppress_i_dot :=false;
let dcchar=\; % `|dcchar|' should precede each character
let generate=input; % `|generate|' should follow the parameters
autorounding:=0; smoothing:=0; % we do our own rounding
def autorounded = interim autorounding:=2 enddef;
newinternal slant,fudge,math_spread,superness,superpull,beak_darkness,ligs;
boolean square_dots,hefty,serifs,
monospace,variant_g,low_asterisk,math_fitting;
boolean dark,dark.dark,skewed,skewed.skewed; % for fast option testing
dark=skewed=false; dark.dark=skewed.skewed=true;
vardef Vround primary y = y_:=vround y;
if y_<min_Vround: min_Vround else: y_ fi enddef;
newinternal y_,min_Vround;
vardef serif(suffix $,$$,@) % serif at |z$| for stroke from |z$$|
(expr darkness,jut) suffix modifier =
pickup crisp.nib; numeric bracket_height; pair downward;
bracket_height=if dark.modifier: 1.5 fi\\ bracket;
if y$<y$$: y@2=min(y$+bracket_height,y$$);
top y@1-slab=bot y@0+eps=tiny.bot y$; downward=z$-z$$;
if y@1>y@2: y@2:=y@1; fi
else: y@2=max(y$-bracket_height,y$$);
bot y@1+slab=top y@0-eps=tiny.top y$; downward=z$$-z$;
if y@1<y@2: y@2:=y@1; fi fi
y@3=y@2; z@3=whatever[z$,z$$];
if jut<0: z@2+penoffset downward of currentpen =
z$l+penoffset downward of pen_[tiny.nib]+whatever*downward;
lft x@0=lft x@1=tiny.lft x$l+jut;
if x@3<x@2+eps: x@3:=x@2+eps; fi
else: z@2-penoffset downward of currentpen =
z$r-penoffset downward of pen_[tiny.nib]+whatever*downward;
rt x@0=rt x@1=tiny.rt x$r+jut;
if x@3>x@2-eps: x@3:=x@2-eps; fi fi
pair corner; ypart corner=y@1; corner=z@2+whatever*downward;
filldraw z@2{z$-z$$}
...darkness[corner,.5[z@1,z@2] ]{z@1-z@2}
...{jut,0}z@1--z@0--(x$,y@0)--z@3--cycle; % the serif
labels (@1,@2); enddef;
def dish_serif(suffix $,$$,@)(expr left_darkness,left_jut)
(suffix @@)(expr right_darkness,right_jut) suffix modifier =
serif($,$$,@,left_darkness,-left_jut) modifier;
serif($,$$,@@,right_darkness,right_jut) modifier;
if dish>0: pickup tiny.nib; numeric dish_out,dish_in;
if y$<y$$: dish_out=bot y$; dish_in=dish_out+dish; let rev_=reverse;
else: dish_out=top y$; dish_in=dish_out-dish; let rev_=relax; fi
erase fill rev_
((x@1,dish_out)..(x$,dish_in){right}..(x@@1,dish_out)--cycle);
fi enddef;
def nodish_serif(suffix $,$$,@)(expr left_darkness,left_jut)
(suffix @@)(expr right_darkness,right_jut) suffix modifier =
serif($,$$,@,left_darkness,-left_jut) modifier;
serif($,$$,@@,right_darkness,right_jut) modifier; enddef;
vardef sloped_serif.l(suffix $,$$,@)(expr darkness,jut,drop) =
pickup crisp.nib; pos@2(slab,90);
lft x@0=tiny.lft x$l; rt x@1=tiny.rt x$r; top y@1=tiny.top y$r;
lft x@2=lft x@0-jut; y@2r=y@1-drop;
y@0=max(y@2l-bracket,y$$)-eps;
if drop>0: erase fill z@1--top z@1
--(x@2r,top y@1)--z@2r--cycle; fi % erase excess at top
filldraw z@1--z@2r--z@2l{right}
...darkness[(x@0,y@2l),.5[z@2l,z@0] ]{z@0-z@2l}
...{down}z@0--(x@1,y@0)--cycle; % sloped serif
labels(@0,@1,@2); enddef;
vardef sloped_serif.r(suffix $,$$,@)(expr darkness,jut,drop) =
pickup crisp.nib; pos@2(slab,-90);
rt x@0=tiny.rt x$r; lft x@1=tiny.lft x$l; bot y@1=tiny.bot y$l;
rt x@2=rt x@0+jut; y@2r=y@1+drop;
y@0=min(y@2l+bracket,y$$)+eps;
if drop>0: erase fill z@1--bot z@1
--(x@2r,bot y@1)--z@2r--cycle; fi % erase excess at bottom
filldraw z@1--z@2r--z@2l{left}
...darkness[(x@0,y@2l),.5[z@2l,z@0] ]{z@0-z@2l}
...{up}z@0--(x@1,y@0)--cycle; % sloped serif
labels(@0,@1,@2); enddef;
vardef term.l(suffix $,$$)(expr d,t,s)= % ``robust'' sans-serif terminal
path p_; p_=z$l{d}..tension t..z$$l;
pair d_; d_=(x$$l-x$l,s*(y$$l-y$l));
if (abs angle direction 1 of p_ < abs angle d_)<>(x$l<x$$l):
p_:=z$l{d}..tension atleast t..{d_}z$$l; fi
p_ enddef;
vardef term.r(suffix $,$$)(expr d,t,s)=
path p_; p_=z$r{d}..tension t..z$$r;
pair d_; d_=(x$$r-x$r,s*(y$$r-y$r));
if (abs angle direction 1 of p_ < abs angle d_)<>(x$r<x$$r):
p_:=z$r{d}..tension atleast t..{d_}z$$r; fi
p_ enddef;
def rterm=reverse term enddef;
vardef arm(suffix $,$$,@)(expr darkness,jut) = % arm from |z$| to |z$$|
x@0=good.x(x$$r-jut); y@0=y$r;
if serifs: y@1=y$l; z@1=z$$l+whatever*(z$$r-z@0);
z@2=.5[z$l,z@1];
filldraw z$$l{z@1-z$$l}...darkness[z@1,.5[z@2,z$$l] ]...z@2
---z$l--z$r--z@0--z$$r--cycle; % arm and beak
else: filldraw z$l--z$r--z@0--z$$r--cycle; fi % sans-serif arm
penlabels(@0,@1,@2); enddef;
def pi_stroke = pickup fine.nib;
pos1(hair,0); pos2(vstem,-90); pos3(vstem,-90);
x1-.5hair=hround -.5hair; x2=2u; x3=w-1.5u;
y1=x_height-x_height/3.141592653589793; y2=y3; top y3l=x_height;
filldraw circ_stroke z3e---z2e...{x1-x2,3.14159(y1-y2)}z1e enddef;
def eng_stroke(suffix $,@,@@,$$)(expr raise) =
penpos$$(x@@r-x@@l,0); x$$=x@@; bot y$$=.21h;
y@@=1/4[bar_height,x_height]+raise; % 1/3
penpos$''(x$r-x$l,0); x$''=x$;
y$''=1/8[bar_height,x_height]+raise;
filldraw stroke z$''e--z$e; % thicken the lower left stem
penpos@0(min(rt x$r-lft x$l,thin_join)-fine,180); pickup fine.nib;
rt x@0l=tiny.rt x$r; y@0=y$'';
pos@1(vair,90); pos@@'(x@@r-x@@l+tiny,0); z@@'=z@@;
x@1=.5[rt x@0l,rt x@@'r];
top y@1r=x_height+oo+raise;
(x@,y@1l)=whatever[z@1r,z@0l]; x@1l:=x@;
filldraw stroke z@0e{up}...{right}z@1e
&{{interim superness:=hein_super; super_arc.e(@1,@@')}}; % arch
pickup tiny.nib; filldraw stroke z@@e--z$$e; % right stem
labels(@0); penlabels(@1); enddef;
def bulb(suffix $,$$,$$$) =
z$$$r=z$$r;
path_.l:=z$l{x$$r-x$r,0}...{0,y$$r-y$r}z$$l;
filldraw path_.l--z$$r{0,y$r-y$$r}...{x$r-x$$r,0}z$r--cycle; % link
path_.r:=z$$$l{0,y$r-y$$r}..z$$$r{0,y$$r-y$r}; % near-circle
filldraw subpath(0,xpart(path_.r intersectiontimes path_.l)) of path_.r
--z$$r{0,y$$r-y$r}..cycle; % bulb
enddef;
def v_bulb(suffix $,$$)= % |pos$| is known
y$$+.5curve=x_height+oo; x$$+.5curve=w-u;
numeric theta; theta=angle(4(x$-x$$),y$-y$$); pos$$(curve,theta+90);
filldraw z$$l{dir theta}..tension atleast 1 and 1..{down}z$l
--z$r{up}...{-dir theta}z$$r..cycle; % bulb
enddef;
def dot(suffix $,$$) =
filldraw if square_dots: (x$l,y$$l)--(x$r,y$$l)
--(x$r,y$$r)--(x$l,y$$r)--cycle % squarish dot
else: z$l...z$$l...z$r...z$$r...cycle fi % roundish dot
enddef;
def comma(suffix $,@)(expr dot_size,jut,depth) =
pickup fine.nib; pos$(dot_size,90);
if square_dots: pos$'(dot_size,0); z$'=z$; dot($',$); % squarish dot
comma_join_:=max(fine.breadth,floor .7dot_size);
comma_bot_:=max(fine.breadth,floor .5dot_size);
pos@0(comma_join_,0); pos@1(comma_join_,0);
pos@2(comma_bot_,0); y@0=y$; y@1=y$l; y@2=y@1-depth;
x@0r=x@1r=x$'r; rt x@2r=good.x(x$-eps);
filldraw stroke z@0e--z@1e..z@2e; % tail
else: pos@1(vair,90); pos@2(vair,0); pos@3(vair,-45);
z@1r=z$r; rt x@2r=hround(x$+.5dot_size+jut)+2eps; x@3=x$-.5u;
y@2=1/3[y@1,y@3]; bot y@3r=vround(y$-.5dot_size-depth);
y_:=ypart((z@1{right}...z@2{down}...z@3)
intersectiontimes (z$l{right}..{left}z$r)); if y_<0: y_:=1; fi
filldraw z$r{left}..subpath (0,y_) of (z$l{right}..{left}z$r)--cycle; % dot
filldraw stroke z@1e{right}...z@2e{down}...z@3e; fi % tail
penlabels(@1,@2,@3); enddef;
def ammoc(suffix $,@)(expr dot_size,jut,depth) = % reversed comma
pickup fine.nib; pos$(dot_size,90);
if square_dots: pos$'(dot_size,0); z$'=z$; dot($',$); % squarish dot
comma_join_:=max(fine.breadth,floor .7dot_size);
comma_top_:=max(fine.breadth,floor .5dot_size);
pos@0(comma_join_,0); pos@1(comma_join_,0);
pos@2(comma_top_,0); y@0=y$; y@1=y$r; y@2=y@1+depth;
x@0l=x@1l=x$'l; lft x@2l=good.x(x$+eps);
filldraw stroke z@0e--z@1e..z@2e; % tail
else: pos@1(vair,90); pos@2(vair,0); pos@3(vair,-45);
z@1l=z$l; lft x@2l=hround(x$-.5dot_size