File: tipagerm.mf

package info (click to toggle)
tipa 19960624-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 888 kB
  • ctags: 27
  • sloc: perl: 1,636; sh: 256; makefile: 83; lisp: 14
file content (161 lines) | stat: -rw-r--r-- 7,083 bytes parent folder | download | duplicates (2)
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
%
% tipagerm.mf: TIPA symbols for germanic languages
%
% Version 1.0 1996/05/22 FUKUI Rei
%
% This font is based on:
%   Computer Modern font series by D. E. Knuth,
%   DC fonts by J"org Knappen and
%   TSIPA by KOBAYASHI Hajime, FUKUI Rei and SHIRAKAWA Shun.
%

cmchar "The letter thorn"; % from cmman
beginchar(oct"376",10u#+serif_fit#,asc_height#,desc_depth#);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
adjust_fit(serif_fit#,0);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
lft x1l=hround(2.5u-.5stem'); top y1=h;
numeric edge; edge=rt x2r;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
pos4(vair',90); pos5(curve,0); pos6(vair,-90);
rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height];
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
x6=x3; bot y6r=-oo;
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
 &z5e{down}...{5(x6-x5),y6-y5}z6e;  % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
pickup tiny.nib; bot y2=-d;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
z7'=z2; x8l=x7'l; bot y8=0;
filldraw stroke z7'e--z8e;  % point
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop);  % upper serif
 dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi  % lower serif
penlabels(0,1,2,3,4,5,6,8); endchar;

%cmchar "Capital Thorn"; % from dc font
%beginchar(oct"336",11u#,cap_height#,0);
%italcorr .75cap_height#*slant-.5u#;
%adjust_fit(cap_serif_fit#,0);
%numeric left_stem,right_curve,middle_weight;
%left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5;
%pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0);
%lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0;
%filldraw stroke z1e--z2e; % stem
%penpos3(cap_band,90); penpos4(cap_band,90);
%penpos6(middle_weight,-90); penpos7(middle_weight,-90);
%penpos8(cap_band,90); penpos9(cap_band,90);
%penpos5(right_curve-stem_corr,0); penpos10(right_curve,0);
%penpos11(cap_band,-90); penpos12(cap_band,-90);
%z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair;
%x12=x1;
%y12r=0.26h; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h+y12r;
%x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u;
%x5r=hround(w-1.5u); x10r=hround(w-u);
%if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-2.5u];
%else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u];
% x4l:=x4l-.5u; x9l:=x9l-.5u; fi
%x6l:=x6l-.5u; x11l:=x11l-.5u;
%fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e;  % lower lobe
%if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut);  % upper serif
% dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); fi  % lower serif
%math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;

vardef varm(suffix $,$$,@)(expr darkness,jut)=
 y@0=good.y(y$$r-jut); x@0=x$r;
 x@1=x$l; z@1=z$$l+whatever*(z$$r-z@0); z@2=.5[z$l,z@1];
 filldraw z$$l{z@1-z$$l}...darkness[z@1,.5[z@2,z$$l]]...z@2
  ---z$l--z$r--z@0--z$$r--cycle;
 penlabels(@0,@1,@2); enddef;

cmchar "Wynn";
beginchar(oct"337",9u#+serif_fit#,x_height#,desc_depth#);
italcorr .5x_height#*slant+min(.5curve#-.75u#,.1u#);
adjust_fit(serif_fit#,0);
pickup tiny.nib; pos2(stem,if serifs:0 else: 15 fi);
pos0'(stem',0); pos0(stem,0); pos1(stem',0); z0l=z0'l; x0'=x1; x1=x2;
lft x1l=hround(2.5u-.5stem');top y1=h;
pickup fine.nib; pos3(hair,90); pos4(vair,90);
pos5(curve,0); pos6(hair,-90); pos7(vair,-90);
x3=x7=x0; x4+.5u=x6=.6w; top y4r=x_height; y4-y3=y6-y7;
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.6x_height;
bot y6r=.1x_height-oo; bot y7r=-oo; y0=y3;
pickup tiny.nib; bot y2=if serifs: -.7d; else: -d; fi
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
filldraw stroke z3e--z4e{z6-z7}...z5e{down}...{z7-z6}z6e--z7e;
if serifs: pickup tiny.nib; pos10(stem,0); pos11(vair,-90);
 z10=z2; lft x11l=x22=.5u; y11l=-d-oo;
 varm(10,11,a,.8beak_darkness,-1.5beak_jut);
 pickup crisp.nib;
 pos21(stem',0); pos22(hair,90); z21=(x1,.6h); y22r=y4;
 varm(21,22,b,.8beak_darkness,-1.3beak_jut); fi
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,21,22); endchar;

cmchar "H-V ligature";
beginchar(oct"377",13.8u#,asc_height#,0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
pos1'(stem',0); pos2'(stem',0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1-3.8u;
top y1=h; bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
y3=1/3[bar_height,x_height];
penpos2''(x2r-x2l,0); x2''=x2; y2''=1/8[bar_height,x_height];
filldraw stroke z2''e--z2e;  % thicken the lower left stem
penpos a0(min(rt x2r-lft x2l,thin_join)-fine,180); pickup fine.nib;
rt x a0l=tiny.rt x2r; y a0=y2'';
pos a1(vair,90); pos3'(x3r-x3l+tiny,0); z3'=z3;
x a1=.5[rt x a0l,rt x3'r]; top y a1r=x_height+oo;
(x a,y a1l)=whatever[z a1r,z a0l]; x a1l:=x a;
filldraw stroke z a0e{up}...{right}z a1e
 &{{interim superness:=hein_super; super_arc.e(a1,3')}};  % arch
labels(a0); penlabels(a1);
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x3l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x3l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); fi % lower left serif
pickup tiny.nib; interim superness:=more_super;
pos3''(stem,180);y3''=y3;
pos4(stem,180); x4=x3''=x3;
pos5(vair,-90); pos6(hair,0);
x5=x4+2.8u; rt x6r=hround(w-.7u); y4=.4h; bot y5r=-oo; y6=.4h;
filldraw stroke z3''e{down}--super_arc.e(4,5) % v stroke
 ..tension atleast 1.05..{up}z6e; % left stem and arc
v_bulb(6,7);  % closing bulb
penlabels(1,2,3,4,5,6,7); endchar;

cmchar "Comma-tail Z";
beginchar(oct"336",9u#,x_height#,desc_depth#);
italcorr x_height#*slant-.5serif_fit#-1u#;
adjust_fit(0,.5serif_fit#);
numeric arm_thickness[],z_stem;
arm_thickness1=vair; arm_thickness2=1.2vair; z_stem=.9[vair,stem];
pickup tiny.nib; rt x1r=rt x2r=hround(.89w-.8u);
lft x3l=lft x4l=hround .5u;
top y1=h; y2=min(y1,h-2/3arm_thickness1);
bot y4=0; y3=max(y4,2/3arm_thickness2);
numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3));
penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0);
penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0);
pair delta; delta=penoffset z3-z2 of currentpen;
fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l
 ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r
 ---cycle;  % diagonal
pickup tiny.nib; pos5(arm_thickness1,90); pos6(hair,180);
top y5r=h; x5=x1; lft x6r=hround .75u; y6=good.y(y5l-beak/1.4)-eps;
arm(5,6,a,beak_darkness,-.4beak_jut);  % upper arm and beak
pos7(arm_thickness2,90); pos8(arm_thickness2,90);
 x7=x4; bot y8l=bot y7l=y8'=0; x8=x5-1.5u;
 pos9(hair,0); y9=-.4d; rt x9r =hround(x8+2.5u);
 pos10(hair,-90); y10=-.8d;% x10=x8-.5u;
 pos11(hair,-100); y11=-.7d; x11=.5[x3,x9];
 x9-x10=x10-x11;
filldraw stroke z7e--z8e{right}..z9e{down}..{left}z10e..z11e;
penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;

% end of tipagerm.mf