2 %% This is file `c40enc.def',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% ucs.dtx (with options: `c40enc.def')
9 %% Copyright 2001 Dominique Unruh <dominique@unruh.de>
11 %% This program is provided under the terms of the LaTeX Project Public
12 %% License with some modifications.
13 %% See the file LICENSE (http://www.unruh.de/DniQ/latex/unicode/content/LICENSE)
16 \ProvidesFile{c40enc.def}[2002/11/25 Fontencoding C40 (JIS)]%
17 \DeclareFontEncoding{C40}{}{}%
18 \DeclareFontSubstitution{C40}{song}{m}{n}%
20 \expandafter\let\csname C40/song/m/n\endcsname\undefined
21 \def\cjk@Cforty#1#2#3#4{% Takes JIS0208 codepos in hex
25 \advance\count0 by"#3#4
26 \advance\count0 by-"B3F
29 \multiply\count0 by256
30 \advance\count1 by-\count0
32 %\typeout{C0=\number\count0, C1=\number\count1}%
33 \edef\temp@a{\ifnum\count0<10 0\fi\number\count0}%
34 \edef\temp@b{\ifx\temp@a\CJK@plane\else
35 \def\noexpand\CJK@plane{\temp@a}\noexpand\selectfont\fi
36 \char\number\count\@ne\space}%
37 %\typeout{C40: \meaning\temp@b}%
40 \DeclareTextCommand\jischar{C40}[1]{\cjk@Cforty#1}
41 \DeclareTextCommandDefault\jischar[1]{{\fontencoding{C40}%
42 \let\CJK@plane\undefined\cjk@Cforty#1}}