summaryrefslogtreecommitdiff
path: root/fonts/capbas/simdefs.mf
blob: 252fd2bc0d099be9e4b838692fc5094688903c42 (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
%%% @mffile{
%%%     filename="simfon.mf",
%%%     version="",
%%%     date="",
%%%     filetype="mf inputfile",
%%%     package="m-capbas.arj"
%%%     author="Phons Bloemen (PhB)",
%%%     address="Eindhoven U. of Technology,
%%%            Fac. of Electrical Engineering,
%%%            P. O. Box 513, NL-5600 MB Eindhoven
%%%     email="Internet: phons@ei.ele.tue.nl",
%%%     codetable="ISO/ASCII",
%%%     checksumtype="none",
%%%     checksum="0",
%%%     keywords="",
%%%     abstract="
%%%        This file contains the definitions of character glyphs
%%%        for the Simple font. Only capitals and numerals are
%%%        provided.
%%%        Parameters: a: (relative) width of character
%%%                    b: (relative) height of character
%%%                    s: thickness of drawing pen
%%%        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.",
%%%     }
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

def gensimgrid(suffix $)(expr a,b) =
  bot lft z$p1 = z$ + (-a,-b); top lft z$p2 = z$ + (-a,b);
  top rt z$p3 = z$ + (a,b); bot rt z$p4 = z$ + (a,-b);
  lft z$p5 = z$ + (-a,0); rt z$p6 = z$ + (a,0);
  top z$p8 = z$ + (0,b); bot z$p7 = z$ + (0,-b);
  z$p52 = (z$p5+z$p2)/2; z$p51 = (z$p5+z$p1)/2; z$p57 = (z$p5+z$)/2;
  z$p63 = (z$p6+z$p3)/2; z$p64 = (z$p6+z$p4)/2; z$p67 = (z$p6+z$)/2;
  labels ($);
enddef;

def gensima(suffix $)(expr s) =
  draw z$p1 -- z$p8 -- z$p4 withweight s;
  draw z$p57 -- z$p67 withweight s;
enddef;
def gensimb(suffix $)(expr s) =
  draw z$p1 -- z$p2 -- z$p8 {right} .. z$p63 .. {left} z$ -- z$p5 withweight s;
  draw z$p1 -- z$p7 {right} .. z$p64 .. {left} z$ -- z$p5  withweight s; enddef;
def gensimc(suffix $)(expr s) =
  draw z$p64 .. z$p7 .. z$p5 .. z$p8 .. z$p63 withweight s;
enddef;
def gensimd(suffix $)(expr s) =
  draw z$p1 -- z$p2 {right} .. z$p6 .. {left} z$p1 withweight s;
enddef;
def gensime(suffix $)(expr s) =
  draw z$p4 -- z$p1 -- z$p2 -- z$p3 withweight s;
  draw z$p5 -- z$p6 withweight s;
enddef;
def gensimf(suffix $)(expr s) =
  draw z$p1 -- z$p2 -- z$p3 withweight s; draw z$p5 -- z$ withweight s;
enddef;
def gensimg(suffix $)(expr s) =
  draw z$ -- z$p6 -- z$p64 .. z$p7 .. z$p5 .. z$p8 .. z$p63 withweight s;
enddef;
def gensimh(suffix $)(expr s) =
 draw z$p1 -- z$p2 withweight s; draw z$p3 -- z$p4 withweight s;
 draw z$p5 -- z$p6 withweight s;
enddef;
def gensimi(suffix $)(expr s) =
  draw z$p8 -- z$p7 withweight s;
enddef;

def gensimj(suffix $)(expr s) =
  draw z$p3 -- z$p64 {down} .. z$p7 .. {up} z$p51 withweight s;
enddef;
def gensimk(suffix $)(expr s) =
  draw z$p1 -- z$p2 withweight s; draw z$p3 -- z$p5 -- z$p4 withweight s;
enddef;
def gensiml(suffix $)(expr s) =
  draw z$p2 -- z$p1 -- z$p4 withweight s;
enddef;
def gensimm(suffix $)(expr s) =
  draw z$p1 -- z$p2 -- z$ -- z$p3 -- z$p4 withweight s;
enddef;
def gensimn(suffix $)(expr s) =
  draw z$p1 -- z$p2 -- z$p4 -- z$p3 withweight s;
enddef;
def gensimo(suffix $)(expr s) =
  draw z$p5 .. z$p8 .. z$p6 .. z$p7 .. cycle withweight s;
enddef;
def gensimp(suffix $)(expr s) =
  draw z$p1 -- z$p2 -- z$p8 {right} .. z$p63 .. {left} z$ -- z$p5
withweight s; enddef;
def gensimq(suffix $)(expr s) =
  draw z$p5 .. z$p8 .. z$p6 .. z$p7 .. cycle withweight s;
  draw z$ -- z$p4 withweight s;
enddef;
def gensimr(suffix $)(expr s) =
  draw z$p1 -- z$p2 -- z$p8 {right} .. z$p63 .. {left} z$p57 -- z$p4
withweight s;
  draw z$p5 -- z$p57 withweight s; enddef;
def gensims(suffix $)(expr s) =
  draw z$p51 {down} .. z$p7 .. z$p64 .. z$p52 .. z$p8 .. {down} z$p63
  withweight s; enddef;
def gensimu(suffix $)(expr s) =
  draw z$p2 -- z$p5 {down} .. z$p7 .. {up} z$p6 -- z$p3 withweight s;
enddef;
def gensimt(suffix $)(expr s) =
  draw z$p2 -- z$p3 withweight s; draw z$p7 -- z$p8 withweight s;
enddef;
def gensimv(suffix $)(expr s) =
   draw z$p2 -- z$p7 -- z$p3 withweight s;
enddef;
def gensimw(suffix $)(expr s) =
   draw z$p2 -- (z$p1+z$p7)/2 -- z$ -- (z$p4+z$p7)/2 -- z$p3 withweight s;
enddef;
def gensimx(suffix  $)(expr s) =
 draw z$p1 -- z$p3  withweight s; draw z$p2 -- z$p4 withweight s;
enddef;
def gensimy(suffix $)(expr s) =
  draw z$p2 -- z$ -- z$p3 withweight s; draw z$ -- z$p7 withweight s;
enddef;
def gensimz(suffix $)(expr s) =
  draw z$p2 -- z$p3 -- z$p1 -- z$p4 withweight s;
enddef;
def gensimone(suffix $)(expr s) =
  draw (z$p5+z$p8)/2 -- z$p8 -- z$p7 withweight s;
enddef;
def gensimtwo(suffix $)(expr s) =
  draw z$p52 {up} .. z$p8 .. z$p63 .. z$ .. z$p1 -- z$p4
  withweight s; enddef;
def gensimthr(suffix $)(expr s) =
  draw z$p52 {up} .. z$p8 .. z$p63 .. {left} z$  withweight s;
  draw z$p51 {down} .. z$p7 .. z$p64 .. {left} z$ withweight s;
enddef;
def gensimfou(suffix $)(expr s) =
  draw (z$p4+z$p7)/2 -- (z$p3+z$p8)/2 -- z$p51 -- z$p64 withweight s;
enddef;
def gensimfiv(suffix $)(expr s) =
  draw z$p3 -- z$p2 -- z$p5 .. (2*z$+z$p8)/3 ..
  (z$p6+z$p64)/2 .. z$p7 .. z$p51 withweight s; enddef;
def gensimsix(suffix $)(expr s) =
  draw (z$p8+z$p3)/2 .. {down} z$p51 .. z$p7 .. z$p64 .. (2*z$+z$p8)/3
  .. {down} z$p51 withweight s;
enddef;
def gensimsev(suffix $)(expr s) =
  draw z$p2 -- z$p3 .. {down} z$p7 withweight s;
enddef;
def gensimeig(suffix $)(expr s) =
  draw z$p8 .. z$p52 .. z$ .. z$p63 .. cycle withweight s;
  draw z$p7 .. z$p64 .. z$ .. z$p51 .. cycle withweight s;
enddef;
def gensimnin(suffix $)(expr s) =
  draw (z$p7+z$p1)/2 .. {up} z$p63 .. z$p8 .. z$p52 .. (2*z$+z$p7)/3
  .. {up} z$p63 withweight s; enddef;