summaryrefslogtreecommitdiff
path: root/fonts/malvern/source/magrcaps.mf
blob: b0aeb844846c0eeed92652cc53909315dcd8b909 (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
% magrcaps.mf 1.2.0 1994/10/11 -- caps in greek and not latin
% Copyright 1994 P. Damian Cugley

%%% @METAFONT-file {
%%%   filename       = "magrcaps.mf",
%%%   version        = "1.2.0",
%%%   date           = "1994/10/11",
%%%   package        = "Malvern 1.2",
%%%   author         = "P. Damian Cugley",
%%%   email          = "damian.cugley@comlab.ox.ac.uk",
%%%   address        = "Oxford University Computing Laboratory,
%%%                     Parks Road, Oxford  OX1 3QD, UK",
%%%   codetable      = "USASCII",
%%%   keywords       = "Malvern, METAFONT, font, typefont, TeX",
%%%   supported      = "Maybe",
%%%   abstract       = "Greek cap. character programs for the Malvern
%%%                     font family.",
%%%   dependencies   = "other program files",
%%% }

%  See the Malvern Handbook (maman.tex) for more info about Malvern.
%  This software is available freely but without warranty.
%  See the file COPYING for details.

%{{{ magrcaps.mf

set_cap_widths;

if testing: endinput fi

"Greep capital Gamma"; do_EFL(code.gr.cap.gamma, true, 0, 0, false);
%{{{   Delta, Lambda

"Greek capital Delta";
ma_cap(code.gr.cap.delta, wide_wd# + 3pn_adj#)(1/3,1/3);
    A_body(false, true);
endchar;

"Greek capital Lambda";
ma_cap(code.gr.cap.lambda, wide_wd# + 3pn_adj#)(1/3,1/3);
    A_body(false, false);
endchar;

%}}}
%{{{   Theta, Koppa

"Greek Capital Theta"; 
ma_char(code.gr.cap.theta, O_wd#, height#, 0v#)(O_sp, O_sp);
    draw_O;
    y1bar = y2bar = good.y 0.505h;
    lft x1bar = w - rt x2bar = max(1/5[l,r], rt x2 + 1/2u);
    draw z1bar -- z2bar;
    labels(1bar, 2bar);
    set_ic_O;
endchar;

iff known code.gr.cap.koppa: "Greek Capital Koppa";
ma_char(code.gr.cap.koppa, O_wd#, height#, desc_dp#)(O_sp, O_sp);
    if 1/2w <> good.x 1/2w: change_width; fi
    draw_O;     set_ic_O;
    z1stroke = good.top (1/2w, 1/3h);
    bot y2stroke = -d; x2stroke = x1stroke;
    draw z1stroke -- z2stroke;
    labels(1stroke, 2stroke);
endchar;

%}}}
%{{{   Xi

iff known code.gr.cap.xi1: "eccentric Greek capital Xi";
ma_cap(code.gr.cap.xi1, medium_wd# + 2pn_adj#)(1/2,1/2);
    lft x1 = lft x5 = w - rt x2 = w - rt x6 = l;
    top y1 = top y2 = h; bot y5 = bot y6 = -d;
    y3 = y4 = good.y 0.55[-d, h];
    lft x3 = w - rt x4 = max(lft x1 + 1/2u, 1/5[l,r]);
    draw z1 -- z2 -- bot z2 
    	-- top z3 -- z3 -- z4 -- bot z4
    	-- top z5 -- z5 -- z6;
    labels(range 1 thru 6); set_ic_tr;
endchar;

iff known code.gr.cap.xi: "Greek capital Xi";
ma_cap(code.gr.cap.xi, medium_wd# + 2pn_adj#)(1/2,1/2);
    lft x1 = lft x5 = w - rt x2 = w - rt x6 = l;
    top y1 = top y2 = h; bot y5 = bot y6 = -d;
    y3 = y4 = good.y 0.55[-d, h];
    lft x3 = w - rt x4 = max(lft x1 + 1/2u, 1/5[l,r]);
    draw z1 -- z2;
    draw z3 -- z4;
    draw z5 -- z6;
    labels(range 1 thru 6); set_ic_tr;
endchar;

%}}}
%{{{   Pi

ma_cap(code.gr.cap.pi, medium_wd# + 2pn_adj#)(1,1);
    lft x1 = lft x2 = w - rt x3 = w - rt x4 = l;
    top y2 = top y3 = h; bot y1 = bot y4 = -d - o;
    draw z1 -- z2 -- z3 -- z4;
    set_ic_tr;
    labels(1,2,3,4);
endchar;

%}}}
%{{{   Sigma

ma_cap(code.gr.cap.sigma, medium_wd# + 2pn_adj#)(1/3,1/2);
    rt x1 = rt x5 = r; lft x2 = lft x4 = l;
    top y1 = top y2 = h; bot y4 = bot y5 = -d;
    y3 = 0.54[y4, y2]; x3 = good.x 0.7[x2, x1];
    draw z1 -- z2 -- bot z2 -- z3 -- top z4 -- z4 -- z5;
    labels(1, 2, 3, 4, 5);
    set_ic_tr;
endchar;

%}}}
%{{{   Upsilon

iff known code.gr.cap.upsilon:
ma_cap(code.gr.cap.upsilon, medium_wd# + 2pn_adj#)(1/2,1/2); 
    draw_Y(0.55[-d, h]); set_ic_tr; 
endchar;

iff known code.gr.cap.upsilon1:
ma_cap(code.gr.cap.upsilon1, medium_wd# + 2pn_adj#)(1/3,1/3);
    if 1/2w <> good.x (1/2w): change_width; fi
    x2stem = x1stem = 1/2w;
    bot y2stem = d - o; y1stem = 0.475[-d, h];
    lft x1arm = l; top y2arm = h; 
    y1arm = bot y2arm; x2arm = rt x1arm;
    y3arm = y1arm; lft x3arm = rt x2arm;
    path p; p = z1arm ... z2arm ... z3arm{z1stem - z2arm} ... z1stem;
    draw p; draw p reflectedabout(z1stem, z2stem);
    draw z1stem -- z2stem; 
    labels(1stem, 2stem, 1arm, 2arm); set_ic_tr;
endchar;

%}}}
%{{{   Phi, Psi

def PhiPsi(expr pp) = 
    if 0.5w <> good.x 0.5w: change_width; fi
    top z1stem = (1/2w, h + o); bot z2stem = (1/2w, -d - o);
    top y1a = top y1b = bot y3a + 8v = bot y3b + 8v
    	= vround (1/2[-d, h] + 4v);
    x1a = x3a = lft x1stem; x1b = x3b = rt x1stem;
    lft x2a = w - rt x2b = l; y2a = y2b = 1/2[y1a, y3a];
    forsuffixes $ = a,b:
    	draw 
    	    if pp: z1${(x2$ - x1$, 0)}
    	    	... (1/sqrt2)[(x1$, y2$), (x2$, y1$)]{z2$ - z1$}
    	    else: (x2$, y1$)
    	    fi
    	    ... z2${down}
    	    ... (1/sqrt2)[(x3$, y2$), (x2$, y3$)]{z3$ - z2$}
    	    ... z3${(x3$ - x2$, 0)};
    endfor;
    draw z1stem -- z2stem;
    labels(1stem, 2stem);
enddef;

"Greek capital Phi"; ma_cap(code.gr.cap.phi, 8u# + pn.wd#)(1/2, 1/2); PhiPsi(true); endchar;
"Greek capital Psi"; ma_cap(code.gr.cap.psi, 6u# + 3pn.wd#)(1/2, 1/2); PhiPsi(false); endchar;
%}}}
%{{{   Omega

%	    6
%	 5     7
%      4	 8
%
%	 3     9
%      1   2   10 11

"Greek Capital Omega";
ma_char(code.gr.cap.omega, O_wd#, height#, 0v#)(O_sp, O_sp);
    lft x1 = w - rt x11 = lft x4 = w - rt x8 = l;
    bot y1 = bot y2 = bot y10 = bot y11 = -d;  top y6 = h + o;
    x6 = 1/2[l,r];
    rt x2 = w - lft x10 = hround min(1/2w - 1/2u, 1/3[l,r]);
    y4 = y8 = 0.52[top y2, y6]; 
    numeric super; super = 1/sqrt2;
    z5 = super[(x6, y4), (x4, y6)]; z7 = super[(x6, y8), (x8, y6)];
    x3 = x5; x9 = x7;
    1/2[y3, y5] = 1/2[y9, y7] = y4;
    draw z1 -- z2 --- top z2 
	... z3{z6 - z8} ... z4 ... z5{z6 - z4} ... z6 ... z7{z8 - z6} ... z8 
	... z9{z4 - z6} ... top z10 --- z10 -- z11;
    labels(range 1 thru 11);
    set_ic_O;
endchar;


%}}}
%{{{   Digamma/Wau

if known code.gr.cap.digamma:
    do_EFL(code.gr.cap.digamma, true, 0, 5/6, false);
fi

%}}}   Digamma
%{{{   Lunate Sigma

iff known code.gr.cap.sigma1: "Capital Greek lunate Sigma";
ma_cap(code.gr.cap.sigma1, medium_wd# + pn_adj#)(1/2,1/3);
    draw_C(l, h, r, -d) 0; set_ic_tr; 
endchar;

%}}}   Lunate Sigma

greek_names := 1;
input maglcaps

%}}} magrcaps.mf

%Local variables:
%fold-folded-p: t
%End: