summaryrefslogtreecommitdiff
path: root/fonts/elvish/tengsecs.mf
blob: 40256ffa5bc8226724b8bf981c64c2131221d6f5 (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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311

beginchar("l",0.8em#,ex#,desc#) ; "The tengwa lambe" ;
 pickup main_nib ;
 x1 = straight_sidebar ; x2 = w - x1 ;
 top y1 = top y2 = round ex ;
 z1' = z1 - ( 0.04em * dir penangle) ;
 z2' = z2 + ( 0.04em * dir penangle) ;
 draw z1'{dir penangle} .. {dir penangle}z2' ;
 y3 = y1 ; x3 = 0.6[x1,x2] ; % top of bowl
 lft x4 = 2curve_sidebar ; y4 = 0.2ex ; % side of bowl
 bot y5 = -0.5 desc ; x5 = .4w ; % bottom of bowl
 x6 = w - x4 ; y6 = 0.2ex; % right side of bowl
 z7 = z6 + (0.05em *(left rotated -10)) ;
 draw z3{dir (penangle+180)} ..
      {down}z4 ..  z5{right}
      .. z6 .. {dir -penangle} z7 ;
 labels(1,2,3,4,5,6) ;
endchar ;

beginchar("I",0.8tinco_width#,ex#,0) ; "The tengwa yanta" ;
 pickup main_nib ;
 y1 = 0 ; x1 = straight_sidebar ; % bottom of left arm ;
 y2 = 0 ; x2 = w - x1 ; % bottom of right arm
 x3 = 0.5[x1,x2] ; y3 = 0.8ex ; % junction point
 top y4 = round(ex) ; z4 - z2 = whatever*(z3 - z2) ; % top of arm
 draw z4 .. z2 ;
 draw z3 .. z1 ;
 z4' = z4 + 0.05em * dir(penangle+180) ;
 z2' = z2 + 0.05em * dir(penangle) ;
 z1' = z1 + 0.05em * dir(penangle+90) ;
 draw z4'{dir penangle} .. {z2-z4}z4 ;
 draw z2'{dir (penangle+180)} .. {z4-z2}z2 ;
 draw z1'{dir(penangle-90)} .. {z3-z1}z1 ;
endchar ;

beginchar("U",0.9tinco_width#,ex#,0) ; "The tengwa ure" ;
 pickup main_nib ;
 top y1 = round(ex+o) ; x1 = 0.5w ;
 bot y3 = round(-o) ; x3 = x1 ;
 rt x2 = w - curve_sidebar = w - lft x4 ;
 y2 = y4 = 0.5h ;
 draw z1 .. z2 .. z3 .. z4 .. cycle ;
endchar ;


beginchar("s",0.9*tinco_width#,asc#,0) ; "The tengwa silme" ;
 pickup main_nib ;
 lft x4 = curve_sidebar ; y4 = 0.7ex ; % left side of bow
 bot y3 = round(-o) ; x3 = good.x 0.5w ; % bottom
 x2 = w - x4 ; y2 = 0.5ex ; % right side of bow
 x1 = good.x 0.7w ; y1 = 0.8ex ; % end of bow
 z1' = z1 + 0.03em*dir(170) ; % serif
 x5 = 0.55w ; y5 = 0.95asc ; % top end of letter
 z6 = z5 + 0.05em*(dir(penangle+80)) ; % for serif
 draw z1'{dir penangle} .. z1 .. z2 .. z3 .. z4{up} .. tension 0.9 and 1.2 .. z5  .. z6 ;
 labels(1,1',2,3,4,5,6) ;
endchar ;

beginchar("S",0.9*tinco_width#,ex#,desc#); "The tengwa silme nuquerna";
 pickup main_nib ;
 lft x2 = curve_sidebar ; y2 = 0.6 ex ; % left
 top y3 = round(ex+o) ; x3 = 0.55w ; % top
 rt x4 = w - curve_sidebar ; y4 = 0.4 ex ;
 x1 = x2 + 0.2w ; y1 = 0.25 ex ; % curly end
 x5 = x2 ; y5 = -0.9desc ;
 draw z1{dir(penangle+180)} .. z2{up} .. z3{right} ..
        z4{down} .. tension 1.2 .. z5 ;
 labels(1,2,3,4,5) ;
endchar ;

beginchar("r", romen_width#, ex#, desc#); "The tengwa romen";
 pickup main_nib ;
 x1 = straight_sidebar ; top y1 = round(0.95ex) ; % top of left arm
 bot y2 = 0.0ex ; % join at bottom
 rt x3 = w - curve_sidebar ;  y3 = 0.75ex ;% 'top' of right stem ;
 % want vectors z3-z2 and z1-z2 to be mirror images in direction
 numeric temp ;
 y3 - y2 = temp*(y1 - y2) ;
 x3 - x2 = 1.1temp*(x2 - x1) ; % not quite mirror !
 draw z1 -- z2 ;  % left arm (without serif)
 z1' = z1 + 0.05em*dir(penangle+135) ;
 draw z1'{dir penangle} .. {z2-z1}z1 ; % serif
 top y4 = round(ex - 0.2penwidth*sind penangle) ; x4 = 1/3[x2,x3] ; % end of right arm
 bot y5 = round(-0.9desc) ; x5 = 0[x2,x3] ; % bottom of tail
 y6 = -0.2desc ; x6 = 1/2[x5,x3] ; % end of tail
 path p ;
 p = z4{dir penangle} .. z3 .. tension 1 .. z2 % {dir (penangle+180)}
      .. tension 3/4 .. z5{right} .. {dir (penangle+180)}z6 ;
 draw p ;
 draw z1'{dir penangle} .. {z2-z1}z1 .. z2 ;
 labels(1,2,3,4,5,6);
 endchar ;

beginchar("&", romen_width#, ex#, desc#); "The tengwa arda";
 pickup main_nib ;
 x1 = straight_sidebar ; top y1 = round(0.95ex) ; % top of left arm
 bot y2 = 0.0ex ; % join at bottom
 rt x3 = w - curve_sidebar ;  y3 = 0.75ex ;% 'top' of right stem ;
 % want vectors z3-z2 and z1-z2 to be mirror images in direction
 numeric temp ;
 y3 - y2 = temp*(y1 - y2) ;
 x3 - x2 = 1.1temp*(x2 - x1) ; % not quite mirror !
 draw z1 -- z2 ;  % left arm (without serif)
 z1' = z1 + 0.05em*dir(penangle+135) ;
 draw z1'{dir penangle} .. {z2-z1}z1 ; % serif
 top y4 = round(ex - 0.2penwidth*sind penangle) ; x4 = 1/3[x2,x3] ; % end of right arm
 bot y5 = round(-0.9desc) ; x5 = 0[x2,x3] ; % bottom of tail
 y6 = -0.2desc ; x6 = 1/2[x5,x3] ; % end of tail
 path p ;
 p = z4{dir penangle} .. z3 .. tension 1 .. z2 % {dir (penangle+180)}
      .. tension 3/4 .. z5{right} .. {dir (penangle+180)}z6 ;
 draw p ;
 draw z1'{dir penangle} .. {z2-z1}z1 .. z2 ;
 z10 = 0.25[z2,z1] ;
 z11 = z10 + 0.2em*dir(penangle+180) ;
 z12 = z11 + 0.08em*dir(penangle-90) ;
 draw z10 .. tension 1.5 .. z11  .. tension 1.5 .. z12 ;
 labels(1,2,3,4,5,6,10,11,12);
 endchar ;

beginchar("z",0.85tinco_width#,asc#,desc#) ; "The tengwa esse" ;
 pickup main_nib ;
 % top bow first - make a path for later use
 x1 = 0.55w ; y1 = 0.95asc ; % top
 z1' = z1 + 0.05em*dir(penangle+80) ; % serif
 lft x2 = curve_sidebar ; y2 = 0.5h ; % left side of top bow ;
 x3 = 0.5w ; y3 = good.y 0.2h ; % bottom of top bow
 x4 = 0.7w ; y4 = 0.5h ; % end of bow
 z4' = z4 + 0.03em*dir(170) ; % serif
 path p ;
 p = z4'{dir penangle} .. z4 .. z3{left} .. z2{up} ..
       tension 0.9 and 1.2 .. z1 .. z1' ;
 draw p ;
 x5' = x1 ; y5'-y7 = y1-y3 ; % top of bottom bow
 x6 = x2 ; y6 - y7 = y2 - y3 ; % side
 x7 = x3 ; bot y7 = round(-0.9desc) ; % bottom
 z8 - z7 = z4 - z3 ; % end
 z8' - z8 = z4' - z4 ;
 path pa ;
 pa = z8'{dir penangle} .. z8 .. z7{left} .. z6{up} ..
        tension 0.9 and 1.2 .. z5' ;
 (t1,t2) = p intersectiontimes pa ;
 draw subpath(0,t2) of pa ;
 labels(1,2,3,4,5,6,7,8) ;
endchar ;

beginchar("Z",0.8tinco_width#,ex#,desc#) ; "The tengwa esse nuquerna" ;
 pickup main_nib ;
 y1 = 0.5h ; x1 = 0.3w ; % end of top bow
 z1' = z1 + 0.03em*dir(-10) ; % and serif
 % ignore z2 (left side) for the moment
 top y3 = round(ex+o) ; x3 = 0.5w ; % top
 rt x4 = 0.9w - curve_sidebar ; y4 = 0.65h ; % right
 y5 = -0.1desc ; lft x5 = curve_sidebar  ; %end
 path p ;
 p = z1'{dir(penangle+180)} .. z3{right} .. z4{down} ..
       tension 0.9 and 1.2 .. z5 ;
 draw p ;
 z6 = ( (0.5w,-desc) .. (0.5w,0.5ex) ) intersectionpoint p ;
 x7 = x4 ; y7 = -0.3desc ;
 x8 = x5 ; y8 = -0.9desc ;
 draw z6{dir penangle} .. z7{down} .. tension 0.9 and 2 .. z8 ;
 labels(1,2,3,4,5,6,7,8) ;
endchar ;

beginchar("h",0.8tinco_width#,asc#,0) ; "The tengwa hyarmen" ;
 pickup main_nib ;
 bot y1 = 0 ; x1 = straight_sidebar ; % bottom of left arm
 y2 = 0 ; x2 = w - x1 ; % bottom of right arm
 x3 = 0.6[x1,x2] ; y3 = 0.9ex ; % junction point
 top y4 = round (0.9asc) ; z4 - z2 = whatever*(z3-z2) ; % top of arm
 z4' = z4 + 0.08em*dir(penangle+160);
 z4'' = z4 + 0.08em*(dir(angle(z2-z4))) ;
 draw z4'{dir penangle} .. z4'' --- z2 ;
 draw z3 .. z1 ;
 z1' = z1 + 0.05em*dir(penangle+180) ;
 z2' = z2 + 0.05em*dir(penangle) ;
 draw z2'{dir(penangle+180)} .. {z4-z2}z2 ;
 draw z1'{dir(penangle-90)} .. {z3-z1}z1 ;
 labels(1,2,3,4) ;
endchar ;

beginchar("H",tinco_width#,asc#,0) ; "The tengwa hwesta sindarinwa" ;
 pickup main_nib ;
 top y1 = asc ; x1 = good.x (w - 0.2em) ;
 bot y2 = 0 ; x2 = x1 ;
 draw_telco(1,2,"t") ;
 x3 = x7 = x1 ; y3 = .75ex ; y7 = 0.1ex ;
 top y4 = round(ex+o) ;
 bot y6 = round(-o) ;
 x4 = 0.5w ;
 x6 = 0.4w ;
 y5 = 0.5ex ; x5 = curve_sidebar ;
 draw z3 .. z4{left} .. z5{down} .. z6{right} .. z7 ;
 z2' = z2 + 0.05em*dir(penangle) ;
 z2'' = z2 + 0.2em*right ;
 z2''' = z2 - 0.05em*dir(penangle+180) ;
 draw z2{dir penangle} .. z2' .. z2'' .. z2'''{dir penangle} ;
 labels(1,2,3,4,5,6,2'') ;
endchar ;

beginchar("@",0.3em#,ex#,0) ; "The short carrier" ;
 pickup main_nib ;
 top y1 = round(ex) ; y2 = 0 ;
 x1 = x2 = good.x 0.5w ;
 draw_telco(1,2,"tb") ;
endchar ;

beginchar("*",0.3em#,ex#,desc#) ; "The long carrier" ;
 pickup main_nib ;
 top y1 = round(ex) ; y2 = -0.6desc ;
 x1 = x2 = good.x 0.5w ;
 draw_telco(1,2,"t") ;
 z3 = z2 + 0.2em*dir(penangle-150) ;
 draw z2{z2-z1} .. z3{dir(penangle+180)} ;
endchar ;

beginchar("A",0.75tinco_width#,ex#,0) ; "The tengwa A" ;
 pickup main_nib ;
 top y1 = round(ex+o) ; x1 = 0.6w ;
 y3 = 0 ; x3 = x1 ;
 lft x2 = curve_sidebar ; y2 = 0.55h ;
 x4 = w - straight_sidebar ; x6 = x4+0.05em ;
 y4 = 0.75h ; y6 = 0.35h ;
 z4' = z4 + 0.03em*dir(180+penangle) ;
 draw z4'{dir penangle} .. z4 .. z1{left} .. z2{down} .. z3{right} .. z6 ;
endchar ;

beginchar("|",0.3em#,asc#,0); "The tengwa halla" ;
 pickup main_nib ;
 x1 = x2 = good.x 0.5w ;
 top y1 = asc ;
 y2 = 0 ;
 draw_telco(1,2)("tb") ;
 endchar ;

beginchar("L",0.8em#,ex#,desc#) ; "The tengwa alda" ;
 pickup main_nib ;
 x1 = straight_sidebar = w - x2 ;
 top y1 = top y2 = round ex ;
 z1' = z1 - ( 0.04em * dir penangle) ;
 z2' = z2 + ( 0.04em * dir penangle) ;
 draw z1'{dir penangle} .. {dir penangle}z2' ;
 x3 = 0.4[x1,x2] ; % top of bowl
 y3 = 0.95ex ;
 lft x4 = straight_sidebar ; y4 = 0.5ex ; % first bend
 rt x5 = w - straight_sidebar ; y5 = -0.15ex ; % second bend
 x6 = 0.65w ; bot y6 = -0.7desc ; % bottom of bowl
 x7 = 0.3w ; y7 = -0.2 ex ; % end
 draw z3{curl 0} .. tension 2 .. z4{down} .. z5{down} .. z6{left} ..
        z7{dir penangle} ;
endchar ;
beginchar("$", romen_width#, asc#, 0) ; "Inverted romen - wh" ;
 pickup main_nib ;
 x1 = w - straight_sidebar ; bot y1 = round(0.05ex) ;
 top y2 = 1.0ex ;
 lft x3 = curve_sidebar ; y3 = 0.25ex ;
 numeric temp ;
 y3 - y2 = temp*(y1 - y2) ;
 x3 - x2 = 1.1temp*(x2 - x1) ;
 draw z1 -- z2 ;
 z1' = z1 + 0.05em*dir(penangle-45) ;
 draw z1'{dir(penangle+180)} .. {z2-z1}z1 ;
 bot y4 = round(0.2penwidth*sind penangle) ; x4 = 1/3[x2,x3] ;
 top y5 = round(ex+0.9desc) ; x5 = 0[x2,x3] ;
 y6 = ex + 0.2desc ; x6 = 1/2[x5,x3] ;
 draw z4{dir(penangle+180)} .. z3 .. z2
        .. tension 3/4 .. z5{left} .. {dir penangle}z6 ;
 draw z1'{dir penangle} .. {z2 - z1}z1 .. z2 ;
 labels(1,2,3,4,5,6) ;
endchar ;

beginchar("#",0.7em#,ex#,desc#) ; "Inverted lambe - w" ;
 pickup main_nib ;
 x1 = straight_sidebar = w - x2 ;
 bot y1 = bot y2 = -0.5desc ;
 z1' = z1 - 0.04em*dir(penangle) ;
 z2' = z2 + 0.04em*dir(penangle) ;
 draw z1'{dir penangle} .. {dir penangle}z2' ;
 y3 = y1 ; x3 = 0.2[x1,x2] ;
 rt x4 = w - curve_sidebar ; y4 = 0.8ex - 0.5desc;
 top y5 = round(ex) ; x5 = 0.6w ;
 x6 = w - x4 ; y6 = y4 ;
 z7 = z6 + 0.05em*(left rotated 170) ;
 draw z3{dir penangle} .. {up}z4 .. z5{left}
      .. z6 .. {dir(180-penangle)}z7 ;
 labels(1,2,3,4,5,6,7) ;
endchar ;

beginchar("%",0.8tinco_width#,ex#,0) ; "The tengwa for u in up" ;
 pickup main_nib ;
 top y1 = ex ; rt x1 = w - straight_sidebar ;
 y2 = 0 ; x2 = x1 ;
 draw_telco(1,2)("tb") ;
 y3 = y1 ; x3 = w - x1 ;
 x4 = x3 ; y4 = 0.3h ;
 draw_telco(3,4)("t") ;
 y5 = 0 ; x5 = 0.45w ;
 x6 = x1 ; y6 = 0.3ex ;
 draw z4{z4-z3} .. z5 .. z6{dir penangle} ;
 labels(5,6) ;
endchar ;

beginchar(9,0.55em#,ex#,0) ; "The schwa tengwa (Pictures plate 48)" ;
 pickup main_nib ;
 lft x1 = lft x2 = straight_sidebar ;
 top y1 = ex ; y2 = 0 ;
 draw_telco(1,2)("tb") ;
 y3 = y1 ; rt x3 = w ; %- curve_sidebar ;
 draw_bar(1,3)("r") ;
endchar ;