\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{chiseotf}[2006/03/28 v.0.2 (Omega/CHISE Team)]

\RequirePackage[multi]{otf}

\DeclareKanjiFamily{\otf@JYn}{urui6}{}
\DeclareKanjiFamily{\otf@JTn}{urui6}{}
\Declare@FontShape{urui6}{m}{0123456789abcdef}{urui6}
\Declare@FontShape{urui6}{bx}{0123456789abcdef}{urui6}

\DeclareRobustCommand{\Ruimoku}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{urui6}\uppercase{\set@character="#1}%
        \endgroup%
}

\DeclareKanjiFamily{\otf@JYn}{uhzk1}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk1}{}
\Declare@FontShape{uhzk1}{m}{0123456789abcdef}{uhzk1}
\Declare@FontShape{uhzk1}{bx}{0123456789abcdef}{uhzk1}
\DeclareKanjiFamily{\otf@JYn}{uhzk2}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk2}{}
\Declare@FontShape{uhzk2}{m}{0123456789abcdef}{uhzk2}
\Declare@FontShape{uhzk2}{bx}{0123456789abcdef}{uhzk2}
\DeclareKanjiFamily{\otf@JYn}{uhzk3}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk3}{}
\Declare@FontShape{uhzk3}{m}{0123456789abcdef}{uhzk3}
\Declare@FontShape{uhzk3}{bx}{0123456789abcdef}{uhzk3}
\DeclareKanjiFamily{\otf@JYn}{uhzk4}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk4}{}
\Declare@FontShape{uhzk4}{m}{0123456789abcdef}{uhzk4}
\Declare@FontShape{uhzk4}{bx}{0123456789abcdef}{uhzk4}
\DeclareKanjiFamily{\otf@JYn}{uhzk5}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk5}{}
\Declare@FontShape{uhzk5}{m}{0123456789abcdef}{uhzk5}
\Declare@FontShape{uhzk5}{bx}{0123456789abcdef}{uhzk5}
\DeclareKanjiFamily{\otf@JYn}{uhzk6}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk6}{}
\Declare@FontShape{uhzk6}{m}{0123456789abcdef}{uhzk6}
\Declare@FontShape{uhzk6}{bx}{0123456789abcdef}{uhzk6}
\DeclareKanjiFamily{\otf@JYn}{uhzk7}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk7}{}
\Declare@FontShape{uhzk7}{m}{0123456789abcdef}{uhzk7}
\Declare@FontShape{uhzk7}{bx}{0123456789abcdef}{uhzk7}
\DeclareKanjiFamily{\otf@JYn}{uhzk8}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk8}{}
\Declare@FontShape{uhzk8}{m}{0123456789abcdef}{uhzk8}
\Declare@FontShape{uhzk8}{bx}{0123456789abcdef}{uhzk8}
\DeclareKanjiFamily{\otf@JYn}{uhzk9}{}
\DeclareKanjiFamily{\otf@JTn}{uhzk9}{}
\Declare@FontShape{uhzk9}{m}{0123456789abcdef}{uhzk9}
\Declare@FontShape{uhzk9}{bx}{0123456789abcdef}{uhzk9}
\DeclareKanjiFamily{\otf@JYn}{uhzka}{}
\DeclareKanjiFamily{\otf@JTn}{uhzka}{}
\Declare@FontShape{uhzka}{m}{0123456789abcdef}{uhzka}
\Declare@FontShape{uhzka}{bx}{0123456789abcdef}{uhzka}
\DeclareKanjiFamily{\otf@JYn}{uhzkb}{}
\DeclareKanjiFamily{\otf@JTn}{uhzkb}{}
\Declare@FontShape{uhzkb}{m}{0123456789abcdef}{uhzkb}
\Declare@FontShape{uhzkb}{bx}{0123456789abcdef}{uhzkb}
\DeclareKanjiFamily{\otf@JYn}{uhzkc}{}
\DeclareKanjiFamily{\otf@JTn}{uhzkc}{}
\Declare@FontShape{uhzkc}{m}{0123456789abcdef}{uhzkc}
\Declare@FontShape{uhzkc}{bx}{0123456789abcdef}{uhzkc}

\DeclareRobustCommand{\HanzikuA}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk1}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuB}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk2}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuC}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk3}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuD}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk4}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuE}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk5}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuF}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk6}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuG}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk7}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuH}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk8}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuI}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzk9}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuJ}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzka}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuK}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzkb}\uppercase{\set@character="#1}%
        \endgroup%
}
\DeclareRobustCommand{\HanzikuL}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{uhzkc}\uppercase{\set@character="#1}%
        \endgroup%
}

\DeclareKanjiFamily{\otf@JYn}{ucdp}{}
\DeclareKanjiFamily{\otf@JTn}{ucdp}{}
\Declare@FontShape{ucdp}{m}{0123456789abcdef}{ucdp}
\Declare@FontShape{ucdp}{bx}{0123456789abcdef}{ucdp}

\DeclareRobustCommand{\CDPUCS}[1]{\begingroup%
        \edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
        \kanjifamily{ucdp}\uppercase{\set@character="#1}%
        \endgroup%
}

\DeclareKanjiFamily{\otf@JYn}{ugt01}{}
\DeclareFontShape{\otf@JYn}{ugt01}{m}{n}{<-> s * [0.961] ugt01}{}
\DeclareFontShape{\otf@JYn}{ugt01}{bx}{n}{<-> s * [0.961] ugt01}{}
\DeclareKanjiFamily{\otf@JYn}{ugt02}{}
\DeclareFontShape{\otf@JYn}{ugt02}{m}{n}{<-> s * [0.961] ugt02}{}
\DeclareFontShape{\otf@JYn}{ugt02}{bx}{n}{<-> s * [0.961] ugt02}{}
\DeclareKanjiFamily{\otf@JYn}{ugt03}{}
\DeclareFontShape{\otf@JYn}{ugt03}{m}{n}{<-> s * [0.961] ugt03}{}
\DeclareFontShape{\otf@JYn}{ugt03}{bx}{n}{<-> s * [0.961] ugt03}{}
\DeclareKanjiFamily{\otf@JYn}{ugt04}{}
\DeclareFontShape{\otf@JYn}{ugt04}{m}{n}{<-> s * [0.961] ugt04}{}
\DeclareFontShape{\otf@JYn}{ugt04}{bx}{n}{<-> s * [0.961] ugt04}{}
\DeclareKanjiFamily{\otf@JYn}{ugt05}{}
\DeclareFontShape{\otf@JYn}{ugt05}{m}{n}{<-> s * [0.961] ugt05}{}
\DeclareFontShape{\otf@JYn}{ugt05}{bx}{n}{<-> s * [0.961] ugt05}{}
\DeclareKanjiFamily{\otf@JYn}{ugt06}{}
\DeclareFontShape{\otf@JYn}{ugt06}{m}{n}{<-> s * [0.961] ugt06}{}
\DeclareFontShape{\otf@JYn}{ugt06}{bx}{n}{<-> s * [0.961] ugt06}{}
\DeclareKanjiFamily{\otf@JYn}{ugt07}{}
\DeclareFontShape{\otf@JYn}{ugt07}{m}{n}{<-> s * [0.961] ugt07}{}
\DeclareFontShape{\otf@JYn}{ugt07}{bx}{n}{<-> s * [0.961] ugt07}{}
\DeclareKanjiFamily{\otf@JYn}{ugt08}{}
\DeclareFontShape{\otf@JYn}{ugt08}{m}{n}{<-> s * [0.961] ugt08}{}
\DeclareFontShape{\otf@JYn}{ugt08}{bx}{n}{<-> s * [0.961] ugt08}{}
\DeclareKanjiFamily{\otf@JYn}{ugt09}{}
\DeclareFontShape{\otf@JYn}{ugt09}{m}{n}{<-> s * [0.961] ugt09}{}
\DeclareFontShape{\otf@JYn}{ugt09}{bx}{n}{<-> s * [0.961] ugt09}{}
\DeclareKanjiFamily{\otf@JYn}{ugt10}{}
\DeclareFontShape{\otf@JYn}{ugt10}{m}{n}{<-> s * [0.961] ugt10}{}
\DeclareFontShape{\otf@JYn}{ugt10}{bx}{n}{<-> s * [0.961] ugt10}{}
\DeclareKanjiFamily{\otf@JYn}{ugt11}{}
\DeclareFontShape{\otf@JYn}{ugt11}{m}{n}{<-> s * [0.961] ugt11}{}
\DeclareFontShape{\otf@JYn}{ugt11}{bx}{n}{<-> s * [0.961] ugt11}{}
\DeclareKanjiFamily{\otf@JYn}{ugt12}{}
\DeclareFontShape{\otf@JYn}{ugt12}{m}{n}{<-> s * [0.961] ugt12}{}
\DeclareFontShape{\otf@JYn}{ugt12}{bx}{n}{<-> s * [0.961] ugt12}{}
\DeclareKanjiFamily{\otf@JYn}{ugt13}{}
\DeclareFontShape{\otf@JYn}{ugt13}{m}{n}{<-> s * [0.961] ugt13}{}
\DeclareFontShape{\otf@JYn}{ugt13}{bx}{n}{<-> s * [0.961] ugt13}{}
\DeclareKanjiFamily{\otf@JTn}{ugt01}{}
\DeclareFontShape{\otf@JTn}{ugt01}{m}{n}{<-> s * [0.961] ugt01-v}{}
\DeclareFontShape{\otf@JTn}{ugt01}{bx}{n}{<-> s * [0.961] ugt01-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt02}{}
\DeclareFontShape{\otf@JTn}{ugt02}{m}{n}{<-> s * [0.961] ugt02-v}{}
\DeclareFontShape{\otf@JTn}{ugt02}{bx}{n}{<-> s * [0.961] ugt02-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt03}{}
\DeclareFontShape{\otf@JTn}{ugt03}{m}{n}{<-> s * [0.961] ugt03-v}{}
\DeclareFontShape{\otf@JTn}{ugt03}{bx}{n}{<-> s * [0.961] ugt03-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt04}{}
\DeclareFontShape{\otf@JTn}{ugt04}{m}{n}{<-> s * [0.961] ugt04-v}{}
\DeclareFontShape{\otf@JTn}{ugt04}{bx}{n}{<-> s * [0.961] ugt04-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt05}{}
\DeclareFontShape{\otf@JTn}{ugt05}{m}{n}{<-> s * [0.961] ugt05-v}{}
\DeclareFontShape{\otf@JTn}{ugt05}{bx}{n}{<-> s * [0.961] ugt05-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt06}{}
\DeclareFontShape{\otf@JTn}{ugt06}{m}{n}{<-> s * [0.961] ugt06-v}{}
\DeclareFontShape{\otf@JTn}{ugt06}{bx}{n}{<-> s * [0.961] ugt06-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt07}{}
\DeclareFontShape{\otf@JTn}{ugt07}{m}{n}{<-> s * [0.961] ugt07-v}{}
\DeclareFontShape{\otf@JTn}{ugt07}{bx}{n}{<-> s * [0.961] ugt07-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt08}{}
\DeclareFontShape{\otf@JTn}{ugt08}{m}{n}{<-> s * [0.961] ugt08-v}{}
\DeclareFontShape{\otf@JTn}{ugt08}{bx}{n}{<-> s * [0.961] ugt08-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt09}{}
\DeclareFontShape{\otf@JTn}{ugt09}{m}{n}{<-> s * [0.961] ugt09-v}{}
\DeclareFontShape{\otf@JTn}{ugt09}{bx}{n}{<-> s * [0.961] ugt09-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt10}{}
\DeclareFontShape{\otf@JTn}{ugt10}{m}{n}{<-> s * [0.961] ugt10-v}{}
\DeclareFontShape{\otf@JTn}{ugt10}{bx}{n}{<-> s * [0.961] ugt10-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt11}{}
\DeclareFontShape{\otf@JTn}{ugt11}{m}{n}{<-> s * [0.961] ugt11-v}{}
\DeclareFontShape{\otf@JTn}{ugt11}{bx}{n}{<-> s * [0.961] ugt11-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt12}{}
\DeclareFontShape{\otf@JTn}{ugt12}{m}{n}{<-> s * [0.961] ugt12-v}{}
\DeclareFontShape{\otf@JTn}{ugt12}{bx}{n}{<-> s * [0.961] ugt12-v}{}
\DeclareKanjiFamily{\otf@JTn}{ugt13}{}
\DeclareFontShape{\otf@JTn}{ugt13}{m}{n}{<-> s * [0.961] ugt13-v}{}
\DeclareFontShape{\otf@JTn}{ugt13}{bx}{n}{<-> s * [0.961] ugt13-v}{}

\DeclareRobustCommand{\GTpjA}[1]{\begingroup%
  \kanjifamily{ugt01}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjB}[1]{\begingroup%
  \kanjifamily{ugt02}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjC}[1]{\begingroup%
  \kanjifamily{ugt03}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjD}[1]{\begingroup%
  \kanjifamily{ugt04}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjE}[1]{\begingroup%
  \kanjifamily{ugt05}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjF}[1]{\begingroup%
  \kanjifamily{ugt06}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjG}[1]{\begingroup%
  \kanjifamily{ugt07}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjH}[1]{\begingroup%
  \kanjifamily{ugt08}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjI}[1]{\begingroup%
  \kanjifamily{ugt09}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjJ}[1]{\begingroup%
  \kanjifamily{ugt10}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjK}[1]{\begingroup%
  \kanjifamily{ugt11}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjL}[1]{\begingroup%
  \kanjifamily{ugt12}\selectfont\char\jis"#1\endgroup
}
\DeclareRobustCommand{\GTpjM}[1]{\begingroup%
  \kanjifamily{ugt13}\selectfont\char\jis"#1\endgroup
}

\DeclareFontFamily{T1}{chisesub000}{}
\DeclareFontShape{T1}{chisesub000}{m}{n}{
   <-> [.961] chisesub000min
}{}
\DeclareFontFamily{T1}{chisesub000}{}
\DeclareFontShape{T1}{chisesub000}{bx}{n}{
   <-> [.961] chisesub000got
}{}
\DeclareFontFamily{T1}{chisesub001}{}
\DeclareFontShape{T1}{chisesub001}{m}{n}{
   <-> [.961] chisesub001min
}{}
\DeclareFontFamily{T1}{chisesub001}{}
\DeclareFontShape{T1}{chisesub001}{bx}{n}{
   <-> [.961] chisesub001got
}{}
\DeclareFontFamily{T1}{chisesub002}{}
\DeclareFontShape{T1}{chisesub002}{m}{n}{
   <-> [.961] chisesub002min
}{}
\DeclareFontFamily{T1}{chisesub002}{}
\DeclareFontShape{T1}{chisesub002}{bx}{n}{
   <-> [.961] chisesub002got
}{}
\DeclareFontFamily{T1}{chisesub003}{}
\DeclareFontShape{T1}{chisesub003}{m}{n}{
   <-> [.961] chisesub003min
}{}
\DeclareFontFamily{T1}{chisesub003}{}
\DeclareFontShape{T1}{chisesub003}{bx}{n}{
   <-> [.961] chisesub003got
}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% IDC shorthand
% -------------
\def\idc@#1{\UTFM{#1}}
\def\idcltr{\idc@{2FF0}}
\def\idcatb{\idc@{2FF1}}
\def\idcltmr{\idc@{2FF2}}
\def\idcatmb{\idc@{2FF3}}
\def\idcfs{\idc@{2FF4}}
\def\idcsfa{\idc@{2FF5}}
\def\idcsfb{\idc@{2FF6}}
\def\idcsfl{\idc@{2FF7}}
\def\idcsful{\idc@{2FF8}}
\def\idcsfur{\idc@{2FF9}}
\def\idcsfll{\idc@{2FFA}}
\def\idcol{\idc@{2FFB}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% other macros
% -------------
\newcommand{\UCSgb}[1]{\UTFC{#1}}
\newcommand{\UCSjis}[1]{\UTF{#1}}
\newcommand{\UCSks}[1]{\UTFK{#1}}
\newcommand{\UCScns}[1]{\UTFT{#1}}
\newcommand{\AdobeJP}[1]{\CID{#1}}
\newcommand{\ThaiTIS}[1]{\fontencoding{LTH}\selectfont\char"#1\fontencoding{T1}\selectfont}
\newcommand{\CyrillicScript}[1]{\fontencoding{T2A}\selectfont{}#1\fontencoding{T1}\selectfont{}}
\newcommand{\GreekScript}[1]{\fontencoding{LGR}\selectfont{}#1\fontencoding{T1}\selectfont{}}
