Debian Codegraph @

texmf-dist/fonts/source/public/bbold/bbparams.mf

raw
1 % Blackboard bold parameters, Alan Jeffrey 14--18 Dec 1989.
2 %
3 % These parameters are deduced from those set in bboldNN.mf.
4 %
5 % The only horizontal parameter we take in is the unit u#,
6 % from which we calculate all the horizontal distances.
7 %
8 % The distance between the two strokes in a fat line is fatness.
9
10 fatness# := 2.3u#;
11
12 % The size of a pen is rule_thickness.
13
14 pen_size# := rule_thickness#;
15
16 % Characters with space inside them (for example the
17 % gap between the bar and the dot in a ! have either smallspace,
18 % space# or bigspace# worth of space.
19
20 smallspace# := u#;
21 space# := 2u#;
22 bigspace# := 3u#;
23
24 % Characters with bits jutting out of them (for example the feet in
25 % ] or the bar in f) have jut# worth of stick-outiness.
26
27 jut# := 1.5u#;
28 bigjut# := 2.5u#;
29
30 % Some characters are exactly fatness# + pen_size# wide, as they are
31 % drawn with just one vertical line.
32 %
33 % tiny --- I, i, l, |, ,, :, ;, ., `, ', !.
34 %
35 % Others have a small amount jutting out from the side, like the
36 % top and bottom of a ].
37 %
38 % tiny+jut --- [, ], (, ).
39
40 tiny# := fatness# + pen_size#;
41
42 % Upper case characters come in three sizes:
43 %
44 % small --- B, E, F, J, K, L, P, R, S, Gamma, Pi, ?, $, /, \,
45 %
46 % medium --- A, C, D, G, H, M, N, O, Q, T, U, V, X, Y, Z,
47 % Delta, Theta, Lamba, Xi, Sigma, Upsilon, Phi, Psi, Omega,
48 %
49 % big --- W.
50
51 smallcap# := 9u#;
52 medcap# := 10u#;
53 bigcap# := 14u#;
54
55 % Lower case characters come in three sizes:
56 %
57 % small --- f, j, s, t,
58 %
59 % small + fatness --- h, k, n, r,
60 %
61 % medium --- a, c, d, e, g, o, q, u, v, x, y, z,
62 %
63 % medium + fatness --- b, p,
64 %
65 % big --- m, w.
66 %
67 % The letters with verticals at the left have fatness added on
68 % so that the curves are the same size as the other letters.
69
70 smalllower# := 6u#;
71 medlower# := 7.5u#;
72 biglower# := 11u#;
73
74 % Numerals are all the same size.
75
76 numeral# := 8u#;
77
78 % Arithmetic operators (in this case just +) are all the same size.
79
80 arithmetic# := 12u#;
81
82 % Characters have three kinds of space at the side:
83 %
84 % small --- for example around a T,
85 %
86 % medium --- for example around an O,
87 %
88 % large --- for example around an I.
89
90 smallgap# := 1/2u#;
91 medgap# := 1u#;
92 biggap# := 1.5u#;
93
94 % Whereas we've only got one horizontal measurement stolen from cmr,
95 % there are lots of vertical ones. We can use these to work out
96 % our measurements.
97 %
98 % Characters can have various top positions:
99 %
100 % ATop --- the top of all capitals, Greek, and some punctuation,
101 %
102 % aTop --- the top of lower case without ascenders,
103 %
104 % bTop --- the top of lower case with ascenders,
105 %
106 % iTop --- the top of i and j,
107 %
108 % oneTop --- the top of numerals,
109 %
110 % bracketTop --- the top of a bracket (also the top of the body size).
111
112 ATop# := cap_height#;
113 aTop# := x_height#;
114 bTop# := asc_height#;
115 oneTop# := fig_height#;
116 bracketTop# := body_height#;
117 iTop# := min(x_height# + space# + fatness#, asc_height#);
118
119 % The bottoms of characters can be:
120 %
121 % aBottom --- the base line,
122 %
123 % gBottom --- the bottom of a descender,
124 %
125 % bracketBottom --- the bottom of a bracket (also the bottom of the body).
126
127 aBottom# := 0pt#;
128 gBottom# := -desc_depth#;
129 .5 [bracketBottom#, bracketTop#] = math_axis#; % Brackets are centered.
130
131 % Various characters such as A, B, G, e, and 3 have bars in them.
132
133 ABar# := .25 [aBottom#, ATop#];
134 BBar# := .52 [aBottom#, ATop#]; % number nicked from cmr.
135 GBar# := .50 [aBottom#, ATop#];
136 eBar# := bar_height#;
137 threeBar# := .54[aBottom#, oneTop#]; % number nicked from cmr.
138
139 % The top of a Q's tail is at QTailTop, and the bottom is at QTailBottom.
140
141 QTailTop# := .28 [aBottom#, ATop#]; % number nicked from cmr.
142 QTailBottom# := aBottom# - comma_depth#; % number nicked from cmr.
143
144 % Various sorts of letters have various amounts of curl in them.
145 %
146 % CCurl --- the amount the end of a C curls,
147 % cCurl --- the amount the end of a c curls,
148 % gCurl --- the amount the tail of a g curls,
149 % hCurl --- the distance from the bottom of an h to the point where
150 % the right of the curve becomes vertical.
151
152 CCurl# := .2 (ATop# - aBottom#);
153 cCurl# := .2 (aTop# - aBottom#);
154 gCurl# := .2 (aBottom# - gBottom#);
155 hCurl# := .4 (aTop# - aBottom#);
156
157 % The numbers five, six and eight have bowls, which are sixBowl# tall.
158
159 sixBowl# := aTop# - aBottom#; % These bowls are as tall as an a.
160
161 % A less than (and a greater than) is lessthan# tall.
162
163 lessthan# := math_spread [5/4x_height#, 3/2x_height#]; % Numbers from cmr.
164
165 % Right, I'll now turn these nice sharp measurements into grotty
166 % approximate pixelly ones.
167
168 define_corrected_pixels (o);
169
170 define_whole_blacker_pixels
171 (pen_size);
172
173 define_whole_pixels
174 (fatness, jut, bigjut, smallspace, space, bigspace);
175
176 define_whole_vertical_pixels
177 (CCurl, cCurl, gCurl, hCurl, sixBowl);
178
179 define_whole_top_pixels
180 (ATop, aTop, bTop, oneTop, bracketTop, QTailTop);
181
182 define_whole_bottom_pixels
183 (QTailBottom, aBottom, gBottom, bracketBottom);
184
185 pickup pencircle scaled pen_size;
186 define_good_y_pixels
187 (ABar, BBar, GBar, eBar, threeBar);
188
189 % And now some handy numbers, which I don't need sharp versions of.
190
191 aMiddle := .5[aBottom, aTop];
192 dashMiddle := .61803 [aBottom, aTop]; % Number stolen from cmr.
193
194 % I can now set the font parameters for the TFM files, stolen from cmr.
195
196 font_normal_space := 6u#;
197 font_normal_stretch := 3u#;
198 font_normal_shrink := 2u#;
199 font_quad := 18u#;
200 font_extra_space := 2u#;
201 font_x_height := x_height#;
202
203 % And that's that.
204
205