% omegaja.sty (based on uniomjp.sty)
% Haruhiko Okumura <okumura@acm.org>
%
% 0.962216 in uniomjp changed to 0.92469
\DeclareFontFamily{OT1}{omja}{}
\DeclareFontShape{OT1}{omja}{m}{n}{<-> s * [0.92469] omrml}{}
\DeclareFontShape{OT1}{omja}{m}{sl}{<-> s * [0.92469] omgbm}{}
\DeclareFontShape{OT1}{omja}{m}{it}{<-> s * [0.92469] omgbm}{}
\DeclareFontShape{OT1}{omja}{m}{sc}{<-> s * [0.92469] omgbm}{}
\DeclareFontShape{OT1}{omja}{bx}{n}{<-> s * [0.92469] omgbm}{}
\DeclareFontShape{OT1}{omja}{b}{n}{<-> s * [0.92469] omgbm}{}
\DeclareFontShape{OT1}{omja}{bx}{it}{<-> s * [0.92469] omgbm}{}
\DeclareFontShape{OT1}{omja}{bx}{sl}{<-> s * [0.92469] omgbm}{}
\DeclareFontShape{OT1}{omja}{bx}{sc}{<-> s * [0.92469] omgbm}{}
\DeclareFontShape{OT1}{omja}{m}{ui}{<-> s * [0.92469] omrml}{}
%
\DeclareFontFamily{OT1}{omjc}{}
\DeclareFontShape{OT1}{omjc}{m}{n}{<-> s * [0.92469] omcrml}{}
\DeclareFontShape{OT1}{omjc}{m}{sl}{<-> s * [0.92469] omcgbm}{}
\DeclareFontShape{OT1}{omjc}{m}{it}{<-> s * [0.92469] omcgbm}{}
\DeclareFontShape{OT1}{omjc}{m}{sc}{<-> s * [0.92469] omcgbm}{}
\DeclareFontShape{OT1}{omjc}{bx}{n}{<-> s * [0.92469] omcgbm}{}
\DeclareFontShape{OT1}{omjc}{b}{n}{<-> s * [0.92469] omcgbm}{}
\DeclareFontShape{OT1}{omjc}{bx}{it}{<-> s * [0.92469] omcgbm}{}
\DeclareFontShape{OT1}{omjc}{bx}{sl}{<-> s * [0.92469] omcgbm}{}
\DeclareFontShape{OT1}{omjc}{bx}{sc}{<-> s * [0.92469] omcgbm}{}
\DeclareFontShape{OT1}{omjc}{m}{ui}{<-> s * [0.92469] omcrml}{}
%
\def\japanesefont{\fontfamily{omja}\selectfont}
\def\UNI#1{\begingroup\clearocplists
  \fontfamily{omja}\selectfont\char"#1
  \relax\endgroup}
\def\CID#1{\begingroup\clearocplists
  \fontfamily{omjc}\selectfont\char#1
  \relax\endgroup}
% zenkaku width (fullwidth)
\newdimen\zw \zw=0.92469em
% skip among Japanese
\newskip\kanjiskip \kanjiskip=0em plus .1em minus .01em
% skip between Japanese and latin
\newskip\xkanjiskip \xkanjiskip=0.25em plus 0.15em minus 0.06em
\DeclareRobustCommand\selectfont
        {% from latex.ltx
    \ifx\f@linespread\baselinestretch \else
      \set@fontsize\baselinestretch\f@size\f@baselineskip \fi
    \xdef\font@name{%
      \csname\curr@fontshape/\f@size\endcsname}%
    \pickup@font
    \font@name
    \size@update
    \enc@update
    % okumura's addition:
    \zw=0.92469em
    \kanjiskip=0em plus .1em minus .01em
    \ifdim\xkanjiskip>\z@
      \xkanjiskip=0.25em plus 0.15em minus 0.06em
    \fi
    }
\def\kinsokupenalty{\penalty1000 } % To be tuned
\newcommand{\ruby}[3][0pt]{%
  \leavevmode
  \dimen1=#1\relax
  \dimen3=\f@size\p@
  \setbox1=\hbox{#2}%
  \setbox3=\hbox{\fontsize{0.5\dimen3}{0pt}\selectfont #3}%
  \ifdim\dimen1=\z@
    \ifdim\wd1>\wd3 \dimen1=\wd1 \else \dimen1=\wd3 \fi
  \fi
  \hbox{%
    \kanjiskip=0pt plus 2fil
    \xkanjiskip=0pt plus 2fil
    \vbox{%
      \hbox to \dimen1{%
        \fontsize{0.5\dimen3}{0pt}\selectfont
        \ifdim\dimen1<\wd3
          \hss\unhbox3\hss
        \else
          \hfil\unhbox3\hfil
        \fi
      }%
      \nointerlineskip
      \hbox to \dimen1{\hfil\unhbox1\hfil}}}}
\endinput
