summaryrefslogtreecommitdiff
path: root/fonts/euro-ce/eurosp.mf
blob: 4d2f7509712c456231804690465a0c4b68a56dc3 (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
% EUROSP.MF --- version 3.0 (6 March 2002) --- (c) Harold W. de Wijn
% EXAMPLE FILE FOR SPECIAL EFFECTS
% FILE SHOULD BE RENAMED WHENEVER IT IS MODIFIED!

message "EUROSP.MF v3.0 (6 March 2002) - (c) Harold W. de Wijn";

font_identifier:="EUROSP"; font_size 10pt#;
u#:=20/36pt#;                % values of cmr10
letter_fit#:=0pt#;
cap_height#:=246/36pt#;
fig_height#:=232/36pt#;
x_height#:=155/36pt#;
o#:=6/36pt#;                 % slightly smaller than for cmr10

% Switch to the driver file, but return in time to do the specials.
Return:=1; input euromac;

% ---------- Font dimensions ----------
font_slant 0;                % most symbols are upright
font_x_height x_height#;
font_normal_space 6u#+2letter_fit#;
font_normal_stretch 3u#;
font_normal_shrink 2u#;
font_quad 18u#+4letter_fit#;
font_extra_space 2u#;

% ---------- Generating symbols  ----------
"Official euro symbol";
BoxHeight#:=cap_height#; C:=1; T:=1; S:=0;
beginchar("E",0,BoxHeight#,0); draw_euro; endchar;

"Thick";
BoxHeight#:=cap_height#; C:=1; T:=4/3; S:=0;
beginchar("a",0,BoxHeight#,0); draw_euro; endchar;

"Very thick";
BoxHeight#:=cap_height#; C:=1; T:=5/3; S:=0;
beginchar("b",0,BoxHeight#,0); draw_euro; endchar;

"Thin";
BoxHeight#:=cap_height#; C:=1; T:=2/3; S:=0;
beginchar("c",0,BoxHeight#,0); draw_euro; endchar;

"Very thin";
BoxHeight#:=cap_height#; C:=1; T:=1/3; S:=0;
beginchar("d",0,BoxHeight#,0); draw_euro; endchar;

"Dunhill";
BoxHeight#:=351/251*cap_height#;
% Adjust C and T such that width and thickness equal those of the official
% euro symbol
T:=(cap_height#+2o#)/(BoxHeight#+2o#); S:=0;
C:=T;                     % first approximation
C:=T/WidthFactor(C,T);    % second approximation
beginchar("e",0,BoxHeight#,0); draw_euro; endchar;

"Tall";
BoxHeight#:=2*cap_height#;
T:=(cap_height#+2o#)/(BoxHeight#+2o#); S:=0;
C:=T; C:=T/WidthFactor(C,T);
beginchar("f",0,BoxHeight#,0); draw_euro; endchar;

"Very tall";
BoxHeight#:=3*cap_height#;
T:=(cap_height#+2o#)/(BoxHeight#+2o#); S:=0;
C:=T; C:=T/WidthFactor(C,T);
beginchar("g",0,BoxHeight#,0); draw_euro; endchar;

"Narrow";
BoxHeight#:=cap_height#; C:=1/2; T:=1; S:=0;
beginchar("h",0,BoxHeight#,0); draw_euro; endchar;

"Very narrow";
BoxHeight#:=cap_height#; C:=1/3; T:=1; S:=0;
beginchar("i",0,BoxHeight#,0); draw_euro; endchar;

"Wide";
BoxHeight#:=cap_height#; C:=2; T:=1; S:=0;
beginchar("j",0,BoxHeight#,0); draw_euro; endchar;

"Very wide";
BoxHeight#:=cap_height#; C:=3; T:=1; S:=0;
beginchar("k",0,BoxHeight#,0); draw_euro; endchar;

"Leaning backward";
BoxHeight#:=cap_height#; C:=1; T:=1; S:=-1/6;
beginchar("l",0,BoxHeight#,0); draw_euro; endchar;

"Leaning forward";
BoxHeight#:=cap_height#; C:=1; T:=1; S:=1/2;
beginchar("m",0,BoxHeight#,0); draw_euro; endchar;

"Leaning very forward";
BoxHeight#:=cap_height#; C:=1; T:=1; S:=1;
beginchar("n",0,BoxHeight#,0); draw_euro; endchar;

"Mirrored";
BoxHeight#:=cap_height#; C:=1; T:=1; S:=0;
begingroup;
save add_transform;
def add_transform = identity                     % w=box width in pixels
   reflectedabout ((1/2w,0),(1/2w,h)); enddef;   % h=box height in pixels
beginchar("o",0,BoxHeight#,0); draw_euro; endchar;
endgroup;

"Rotated";
BoxHeight#:=cap_height#; C:=1; T:=1; S:=0;
begingroup;
save add_transform;
def add_transform= identity
   rotatedabout ((1/2w,1/2h),180); enddef;
beginchar("p",0,BoxHeight#,0); draw_euro; endchar;
endgroup;

"Tilted";
BoxHeight#:=cap_height#; C:=1; T:=1; S:=0;
begingroup;
save add_transform;
def add_transform= identity
   rotatedabout ((LeftMargin+0.638OuterDiameter,1/2h),5); enddef;
beginchar("q",0,BoxHeight#,0); draw_euro; endchar;
endgroup;

bye