summaryrefslogtreecommitdiff
path: root/fonts/mbboard/source/mbbromxl.mf
blob: 591ef4767110451c089a9a1293c4a15066f75240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
% blackboard typefaces by Anthony Phan.
% file: mbbromxl.mf (extended roman lowercase)
% last modification: 25.10.2001.

% Crossed letters are no more generated (except `bbcross_d').
% They appear only with Cork encoding.

def horizontal_rules_list=
 -body_depth,-desc_depth,0.5x_height,x_height,cap_height,
 asc_height,body_height
enddef;

use_rule1;

numeric slash_width;
slash_width=hround(3.8u+hthick+thin);

beginchar(bbes_zet,8u#+2appr#,asc_height#,0);
 "German letter es-zet";
 italcorr 0.5[x_height#,asc_height#]*slant-.5u#;
 pickup circle.nib;
 lft x1=lft x2=apprl; rt x4=w-apprr;
 rt x6=w-apprr+ho; x3=x5=0.5[x1,x4]; x8-x1=hthick;
 bot y1=0; top y3=h+oo; top y5=x_height;
 y2=y4=0.5[y5,y3]; y6=0.5[y7,y5];
 if ab_down_factor>0: bot y7=-oo;
  x7=ab_down_factor[(x1+x6)/2,(x1+x4+2x6)/4];
  y8=ab_down_factor[top 0,y5];
 else: bot y7=bot y8=0; x7=0.5[x1,x6]; fi
 tmp_path:=z1..z2 up_to_right z3 right_to_down z4
 down_to_left z5 &z5 right_to_down z6 down_to_left z7
 if ab_down_factor>0: left_to_up else: .. fi z8;
 draw tmp_path;
 bbbowl(z5,z6,z7,hThick) tmp_path;
 bbbowl(z3,z4,z5,max(0,x4-x.bowl.mid)) tmp_path;
 hbbowl(z3,z2,z1,hthick) tmp_path;
 pickup square.nib; draw z1..z.bowl.bot;
 square_end5(left);
 labels(1,2,3,4,5,6,7,8);
endchar;

iff variant_a:
beginchar(bbae,16u#+ho#-thin#-hThick#+2appr#,x_height#,0);
 "The letter ae";
 italcorr 0.6x_height#*slant+ho#-.5u#;
 save tmp_path; path tmp_path[]; numeric t[];
 % `a' part
 center_bar(5,4); x3=x4;
 lft x1=apprl+hround 0.2u;
 top y2=h+uo; bot y4=0; y3=0.3[y2+oo-uo,y4];
 bot y1=vround max(0.72h,y3);
 tmp_path1:=z4..z3 & elliptic_arc(3,2,1);
 hbbowl(z2,z3,z4,hthick) tmp_path1; z5=z.bowl.bot;
 x11=x7=x5; lft x9=apprl-ho; x8=0.5[x9,0.5[x5,x4]];
 if ab_down_factor>0: bot y8=-oo; y7=ab_down_factor[y4,bot h];
 else: y8=y7=y4; fi
 top y11=min(vround 0.7h,top y3); slope:=(y11-y4)/16u;
 ellipse_set(8,9,10,11);
 tmp_path2=z7 if ab_down_factor>0: down_to_left else: .. fi
 z8 left_to_up z9...z10---z11;
 if straight_bowl: bbbowl(z11,z9,z8,hThick) tmp_path2;
 else: begingroup interim superness:=superbowl;
   draw 0.5[z10,z11]{z10-z11}...(x9+hThick,y9) down_to_right z8;
  endgroup; fi
 draw tmp_path1; draw tmp_path2;
 pickup square.nib; draw z4..z5;
 square_end1(z1-z1');
 % `e' part
 pickup circle.nib;
 rt x14=w-apprr+ho; x5-x16=ho; x19=x4;
 x15=x17=0.5[x14,x16];
 top y15=h+uo; bot y17=-oo;
 y14=y16=y19=good.y(0.5[y15,y17]);
 tmp_path3=superellipse(z14,z15,z16,z17,superness);
 t1=xpart(tmp_path3 intersectiontimes tmp_path1);
 t2=xpart(tmp_path3 intersectiontimes ((x4,y16)..(x4,y17)));
 t3=xpart(tmp_path3 intersectiontimes
  (bot(w/2,0.25[y17,y15])..bot(w,0.25[y17,y15])));
 z18=point t3 of tmp_path3;
 draw subpath (0,t1) of tmp_path3;
 draw z4--subpath (t2,t3) of tmp_path3;
 hbbowl(z15,z14,z14,hThick) tmp_path3;
 x19r=x19l=x19; x14r=x14; x14m=x14l=rt x14;
 y19r=y14r=top y14; y14m=y14; y14l=y19l=bot y14;
 fill z14l--z14m--z14r--z19r--z19l--cycle;
 square_end18(direction t3 of tmp_path3);
 labels(range 1 thru 19,14m,14l,14r,19l,19r);
endchar;

iff not variant_a:
beginchar(bbae,16u#+ho#-thin#-hThick#+2appr#,x_height#,0);
 "The letter ae";
 italcorr 0.6x_height#*slant+ho#-.5u#;
 center_bar(17',17);
 begingroup save apprr; apprr=w-rt x17;
  complete_left_lower(ab_down_factor,ab_up_factor);
 endgroup;
 numeric t[];
 pickup circle.nib;
 rt x12=w-apprr+ho; x17'-x14=ho;
 x13=x15=0.5[x12,x14];
 top y13=h+uo; bot y15=-oo;
 y12=y14=y17=y17'=good.y(0.5[y13,y15]);
 tmp_path:=superellipse(z12,z13,z14,z15,superness);
 t1=xpart(tmp_path intersectiontimes ((x1,y14)..(x1,y13)));
 t2=xpart(tmp_path intersectiontimes ((x1,y14)..(x1,y15)));
 t3=xpart(tmp_path intersectiontimes
  (bot(w/2,0.25[y15,y13])..bot(w,0.25[y15,y13])));
 z16=point t3 of tmp_path;
 draw subpath (0,t1) of tmp_path--z17;
 draw z17--subpath (t2,t3) of tmp_path;
 hbbowl(z13,z12,z12,hThick) tmp_path;
 x17r=x17l=x17; x12r=x12; x12m=x12l=rt x12;
 y17r=y12r=top y12; y12m=y12; y12l=y17l=bot y12;
 fill z12l--z12m--z12r--z17r--z17l--cycle;
 square_end16(direction t3 of tmp_path);
 labels(12,12m,12l,12r,13,14,15,16,17,17',17l,17r,18,19);
endchar;

beginchar(bboe,16u#+2ho#-thin#-hThick#+2appr#,x_height#,0);
 "The letter oe";
 italcorr 0.6x_height#*slant+ho#-.5u#;
 numeric t;
 pickup circle.nib;
 top y2=top y6=h+uo; bot y4=bot y8=-oo;
 y1=y3=y5=y7=good.y(0.5[y2,y4]);
 lft x3=apprl-ho; rt x5=w-apprr+ho;
 x2=x4=0.5[x3,x1]; x6=x8=0.5[x7,x5]; x1-x3=x5-x7;
 x1-x7=hThick; tmp_path:=superellipse(z1,z2,z3,z4,superness);
 tmpp_path:=superellipse(z5,z6,z7,z8,superness);
 bbbowl(z2,z3,z4,hThick) tmp_path;
 t=xpart(tmpp_path intersectiontimes
  (bot(x8,0.25[y8,y6])..bot(w,0.25[y8,y6])));
 z13=point t of tmpp_path;
 draw tmp_path;
 draw subpath (0,t) of tmpp_path;
 hbbowl(z6,z5,z5,hThick) tmpp_path;
 x1r=x1l=x1; x5r=x5; x5m=x5l=rt x5;
 y1r=y5r=top y5; y5m=y5; y5l=y1l=bot y5;
 fill z5l--z5m--z5r--z1r--z1l--cycle;
 square_end13(direction t of tmpp_path);
 labels(range 1 thru 16,5m,5l,5r,1l,1r);
endchar;

beginchar(bbslash_o,8u#+2appr#,x_height#+0.5desc_depth#,0.5desc_depth#);
 "The letter slash o";
 italcorr 0.6x_height#*slant+ho#-.5u#;% not perfect at all...
 pickup circle.nib;
 bbcircle1(apprl-ho,w-apprr+ho,x_height+uo,-oo); draw last_path;
 bbbowl(z1b,z1a,z1d,hThick) last_path; z3=z.bowl.top;
 bbbowl(z1b,z1c,z1d,hThick) last_path; z2=z.bowl.bot;
 y4=-d; y5=h;
 z4=whatever[z2,z3]; z5=whatever[z2,z3];
 penpos4(diag_width(thin,z3-z2),0);
 penpos5(diag_width(thin,z3-z2),0);
 penstroke z4e..z5e; penlabels(2,3,4,5);
endchar;

iff known bbcross_d:
beginchar(bbcross_d,8u#+2appr#,asc_height#,0);
 "The letter crossed d";
 italcorr asc_height#*slant-1.5u#;
 pickup circle.nib;
 top y1=top y2=h; bot y4=-oo;
 top y6=x_height if ab_up_factor>0: +oo fi;
 y3=0.4[y4,y2]; y5=0.5[y4,y6]; if ab_up_factor>0:
  y7=ab_up_factor[bot x_height, top 0]; else: y7=y6; fi
 lft x1=apprl+hround u; rt x3=w-apprr+ho; lft x5=apprl-ho;
 x3-x7=hThick; x4=x6=0.5[x5,x3]; x2=0.25[x1,x7];
 tmp_path:=z1..z2 right_to_down z3 down_to_left z4
 left_to_up z5 up_to_right z6;
 draw tmp_path;
 bbbowl(z6,z5,z4,hThick) tmp_path;
 hbbowl(z2,(x3,y7),(x3,y7),x3-x7) tmp_path;
 hbbowl(z4,(x3,y5),(x3,y7),x3-x7) tmp_path;
 draw z6 if ab_up_factor>0: right_to_down else: .. fi z7;
 x8=x1; rt x9=w-apprr-hround u; y9=y2;
 y8=good.y 0.3[y6,y1]; draw z8..z9;
 square_end1(left); square_end8(z8-z9);
 square_end9(z8-z9);
 labels(1,2,3,4,5,6,7,8,9);
endchar;

iff known bbeng:
beginchar(bbeng,8u#+2appr#,x_height#,desc_depth#);
 "Lowercase eng";
 italcorr 0.75x_height#*slant-.5u#;
 j_bar:=true; complete_n;
endchar;

iff known bbthorn:
beginchar(bbthorn,8u#+2appr#,asc_height#,desc_depth#);
 "Lowercase thorn";
 italcorr 0.6x_height#*slant+ho#-.5u#;
 complete_right_lower(lower_down_curve_factor,lower_up_curve_factor);
endchar;