-
Notifications
You must be signed in to change notification settings - Fork 0
/
nom_rules_extra.mf
89 lines (53 loc) · 2.01 KB
/
nom_rules_extra.mf
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
%% nom_rules_extra.mf
%% * (1) Copyright and License.
%%%% This file is part of the source code for Mariu, a calligraphic font, programmed in METAFONT.
%%%% Copyright (C) 2022 Laurence D. Finston
%%%% Mariu is free software; you can redistribute it and/or modify
%%%% it under the terms of the GNU General Public License as published by
%%%% the Free Software Foundation; either version 3 of the License, or
%%%% (at your option) any later version.
%%%% Mariu is distributed in the hope that it will be useful,
%%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%%%% GNU General Public License for more details.
%%%% You should have received a copy of the GNU General Public License
%%%% along with Mariu; if not, write to the Free Software
%%%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
%%%% Please send bug reports to [email protected]
%%%% The author can be contacted at:
%%%% Laurence D. Finston
%%%% [email protected]
%This is nom_rules_extra.mf. It makes proofrules for
% the nominal box for letters that extend beyond the borders of
% their boxes.
if unknown nom_d: nom_d = 0; fi;
if unknown extra_under_width: extra_under_width = 0; fi;
if unknown extra_over_width: extra_over_width = 0; fi;
% vertical rules:
begingroup
save a,b;
% b divides the nominal box by b.
b = 4;
for a=0 upto b:
proofrule(((a/b)*nom_w,-nom_d),((a/b)*nom_w,nom_h));
% horizontal rules:
proofrule((0,(a/b)*nom_h),(nom_w,(a/b)*nom_h));
endfor;
% horizontal rules for y<0 (depth):
for a= 0 upto b:
proofrule((0,(a/b)*(-nom_d)),(nom_w,(a/b)*(-nom_d)));
endfor;
% rules for portions of letter outside of box:
% horizontals:
if extra_under_width > 0:
for a = 0 upto b:
proofrule((-3/4nom_w,(a/b)*(-nom_d)),(0,(a/b)*(-nom_d)));
endfor;
% verticals:
for a = 0 upto 3:
proofrule(((-a/b)*nom_w,-nom_d),((-a/b)*nom_w,0));
endfor;
fi;
proofrulethickness .5mm#;
proofrule((0,0),(nom_w,0));
endgroup;