summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ucs/c40enc.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ucs/c40enc.def')
-rw-r--r--Master/texmf-dist/tex/latex/ucs/c40enc.def42
1 files changed, 42 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ucs/c40enc.def b/Master/texmf-dist/tex/latex/ucs/c40enc.def
new file mode 100644
index 00000000000..603f1375872
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ucs/c40enc.def
@@ -0,0 +1,42 @@
+%%
+%% This is file `c40enc.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ucs.dtx (with options: `c40enc.def')
+%%
+%% Copyright 2001 Dominique Unruh <dominique@unruh.de>
+%%
+%% This program is provided under the terms of the LaTeX Project Public
+%% License with some modifications.
+%% See the file LICENSE (http://www.unruh.de/DniQ/latex/unicode/content/LICENSE)
+%% for information.
+%%
+\ProvidesFile{c40enc.def}[2002/11/25 Fontencoding C40 (JIS)]%
+\DeclareFontEncoding{C40}{}{}%
+\DeclareFontSubstitution{C40}{song}{m}{n}%
+\input{cenccmn.tex}%
+\expandafter\let\csname C40/song/m/n\endcsname\undefined
+\def\cjk@Cforty#1#2#3#4{% Takes JIS0208 codepos in hex
+ {%
+ \count0="#1#2
+ \multiply\count0 by94
+ \advance\count0 by"#3#4
+ \advance\count0 by-"B3F
+ \count1\count0
+ \divide\count0 by256
+ \multiply\count0 by256
+ \advance\count1 by-\count0
+ \divide\count0 by256
+ %\typeout{C0=\number\count0, C1=\number\count1}%
+ \edef\temp@a{\ifnum\count0<10 0\fi\number\count0}%
+ \edef\temp@b{\ifx\temp@a\CJK@plane\else
+ \def\noexpand\CJK@plane{\temp@a}\noexpand\selectfont\fi
+ \char\number\count\@ne\space}%
+ %\typeout{C40: \meaning\temp@b}%
+ \expandafter}\temp@b%
+ }%
+\DeclareTextCommand\jischar{C40}[1]{\cjk@Cforty#1}
+\DeclareTextCommandDefault\jischar[1]{{\fontencoding{C40}%
+ \let\CJK@plane\undefined\cjk@Cforty#1}}