summaryrefslogtreecommitdiff
path: root/fonts/tengwar/additionals.mf
blob: 29e1b313d17c0f5b5b1094dbfe7025277f9927af (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
% Copyright 1988 Michael Urban
% Everyone is granted permission to copy, modify and redistribute
% this file, provided that a currently-dated copy of this
% copyright notice is included in the copy.
% License is granted to produce fonts based on the information
% in this file, provided that such fonts are redistributed
% without charge to any third party.

% SCCS ID @(#)additionals.mf        1.1   10/1/86

def commonr=
        pickup elvishpen;
        save x,y,sweep;
        path sweep;
        lft x0 = leadgap; top y0 = h;
        lft x1 = 0; z0-z1 = whatever*(dir tilt);
        x2 = .75w; top y2=h;
        rt x3 = w; y3 = .5h;
        lft x4 = leadgap; y4 = -.65d;
        x5 = .5w; y5 = -d;
        x6 = .85w; z6-z5 = whatever*(dir tilt);
        sweep = (z2..z3{down}..z4{down}..z5{right}..z6);
        z7 = sweep intersectionpoint 
                ((-infinity,0)--(infinity,0));
        draw sweep;
        draw z1--z0..z7;
enddef;

beginchar("r", shortwidth, xht#, dep#); "The letter r (romen)";
        begingroup;
        commonr;
        endgroup;
endchar;
beginchar(18, shortwidth, xht#, dep#); "The ligature rh (arda)";
        begingroup;
        commonr;
        z8 = point .5 of (z0..z7);
        x9 = x1;
        z8-z9 = whatever*(dir tilt);
        x10 = x0; y10=y9;
        draw z8--z9..tension 3.0..z10{dir tilt};
        endgroup;
endchar;
        
def commonl=
        save x,y;
        pickup elvishpen;
        path tilde;

        lft x1=leadgap;top y1=h;
        rt x4 = w; y4=h;
        y2-y1 = y4-y3 = 3(y4-y1);
        z2-z1=z4-z3=whatever*(dir tilt);
        tilde = ( z1..controls z2 and z3..z4); % straight from Page 152 of MFbook
        z5 = point .6 of tilde;
        lft x6 = leadgap+1/20em; y6 = -.25d;
        x7 = .5[leadgap, w]; bot y7=-d;
        rt x8 = w-leadgap; y8 = 0;
        y9=.25h; z9-z8=whatever*(dir (tilt+90));
        draw tilde;
        z10 = point .6 of (z5..z6{down});
enddef;
beginchar("l", .8em#, xht#, dep#); "The letter l (lambe)";
        begingroup;
        commonl;
        draw z5..z6{down}..z7{right}..z8..z9;
        endgroup;
endchar;

beginchar("L", .8em#, xht#, dep#); "The ligature ld (alda)";
        begingroup;
        commonl;
        draw z5..tension 1.5..z10..z9..z8..z7..z6;
        endgroup;
endchar;

def commonsz=
        pickup elvishpen;
        save x,y,spath;
        path spath,zspath,zpath;
        x0 =.9w; top y0=height;
        x0-x1 = .08w; z0-z1=whatever*(dir(tilt-10));
        y3=xht/2; lft x3=leadgap;
        x4 = w/2+leadgap; bot y4=0;
        rt x5 = w; y5 = xht/2; %z5-z4 = whatever*(dir tilt);
        z6-z5=whatever*(dir (tilt+90)); 
        x6=x5-.3w;
        spath=(z0..z1..tension 2.2..z3{down}..z4{right}..z5{up}..z6{dir(tilt+90)});
        zspath=(z0..z1..tension 2.2..z3{down}..z4{right}..z5);
        x7=x3; y7= -.6d;
        x8=x4; bot y8=-d;
        x9=x5; y9= -.6d;
        z10-z9= z6-z5;
        zpath=(z4..tension 2.2..z7{down}..z8{right}..z9{up}..z10{dir(tilt+90)});
enddef;
beginchar("s", shortwidth, cap#, 0); "The letter s (silme)";
        begingroup;
        save height;
        height=h;
        commonsz;
        draw spath;
        endgroup;
endchar;
        
beginchar(3, shortwidth, xht#, dep#); "The letter s reversed (silme nuquerna)";
        begingroup;
        save height;
        height=cap;
        commonsz;
        draw (spath rotatedabout ( (.5[leadgap,w],xht/2), 180));
        endgroup;
endchar;

beginchar ("z", shortwidth, cap#, dep#); "The letter z (aze)";
        begingroup;
        save height; height=h;
        commonsz;
        draw zspath;
        draw zpath;
        endgroup;
endchar;

beginchar (26, shortwidth, cap#, dep#); "The letter z reversed (aze nuquerna)";

        begingroup;
        save height; height=cap;
        commonsz;
        draw (zspath rotatedabout ( (.5[leadgap,w],0), 180));
        draw (zpath rotatedabout ( (.5[leadgap,w],0), 180));
        endgroup;
endchar;

beginchar("e", shortwidth, xht#, 0); "The letter e (yanta)";
        begingroup;
        save x,y;
        pickup elvishpen;
        top y0 = h; x0=.5[0, w];
        lft x1 = 0; y1=0;
        y2=0; rt x2=w;
        y3=y0; x3=x0-.7thick;
        z4-z1 = whatever*(z0-z2);
        x1-x4=.2thin;
        z6-z2 = whatever*(z0-z1);
        x6=w;
        draw z3..z0--z2..z6;
        draw z4..z1--z0;
        endgroup;
endchar;
        
beginchar("h", shortwidth, cap#, 0); "The letter h (hyarmen)";
        begingroup;
        save x,y;
        pickup elvishpen;
        top y0 = h; x0=leadgap;
        lft x1 = leadgap+.3thick; y1=0;
        y2=0; rt x2=w;
        y3=y0; x3=x0-.7thick;
        z4-z1 = whatever*(z0-z2);
        x1-x4=.2thin;
        z5 =  point .5 of (z0--z2);
        z6-z2 = whatever*(z5-z1);
        x6=w;
        draw z3..z0--z2..z6;
        draw z4..z1--z5;
        endgroup;
%
% This character requires a bit more height than the others so that
% accents get raised enough.  
%
        charht := .3[xht#,cap#];
oldendchar;

beginchar ("u", shortwidth, xht#, 0); "The letter u (ure)";
        begingroup;
        save x,y;
        pickup elvishpen;
        lft x0 = leadgap;
        top y1 = h;
        rt x2 = w;
        bot y3 = 0;
        y0 = .65h; x1 = leadgap+.35w;
        y2 = .35h; x3 = leadgap+.65w;
        draw z0..z1..z2..z3..cycle;
        endgroup;
endchar;


beginchar (15, shortwidth+thick#, cap#,0); "The ligature hw (hwesta sindarinwa)";
        begingroup;
        save x,y;
        pickup elvishpen;
        nutelco(w-thick, longstem, stemdepth)
        z7=bowpoint;
        bot y8 = 0; x8=1/2[x7,leadgap];
        lft x9 = leadgap; y9=1/2xht;
        top y10 = xht; x10=x8;
        draw z7{down}..z8{left}..z9{up}..z10{right}..cycle;
        rt x11 = w-thick; y11 = 0;
        z12= (w, 0);
        draw z11--z12;
        endgroup;
endchar;