Commit f9eb499d authored by Elise's avatar Elise
Browse files

first files

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
THE BBOLD SYMBOL FONT
6 APRIL 1994
This distribution contains the bbold symbol font:
INSTALL bbgreeku.mf bbold.dtx bbold17.mf bbold8.mf
README bbligs.mf bbold.mf bbold5.mf bbold9.mf
bbbase.mf bblower.mf bbold10.mf bbold6.mf bbparams.mf
bbgreekl.mf bbnum.mf bbold12.mf bbold7.mf bbpunc.mf
bbupper.mf
To install the fonts, you should:
* run METAFONT on the fonts, for example under Unix you say:
mf "\mode=localfont; input bbold5;"
mf "\mode=localfont; input bbold6;"
mf "\mode=localfont; input bbold7;"
mf "\mode=localfont; input bbold8;"
mf "\mode=localfont; input bbold9;"
mf "\mode=localfont; input bbold12;"
mf "\mode=localfont; input bbold17;"
* move bbold*.tfm into a TeX font metrics directory
* move bbold*.*pk into a TeX bitmaps directory
If you want to use the bbold font in LaTeX2e, you should:
* run LaTeX2e on bbold.dtx
* move bbold.sty and Ubbold.fd into a TeX inputs directory
* read the documentation in bbold.dvi
This file should only be distributed as part of the bbold
distribution.
Copyright 1994 Alan Jeffrey
THE BBOLD SYMBOL FONT
6 APRIL 1994
This directory contains the bbold symbol font. This is a geometric
sans serif blackboard bold font, for use in mathematics.
Read the INSTALL file for details of how to install the bbold
package.
Alan Jeffrey (alanje@cogs.susx.ac.uk)
% Blackboard bold base file, containing lots of horrible hacks.
% Alan Jeffrey, 12--18 Dec 1989.
% DIGITIZATION
% I'm doing all my own digitization, so I don't need help from MF.
autorounding := 0;
% To get the unsharp version of x#, say unsharp x#.
def unsharp = hppp * enddef;
% The only pen I'm working with is of size pen_size. This makes life
% rather easier. To find the x-coordinate whose left-hand edge is
% at hround x, say leftround x, and similarly for rightround,
% topround and bottomround.
def leftround expr x = hround x + 1/2 pen_size enddef;
def rightround expr x = hround x - 1/2 pen_size enddef;
def topround expr y = vround y - 1/2 pen_size enddef;
def bottomround expr y = vround y + 1/2 pen_size enddef;
% Using this, I can give the equivalent of define_whole_pixels...
def define_whole_top_pixels (text t) =
forsuffixes $ = t:
$ := topround unsharp $.#;
endfor
enddef;
def define_whole_bottom_pixels (text t) =
forsuffixes $ = t:
$ := bottomround unsharp $.#;
endfor
enddef;
% POINTS
% The point y~x is short for (x,y). The reason for switching the
% points around is that I find it easier to say Top~Left than
% (Left, Top).
primarydef x ~ y = (y,x) enddef;
% To find the average of two points, say p -+- q.
primarydef x ~ y = (y,x) enddef;
tertiarydef x -+- y = .5[x,y] enddef;
% To get the point 1/2fatness above p, say above p. This is useful
% for drawing lines fatness in width. Similarly we have commands
% below, leftof and rightof.
def above secondary p =
p + 1/2fatness * up
enddef;
def below secondary p =
p + 1/2fatness * down
enddef;
def leftof secondary p =
p + 1/2fatness * left
enddef;
def rightof secondary p =
p + 1/2fatness * right
enddef;
% The command farleftof is equivalent to leftof leftof, and similarly
% farrightof.
def farleftof secondary p =
p + fatness * left
enddef;
def farrightof secondary p =
p + fatness * right
enddef;
% To get curves with o-correction, we need to be able to move
% o pixels up or down.
def oabove secondary p =
p + o * up
enddef;
def obelow secondary p =
p + o * down
enddef;
% DECLARATIONS
% To declare a new variable foo of type T, say var (T) foo.
def var (text type) text declarations =
save declarations;
type declarations
enddef;
% PATHS
% Given a cyclic path p, outline p draws the path and fills the inside
% with white. This is stolen from the MF book, exercise 13.11.
def outline expr c =
begingroup
picture region;
region := nullpicture;
interim turningcheck := 0;
addto region contour c;
cull region dropping (0,0);
cullit;
addto currentpicture also -region;
cullit;
draw c
endgroup
enddef;
% Given a path p, leftside p is the path 1/2 fatness to its left,
% and similarly rightside.
def leftside primary apath =
apath shifted (1/2fatness * left)
enddef;
def rightside primary apath =
apath shifted (1/2fatness * right)
enddef;
% Given a path p, fatten p draws the leftside of p,
% the rightside of p, and joins them up with straight lines.
def fatten expr apath =
leftside apath
-- (reverse rightside apath)
-- cycle
enddef;
% Given a point p, splodge p draws an o-corrected circle of radius
% fatness around p.
def splodge expr apoint =
above apoint + o*up {right}
.. rightof apoint + o*right {down}
.. below apoint + o*down {left}
.. leftof apoint + o*left {up}
.. cycle
enddef;
% The command splodgel does the same, but doesn't close the cycle,
% and leaves the current point at the left of the circle.
def splodgel tertiary apoint =
leftof apoint + o*left {up}
.. above apoint + o*up {right}
.. rightof apoint + o*right {down}
.. below apoint + o*down {left}
.. leftof apoint + o*left {up}
enddef;
% Similarly, splodger leaves the current point at the right of the
% circle.
def splodger tertiary apoint =
rightof apoint + o*right {down}
.. below apoint + o*down {left}
.. leftof apoint + o*left {up}
.. above apoint + o*up {right}
.. rightof apoint + o*right {down}
enddef;
% CLIPPING
% sometime (p, q) gives the time along p when it intersects q.
def sometime (expr apath, bpath) =
xpart (apath intersectiontimes bpath)
enddef;
% othertime (p, q) gives another time at which p intersects q.
def othertime (expr apath, bpath) =
length apath - sometime (reverse apath) (reverse bpath)
enddef;
% firsttime (p, q) gives the smallest of sometime (p,q) and othertime (p,q).
def firsttime (expr apath, bpath) =
min (sometime (apath) (bpath), othertime (apath) (bpath))
enddef;
% lasttime (p, q) gives the largest of the two times.
def lasttime (expr apath, bpath) =
max (sometime (apath) (bpath), othertime (apath) (bpath))
enddef;
% We can then clip p with q by finding the subpath of p from 0 to
% the time p intersects q.
def cliponce (expr apath, clippath) =
subpath (0, sometime (apath) (clippath)) of apath
enddef;
% Similarly, if p intersects q twice, we can find the path between
% the two times it intersects with cliptwice.
def cliptwice (expr apath, clippath) =
subpath
(firsttime (apath) (clippath), lasttime (apath) (clippath))
of apath
enddef;
% Given a path p and two paths q and r which intersect p,
% we can find the path between when p crosses q and when p crosses r.
% someclipbetween (p, q, r) will always start at q and finish at r.
def someclipbetween (expr apath, firstclip, secondclip) =
subpath
(sometime (apath) (firstclip),
sometime (apath) (secondclip))
of
apath
enddef;
% firstclipbetween does the same, but if p intersects q and r more
% than once, it gives the first clipping.
def firstclipbetween (expr apath, firstclip, secondclip) =
subpath
(firsttime (apath) (firstclip),
firsttime (apath) (secondclip))
of
apath
enddef;
% lastclipbetween gives the last clipping.
def lastclipbetween (expr apath, firstclip, secondclip) =
subpath
(lasttime (apath) (firstclip),
lasttime (apath) (secondclip))
of
apath
enddef;
% We can join these together and clip fat lines.
def fatcliponce (expr apath, clippath) =
cliponce (leftside apath) (clippath)
-- someclipbetween (clippath) (leftside apath) (rightside apath)
-- reverse cliponce (rightside apath) (clippath)
-- cycle
enddef;
def fatcliptwice (expr apath, clippath) =
cliptwice (leftside apath) (clippath)
-- lastclipbetween (clippath) (leftside apath) (rightside apath)
-- cliptwice (rightside apath) (reverse clippath)
-- firstclipbetween (clippath) (rightside apath) (leftside apath)
-- cycle
enddef;
% BBCHAR.
% bbchar (c) (l#, w#, r#) (t#, b#) begins a character at code c,
% of width w# with l# gap at the left and r# gap at the right.
% It's topmost point is at t# and its bottommost point at b#.
% From these parameters we calculate Width (the width of the character
% in whole pixels) and hardTop and hardBottom (the exact top and bottom
% of the character). Top is then 1/2 pensize from the top of the character,
% and Bottom is 1/2 pensize from the bottom. This means if we draw a line
% through top, the top of it will exactly touch the top. We then calculate
% Left, Middle, and Right in the same way, using calculateLeftetc.
def bbchar
(expr code)
(expr sharphardLeft, sharpWidth, sharprightgap)
(expr sharphardTop, sharphardBottom) =
beginchar
(code)
(sharphardLeft + sharpWidth + sharprightgap)
(max (sharphardTop, 0pt#))
(max (-sharphardBottom, 0pt#));
save Top, Bottom, Horizon, hardTop, hardBottom,
Width, hardLeft, hardRight, Left, Right, Middle;
hardTop# = sharphardTop;
hardBottom# = sharphardBottom;
Width# = sharpWidth;
hardLeft# = sharphardLeft;
hardRight# = sharphardLeft + sharpWidth;
define_whole_pixels (Width);
define_whole_vertical_pixels (hardTop, hardBottom);
Top = topround hardTop;
Bottom = bottomround hardBottom;
Horizon = .5 [Top, Bottom];
calculateLeftetc;
pickup pencircle scaled pen_size;
enddef;
def calculateLeftetc =
hardLeft := floor (unsharp hardLeft#);
hardRight := hardLeft + Width;
Left := (hardLeft + 1/2pen_size);
Middle := (hardLeft + 1/2Width);
Right := (hardRight - 1/2pen_size);
enddef;
% bbcap is bbchar with the top at ATop# and the bottom at aBottom#.
def bbcap (expr code, leftgap, width, rightgap) =
bbchar (code) (leftgap, width, rightgap) (ATop#, aBottom#);
enddef;
% bbnum is bbchar with the dimensions of a number hard-wired.
def bbnum (expr code) =
bbchar (code) (medgap#, numeral#, medgap#) (oneTop#, aBottom#);
enddef;
% For characters such as < and > which appear a lot blacker than the
% others, we can surround the character by beginblacker n ... endblacker,
% which temporarily multiplies fatness by n.
def beginblacker expr blackness =
begingroup
save oldfatness;
oldfatness# := fatness#;
save fatness;
fatness# := oldfatness# * blackness;
define_whole_pixels (fatness)
enddef;
let endblacker = endgroup;
% SYMMETRY
% To try to get characters symmetric, we need to round the width so there
% are the same number of characters on the left of the central vertical
% as there are on the right. So if we are symmetrical around a pen of
% size 2n, we need to make the width even. If we are symmetrical around
% a pen of size 2n+1 we need to make the width odd. This is done with
% roundlike (x) y, which rounds y to be even iff x is even.
def roundlike (expr x) expr y =
2 * (round (x -+- y)) - x
enddef;
% To make the character symmetric, we round Width like pen_size.
def symmetric =
Width := roundlike (pen_size) unsharp Width#;
calculateLeftetc
enddef;
% To make the character symmetric around a fat vertical, we round
% Width like fatness + pen_size.
def fatsymmetric =
Width := roundlike (fatness + pen_size) unsharp Width#;
calculateLeftetc
enddef;
% DRAWING THE CHARACTERS ON THE SCREEN
% makebox and maketicks nicked from cmbase, adjusted for this job.
def makebox(text rule) =
for y=0, hardBottom, hardTop:
rule((0,y)t_,(w,y)t_); endfor % horizontals
for x=0,hardLeft,hardRight,w:
rule((x,hardBottom)t_,(x,hardTop)t_); endfor % verticals
enddef;
def maketicks(text rule) =
for y=0, hardBottom, hardTop:
rule((-10,y)t_,(0,y)t_); % horizontals at left
rule((w,y)t_,(w+10,y)t_); % horizontals at right
endfor
for x=0,hardLeft,hardRight,w:
rule((x,hardBottom-10)t_,(x,hardBottom)t_); % verticals at bottom
rule((x,hardTop)t_,(x,hardTop+10)t_); % verticals at top
endfor % verticals at top
enddef;
% HACKS TO MAKE CMR WORK
% Some parameters I never use, but are needed by the cmr parameter files.
boolean
square_dots, hefty, serifs, monospace,
variant_g, low_asterisk, math_fitting;
% And that's that.
% Blackboard bold lower case Greek, Alan Jeffrey, 15--18 Dec 1989.
%
% These characters occupy spaces oct "013" to oct "040", and oct "177".
% This is because ! occupies oct "041" and I have to stick omega
% somewhere.
% -------------------------------------------------------------------
bbchar
(oct "013")
(smallgap#, medlower#, smallgap# + jut#)
(aTop#, aBottom#);
"Lowercase Greek alpha";
% The curve.
var (path) alphapath;
alphapath
= Top~(Right + jut) {down}
.. obelow Bottom~Middle {left}
.. Horizon~Left {up}
.. oabove Top~Middle {right}
.. Bottom~(Right + jut){right};
% The emphasis.
draw
fatcliptwice
(rightof obelow Bottom~Left -- rightof oabove Top~Left)
(alphapath);
% The curve.
draw alphapath
endchar;
% -------------------------------------------------------------------
bbchar
(oct "014")
(medgap#, smalllower# + fatness#, smallgap#)
(bTop#, gBottom#);
"Lowercase Greek beta";
% The top curve.
var (path) betapath;
betapath
= aBottom~Left
--- aTop~Left
.. oabove rightof Top~Middle {right}
.. (Top -+- aTop)~Right {down}
.. rightof aTop~Middle {left};
% The emphasis
draw
fatcliponce
(rightof Bottom~Left -- rightof oabove Top~Left)
(betapath);
% The top curve.
draw betapath;
% The bottom curve.
draw
rightof aTop~Middle {right}
.. aMiddle~Right {down}
.. obelow rightof aBottom~Middle {left}
.. farrightof (aBottom + cCurl)~Left
endchar;
% -------------------------------------------------------------------
bbchar
(oct "015")
(smallgap#, medlower#, smallgap#)
(aTop#, gBottom#);
"Lowercase Greek gamma";
% The curve.
var (path) gammapath;
gammapath
= Top~Left {right}
.. aBottom~Right {down}
.. obelow Bottom~Middle {left}
.. aBottom~Left {up}
.. Top~Right {right};
% The emphasis.
draw
fatcliptwice
(obelow rightof Bottom~Left -- rightof Top~Left)
(subpath (1,infinity) of gammapath);
% The curve.
draw gammapath
endchar;
% -------------------------------------------------------------------
bbchar
(oct "016")
(smallgap#, medlower#, smallgap#)
(bTop#, aBottom#);
"Lowercase Greek delta";
% The path.
var (path) deltapath;
deltapath
= aTop~Middle {left}
.. aMiddle~Left {down}
.. obelow Bottom~Middle {right}
.. aMiddle~Right {up}
.. aTop~Middle
.. (aTop -+- Top)~Left {up}
.. oabove Top~Middle {right}
.. (Top - cCurl)~Right;
% The emphasis, clipped by the first bit of the curve (ie the bowl).
draw
fatcliptwice
(obelow rightof Bottom~Left -- rightof Top~Left)
(subpath (0,4) of deltapath);
% The curve.
draw deltapath
endchar;
% -------------------------------------------------------------------
bbchar
(oct "017")
(smallgap#, medlower#, smallgap#)
(aTop#, aBottom#);
"Lowercase Greek epsilon";
% The curve.
var (path) epsilonpath;
epsilonpath
= (Top - cCurl)~Right
.. oabove Top~Middle {left}
.. aMiddle~Left {down}
.. obelow Bottom~Middle {right}
.. (Bottom + cCurl)~Right;
% The emphasis.
draw
fatcliptwice
(obelow rightof Bottom~Left -- oabove rightof Top~Left)
(epsilonpath);
% The curve.
draw epsilonpath;
% The bar.
draw
farrightof eBar~Left
-- farrightof eBar~(Left + jut)
endchar;
% -------------------------------------------------------------------
bbchar
(oct "020")
(medgap#, smalllower#, smallgap#)
(bTop#, gBottom#);
"Lowercase Greek zeta";
% The curl.
var (path) zetapath;
zetapath
= Top~Right
.. aMiddle~Left {down}
.. aBottom~Middle
.. (aBottom -+- Bottom)~Right {down}
.. Bottom~(Right - jut) {left};
% The emphasis.
draw
fatcliptwice
(rightof Bottom~Left -- rightof Top~Left)
(zetapath);
% The curl.
draw zetapath
endchar;
% -------------------------------------------------------------------
bbchar
(oct "021")
(medgap#, smalllower# + fatness#, medgap#)
(aTop#, gBottom#);
"Lowercase Greek eta";
% The emphasis.
draw
fatten
rightof aBottom~Left
-- rightof Top~Left;