summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/barcodes/wlean.mf
blob: 3214c1b6ea2720773c31c722fa4ef27f9db3179e (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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
%%
%% This is file `wlean.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% barcodes.dtx  (with options: `codeeanmf')
%% As this is a generated file, you may perhaps not want to edit it.
%% This file belongs to the barcode package.
%% It may be of no great use without the rest of the barcode package.
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%% Font for printing EAN Code
%% For small sizes (on the Deskjet, < 1,0) you have to be
%% very careful and test if the font is still machine readable.
%% On write-black-printers, it may be necessary to reduce
%% the width of black bars by fiddling with
%% the definition of fb().
%% For producing EAN Add-ons or codes with variable height,
%% it would be a good idea to shorten the height of the bars and
%% to leave the numbers out of the bars-definition, so that you
%% could stack several bars above each other.
%% Flexibility would increase, but---on the other hand---
%% TeX macros for setting EAN code would become even more complicated.
%% Peter Willadt 1997, September, 21
%% Author
%% Peter Willadt
%% 75177 Pforzheim
%% Germany
%% email: Willadt@t-online.de

mode_setup;

%% EAN size 1 (100%)
bheight#:=22.85mm#;
bdepth#:=1.65mm#;
bwidth#:=0.33mm#;
digheight#:=2.75mm#;
numgap#=1mm#;
digdiam#=0.9pt#;
lgap#:= bwidth#+0.5 digdiam#;
totheight#=bheight#+digheight#+numgap#;
ndheight#:=totheight#-bheight#-bdepth#;
define_pixels(ndheight,digheight,numgap,lgap,bwidth);
define_blacker_pixels(bheight,totheight,digdiam);

font_normal_space=7*bwidth#;
font_size 10pt#;

def fb(expr posn) =
x20:=(posn-1)*bwidth;
x21:=x20;
x22:=posn*bwidth;
x23:=x22;
y20:=y22:=digheight+numgap;
y21:=y23:=h;
fill z20--z21--z23--z22--cycle;
enddef;

def klotz(expr posn) =
x1:=(posn-1)*bwidth;x2:=posn*bwidth;
x3:=x2;x4:=x1;
y1:=y2:=ndheight;
y3:=y4:=digheight+numgap;
fill z1--z2--z3--z4--cycle;
enddef;

def nuller =
x1=0.5w;
y1=digheight;
x2=lgap;
y2=0.8y1;
x3=x2;
y3-y4=y1-y2;
y4=0;
x4=x1;
x5=w-x3;
y5=y3;
x6=x5;
y6=y2;
pickup pencircle scaled digdiam;
draw z1..{down}z2--z3{down}..z4..{up}z5--z6{up}..cycle;
enddef;

def einser =
x1=x2=0.5w+lgap;
x3=2*lgap;
y1=0;
y2=digheight;
y3=0.8digheight;
pickup pencircle scaled digdiam;
draw z1--z2--z3;
enddef;

def zweier =
x1=w-lgap;
x2=lgap;
y1=y2=0;
x3=x2;
y3=0.15 digheight;
x4=w-lgap;
y4=0.6 digheight;
x5=x4;
y5=0.9 digheight;
x6=0.5w;
y6=digheight;
x7=x2;
y7=y5;
pickup pencircle scaled digdiam;
draw z1--z2{up}..z3..z4..z5..z6..z7;
enddef;

def dreier =
x1=lgap;
w-x2=x1;
y1=y2=digheight;
x3=0.5w;
y3=0.6digheight;
y4=0.5y3;
x4=x2;
y5=0;
x5=0.5w;
x6=x1;
y6=0.2 digheight;
pickup pencircle scaled digdiam;
draw z1--z2--z3{right}..z4..z5..z6;
enddef;

def vierer =
x1=0.6w;y1=digheight;
x2=lgap;
y2=0.3digheight;
y3=y2;
w-x3=x2;
x4=0.5[x1,x3];
x5=x4;
y4=0.5digheight;
y5=0;
pickup pencircle scaled digdiam;
draw z1--z2--z3;
draw z4--z5;
enddef;

def fuenfer =
x2=lgap;
x2=w-x1;
y1=y2=digheight;
x3=x2;
y3=0.7digheight;
x4=x1;
y3-y4=y4;
x5=x2;
y5=0;
pickup pencircle scaled digdiam;
draw z1--z2--z3{right}..z4..{left}z5;
enddef;

def sechser =
x1=0.6w;
y1=digheight;
x2=lgap;
x4=w-x2;
y2=y4=0.5y5;
x3=x5=0.5w;
y3=0;
y5=x4-x2;
pickup pencircle scaled digdiam;
draw z2..z3..z4..z5..cycle;
draw z1..{down}z2;
enddef;
def siebener =
x1=lgap;
x2=w-x1;
y1=y2=digheight;
x3=x4=0.5w;
y3=0.3digheight;
y4=0;
pickup pencircle scaled digdiam;
draw z1--z2;
draw z2..z3...z4;
enddef;
def achter =
x1=x3=x5=0.5w;
y1=digheight;
y3=0.6digheight;
y5=0;
x2=w-x7;
x4=w-x6;
y2=y7=0.5[y1,y3];
y4=y6=0.5[y3,y5];
x2=1.5lgap;
x4=w-lgap;
pickup pencircle scaled digdiam;
draw z1..z2..z3..z7..cycle;
draw z3..z4..z5..z6..cycle;
enddef;
def neuner =
x1=0.4w;
y1=0;
x2=w-lgap;
x4=w-x2;
y2=y4=0.5[y5,y3];
x3=x5=0.5w;
y3=digheight;
y5=0.4 digheight;
pickup pencircle scaled digdiam;
draw z1..{up}z2;
draw z2..z3..z4..z5..cycle;
enddef;
beginchar("+",3*bwidth#,totheight#,0); "Das Randzeichen";
fb(1); fb(3);
klotz(1);
klotz(3);
endchar;
beginchar("-",5*bwidth#,totheight#,0); "Das Mittenzeichen";
fb(2); fb(4);
klotz(2);
klotz(4);
endchar;

beginchar("0",7*bwidth#,digheight#,0);
nuller;
endchar;

beginchar("1",7*bwidth#,digheight#,0);
einser;
endchar;

beginchar("2",7*bwidth#,digheight#,0);
zweier;
endchar;

beginchar("3",7*bwidth#,digheight#,0);
dreier;
endchar;

beginchar("4",7*bwidth#,digheight#,0);
vierer;
endchar;

beginchar("5",7*bwidth#,digheight#,0);
fuenfer;
endchar;

beginchar("6",7*bwidth#,digheight#,0);
sechser;
endchar;

beginchar("7",7*bwidth#,digheight#,0);
siebener;
endchar;

beginchar("8",7*bwidth#,digheight#,0);
achter;
endchar;

beginchar("9",7*bwidth#,digheight#,0);
neuner;
endchar;


beginchar("A",7*bwidth#,totheight#,0); "Die Null (A)";
fb(4);fb(5);fb(7);
nuller;
endchar;

beginchar("B",7*bwidth#,totheight#,0); "Die Eins (A)";
fb(3);fb(4);fb(7);
einser;
endchar;

beginchar("C",7*bwidth#,totheight#,0); "Die Zwei (A)";
fb(3);fb(6);fb(7);
zweier;
endchar;
beginchar("D",7*bwidth#,totheight#,0); "Die Drei (A)";
fb(2);fb(3);fb(4);fb(5);fb(7);
dreier;
endchar;
beginchar("E",7*bwidth#,totheight#,0); "Die Vier (A)";
fb(2);fb(6);fb(7);
vierer;
endchar;
beginchar("F",7*bwidth#,totheight#,0); "Die Fuenf (A)";
fb(2);fb(3);fb(7);
fuenfer;
endchar;
beginchar("G",7*bwidth#,totheight#,0); "Die Sechs (A)";
fb(2);fb(4);fb(5);fb(6);fb(7);
sechser;
endchar;
beginchar("H",7*bwidth#,totheight#,0); "Die Sieben (A)";
fb(2);fb(3);fb(4);fb(6);fb(7);
siebener;
endchar;

beginchar("I",7*bwidth#,totheight#,0); "Die Acht (A)";
fb(2);fb(3);fb(5);fb(6);fb(7);
achter;
endchar;

beginchar("J",7*bwidth#,totheight#,0); "Die Neun (A)";
fb(4);fb(6);fb(7);
neuner;
endchar;


beginchar("a",7*bwidth#,totheight#,0); "Die Null (B)";
fb(2);fb(5);fb(6);fb(7);
nuller;
endchar;

beginchar("b",7*bwidth#,totheight#,0); "Die Eins (B)";
fb(2);fb(3);fb(6);fb(7);
einser;
endchar;

beginchar("c",7*bwidth#,totheight#,0); "Die Zwei (B)";
fb(3);fb(4);fb(6);fb(7);
zweier;
endchar;
beginchar("d",7*bwidth#,totheight#,0); "Die Drei (B)";
fb(2);fb(7);
dreier;
endchar;
beginchar("e",7*bwidth#,totheight#,0); "Die Vier (B)";
fb(3);fb(4);fb(5);fb(7);
vierer;
endchar;
beginchar("f",7*bwidth#,totheight#,0); "Die Fuenf (B)";
fb(2);fb(3);fb(4);fb(7);
fuenfer;
endchar;
beginchar("g",7*bwidth#,totheight#,0); "Die Sechs (B)";
fb(5);fb(7);
sechser;
endchar;
beginchar("h",7*bwidth#,totheight#,0); "Die Sieben (B)";
fb(3);fb(7);
siebener;
endchar;

beginchar("i",7*bwidth#,totheight#,0); "Die Acht (B)";
fb(4);fb(7);
achter;
endchar;

beginchar("j",7*bwidth#,totheight#,0); "Die Neun (B)";
fb(3);fb(5);fb(6);fb(7);
neuner;
endchar;


beginchar("K",7*bwidth#,totheight#,0); "Die Null (C)";
fb(1);fb(2);fb(3);fb(6);
nuller;
endchar;

beginchar("L",7*bwidth#,totheight#,0); "Die Eins (C)";
fb(1);fb(2);fb(5);fb(6);
einser;
endchar;

beginchar("M",7*bwidth#,totheight#,0); "Die Zwei (C)";
fb(1);fb(2);fb(4);fb(5);
zweier;
endchar;
beginchar("N",7*bwidth#,totheight#,0); "Die Drei (C)";
fb(1);fb(6);
dreier;
endchar;
beginchar("O",7*bwidth#,totheight#,0); "Die Vier (C)";
fb(1);fb(3);fb(4);fb(5);
vierer;
endchar;
beginchar("P",7*bwidth#,totheight#,0); "Die Fuenf (C)";
fb(1);fb(4);fb(5);fb(6);
fuenfer;
endchar;
beginchar("Q",7*bwidth#,totheight#,0); "Die Sechs (C)";
fb(1);fb(3);
sechser;
endchar;
beginchar("R",7*bwidth#,totheight#,0); "Die Sieben (C)";
fb(1);fb(5);
siebener;
endchar;

beginchar("S",7*bwidth#,totheight#,0); "Die Acht (C)";
fb(1);fb(4);
achter;
endchar;

beginchar("T",7*bwidth#,totheight#,0); "Die Neun (C)";
fb(1);fb(2);fb(3);fb(5);
neuner;
endchar;

end;
\endinput
%%
%% End of file `wlean.mf'.