Debian Codegraph @

texmf-dist/fonts/source/public/barcodes/wlc11.mf

raw
1 %%
2 %% This is file `wlc11.mf',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% barcodes.dtx (with options: `code11mf')
8 %% As this is a generated file, you may perhaps not want to edit it.
9 %% This file belongs to the barcode package.
10 %% It may be of no great use without the rest of the barcode package.
11 %% \CharacterTable
12 %% {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
13 %% 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
14 %% Digits \0\1\2\3\4\5\6\7\8\9
15 %% Exclamation \! Double quote \" Hash (number) \#
16 %% Dollar \$ Percent \% Ampersand \&
17 %% Acute accent \' Left paren \( Right paren \)
18 %% Asterisk \* Plus \+ Comma \,
19 %% Minus \- Point \. Solidus \/
20 %% Colon \: Semicolon \; Less than \<
21 %% Equals \= Greater than \> Question mark \?
22 %% Commercial at \@ Left bracket \[ Backslash \\
23 %% Right bracket \] Circumflex \^ Underscore \_
24 %% Grave accent \` Left brace \{ Vertical bar \|
25 %% Right brace \} Tilde \~}
26 %%
27 %% Code 11 in Metafont format
28 %% Peter Willadt 1998-04-10
29 %% For copyright and the like see the documentation
30 %% to the barcode package, from which this file is part of.
31 %% If you received only this file,
32 %% then maybe someone fooled you.
33 %%
34 %% Code 11 requires one or two check digits.
35 %% These check digtis are calculated using a weighted mod 11-checksum.
36 %% You have to see the docs.
37 %% Start and stop chars are mapped to @,
38 %% codeable are 0--9 and the minus sign.
39
40 mode_setup;
41
42 bheight#:=5mm#;
43
44 bwidth# :=.33 mm#;
45
46 designsize :=bheight#;
47 font_slant :=0;
48 font_normal_space :=8*bwidth#;
49 font_extra_space :=0;
50 font_normal_stretch:=0;
51 font_normal_shrink :=0;
52 font_quad :=15*bwidth#;
53
54 define_pixels(bheight, bwidth);
55
56 def CODExichar(expr charnum, spex) =
57 numeric mywid, asval, i;
58 mywid=6;
59 for i= 0 upto 4:
60 asval:=ASCII(substring(i,i+1) of spex);
61 asval:=asval-ASCII("0");
62 mywid:=mywid+asval;
63 endfor;
64 beginchar(charnum, mywid*bwidth#,bheight#,0);
65 y1=y2=0;
66 y3=y4=bheight;
67 numeric myright,myleft,barweight,spcweight;
68 myright:=0;myleft:=0;barweight:=0;spcweight:=0;
69 for i=0 upto 4:
70 asval:=ASCII(substring(i,i+1) of spex);
71 asval:=asval-ASCII("0");
72 myright:=myright+(asval+1)*bwidth;
73 if not odd (i):
74 x1:=myleft-blacker;
75 x4:=x1;
76 x2:=myright+blacker;
77 x3:=x2;
78 fill (z1)--(z2)--(z3)--(z4)--cycle;
79 fi
80 myleft:=myright;
81 endfor;
82 endchar;
83 enddef;
84
85 CODExichar("-","00100");
86 CODExichar("0","00001");
87 CODExichar("1","10001");
88 CODExichar("2","01001");
89 CODExichar("3","11000");
90 CODExichar("4","00101");
91 CODExichar("5","10100");
92 CODExichar("6","01100");
93 CODExichar("7","00011");
94 CODExichar("8","10010");
95 CODExichar("9","10000");
96 CODExichar("@","00110");
97
98 end;% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
99 \endinput
100 %%
101 %% End of file `wlc11.mf'.