-
Notifications
You must be signed in to change notification settings - Fork 0
/
ogham.mf
155 lines (135 loc) · 4.61 KB
/
ogham.mf
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
% ogham.mf
% This font was designed by Alan M Stanier ( [email protected] ),
% at Essex University Computer Service, Colchester, Essex CO4 3EA. England.
%
% Maintenance now overseen by Robin Fairbairns of Cambridge University.
% (search on the web for my email address)
%
% Alan Stanier asked that if you make significant additions
% or improvements to the font, you should send him an updated version;
% if you send it to CTAN as a contribution, and mark it for my attention,
% I shall see that it is installed, and ensure that Alan has a copy.
%
% The font is released into the public domain.
%
%
% The OGHAM alphabet is found on a number of Irish and Pictish
% carvings dated from the 4th century AD.
% The characters touch or cross the edges of the stone.
%
% There are 20 characters in the alphabet, representing:
%
% a o u e i
% b l v s n
% h d t c q
% m g ng z r
%
% I have coded ng as 'j'.
%
% Each character is given in lower case (as carved on vertical edges)
% and upper case (as carved on horizontal edges).
%
mg#:=.4pt#; % a unit length, not a magnification.
mode_setup;
font_size 10pt#;
pensize#:=1.25*mg#;
bigpensize#:=2.0*mg#;
height#:=15pt#;
bigheight#:=20pt#;
define_pixels(mg);
define_blacker_pixels(pensize,bigpensize);
def getpen = pickup pencircle scaled pensize enddef;
def getbigpen = pickup pencircle scaled bigpensize enddef;
def top =
getbigpen;
draw (-5*mg,15*mg) -- (40*mg,15*mg);
getpen;
enddef;
def bigtop =
getbigpen;
draw (-5,15*mg) -- (50*mg,15*mg);
getpen;
enddef;
def edge =
getbigpen;
draw (15*mg,0) -- (15*mg,30*mg);
getpen;
enddef;
def bigedge =
getbigpen;
draw (15*mg,0) -- (15*mg,40*mg);
getpen;
enddef;
def full(expr n) =
edge;
for i = 1 upto n: draw (0,5*i*mg) -- (30*mg,5*i*mg); endfor
enddef;
def lineright(expr n) =
edge;
for i = 1 upto n: draw (15*mg,5*i*mg) -- (30*mg,5*i*mg); endfor
enddef;
def lineleft(expr n) =
edge;
for i = 1 upto n: draw (0,5*i*mg) -- (15*mg,5*i*mg); endfor
enddef;
def slope(expr n) =
bigedge;
for i = 1 upto n: draw (0,(6*i+16)*mg) -- (30*mg,6*(i-1)*mg); endfor
enddef;
def across(expr n) =
top;
for i = 1 upto n: draw (5*i*mg,0) -- (5*i*mg,30*mg); endfor
enddef;
def lineup(expr n) =
top;
for i = 1 upto n: draw (5*i*mg,15*mg) -- (5*i*mg,30*mg); endfor
enddef;
def linedown(expr n) =
top;
for i = 1 upto n: draw (5*i*mg,0) -- (5*i*mg,15*mg); endfor
enddef;
def lean(expr n) =
bigtop;
for i = 1 upto n: draw (6*(i-1)*mg,0) -- ((6*i+16)*mg,30*mg); endfor
enddef;
beginchar("a",height#,height#,0); full(1); endchar;
beginchar("A",height#,height#,0); across(1); endchar;
beginchar("o",height#,height#,0); full(2); endchar;
beginchar("O",height#,height#,0); across(2); endchar;
beginchar("u",height#,height#,0); full(3); endchar;
beginchar("U",height#,height#,0); across(3); endchar;
beginchar("e",height#,height#,0); full(4); endchar;
beginchar("E",height#,height#,0); across(4); endchar;
beginchar("i",height#,height#,0); full(5); endchar;
beginchar("I",height#,height#,0); across(5); endchar;
beginchar("b",height#,height#,0); lineright(1); endchar;
beginchar("B",height#,height#,0); linedown(1); endchar;
beginchar("l",height#,height#,0); lineright(2); endchar;
beginchar("L",height#,height#,0); linedown(2); endchar;
beginchar("v",height#,height#,0); lineright(3); endchar;
beginchar("V",height#,height#,0); linedown(3); endchar;
beginchar("s",height#,height#,0); lineright(4); endchar;
beginchar("S",height#,height#,0); linedown(4); endchar;
beginchar("n",height#,height#,0); lineright(5); endchar;
beginchar("N",height#,height#,0); linedown(5); endchar;
beginchar("h",height#,height#,0); lineleft(1); endchar;
beginchar("H",height#,height#,0); lineup(1); endchar;
beginchar("d",height#,height#,0); lineleft(2); endchar;
beginchar("D",height#,height#,0); lineup(2); endchar;
beginchar("t",height#,height#,0); lineleft(3); endchar;
beginchar("T",height#,height#,0); lineup(3); endchar;
beginchar("c",height#,height#,0); lineleft(4); endchar;
beginchar("C",height#,height#,0); lineup(4); endchar;
beginchar("q",height#,height#,0); lineleft(5); endchar;
beginchar("Q",height#,height#,0); lineup(5); endchar;
beginchar("m",height#,bigheight#,0); slope(1); endchar;
beginchar("M",bigheight#,height#,0); lean(1); endchar;
beginchar("g",height#,bigheight#,0); slope(2); endchar;
beginchar("G",bigheight#,height#,0); lean(2); endchar;
beginchar("j",height#,bigheight#,0); slope(3); endchar;
beginchar("J",bigheight#,height#,0); lean(3); endchar;
beginchar("z",height#,bigheight#,0); slope(4); endchar;
beginchar("Z",bigheight#,height#,0); lean(4); endchar;
beginchar("r",height#,bigheight#,0); slope(5); endchar;
beginchar("R",bigheight#,height#,0); lean(5); endchar;
end