summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/barcodes/wlc93.mf
blob: f92734f7f9fede3ab46a909fa8e43cd7f663465c (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
%%
%% This is file `wlc93.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% barcodes.dtx  (with options: `code93mf')
%% 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 93 in Metafont format
%% Peter Willadt 1998-04-21
%% For copyright and the like see the documentation
%% to the barcode package, from which this file is part of.
%% If you received only this file,
%% then maybe someone fooled you.
%%
%% Code 93 requires one or two check digits.
%% These check digtis are calculated using a weighted mod 11-checksum.
%% You have to see the docs.
%% Start and stop chars are mapped to < and >, respectively.
%% codeable are 0--9 , A-Z, -,+, space, dot, $, /, and percent.
%% To print full ascii, ordinary characters have to be preceeded with
%% on of four shift characters. Thes shift characters are
%% ($) mapped to =
%% (%) mapped to [
%% (/) mapped to |
%% (+) mapped to ]

mode_setup;

bheight#:=5mm#;

bwidth#   :=.33  mm#;

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

define_pixels(bheight, bwidth);

def CODExciiichar(expr charnum, spex) =
numeric mywid, asval, i;
mywid=0;
for i= 0 upto 5:
asval:=ASCII(substring(i,i+1) of spex);
asval:=asval-ASCII("0");
mywid:=mywid+asval;
endfor;
beginchar(charnum, mywid*bwidth#,bheight#,0);
y1=y2=0;
y3=y4=bheight;
numeric myright,myleft,barweight,spcweight;
myright:=0;myleft:=0;barweight:=0;spcweight:=0;
for i=0 upto 5:
asval:=ASCII(substring(i,i+1) of spex);
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;

CODExciiichar("0","131112");
CODExciiichar("1","111213");
CODExciiichar("2","111312");
CODExciiichar("3","111411");
CODExciiichar("4","121113");
CODExciiichar("5","121212");
CODExciiichar("6","121311");
CODExciiichar("7","111114");
CODExciiichar("8","131211");
CODExciiichar("9","141111");
CODExciiichar("A","211113");
CODExciiichar("B","211212");
CODExciiichar("C","211311");
CODExciiichar("D","221112");
CODExciiichar("E","221211");
CODExciiichar("F","231111");
CODExciiichar("G","112113");
CODExciiichar("H","112212");
CODExciiichar("I","112311");
CODExciiichar("J","122112");
CODExciiichar("K","132111");
CODExciiichar("L","111123");
CODExciiichar("M","111222");
CODExciiichar("N","111321");
CODExciiichar("O","121122");
CODExciiichar("P","131121");
CODExciiichar("Q","212112");
CODExciiichar("R","212211");
CODExciiichar("S","211122");
CODExciiichar("T","211221");
CODExciiichar("U","221121");
CODExciiichar("V","222111");
CODExciiichar("W","112122");
CODExciiichar("X","112221");
CODExciiichar("Y","122121");
CODExciiichar("Z","123111");
CODExciiichar("-","121131");
CODExciiichar(".","311112");
CODExciiichar( 32,"311211");% space
CODExciiichar( 36,"321111");% dollar
CODExciiichar("/","112131");
CODExciiichar("+","113121");
CODExciiichar( 37,"211131");% percent
CODExciiichar("(","121221");% ought to be ($)
CODExciiichar(")","312111");% ought to be (%)
CODExciiichar("[","311121");% ought to be (/)
CODExciiichar("]","122211");% ought to be (+)
CODExciiichar("<","111141");% start sign
CODExciiichar(">","1111411");% stop sign has extra bar

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