summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/platex/japanese-otf/otf.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/platex/japanese-otf/otf.sty')
-rw-r--r--Master/texmf-dist/tex/platex/japanese-otf/otf.sty79
1 files changed, 45 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/platex/japanese-otf/otf.sty b/Master/texmf-dist/tex/platex/japanese-otf/otf.sty
index 27ceb01d0d7..39a2beaa900 100644
--- a/Master/texmf-dist/tex/platex/japanese-otf/otf.sty
+++ b/Master/texmf-dist/tex/platex/japanese-otf/otf.sty
@@ -1,8 +1,9 @@
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{otf}[2023/02/23 TeX JP org, v1.7b8 psitau, u0.28 ttk]
+\ProvidesPackage{otf}[2023/06/25 TeX JP org, v1.7b8 psitau, u0.29 ttk]
\RequirePackage{keyval}
%for processing options
\newif\if@kana \@kanafalse
+\newif\if@ruby \@rubytrue
\newif\if@macro \@macrotrue
\newif\if@deluxe \@deluxefalse
\newif\if@replace \@replacetrue
@@ -16,6 +17,7 @@
\DeclareOption{nomacro}{\@macrofalse}
\DeclareOption{nomacros}{\@macrofalse}
\DeclareOption{noreplace}{\@replacefalse}
+\DeclareOption{noruby}{\@rubyfalse}
\DeclareOption{bold}{\@replacetrue\@boldtrue}
\DeclareOption{expert}{\@replacetrue\@kanatrue}
\DeclareOption{deluxe}{\@boldfalse\@replacetrue\@deluxetrue}
@@ -36,6 +38,7 @@
\def\otf@OTorT{\if@otf@uplatex T\else OT\fi}
\def\otf@pfx@{\if@otf@uplatex up\else \fi}
\def\brsg@pfx@{\if@burasage brsg\else\fi}
+\def\ruby@pfx@{\if@ruby ruby\else nml\fi}
\def\nlck@sfx@{\if@newglyph n\else\fi}
\ProcessOptions\relax
@@ -94,7 +97,8 @@
\edef\reserved@a{\gtdefault}\edef\reserved@b{\mgdefault}%
\ifx\k@family\reserved@a \kanjifamily{cidjg}\else\ifx\k@family\reserved@b
\kanjifamily{cidjmg}\else\kanjifamily{cidj}\fi\fi%
- \set@character=#1%
+% \set@character=#1% (1) pLaTeX, upLaTeXともに\CID{}に従来のsubfontを使う
+ \if@otf@uplatex\set@character@\else\set@character\fi=#1% (2) upLaTeXでは\CID{}に新vfを使う
\endgroup%
}
\else
@@ -107,7 +111,9 @@
}
\DeclareRobustCommand{\CID}[1]{\begingroup%
\edef\reserved@a{\gtdefault}\ifx\k@family\reserved@a \kanjiseries{bx}\fi%
- \kanjifamily{cidj}\set@character=#1%
+ \kanjifamily{cidj}%
+% \set@character=#1% (1) pLaTeX, upLaTeXともに\CID{}に従来のsubfontを使う
+ \if@otf@uplatex\set@character@\else\set@character\fi=#1% (2) upLaTeXでは\CID{}に新vfを使う
\endgroup%
}
\fi
@@ -251,11 +257,16 @@
\AtBeginDocument{\Redefine@UTF}
%internal macros
%macros by iNOUE Koich!
+\ifx\kanjishapeforce\@undefined
+ \let\otf@kanjishape\kanjishape
+\else
+ \let\otf@kanjishape\kanjishapeforce
+\fi
\newcommand\set@character{\afterassignment\put@character\@tempcnta}
\newcommand\put@character{%
\@tempcntb=\@tempcnta
\divide\@tempcntb by "1000
- \kanjishape{\ifcase\@tempcntb0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or a\or b\or c\or d\or e\or f\or
+ \otf@kanjishape{\ifcase\@tempcntb0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or a\or b\or c\or d\or e\or f\or
\or \or \or \or \or \or \or \or \or \or \or g\or \or h\or i\or j\or
k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\fi}%
\selectfont%
@@ -275,7 +286,7 @@
}
\newcommand\set@character@{\afterassignment\put@character@\@tempcnta}
\newcommand\put@character@{%
- \kanjishape{-}\selectfont%
+ \otf@kanjishape{-}\selectfont%
\kchar\@tempcnta%
}
\catcode`\"=\count@
@@ -364,8 +375,8 @@
\if@kana
\DeclareFontShape{\otf@JYn}{hmc}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expminr\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{hmc}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expminr\nlck@sfx@-v}{}
- \DeclareFontShape{\otf@JYn}{ruby}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubyminr-h}{}
- \DeclareFontShape{\otf@JTn}{ruby}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubyminr-v}{}
+ \DeclareFontShape{\otf@JYn}{ruby}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ minr-h}{}
+ \DeclareFontShape{\otf@JTn}{ruby}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ minr-v}{}
\else
\if@replace
\DeclareFontShape{\otf@JYn}{hmc}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlminr\nlck@sfx@-h}{}
@@ -380,12 +391,12 @@
\DeclareFontShape{\otf@JTn}{hgt}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgothr\nlck@sfx@-v}{}
\DeclareFontShape{\otf@JYn}{hgt}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgothb\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{hgt}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgothb\nlck@sfx@-v}{}
- \DeclareFontShape{\otf@JYn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubyminb-h}{}
- \DeclareFontShape{\otf@JTn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubyminb-v}{}
- \DeclareFontShape{\otf@JYn}{rubyg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubygothr-h}{}
- \DeclareFontShape{\otf@JTn}{rubyg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubygothr-v}{}
- \DeclareFontShape{\otf@JYn}{rubyg}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubygothb-h}{}
- \DeclareFontShape{\otf@JTn}{rubyg}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubygothb-v}{}
+ \DeclareFontShape{\otf@JYn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ minb-h}{}
+ \DeclareFontShape{\otf@JTn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ minb-v}{}
+ \DeclareFontShape{\otf@JYn}{rubyg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ gothr-h}{}
+ \DeclareFontShape{\otf@JTn}{rubyg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ gothr-v}{}
+ \DeclareFontShape{\otf@JYn}{rubyg}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ gothb-h}{}
+ \DeclareFontShape{\otf@JTn}{rubyg}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ gothb-v}{}
\else
\DeclareFontShape{\otf@JYn}{hmc}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlminb\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{hmc}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlminb\nlck@sfx@-v}{}
@@ -399,13 +410,13 @@
\if@bold
\DeclareFontShape{\otf@JYn}{hgt}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgothb\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{hgt}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgothb\nlck@sfx@-v}{}
- \DeclareFontShape{\otf@JYn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubygothb-h}{}
- \DeclareFontShape{\otf@JTn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubygothb-v}{}
+ \DeclareFontShape{\otf@JYn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ gothb-h}{}
+ \DeclareFontShape{\otf@JTn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ gothb-v}{}
\else
\DeclareFontShape{\otf@JYn}{hgt}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgothr\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{hgt}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgothr\nlck@sfx@-v}{}
- \DeclareFontShape{\otf@JYn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubygothr-h}{}
- \DeclareFontShape{\otf@JTn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubygothr-v}{}
+ \DeclareFontShape{\otf@JYn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ gothr-h}{}
+ \DeclareFontShape{\otf@JTn}{ruby}{bx}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ gothr-v}{}
\fi
\else
\if@bold
@@ -451,22 +462,22 @@
\if@kana
\DeclareFontShape{\otf@JYn}{mg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expmgothr\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{mg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expmgothr\nlck@sfx@-v}{}
- \DeclareFontShape{\otf@JYn}{rubymg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubymgothr-h}{}
- \DeclareFontShape{\otf@JTn}{rubymg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubymgothr-v}{}
+ \DeclareFontShape{\otf@JYn}{rubymg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ mgothr-h}{}
+ \DeclareFontShape{\otf@JTn}{rubymg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ mgothr-v}{}
\DeclareFontShape{\otf@JYn}{hmc}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expminl\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{hmc}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expminl\nlck@sfx@-v}{}
\DeclareFontShape{\otf@JYn}{hgt}{eb}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgotheb\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{hgt}{eb}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ expgotheb\nlck@sfx@-v}{}
- \DeclareFontShape{\otf@JYn}{ruby}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubyminl-h}{}
- \DeclareFontShape{\otf@JTn}{ruby}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ rubyminl-v}{}
+ \DeclareFontShape{\otf@JYn}{ruby}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ minl-h}{}
+ \DeclareFontShape{\otf@JTn}{ruby}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \ruby@pfx@ minl-v}{}
\else
\DeclareFontShape{\otf@JYn}{mg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlmgothr\nlck@sfx@-h}{}
\DeclareFontShape{\otf@JTn}{mg}{m}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlmgothr\nlck@sfx@-v}{}
- \DeclareFontShape{\otf@JYn}{hmc}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ nmlminl\nlck@sfx@-h}{}
- \DeclareFontShape{\otf@JTn}{hmc}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ nmlminl\nlck@sfx@-v}{}
+ \DeclareFontShape{\otf@JYn}{hmc}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlminl\nlck@sfx@-h}{}
+ \DeclareFontShape{\otf@JTn}{hmc}{l}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlminl\nlck@sfx@-v}{}
+ \DeclareFontShape{\otf@JYn}{hgt}{eb}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlgotheb\nlck@sfx@-h}{}
+ \DeclareFontShape{\otf@JTn}{hgt}{eb}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlgotheb\nlck@sfx@-v}{}
\fi
- \DeclareFontShape{\otf@JYn}{hgt}{eb}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlgotheb\nlck@sfx@-h}{}
- \DeclareFontShape{\otf@JTn}{hgt}{eb}{n}{<-> s * [\utf@sc@le] \otf@pfx@ \brsg@pfx@ nmlgotheb\nlck@sfx@-v}{}
\DeclareFontShape{\otf@JYn}{hmc}{m}{prp}{<-> s * [\utf@sc@le] \otf@pfx@ phiraminw3-h}{}
\DeclareFontShape{\otf@JYn}{hmc}{bx}{prp}{<-> s * [\utf@sc@le] \otf@pfx@ phiraminw6-h}{}
\DeclareFontShape{\otf@JYn}{hgt}{m}{prp}{<-> s * [\utf@sc@le] \otf@pfx@ phirakakuw3-h}{}
@@ -484,36 +495,36 @@
\DeclareKanjiFamily{\otf@JYn}{cidj}{}
\DeclareKanjiFamily{\otf@JTn}{cidj}{}
\Declare@FontShape{utfj}{m}{0123456789abcdefjklmnopqrstuvxyz-}{utfjmr\nlck@sfx@}
-\Declare@FontShape{cidj}{m}{012345}{cidjmr}
+\Declare@FontShape{cidj}{m}{012345-}{cidjmr}
%definition of other utf/cid fonts
\if@deluxe
\Declare@FontShape{utfj}{bx}{0123456789abcdefjklmnopqrstuvxyz-}{utfjmb\nlck@sfx@}
- \Declare@FontShape{cidj}{bx}{012345}{cidjmb}
+ \Declare@FontShape{cidj}{bx}{012345-}{cidjmb}
\DeclareKanjiFamily{\otf@JYn}{utfjg}{}
\DeclareKanjiFamily{\otf@JTn}{utfjg}{}
\DeclareKanjiFamily{\otf@JYn}{cidjg}{}
\DeclareKanjiFamily{\otf@JTn}{cidjg}{}
\Declare@FontShape{utfjg}{m}{0123456789abcdefjklmnopqrstuvxyz-}{utfjgr\nlck@sfx@}
- \Declare@FontShape{cidjg}{m}{012345}{cidjgr}
+ \Declare@FontShape{cidjg}{m}{012345-}{cidjgr}
\Declare@FontShape{utfjg}{bx}{0123456789abcdefjklmnopqrstuvxyz-}{utfjgb\nlck@sfx@}
- \Declare@FontShape{cidjg}{bx}{012345}{cidjgb}
+ \Declare@FontShape{cidjg}{bx}{012345-}{cidjgb}
\Declare@FontShape{utfjg}{eb}{0123456789abcdefjklmnopqrstuvxyz-}{utfjge\nlck@sfx@}
- \Declare@FontShape{cidjg}{eb}{012345}{cidjge}
+ \Declare@FontShape{cidjg}{eb}{012345-}{cidjge}
\DeclareKanjiFamily{\otf@JYn}{utfjmg}{}
\DeclareKanjiFamily{\otf@JTn}{utfjmg}{}
\DeclareKanjiFamily{\otf@JYn}{cidjmg}{}
\DeclareKanjiFamily{\otf@JTn}{cidjmg}{}
\Declare@FontShape{utfjmg}{m}{0123456789abcdefjklmnopqrstuvxyz-}{utfjmgr\nlck@sfx@}
- \Declare@FontShape{cidjmg}{m}{012345}{cidjmgr}
+ \Declare@FontShape{cidjmg}{m}{012345-}{cidjmgr}
\Declare@FontShape{utfj}{l}{0123456789abcdefjklmnopqrstuvxyz-}{utfjml\nlck@sfx@}
- \Declare@FontShape{cidj}{l}{012345}{cidjml}
+ \Declare@FontShape{cidj}{l}{012345-}{cidjml}
\else
\if@bold
\Declare@FontShape{utfj}{bx}{0123456789abcdefjklmnopqrstuvxyz-}{utfjgb\nlck@sfx@}
- \Declare@FontShape{cidj}{bx}{012345}{cidjgb}
+ \Declare@FontShape{cidj}{bx}{012345-}{cidjgb}
\else
\Declare@FontShape{utfj}{bx}{0123456789abcdefjklmnopqrstuvxyz-}{utfjgr\nlck@sfx@}
- \Declare@FontShape{cidj}{bx}{012345}{cidjgr}
+ \Declare@FontShape{cidj}{bx}{012345-}{cidjgr}
\fi
\fi
\if@macro