Debian Codegraph @

texmf-dist/fonts/source/jknappen/ec/txaccent.mf

raw
1 % txaccent.mf
2 %
3 % (c) Copyright 1995, 1996, 1997 J"org Knappen
4 %
5 % This file is part of ecfonts version 1.0
6 %
7 % Please read the files 00readme.txt, 00inst.txt, 00error.txt, and
8 % copyrite.txt for further information
9 %
10 % You find some documentation in ecdoc.tex (needs LaTeX2e)
11 %
12 % ec Version 1.0
13 %
14 % Content:
15 %
16 % Accents for capital letters
17
18 version_check(1,0); % |version_check| was introduced in dc1.3
19
20 % A dirty trick, better left unseen. |cap_height| and |cap_height#|
21 % are restored at the end of this file.
22
23 numeric saved_cap_height; saved_cap_height=cap_height;
24 cap_height:=hi.x_height;
25 numeric saved_cap_height#; saved_cap_height#=cap_height#;
26 cap_height#:=hi.x_height#;
27
28 vardef is_cap = true enddef;
29
30 ecchar"Grave accent";
31 beginchar_twice(oct"0",9u#,x_height#,0); % |put_gravis| changes the height
32 adjust_fit(0,0);
33 put_gravis;
34 repeat_once;
35 endchar;
36
37
38 ecchar"Acute accent"; % using acute from plfonts
39 beginchar_twice(oct"1",9u#,x_height#,0); % |put_accent| changes the height
40 italcorr h#*slant-if serifs: 1.5 fi u#;
41 adjust_fit(0,0);
42 put_accent;
43 repeat_once;
44 endchar;
45
46 ecchar"Circumflex (hat) accent";
47 beginchar(oct"002",9u#,cap_accent_height#,0);
48 if serifs: italcorr .5[x_height#,h#]*slant+.5hair#-1.75u#;
49 else: italcorr 2/3[x_height#,h#]*slant-.5stem#+.5vair#-.75u#;
50 fi
51 adjust_fit(0,0);
52 uppercase_hat(.5w,0,1,2,3,4,5);
53 penlabels(1,2,3,4,5); endchar;
54
55 ecchar"Tilde (squiggle) accent";
56 beginchar(oct"003",9u#,cap_accent_height#,0);
57 italcorr h#*slant-u#;
58 adjust_fit(0,0);
59 uppercase_tilde(0,0,1,2,3,4,5);
60 penlabels(1,2,3,4,5); endchar;
61
62 ecchar"Umlaut (double dot) accent";
63 beginchar(oct"004",9u#,cap_accent_height#,0);
64 adjust_fit(0,0);
65 uppercase_umlaut(0,0,1,2,3,4);
66 penlabels(1,2,3,4);
67 endchar;
68
69 ecchar"Double acute accent (Long Hungarian umlaut accent)";
70 beginchar_twice(oct"005",9u#,min(asc_height#,2x_height#),0);
71 italcorr h#*slant-u#;
72 adjust_fit(0,0);
73 if monospace: hpos_corr=-2u; put_accent; hpos_corr=2u; put_accent;
74 else: hpos_corr=-1.5u; put_accent; hpos_corr=1.5u; put_accent; fi
75 repeat_once;
76 endchar;
77
78 ecchar"Scandinavian circle accent";
79 beginchar(oct"006",13u#+.5width_adj#,cap_accent_height#,0);
80 adjust_fit(cap_serif_fit#,cap_serif_fit#);
81 y[-1]= cap_height+if hefty: .5 fi accent_gap;
82 uppercase_circle(.5w,y[-1],1,2,3,4);
83 penlabels(1,2,3,4); endchar;
84
85 ecchar"Hachek (check) accent";
86 beginchar(oct"007",9u#,cap_accent_height#,0);
87 adjust_fit(0,0);
88 uc_hachek_accent(.5w);
89 endchar;
90
91 ecchar"Breve accent";
92 beginchar(oct"10",9u#,cap_accent_height#,0);
93 italcorr h#*slant+.5vair#-1.5u#;
94 adjust_fit(0,0);
95 uppercase_breve(.5w,0,1,2,3);
96 penlabels(1,2,3); endchar;
97
98 ecchar"Macron (bar) accent";
99 numeric macron_breadth#; macron_breadth#=.2[vair#,stem#];
100 beginchar(oct"011",9u#,cap_accent_height#,0);
101 italcorr h#*slant-.75u#;
102 adjust_fit(0,0);
103 numeric macron_breadth; macron_breadth:=Vround .2[vair,stem];
104 pickup if serifs: crisp.nib else: fine.nib fi;
105 pos1(macron_breadth,90); pos2(macron_breadth,90);
106 top y1r=top y2r=h+o; lft x1=w-rt x2=hround 1.25u;
107 filldraw stroke z1e--z2e; % bar
108 penlabels(1,2); endchar;
109
110 ecchar"Dot accent";
111 beginchar_twice(oct"012",5u#,x_height#,0);
112 adjust_fit(0,0);
113 put_dot(tiny,max(dot_size#,cap_curve#));
114 repeat_once;
115 endchar;
116
117 ecchar"Cedilla accent";
118 beginchar(oct"013",8u#,0,.875desc_depth#);
119 adjust_fit(0,0);
120 uppercase_cedilla(.5w,0,1,2,3,4,5);
121 penlabels(1,2,3,4,5); endchar;
122
123 ecchar"Ogonek";
124 beginchar(oct"014",5u#,0,desc_depth#);
125 italcorr 0;
126 adjust_fit(0,0);
127 ogon_one := 1;
128 ogon_two := 2;
129 ogon_three := 3;
130 if serifs:
131 x[ogon_one]r=0.7w;
132 %+outer_jut;
133 else:
134 x[ogon_one]r=0.6w;
135 fi
136 pickup crisp.nib;
137 pos[ogon_one](
138 if 0.9vair>currentbreadth: 0.9vair else: currentbreadth+eps fi,-60);
139 pos[ogon_two](stem,0);
140 pos[ogon_three](vair,145);
141 x[ogon_two]=x[ogon_one]-2.5u if monospace: /expansion_factor fi ;
142 x[ogon_three]=x[ogon_one]+0.5u if monospace: /expansion_factor fi;
143 bot y[ogon_one]r = 0;
144 bot y[ogon_three]=0.5(-d-o); %0.4
145 bot y[ogon_two]=0.5(-d-o);
146 filldraw stroke z[ogon_one]e{dir 225}...
147 z[ogon_two]e{dir -110}...{dir 60}z[ogon_three]e; % hook
148 penlabels(1,2,3); endchar;
149
150 iff not is_small_cap:
151 ecchar"Capital tie accent";
152 beginchar(oct"033",max(6u#,4u#+cap_stem#),uc_acc_height#,0); % same width as `I'
153 italcorr 4/9[x_height#,uc_acc_height#]*slant+5u#+2letter_fit#+.5hair#;
154 adjust_fit(if monospace:2u#,2u# else:serif_fit#,serif_fit# fi);
155 pickup fine.nib; pos1(hair,180); pos2(vround 1/5[vair,stem],90);
156 pos3(hair,0);
157 lft x1r=hround(.5w-.5hair); x2=.5[x1,x3];
158 rt x3r=hround(w+4.5u+2letter_fit+.5hair);
159 y1=y3=cap_height + if hefty: .5 fi accent_gap; top y2r=cap_height+acc_height;
160 filldraw stroke super_arc.e(1,2) & super_arc.e(2,3); % arc
161 penlabels(1,2,3); endchar;
162
163 iff not is_small_cap:
164 ecchar"New capital tie accent"; % centered
165 beginchar(oct"035",9u#,asc_height#,0);
166 italcorr 4/9[x_height#,uc_acc_height#]*slant+5u#+2letter_fit#+.5hair#;
167 adjust_fit(if monospace:2u#,2u# else:serif_fit#,serif_fit# fi);
168 pickup fine.nib; pos1(hair,180); pos2(vround 1/5[vair,stem],90);
169 pos3(hair,0);
170 lft x1r=w-rt x3r=hround(u-.5vair); x2=.5w;
171 y1=y3=cap_height + if hefty: .5 fi accent_gap; top y2r=cap_height+acc_height;
172 filldraw stroke super_arc.e(1,2) & super_arc.e(2,3); % arc
173 penlabels(1,2,3); endchar;
174
175
176 % Restore original values of |cap_height| and |cap_height#|
177 cap_height:=saved_cap_height; numeric saved_cap_height;
178 cap_height#:=saved_cap_height#; numeric saved_cap_height#;
179
180 endinput;