-
Notifications
You must be signed in to change notification settings - Fork 0
/
thorn.mf
140 lines (96 loc) · 3.01 KB
/
thorn.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
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
%% thorn.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 Laurence.Finston@gmx.de
%%%% The author can be contacted at:
%%%% Laurence D. Finston
%%%% Laurence.Finston@gmx.de
%% This is thorn.mf
%% I've greatly increased the height of the downstroke
%% with respect to my drawing,
%% because it was too short.
special "grayfont black";
beginchar(oct"2",5pt#,8.75pt#,4pt#); "The letter thorn";
clear_vars;
do_fill:=true;
%do_fill:=false;
scaling_factor = 22/20;
nom_w = scaling_factor*3.85pt;
nom_h = scaling_factor*4.5pt;
nom_d = scaling_factor*4.8pt;
% This does the main downstroke.
pickup my_fill_pen;
pos0(nib,47.5);pos1(nib,47.5);pos2(nib,45);
top rt z0r = (34/64 nom_w, 85/64nom_h);
top rt z1r = (27/64 nom_w, 49/64 nom_h);
bot lft z2l = (0, -nom_d);
convert_path.p0 (z0e..z1e..tension 3.5..z2e);
if do_fill=true:
filldraw p0;
fi;
%% This does the forestroke
begingroup save a,b,c;
a = 47.5;
b = 105;
my_pen(a);
bot lft z3 = (4/64 nom_w, 71/64 nom_h);
z4 = (dir (a-b) * whatever) shifted z3;
x4 = 22/64 nom_w;
if do_fill=true:
draw z3..z4;
fi;
endgroup;
%% This draws the bowl.
pickup my_fill_pen;
pos5(nib,47.5);pos6(nib,47.5);pos7(nib,50);pos8(nib,50);
pos9(nib,50);pos10(nib,47.5);
rt top z5r = (7/16 nom_w, 30/64 nom_h);
top rt z6r = (105/128 nom_w, 95/128 nom_h);
rt z7r = (126/128 nom_w, 1/2 nom_h);
rt z8r = (120/128 nom_w, -4/64 nom_d);
lft bot z9l = (42/64 nom_w, -21/64 nom_d);
lft bot z10l = (8/64 nom_w, -17/64 nom_d);
begingroup save a,b,c,e,f,g;
a = 1.5;
b = 1;
c = 1.3;
f = 1.2;
g = 1.5;
convert_path.p1(z5e..tension a..z6e..tension b..z7e..%
tension c..z8e..tension f..z9e..tension g..z10e);
%% The steps of p1:
%% 0 1 2 3 4 5
%% z5l..z6l..z7l..z8l..z9l..z10l..
if do_fill=true:
my_pen(47.5);
draw subpath(3,4) of p1.m shifted (.1nib_thickness * dir (47.5+90));
fi;
if do_fill=true:
around_crossing_pt(p1,0,1,x_pt_factor);
around_crossing_pt(p1,1,5,x_pt_factor);
fi;
endgroup;
%do_letter_shift := false;
if do_letter_shift = true:
do_rules := false;
letter_shift(v0,.425pt,11/32 nom_h);
else:
penlabels(range 0 thru 10);
input nom_rules_extra;
fi;
endchar;
% Local Variables:
% auto-save-interval:0
% End: