% -*- coding: utf-8; mode: japanese-latex; -*-
% for bibunsho5 coded by isao yasuda.
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{uptexcjk}[2010/03/23 0.1 upLaTeX fonts for CJK]
%
%   横組用 Horizontal         縦組用 Virtical
%   Roman, H     Gothic, H    Roman, V     Gothic, H   : encoding fontenc
%   -----------  -----------  -----------  ----------- : -------- -------
%   upjpnrm-h    upjpngt-h    upjpnrm-v    upjpngt-v   : JIS Ext  JYJ/JTJ
%   upkorrm-h    upkorgt-h    upkorrm-v    upkorgt-v   : KS       JYK/JTK
%   upschrm-h    upschgt-h    upschrm-v    upschgt-v   : GB       JYS/JTS
%   uptchrm-h    uptchgt-h    uptchrm-v    uptchgt-v   : CNS      JYT/JTT

% Japanese
\DeclareYokoKanjiEncoding{JYJ}{}{}%
\DeclareKanjiSubstitution{JYJ}{mc}{m}{n}%
\DeclareYokoKanjiEncoding{JTJ}{}{}%
\DeclareKanjiSubstitution{JTJ}{mc}{m}{n}%
\KanjiEncodingPair{JYJ}{JTJ}%
%% 横 JYJ
\DeclareKanjiFamily{JYJ}{mc}{}%
\DeclareFontShape{JYJ}{mc}{m}{n}{<-> s * [0.961] upjpnrm-h}{}%
\DeclareKanjiFamily{JYJ}{gt}{}%
\DeclareFontShape{JYJ}{gt}{m}{n}{<-> s * [0.961] upjpngt-h}{}%
%% 縦 JTJ
\DeclareKanjiFamily{JTJ}{mc}{}%
\DeclareFontShape{JTJ}{mc}{m}{n}{<-> s * [0.961] upjpnrm-v}{}%
\DeclareKanjiFamily{JTJ}{gt}{}%
\DeclareFontShape{JTJ}{gt}{m}{n}{<-> s * [0.961] upjpngt-v}{}%

% Korean
\DeclareYokoKanjiEncoding{JYK}{}{}%
\DeclareKanjiSubstitution{JYK}{mc}{m}{n}%
\DeclareYokoKanjiEncoding{JTK}{}{}%
\DeclareKanjiSubstitution{JTK}{mc}{m}{n}%
\KanjiEncodingPair{JYK}{JTK}%
%% 横 JYK
\DeclareKanjiFamily{JYK}{mc}{}%
\DeclareFontShape{JYK}{mc}{m}{n}{<-> s * [0.961] upkorrm-h}{}%
\DeclareKanjiFamily{JYK}{gt}{}%
\DeclareFontShape{JYK}{gt}{m}{n}{<-> s * [0.961] upkorgt-h}{}%
%% 縦 JTK
\DeclareKanjiFamily{JTK}{mc}{}%
\DeclareFontShape{JTK}{mc}{m}{n}{<-> s * [0.961] upkorrm-v}{}%
\DeclareKanjiFamily{JTK}{gt}{}%
\DeclareFontShape{JTK}{gt}{m}{n}{<-> s * [0.961] upkorgt-v}{}%

% Simplified Chinese
\DeclareYokoKanjiEncoding{JYS}{}{}%
\DeclareKanjiSubstitution{JYS}{mc}{m}{n}%
\DeclareYokoKanjiEncoding{JTS}{}{}%
\DeclareKanjiSubstitution{JTS}{mc}{m}{n}%
\KanjiEncodingPair{JYS}{JTS}%
%% 横 JYS
\DeclareKanjiFamily{JYS}{mc}{}%
\DeclareFontShape{JYS}{mc}{m}{n}{<-> s * [0.961] upschrm-h}{}%
\DeclareKanjiFamily{JYS}{gt}{}%
\DeclareFontShape{JYS}{gt}{m}{n}{<-> s * [0.961] upschgt-h}{}%
%% 縦 JTS
\DeclareKanjiFamily{JTS}{mc}{}%
\DeclareFontShape{JTS}{mc}{m}{n}{<-> s * [0.961] upschrm-v}{}%
\DeclareKanjiFamily{JTS}{gt}{}%
\DeclareFontShape{JTS}{gt}{m}{n}{<-> s * [0.961] upschgt-v}{}%

% Traditional Chinese
\DeclareYokoKanjiEncoding{JYT}{}{}%
\DeclareKanjiSubstitution{JYT}{mc}{m}{n}%
\DeclareYokoKanjiEncoding{JTT}{}{}%
\DeclareKanjiSubstitution{JTT}{mc}{m}{n}%
\KanjiEncodingPair{JYT}{JTT}%
%% 横 JYT
\DeclareKanjiFamily{JYT}{mc}{}%
\DeclareFontShape{JYT}{mc}{m}{n}{<-> s * [0.961] uptchrm-h}{}%
\DeclareKanjiFamily{JYT}{gt}{}%
\DeclareFontShape{JYT}{gt}{m}{n}{<-> s * [0.961] uptchgt-h}{}%
%% 縦 JTT
\DeclareKanjiFamily{JTT}{mc}{}%
\DeclareFontShape{JTT}{mc}{m}{n}{<-> s * [0.961] uptchrm-v}{}%
\DeclareKanjiFamily{JTT}{gt}{}%
\DeclareFontShape{JTT}{gt}{m}{n}{<-> s * [0.961] uptchgt-v}{}%

%% フォント切替用環境定義
\newenvironment{Japanese}{\kanjiencoding{JYJ}\selectfont}{}%
\newenvironment{ChineseSmpl}{\kanjiencoding{JYS}\selectfont}{}%
\newenvironment{ChineseTrad}{\kanjiencoding{JYT}\selectfont}{}%
\newenvironment{Korean}{\kanjiencoding{JYK}\selectfont}{}%
\endinput
