summaryrefslogtreecommitdiff
path: root/fonts/mbboard/source/mbbromxu.mf
blob: 7f62dd86444b66fbf893846d9620acb15823ef19 (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
% blackboard typefaces by Anthony Phan.
% file: mbbromxu.mf (extended roman uppercase)
% last modification: 25.10.2001.

% Crossed letters are no more generated.
% They appear only with Cork encoding.

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

use_rule2;

beginchar(bbAE,15.25u#+2appr#,cap_height#,0);
  "The letter AE";
  italcorr cap_height#*slant-.5u#;
  pickup circle.nib;
  rt x5=rt x8=w-apprr; rt x5-lft x6=rt x8-lft x7=hround 7.5u;
  top y5=top y9=top y6=h; bot y7=bot y10=bot y8=0;
  lft x11=x10=x9=x6+hthick; bot y11=bot y12=vround 0.5h;
  rt x12=w-apprr-hround 0.7u;
  z1l=(apprl-0.5u,0); z2l=(lft x6,h);
  penpos1(diag_width(thin,z2l-z1l),0);
  penpos2(diag_width(thin,z2l-z1l),0);
  y0=y2l; x0=x6; z2a=whatever[z6,z7]; z2a=whatever[z1r,z2r];
  bot y3=bot y4=vround 0.25h; x4=x6; z3=whatever[z1,z2];
  fill z1l--z1r--z2a--z0--z2l--cycle; draw z3..z4; draw z9..z10;
  pickup square.nib; draw z5--z6--z7--z8; draw z11..z12;
  labels(range 3 thru 12); penlabels(0,1,2);
  math_fit(0,0.5ic#);
endchar;

beginchar(bbOE,16u#+2appr#,cap_height#,0);
  "The letter OE";
  italcorr cap_height#*slant-.5u#;% not perfect at all...
  numeric t[];
  pickup circle.nib;
  y1=y3=0.5[y4,y2]; top y2=h+o; bot y4=-o; x2=x4=0.5[x3,x1];
  lft x3=apprl; x1=x13+hThick-hthick;
  rt x9=rt x12=w-apprr; rt x9-lft x10=rt x12-lft x11=hround 7.5u;
  top y9=top y13=top y10=h; bot y11=bot y14=bot y12=0;
  lft x15=x14=x13=x10+hthick; bot y15=bot y16=vround 0.5h;
  rt x16=w-apprr-hround 0.7u;
  tmp_path:=superellipse(z1,z2,z3,z4,superness);
  bbbowl(z2,z3,z4,hThick) tmp_path;
  t1=xpart(tmp_path intersectiontimes ((x10,y2)..(x10,y3)));
  t2=xpart(tmp_path intersectiontimes ((x10,y3)..(x10,y4)));
  z7=point t2 of tmp_path; z8=point t1 of tmp_path;
  draw z10..z8&subpath(t1,t2) of tmp_path&z7..z11; draw z13..z14;
  pickup square.nib; draw z9--z10--z11--z12; draw z15..z16;
  labels(range 1 thru 16);
  math_fit(0,0.5ic#);
endchar;

beginchar(bbslash_O,13u#+2appr#,cap_height#+0.5desc_depth#,0.5desc_depth#);
  "The letter slash O";
  italcorr 0.7cap_height#*slant-.5u#;
  pickup circle.nib;
  bbcircle1(apprl,w-apprr,cap_height+o,-o); 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);
  math_fit(0.3cap_height#*slant-0.5u#,ic#);
endchar;

iff known bbEng:
beginchar(bbEng,12u#+Appr#+appr#,cap_height#,0);
  "The letter Eng";
  italcorr 0.8cap_height#*slant-.5u#;
  pickup circle.nib;
  lft x1=lft x3=Apprl; rt x7=rt x8=w-apprr; x4-x3=x2-x1=hthick;
  x5=x4; x6=0.5[x4,x7]; x9=0.5[x10,x8]; rt x8-lft x10=hround(7.2u);
  if x10<x2: x10:=x2; fi
  bot y1=bot y2=0; top y3=top y4=h; y5=y7; top y6=h+o;  y6-y7=y8-y9;
  top y8=top y10=vround 0.3h; bot y9=-o;
  tmp_path:=z5 up_to_right z6 right_to_down z7..z8 down_to_left
  z9 left_to_up z10;
  draw tmp_path;
  hbbowl(z6,z7,0.5[z7,z8],hthick) tmp_path;
  hbbowl(z9,z8,0.5[z7,z8],hthick) tmp_path;
  pickup square.nib;
  draw z1--z2--z4--z3--cycle;
  square_end10(up);
  labels(1,2,3,4,5,6,7,8,9,10);
endchar;

iff known bbThorn:
beginchar(bbThorn,10.15u#+Appr#+appr#,cap_height#,0);
  "The letter Thorn";
  italcorr 0.6cap_height#*slant-.5u#;
  pickup circle.nib;
  lft x1=lft x2=Apprl; rt x7=w-apprr;
  x3=x4=x5=x9=x1+hthick; x6=x8=0.5[x1,x7];
  bot y1=bot y4=0; top y2=top y3=h;
  top y5=top y6=vround 0.825h;
  bot y8=bot y9=vround 0.225h;
  y7=0.5[y8,y6];
  tmp_path:=z5..z6 right_to_down z7 down_to_left z8..z9;
  bbbowl(z6,z7,z8,hThick) tmp_path; draw tmp_path;
  pickup square.nib; draw z1--z2--z3--z4--cycle;
  labels(1,2,3,4,5,6,7,8,9);
endchar;