summaryrefslogtreecommitdiff
path: root/fonts/capbas/flyspec.mf
blob: 0d590951362909a13b8d01341cf6094805418b0e (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
%%% @mffile{
%%%     filename="flyspec.mf",
%%%     version="",
%%%     date="",
%%%     filetype="mf fontcreator",
%%%     package="m-capbas.arj"
%%%     author="Phons Bloemen (PhB)",
%%%     address="Eindhoven U. of Technology"
%%%     email="Internet: phons@ei.ele.tue.nl",
%%%     codetable="ISO/ASCII",
%%%     checksumtype="none",
%%%     checksum="0",
%%%     keywords="",
%%%     abstract="
%%%        Generates flyspec font, a 5x5 grid font.
%%%        This is the 'Flyspec 3' font as mentioned in
%%%        'the Jargon File'. May be even Flyspec 2!
%%%        Part of Capital Baseball package"
%%%     copyright="Copyleft (L) Phons Bloemen (PhB),
%%%        according to GNU public licence version 2 or later.
%%%        (1) Do not change this file (even its name)
%%%        (2) if you do make changes, first rename it to some
%%%            other name, and mark your changes clearly.",
%%%     }
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%% if unknown cmbase: input cmbase fi
%% mode_setup;
%% def generate suffix t= enddef;
%% input cmtt10; font_setup;
%% get some definitions from cmtt10 for proper setup
%% do not ask why this sequence is used, it works!

mode_setup;

if unknown gensize: gensize := 10; fi;
em# := gensize * 0.3pt#;
uu# := 0.3 em#;
font_coding_scheme:="TeX text";
font_identifier:="FLYSPEC";
font_size gensize * 1pt#;
body_height#:=5uu#;  % height of tallest characters
asc_height#:=5uu#;    % height of lowercase ascenders
cap_height#:=5uu#;    % height of caps
fig_height#:=5uu#;    % height of numerals
x_height#:=4uu#;    % height of lowercase without ascenders
math_axis#:=3uu#;    % axis of symmetry for math symbols
bar_height#:=3uu#;    % height of crossbar in lowercase e
comma_depth#:=1uu#;    % depth of comma below baseline
desc_depth#:=1uu#;    % depth of lowercase descenders
%% monospace := false;
%% font_setup;
font_normal_space 4uu#;
font_quad 18uu#;
font_extra_space 4uu#;

%%% This draws the dot matrix (a generic function, can
%%% be used for many dot matrix characters).
%%% Parameters of 'flychar':
%%%     c : character number (decimal)
%%%     k : # dots horizontal ('width')           0  1  2  3
%%%     l : # dots vertical ('height')            4  5  6  7
%%%     m : # dots descender ('depth')            8  9 10 11
%%%     t : sequence of dot numbers to set.      12 13 14 15
%%%         Dot numbering of a 4 x 5 'flychar':  16 17 18 19

def flychar(expr c,k,l,m)(text t) =
beginchar((char c), (k+1)*uu#, l*uu#, m*uu#);
   clearit;
   pickup pensquare xscaled (w/(k+1)) yscaled((h+d)/(l+m));
   for a = t :
      drawdot((0.5+(a mod k))*w/(k+1),h-((0.5+floor(a/k))*(h+d)/(l+m)));
   endfor;
endchar;
enddef;

%%% The space character is special

beginchar(32,4*uu#,5*uu#,0);
endchar;

%%% The 'flychar' characters follow (upper and lower case!)

flychar(33,1,5,0)(0,1,2,4);
flychar(34,3,3,0)(0,2,3,5);
flychar(35,5,5,0)(1,3,5,6,7,8,9,11,13,15,16,17,18,19,21,23);
flychar(36,5,5,0)(1,2,3,4,5,7,11,12,13,17,19,20,21,22,23);
flychar(37,5,5,0)(0,1,4,5,8,12,16,19,20,23,24);
flychar(38,5,5,0)(1,5,7,11,15,17,19,21,22,23);
flychar(39,2,3,0)(1,2);
flychar(40,2,5,0)(1,2,4,6,9);
flychar(41,2,5,0)(0,3,5,7,8);
flychar(42,5,5,0)(2,5,7,9,11,12,13,15,17,19,22);
flychar(43,5,5,0)(2,7,10,11,12,13,14,17,22);
flychar(44,2,4,1)(7,8);
flychar(45,5,5,0)(10,11,12,13,14);
flychar(46,1,5,0)(4);
flychar(47,5,5,0)(4,8,12,16,20);
flychar(48,5,5,0)(1,2,3,5,9,10,14,15,19,21,22,23);
flychar(49,5,5,0)(1,2,7,12,17,21,22,23);
flychar(50,5,5,0)(0,1,2,3,9,12,13,16,20,21,22,23,24);
flychar(51,5,5,0)(0,1,2,3,4,8,12,13,15,19,21,22,23);
flychar(52,5,5,0)(0,4,5,9,10,11,12,13,14,19,24);
flychar(53,5,5,0)(0,1,2,3,4,5,10,11,12,13,19,20,21,22,23);
flychar(54,5,5,0)(1,2,3,4,5,10,11,12,13,15,19,21,22,23);
flychar(55,5,5,0)(0,1,2,3,4,9,14,19,24);
flychar(56,5,5,0)(1,2,3,5,9,11,12,13,15,19,21,22,23);
flychar(57,5,5,0)(1,2,3,5,9,11,12,13,14,19,20,21,22,23);
flychar(58,1,5,0)(1,3);
flychar(59,2,4,1)(3,7,8);
flychar(60,3,5,0)(2,4,6,10,14);
flychar(61,5,5,0)(5,6,7,8,9,15,16,17,18,19);
flychar(62,3,5,0)(0,4,8,10,12);
flychar(63,5,5,0)(1,2,3,5,9,13,22);
flychar(64,5,5,0)(0,1,2,3,4,5,6,9,10,11,14,19,20,21,22,23,24);
flychar(65,5,5,0)(1,2,3,5,9,10,11,12,13,14,15,19,20,24);
flychar(66,5,5,0)(0,1,2,3,5,9,10,11,12,13,15,19,20,21,22,23);
flychar(67,5,5,0)(0,1,2,3,4,5,10,15,20,21,22,23,24);
flychar(68,5,5,0)(0,1,2,3,5,9,10,14,15,19,20,21,22,23);
flychar(69,5,5,0)(0,1,2,3,4,5,10,11,12,13,15,20,21,22,23,24);
flychar(70,5,5,0)(0,1,2,3,4,5,10,11,12,13,15,20);
flychar(71,5,5,0)(1,2,3,4,5,10,15,19,21,22,23,24);
flychar(72,5,5,0)(0,4,5,9,10,11,12,13,14,15,19,20,24);
flychar(73,3,5,0)(0,1,2,4,7,10,12,13,14);
flychar(74,3,5,0)(0,1,2,5,8,11,12,13);
flychar(75,5,5,0)(0,4,5,8,10,11,12,15,18,20,24);
flychar(76,5,5,0)(0,5,10,15,20,21,22,23,24);
flychar(77,5,5,0)(0,4,5,6,8,9,10,12,14,15,19,20,24);
flychar(78,5,5,0)(0,4,5,6,9,10,12,14,15,18,19,20,24);
flychar(79,5,5,0)(0,1,2,3,4,5,9,10,14,15,19,20,21,22,23,24);
flychar(80,5,5,0)(0,1,2,3,5,9,10,11,12,13,15,20);
flychar(81,5,5,0)(0,1,2,3,4,5,9,10,12,14,15,18,20,21,22,24);
flychar(82,5,5,0)(0,1,2,3,5,9,10,11,12,13,15,18,20,24);
flychar(83,5,5,0)(1,2,3,4,5,11,12,13,19,20,21,22,23);
flychar(84,5,5,0)(0,1,2,3,4,7,12,17,22);
flychar(85,5,5,0)(0,4,5,9,10,14,15,19,21,22,23);
flychar(86,5,5,0)(0,4,5,9,10,14,16,18,22);
flychar(87,5,5,0)(0,4,5,9,10,12,14,15,16,18,19,21,23);
flychar(88,5,5,0)(0,4,6,8,12,16,18,20,24);
flychar(89,5,5,0)(0,4,6,8,12,17,22);
flychar(90,5,5,0)(0,1,2,3,4,8,12,16,20,21,22,23,24);
flychar(91,2,5,0)(0,1,2,4,6,8,9);
flychar(92,5,5,0)(0,6,12,18,24);
flychar(93,2,5,0)(0,1,3,5,7,8,9);
flychar(94,3,5,0)(1,3,5);
flychar(95,5,4,1)(20,21,22,23,24);
flychar(96,2,3,0)(1,2);
flychar(97,4,4,0)(1,2,4,6,8,10,13,14,15);
flychar(98,4,5,0)(0,4,5,6,8,11,12,15,16,17,18);
flychar(99,4,4,0)(1,2,3,4,8,13,14,15);
flychar(100,4,5,0)(3,5,6,7,8,11,12,15,17,18,19);
flychar(101,4,4,0)(1,2,4,7,8,10,13,14,15);
flychar(102,4,5,0)(2,3,5,8,9,10,13,17);
flychar(103,4,4,1)(1,2,3,4,7,9,10,11,15,17,18);
flychar(104,4,5,0)(0,4,5,6,7,8,11,12,15,16,19);
flychar(105,1,5,0)(0,2,3,4);
flychar(106,2,5,1)(1,5,7,9,10);
flychar(107,4,5,0)(0,4,7,8,10,12,13,16,18);
flychar(108,2,5,0)(0,2,4,6,8,9);
flychar(109,5,4,0)(1,3,5,7,9,10,12,14,15,19);
flychar(110,4,4,0)(0,1,2,4,7,8,11,12,15);
flychar(111,4,4,0)(1,2,4,7,8,11,13,14);
flychar(112,4,4,1)(0,1,2,4,7,8,11,12,13,14,16);
flychar(113,4,4,1)(1,2,3,4,7,8,11,13,14,15,19);
flychar(114,3,4,0)(1,2,3,6,9);
flychar(115,4,4,0)(1,2,4,11,13,14);
flychar(116,3,5,0)(1,3,4,5,7,10,13,14);
flychar(117,4,4,0)(0,3,4,7,8,11,13,14,15);
flychar(118,4,4,0)(0,3,4,6,8,9,12);
flychar(119,5,4,0)(0,4,5,7,9,10,11,13,14,16,18);
flychar(120,4,4,0)(0,3,5,7,10,12,13,15);
flychar(121,4,4,1)(0,3,4,7,9,10,11,15,17,18);
flychar(122,4,4,0)(0,1,2,3,6,9,12,13,14,15);
flychar(123,3,5,0)(0,1,4,8,10,12,13);
flychar(124,1,5,0)(0,1,2,3,4);
flychar(125,3,5,0)(1,2,4,6,10,13,14);
flychar(126,4,5,0)(1,3,4,6);

bye.