Debian Codegraph @

texmf-dist/fonts/source/public/stmaryrd/stmaryba.mf

raw
1 %%% ====================================================================
2 %%% @METAFONT-file{
3 %%% author-1 = "Jeremy Gibbons",
4 %%% author-2 = "Alan Jeffrey",
5 %%% version = "1.1",
6 %%% date = "02 June 1992",
7 %%% time = "15:06:36 BST",
8 %%% filename = "stmaryba.mf",
9 %%% address-1 = "Department of Computer Science
10 %%% University of Aukland
11 %%% Private Bag
12 %%% Aukland
13 %%% New Zealand",
14 %%% address-2 = "School of Cognitive and Computing Sciences
15 %%% University of Sussex
16 %%% Brighton BN1 9QH
17 %%% UK",
18 %%% telephone-1 = "+64 9 373 7599 x 5120",
19 %%% telephone-2 = "+44 273 606755 x 3238",
20 %%% FAX-1 = "+64 9 373 7453",
21 %%% FAX-2 = "+44 273 678188",
22 %%% checksum = "49457 121 567 4939",
23 %%% email-1 = "[email protected]",
24 %%% email-2 = "[email protected]",
25 %%% codetable = "ISO/ASCII",
26 %%% keywords = "metafont symbols math fonts",
27 %%% supported = "yes",
28 %%% abstract = "This is part of the metafont program for
29 %%% the St Mary's Road symbol font.",
30 %%% docstring = "This is part of the metafont program for
31 %%% the St Mary's Road symbol font. The font
32 %%% contains a number of mathematical
33 %%% characters which are not present in the
34 %%% standard TeX and AMS symbol fonts.
35 %%%
36 %%% It is described in stmaryrd.tex.
37 %%%
38 %%% Copyright 1992 Jeremy Gibbons and Alan Jeffrey.
39 %%%
40 %%% The checksum field above contains a CRC-16
41 %%% checksum as the first value, followed by the
42 %%% equivalent of the standard UNIX wc (word
43 %%% count) utility output of lines, words, and
44 %%% characters. This is produced by Robert
45 %%% Solovay's checksum utility.",
46 %%% package = "St Mary's Road",
47 %%% dependencies = "none",
48 %%% }
49 %%% ====================================================================
50 %%%
51 %%% 20 May 1991, v1.0: Created the font out of alans.mf and galileo.mf.
52 %%%
53 %%% 2 Jun 1992, v1.1: added the headers.
54
55 % This is the base file for the St Mary's Road symbol font, stmaryrd.mf.
56
57 % The following stolen from the AMS bsymbols.mf file:
58
59 def char_negate(suffix c,t,b) = %c is center point; t is top point; b is bottom
60 pickup rule.nib;
61 w-x.t=x.b; y.t-y.c=y.c-y.b; draw z.t--z.b;
62 penlabels(t,c,b); enddef;
63 def char_center(suffix c) = % find center of type character
64 x.c=w/2; y.c=.5[-d,h]; enddef;
65
66 % The command to draw semantic brackets:
67
68 def left_semantic_bracket(expr breadth,do_top,do_bot) =
69 pickup crisp.nib;
70 numeric thickness; thickness=hround breadth;
71 pos1(thickness,0); pos2(thickness,0);
72 top y1=h; bot y2=1-d; lft x1l=lft x2l=hround(2.5u-.5thickness);
73 filldraw stroke z1e--z2e; % stem1
74 pos3(thickness,90); pos4(thickness,90);
75 pos5(thickness,90); pos6(thickness,90);
76 x3=x5=x1l; rt x4=rt x6=hround(w-.75u+.5thickness);
77 y3r=y4r=y1; y5l=y6l=y2;
78 if do_top: filldraw stroke z3e--z4e; fi % upper bar
79 if do_bot: filldraw stroke z5e--z6e; fi % lower bar
80 pos7(thickness,0); pos8(thickness,0);
81 y7=y1; y8=y2; x7=x8=x1+hround(0.5(w - 3.25u));
82 filldraw stroke z7e--z8e; % stem2
83 penlabels(1,2,3,4,5,6,7,8); enddef;
84
85 def right_semantic_bracket(expr breadth,do_top,do_bot) =
86 pickup crisp.nib;
87 numeric thickness; thickness=hround breadth;
88 pos1(thickness,0); pos2(thickness,0);
89 top y1=h; bot y2=1-d; rt x1r=rt x2r=hround(w-2.5u+.5thickness);
90 filldraw stroke z1e--z2e; % stem1
91 pos3(thickness,90); pos4(thickness,90);
92 pos5(thickness,90); pos6(thickness,90);
93 x3=x5=x1r; lft x4=lft x6=hround(.75u-.5thickness);
94 y3r=y4r=y1; y5l=y6l=y2;
95 if do_top: filldraw stroke z3e--z4e; fi % upper bar
96 if do_bot: filldraw stroke z5e--z6e; fi % lower bar
97 pos7(thickness,0); pos8(thickness,0);
98 y7=y1; y8=y2; x7=x8=x1-hround(0.5(w - 3.25u));
99 filldraw stroke z7e--z8e; % stem2
100 penlabels(1,2,3,4,5,6,7,8); enddef;
101
102 % The command to draw a circle (with free symmetry hacks):
103
104 def begincircle (expr n) =
105 beginarithchar(n);
106 pickup rule.nib;
107 if .5w <> good.x .5w: change_width; fi
108 lft x6=hround u-eps; x2=w-x6; y2=math_axis; y8-y2 = .5(x2-x6);
109 circle_points; draw_circle % circle
110 enddef;
111
112 % And to draw a box (with free symmetry hacks):
113
114 def beginbox (expr n) =
115 beginarithchar(n);
116 pickup rule.nib;
117 if .5w <> good.x .5w: change_width; fi
118 lft x1=hround 1.5u-eps; x2=w-x1; x3=x2; x4=x1;
119 y1-y4 = x2-x1; .5[y1,y4]=math_axis; y1=y2; y3=y4;
120 draw z1--z2--z3--z4--cycle; % box
121 enddef