summaryrefslogtreecommitdiff
path: root/fonts/mbboard/source/mbbaccnt.mf
blob: 536c470bca592120b8f12fc3c26483e7467f9c29 (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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
% blackboard typefaces by Anthony Phan.
% file: mbbaccnt.mf (accents)
% last modification: 25.10.2001.

diacritics_proofing;% changes extra_endchar for proof mode.

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

% italic corrections to be revised

use_rule1;

numeric tmp_h; tmp_h=x_height;

beginchar(bbgrave,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Grave accent";
  italcorr asc_height#*slant-0.5u#;
  complete_grave(apprl,apprr);
endchar;

beginchar(bbacute,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Acute accent";
  italcorr asc_height#*slant-0.5u#;
  complete_acute(apprl,apprr);
endchar;

beginchar(bbcircumflex,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Circumflex accent";
  italcorr asc_height#*slant-0.5u#;
  complete_hat(apprl,apprr);
endchar;

iff known bbwide_circumflex:
beginchar(bbwide_circumflex,10u#+2appr#,min(asc_height#,2x_height#),0);
  "Wide circumflex accent";
  italcorr asc_height#*slant-0.5u#;
  complete_hat(apprl,apprr);
endchar;

beginchar(bbhacheck,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Hackeck accent";
  italcorr asc_height#*slant-0.5u#;
  complete_hacheck(apprl,apprr);
endchar;

beginchar(bbtilde,8u#+2appr#,min(asc_height#,2x_height#),0);
  "The tilde accent";
  italcorr asc_height#*slant-0.5u#;
  numeric a; if square_dots: a=0; else: a=hround 0.5u; fi
  complete_tilde(apprl+a,apprr+a); 
endchar;

iff known bbwide_tilde:
beginchar(bbwide_tilde,10u#+2appr#,min(asc_height#,2x_height#),0);
  "The wide tilde accent";
  italcorr asc_height#*slant-0.5u#;
  numeric a; if square_dots: a=0; else: a=hround 0.5u; fi
  complete_tilde(apprl+a,apprr+a); 
endchar;

iff known bbbreve:
beginchar(bbbreve,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Breve accent";
  italcorr asc_height#*slant-0.5u#;
  pickup circle.nib; top y1=top y3=h;
  lft x1=apprl+hround u; rt x3=w-apprr-hround u;
  bot y2=vround 1/3[tmp_h,h]; x2=0.5[x1,x3];
  draw z1 down_to_right z2 right_to_up z3;
  square_end1(up); square_end3(up);
  labels(1,2,3);
endchar;

iff known bbmacron:
beginchar(bbmacron,8u#+2appr#,0.4[x_height#,asc_height#]+thin#,0);
  "Macron accent";
  italcorr asc_height#*slant-0.5u#;
  pickup circle.nib; top y1=top y2=h;
  lft x1-apprl=w-apprr-rt x2=hround 0.5u;
  pickup square.nib; draw z1..z2; labels(1,2);
endchar;

beginchar(bbdotaccent,8u#+2appr#,
    min(asc_height#,10/7x_height#+0.5dot_size#),0);
  "Dot accent";
  italcorr charht*slant-0.5u#;
  pickup circle.nib; center_bar(1,2); top y2=h;
  bot y1=vround max(h-dot_size,x_height+o);
  dot(1,2); labels(1,2);
endchar;

% It's height has been corrected to fit french trema
beginchar(bbumlaut,8u#+2appr#,
    min(asc_height#,10/7x_height#
      if not low_umlaut: +0.5dot_size# fi),0);
  "Umlaut accent";
  italcorr charht*slant-.5u#;
  pickup circle.nib; x2-x1=x4-x3=hthick;
  lft x1-apprl=w-apprr-rt x4=hround 0.5u;
  top y2=top y4=h;
  bot y1=bot y3=vround max(h-dot_size,x_height+o);
  dot(1,2); dot(3,4); labels(1,2,3,4);
endchar;

iff known bblong_umlaut:
beginchar(bblong_umlaut,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Long hungarian Umlaut accent";
  italcorr charht*slant-.5u#;
  complete_long_umlaut(apprl,apprr);
endchar;

% If one compare the next program with the cm corresponding one,
% he would see that apex_o is missing from the line above. The reason is
% that our 'A' does not overshoot its upper limit.

iff known bbcirc_accent:
beginchar(bbcirc_accent,11.5u#+4/3(asc_height#-x_height#)*slant+2appr#,
    asc_height#,0);
  "The scandinavian circle accent";
  italcorr charht*slant-.5u#;
  pickup circle.nib;
  top y2=h+o; bot y4=vround(1/3[x_height,h])-eps;
  y0=y1=y3=0.5[y4,y2]; x0=x2=x4=0.5[apprl,w-apprr];
  lft x3=hround (x0-0.5max(hThick+thin,3u+thin))-eps;
  x1-x0=x0-x3; draw superellipse(z1,z2,z3,z4,superness);
  labels(1,2,3,4,0);
endchar;

iff known bbcedilla:
beginchar(bbcedilla,8u#+2appr#,0,desc_depth#);
  "The cedilla accent";
% no italic correction
  complete_cedilla(0.5[apprl,w-apprr],-0.5thin);
  square_end1(up);
endchar;

% Polish accents.

iff known bbleft_slanted_cross:
beginchar(bbleft_slanted_cross,0,asc_height#,0);
  "The left slanted cross";
% no  italic correction
  pickup circle.nib; lft x3l=apprl; x2l=x3l+hthick;
  x0=rt x2l; y0=vround x_height+.25; apprl-x4l=x1l-x0=y1l-y0=hround(u);
  y1l-y1r=thin/((1++slant)*sind angle((z1l-z0)slanted slant));
  x1r=x1l; z4l=whatever[z0,z1l]; z3l=whatever[z0,z1l];
  z2l=whatever[z0,z1l]; z2l-z2r=z3l-z3r=z4l-z4r=z1l-z1r;
  penstroke z1e..z2e; penstroke z3e..z4e;
  penlabels(0,1,2,3,4);
endchar;

iff known bbogonek:
beginchar(bbogonek,thin#+2appr#,0,desc_depth#);
  "The ogonek accent";
% no italic correction
  center_stem(0); complete_ogonek(x0,-0.5thin);
  square_end1(up);
endchar;

% Greek accents.

iff known bbstraight_accent:
beginchar(bbstraight_accent,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Greek straight accent";
  italcorr asc_height#*slant-0.5u#;
  if square_dots:
    center_bar(1,2); x3=x2; x4=x1;
    top y3=top y4=h; bot y1=bot y2=vround 1/5[x_height,h];
    pickup square.nib; draw z1--z2--z3--z4--cycle;
    labels(1,2,3,4);
  else:
    x1=x2=hround(0.5[apprl,w-apprr]-0.5dot_size)+0.5dot_size;
    y2=h+o-dot_size/2; y1=vround 1/5[x_height,h]+dot_size/4;
    long_dot(1,2);
  fi
endchar;

iff known bbrough:
beginchar(bbrough,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Greek rough accent";
  italcorr asc_height#*slant-0.5u#;
  pickup circle.nib;
  top y4=h; bot y1=vround 1/5[x_height,h];
  lft x3-apprl=w-apprr-rt x1=hround 2u; x5-x3=hthick;
  complete_comma;
endchar;

iff known bbsmooth:
beginchar(bbsmooth,8u#+2appr#,min(asc_height#,2x_height#),0);
  "Greek smooth accent";
  italcorr asc_height#*slant-0.5u#;
  pickup circle.nib;
  top y4=h; bot y1=vround 1/5[x_height,h];
  lft x1-apprl=w-apprr-rt x3=hround 2u; x3-x5=hthick;
  complete_comma;
endchar;

iff known bbgreek_tilde:
beginchar(bbgreek_tilde,8u#+2appr#,
    min(asc_height#,10/7x_height#+0.5dot_size#),0);
  "Greek tilde accent";
  italcorr asc_height#*slant-0.5u#;
  pickup circle.nib;
  top y2=top y6=h-vround 0.25dot_size;
  bot y1=bot y5=h-dot_size;
  lft x1-apprl=w-apprr-rt x6=hround 0.75u;
  z0=0.5[z1,z6]; slope:=-dot_size/4u;
  hellipse_set(1,2,3,0); hellipse_set(6,5,4,0);
  draw z1 up_to_right z2...z3---z4...z5 right_to_up z6;
  square_end1(down); square_end6(up);
  labels(0,1,2,3,4,5,6);
endchar;

iff known bbrough_tilde:
beginchar(bbrough_tilde,8u#+2appr#,body_height#,0);
  "Greek rough and tilde accent";
  italcorr asc_height#*slant-0.5u#;
  pickup circle.nib;
  % rough
  top y4'=vround min(h-0.75dot_size,asc_height,2x_height);
  bot y1'=vround 1/5[x_height,top y4'];
  lft x3'-apprl=w-apprr-rt x1'=hround 2u; x5'-x3'=hthick;
  % tilde
  top y2=top y6=h+o; bot y1=bot y5=h+o-vround 0.75dot_size;
  lft x1-apprl=w-apprr-rt x6=hround 0.75u;
  z0=0.5[z1,z6]; slope:=-dot_size/4u;
  hellipse_set(1,2,3,0); hellipse_set(6,5,4,0);
  draw z1 up_to_right z2...z3---z4...z5 right_to_up z6;
  square_end1(down); square_end6(up);
  complete_comma'; labels(0,1,2,3,4,5,6);
endchar;

iff known bbsmooth_tilde:
beginchar(bbsmooth_tilde,8u#+2appr#,body_height#,0);
  "Greek smooth and tilde accent";
  italcorr asc_height#*slant-0.5u#;
  pickup circle.nib;
  % smooth
  top y4'=vround min(h-0.75dot_size,asc_height,2x_height);
  bot y1'=vround 1/5[x_height,top y4'];
  lft x1'-apprl=w-apprr-rt x3'=hround 2u; x3'-x5'=hthick;
  % tilde
  top y2=top y6=h+o; bot y1=bot y5=h+o-vround 0.75dot_size;
  lft x1-apprl=w-apprr-rt x6=hround 0.75u;
  z0=0.5[z1,z6]; slope:=-dot_size/4u;
  hellipse_set(1,2,3,0); hellipse_set(6,5,4,0);
  draw z1 up_to_right z2...z3---z4...z5 right_to_up z6;
  square_end1(down); square_end6(up);
  complete_comma'; labels(0,1,2,3,4,5,6);
endchar;

iff known bbsubscript_iota:
beginchar(bbsubscript_iota,8u#+2appr#,0,desc_depth#);
  "Subscript iota";
% no italic correction
  center_bar(4,5); x3=x4; x2=0.5[x1,x4];
  rt x1-lft x4=hround max(3u,hthick+thin+1.7u);
  bot y2=-(desc_depth+o+dot_skip);
  top y4=vround(h-o-dot_skip);
  y1=y3=good.y(0.3[y2,y4]);
  tmp_path:=z1 down_to_left z2 left_to_up z3..z4;
  draw tmp_path;
  hbbowl(z2,z3,z4,hthick) tmp_path;
  pickup square.nib; draw z4..z.bowl.bot;
  square_end1(up); labels(1,2,3,4);
endchar;

standard_proofing;% restore extra_endchar.