summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/barcodes/wlc39.mf
blob: 8c330143bca6f8949e0b643a74d47451fcc620af (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
%%
%% This is file `wlc39.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% barcodes.dtx  (with options: `code39mf')
%% 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         \~}
%%
%% Code 39, in Metafont mode
%% Willadt 1997-08-17
mode_setup;

bheight#:=5mm#;

%% high res .2 mm,
%%  med res .3 mm,
%%   lo res .4 mm.

bwidth# :=.3mm#;

designsize         :=bheight#;
font_slant         :=0;
font_normal_space  :=13*bwidth#;
font_extra_space   :=0;
font_normal_stretch:=0;
font_normal_shrink :=0;
font_quad          :=13*bwidth#;

define_pixels(bheight, bwidth);

def thirtyninechar(expr charnum, spex) =
 beginchar(charnum, 13*bwidth#,bheight#,0);
  numeric myright,myleft;
  numeric asval, i;
  myright:=0;myleft:=0;
  y1=y2=0;y3=y4=bheight;
  for i=0 upto 11:
    asval:=ASCII(substring(i,i+1) of spex);
    exitif asval=-1;
    asval:=asval-ASCII("0");
    myright:=myright+asval*bwidth;
    if not odd (i):
x1:=myleft-blacker;
x4:=x1;
x2:=myright+blacker;
x3:=x2;
fill (z1)--(z2)--(z3)--(z4)--cycle;
    fi
    myleft:=myright;
  endfor;
 endchar;
enddef;

\thirtyninechar("0")("1112212111");
\thirtyninechar("1")("2112111121");
\thirtyninechar("2")("1122111121");
\thirtyninechar("3")("2122111111");
\thirtyninechar("4")("1112211121");
\thirtyninechar("5")("2112211111");
\thirtyninechar("6")("1122211111");
\thirtyninechar("7")("1112112121");
\thirtyninechar("8")("2112112111");
\thirtyninechar("9")("1122112111");
\thirtyninechar( 64)("1211212111"); % start = @
\thirtyninechar("-")("1211112121");
\thirtyninechar("+")("1211121211");
\thirtyninechar("$")("1212121111");
\thirtyninechar("/")("1212111211");
\thirtyninechar(".")("2211112111");
\thirtyninechar( 37)("1112121211"); % percent
\thirtyninechar( 32)("1221112111"); % space
\thirtyninechar("A")("2111121121");
\thirtyninechar("B")("1121121121");
\thirtyninechar("C")("2121121111");
\thirtyninechar("D")("1111221121");
\thirtyninechar("E")("2111221111");
\thirtyninechar("F")("1121221111");
\thirtyninechar("G")("1111122121");
\thirtyninechar("H")("2111122111");
\thirtyninechar("I")("1121122111");
\thirtyninechar("J")("1111222111");
\thirtyninechar("K")("2111111221");
\thirtyninechar("L")("1121111221");
\thirtyninechar("M")("2121111211");
\thirtyninechar("N")("1111211221");
\thirtyninechar("O")("2111211211");
\thirtyninechar("P")("1121211211");
\thirtyninechar("Q")("1111112221");
\thirtyninechar("R")("2111112211");
\thirtyninechar("S")("1121112211");
\thirtyninechar("T")("1111212211");
\thirtyninechar("U")("2211111121");
\thirtyninechar("V")("1221111121");
\thirtyninechar("W")("2221111111");
\thirtyninechar("X")("1211211121");
\thirtyninechar("Y")("2211211111");
\thirtyninechar("Z")("1221211111");

\end;

\endinput
%%
%% End of file `wlc39.mf'.