summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/platex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-02-03 22:47:16 +0000
committerKarl Berry <karl@freefriends.org>2019-02-03 22:47:16 +0000
commit127c5a0395cd8486e64f3b003be661fb2a571257 (patch)
treee9af6f21de1dade75b8a663cd4c3d1190329cae6 /Master/texmf-dist/tex/platex
parent94ca4d6eda3232fcca41b1f37bf34d12908406b3 (diff)
pxchfon (3feb19)
git-svn-id: svn://tug.org/texlive/trunk@49925 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/platex')
-rw-r--r--Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty276
1 files changed, 220 insertions, 56 deletions
diff --git a/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty b/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
index cd13b42101e..186d862c680 100644
--- a/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
+++ b/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxchfon}[2019/01/21 v1.2b]
+\ProvidesPackage{pxchfon}[2019/02/03 v1.3]
\def\pxcz@pkgname{pxchfon}
%% preparations
@@ -123,6 +123,8 @@
\let\pxcz@strict@csi\relax
\newif\ifpxcz@directunicode@default
\let\pxcz@legacycode\relax
+\let\pxcz@expert\relax
+\newif\ifpxcz@glyphid
%% process options
% drivers
@@ -183,6 +185,12 @@
\DeclareOption{ignore-legacycode}{\let\pxcz@legacycode\pxcz@legacycode@ignore}
\DeclareOption{suppress-legacycode}{\let\pxcz@legacycode\pxcz@legacycode@suppress}
\DeclareOption{replace-legacycode}{\let\pxcz@legacycode\pxcz@legacycode@replace}
+% (no)expert
+\DeclareOption{expert}{\let\pxcz@expert=t}
+\DeclareOption{noexpert}{\let\pxcz@expert=f}
+% (no)glyphid
+\DeclareOption{glyphid}{\pxcz@glyphidtrue}
+\DeclareOption{noglyphid}{\pxcz@glyphidfalse}
% preset spec options
\pxcz@onlypreamble@def\pxcz@all@main@preset{%
noembed,%
@@ -308,7 +316,7 @@
\if t\pxcz@strict@csi
% 'strictcsi' requires some pdfTeX feature.
\ifx\pdffiledump\@undefined
- \PackageWarning\pxcz@pkgname
+ \PackageWarningNoLine\pxcz@pkgname
{The option 'strictcsi' cannot be used, because\MessageBreak
the engine does not support '\string\pdffiledump'}
\let\pxcz@strict@csi=f
@@ -394,6 +402,42 @@
\let\pxcz@legacycode\pxcz@legacycode@suppress}%
\fi
+%% 'glyphid' requires 'replace-' or 'suppress-legacycode'
+\pxcz@okfalse
+\ifnum\pxcz@legacycode=\pxcz@legacycode@replace \pxcz@oktrue \fi
+\ifnum\pxcz@legacycode=\pxcz@legacycode@suppress \pxcz@oktrue \fi
+\ifpxcz@uptex\else \pxcz@okfalse \fi
+\ifpxcz@ok\else
+ \ifpxcz@glyphid
+ \PackageError\pxcz@pkgname
+ {The option 'glyphid' cannot be used here. You must\MessageBreak
+ use upLaTeX and the 'unicode' option}
+ {\@ehc}
+ \pxcz@glyphidfalse
+ \fi
+ \if t\pxcz@expert % explicitly given
+ \PackageError\pxcz@pkgname
+ {The option 'expert' cannot be used here. You must\MessageBreak
+ use upLaTeX and the 'unicode' option}
+ {\@ehc}
+ \fi
+ \let\pxcz@expert=f
+\fi
+
+%% apply default for \pxcz@expert
+\@ifpackagewith{otf}{expert}{%
+ \ifx\pxcz@expert\relax
+ \let\pxcz@expert=t
+ \fi
+}{%else
+ \if t\pxcz@expert
+ \PackageWarningNoLine\pxcz@pkgname
+ {The 'expert' option will be ignored, since the\MessageBreak
+ expert mode of the 'otf' package is not enabled}
+ \fi
+ \let\pxcz@expert=f
+}
+
%--------------------------------------- user interface
%% \pxcz@sym@list
@@ -542,7 +586,9 @@
\let\pxcz@cmap\relax
\let\pxcz@font\relax
\let\pxcz@csi\relax
-\newif\ifpxcz@ext
+\newif\ifpxcz@vert
+\newif\ifpxcz@retain
+\newif\ifpxcz@retain@csi
\let\pxcz@lopts\relax
\let\pxcz@mopts\relax
\let\pxcz@font@tribe\relax
@@ -678,6 +724,7 @@
\@onlypreamble\pxcz@declare@entry@modifier
\def\pxcz@declare@entry@modifier#1{%
\pxcz@onlypreamble@csdef{pxcz@MEM/#1}}
+
%% entry modifiers
% Uni: Changes cmap to 'unicode' if directunicode.
\pxcz@declare@entry@modifier{Uni}{%
@@ -693,7 +740,7 @@
\let\pxcz@cmap\pxcz@cmap@directuni
\fi
\fi}
-% Switch
+% Switch: Selects 90 or 04 (according to mmivjis)
\pxcz@declare@entry@modifier{Switch}{%
\ifpxcz@mmivjis
\pxcz@force@mmiv@cmap
@@ -725,23 +772,45 @@
\pxcz@switch@font@for{fwid}%
\pxcz@add@lopt{fwid}}
% AJ16/AK12/AG14/AC14
-\pxcz@declare@entry@modifier{AJ16}{\def\pxcz@csi{AJ16}}
-\pxcz@declare@entry@modifier{AK12}{\def\pxcz@csi{AK12}\pxcz@exttrue}
-\pxcz@declare@entry@modifier{AG14}{\def\pxcz@csi{AG14}\pxcz@exttrue}
-\pxcz@declare@entry@modifier{AC14}{\def\pxcz@csi{AC14}\pxcz@exttrue}
+\pxcz@declare@entry@modifier{AJ16}{%
+ \def\pxcz@csi{AJ16}%
+ \if t\pxcz@expert \ifnum\pxcz@directunicode<\pxcz@directunicode@all\else
+ \ifx\pxcz@font\pxcz@noembed\else
+ \let\pxcz@cmap\pxcz@cmap@directuni \let\pxcz@csi\relax
+ \pxcz@add@lopt{ruby}%
+ \fi\fi\fi}
+\pxcz@declare@entry@modifier{AK12}{\def\pxcz@csi{AK12}\pxcz@retaintrue}
+\pxcz@declare@entry@modifier{AG14}{\def\pxcz@csi{AG14}\pxcz@retaintrue}
+\pxcz@declare@entry@modifier{AC14}{\def\pxcz@csi{AC14}\pxcz@retaintrue}
% V: Adds '-w 1' if cmap is 'unicode'.
\pxcz@declare@entry@modifier{V}{%
+ \pxcz@verttrue
\ifx\pxcz@cmap\pxcz@cmap@directuni
\edef\pxcz@mopts{ -w 1\pxcz@mopts}%
\fi}
+% Exp: Adds 'hkna/vkna' if cmap is 'unicode'.
+\pxcz@declare@entry@modifier{Exp}{%
+ \if t\pxcz@expert \ifx\pxcz@cmap\pxcz@cmap@directuni
+ \ifpxcz@vert \pxcz@add@lopt{vkna}%
+ \else \pxcz@add@lopt{hkna}%
+ \fi
+ \fi\fi}
+% SubG
+\pxcz@declare@entry@modifier{SubG}{%
+ \ifpxcz@glyphid
+ \edef\pxcz@cmap{Identity-\pxcz@cmap}\def\pxcz@csi{I}%
+ \pxcz@retaintrue \pxcz@retain@csitrue
+ \fi}
% Fin: final step
\pxcz@declare@entry@modifier{Fin}{%
\ifx\pxcz@csi\relax\else
- \expandafter\ifx\csname pxcz@OT/\pxcz@sym\endcsname\relax
+ \ifpxcz@retain@csi
+ \edef\pxcz@mopts{/\pxcz@csi}%
+ \else\expandafter\ifx\csname pxcz@OT/\pxcz@sym\endcsname\relax
\edef\pxcz@mopts{/\pxcz@csi}%
\else % omit CSI part for CFF fonts
\let\pxcz@mopts\@empty
- \fi
+ \fi\fi
\fi}
%% \pxcz@spec
@@ -759,7 +828,7 @@
\def\pxcz@Entry#1#2#3#4{%
\def\pxcz@sym{#1}\def\pxcz@cmap{#3}%
\let\pxcz@csi\relax \let\pxcz@mopts\@empty \let\pxcz@lopts\@empty
- \pxcz@extfalse
+ \pxcz@retainfalse \pxcz@retain@csifalse \pxcz@vertfalse
\edef\pxcz@font{\@nameuse{pxcz@FS/\pxcz@sym}}%
\pxcz@inspect@font@tribe
% apply modifiers
@@ -792,7 +861,7 @@
\fi
\fi
% suppress legacy-code mappings unless 'apply-legacycode'
- \ifx\pxcz@cmap\pxcz@cmap@directuni\else \ifpxcz@ext\else
+ \ifx\pxcz@cmap\pxcz@cmap@directuni\else \ifpxcz@retain\else
\ifnum\pxcz@legacycode=\pxcz@legacycode@apply % no-op
\else\ifnum\pxcz@legacycode=\pxcz@legacycode@ignore
\let\pxcz@font\@empty % skip
@@ -878,8 +947,8 @@
\Entry{mnl}{hminl-v} {V} {90,V}%
\Entry{mnl}{otf-ujmln-h} {UniJIS2004-UTF16-H} {Uni,04,FWid}%
\Entry{mnl}{otf-ujmln-v} {UniJIS2004-UTF16-V} {Uni,04,FWid,V}%
-\Entry{mnl}{hminln-h} {H} {}%
-\Entry{mnl}{hminln-v} {V} {V}%
+\Entry{mnl}{hminln-h} {H} {SubG}%
+\Entry{mnl}{hminln-v} {V} {SubG,V}%
\Entry{mnr}{otf-ujmr-h} {UniJIS-UTF16-H} {Uni,90,FWid}%
\Entry{mnr}{otf-ujmr-v} {UniJIS-UTF16-V} {Uni,90,FWid,V}%
\Entry{mnr}{otf-cjmr-h} {Identity-H} {AJ16}%
@@ -888,8 +957,8 @@
\Entry{mnr}{hminr-v} {V} {90,V}%
\Entry{mnr}{otf-ujmrn-h} {UniJIS2004-UTF16-H} {Uni,04,FWid}%
\Entry{mnr}{otf-ujmrn-v} {UniJIS2004-UTF16-V} {Uni,04,FWid,V}%
-\Entry{mnr}{hminrn-h} {H} {}%
-\Entry{mnr}{hminrn-v} {V} {V}%
+\Entry{mnr}{hminrn-h} {H} {SubG}%
+\Entry{mnr}{hminrn-v} {V} {SubG,V}%
\Entry{mnb}{otf-ujmb-h} {UniJIS-UTF16-H} {Uni,90,FWid}%
\Entry{mnb}{otf-ujmb-v} {UniJIS-UTF16-V} {Uni,90,FWid,V}%
\Entry{mnb}{otf-cjmb-h} {Identity-H} {AJ16}%
@@ -898,8 +967,8 @@
\Entry{mnb}{hminb-v} {V} {90,V}%
\Entry{mnb}{otf-ujmbn-h} {UniJIS2004-UTF16-H} {Uni,04,FWid}%
\Entry{mnb}{otf-ujmbn-v} {UniJIS2004-UTF16-V} {Uni,04,FWid,V}%
-\Entry{mnb}{hminbn-h} {H} {}%
-\Entry{mnb}{hminbn-v} {V} {V}%
+\Entry{mnb}{hminbn-h} {H} {SubG}%
+\Entry{mnb}{hminbn-v} {V} {SubG,V}%
\Entry{gtr}{otf-ujgr-h} {UniJIS-UTF16-H} {Uni,90,FWid}%
\Entry{gtr}{otf-ujgr-v} {UniJIS-UTF16-V} {Uni,90,FWid,V}%
\Entry{gtr}{otf-cjgr-h} {Identity-H} {AJ16}%
@@ -908,8 +977,8 @@
\Entry{gtr}{hgothr-v} {V} {90,V}%
\Entry{gtr}{otf-ujgrn-h} {UniJIS2004-UTF16-H} {Uni,04,FWid}%
\Entry{gtr}{otf-ujgrn-v} {UniJIS2004-UTF16-V} {Uni,04,FWid,V}%
-\Entry{gtr}{hgothrn-h} {H} {}%
-\Entry{gtr}{hgothrn-v} {V} {V}%
+\Entry{gtr}{hgothrn-h} {H} {SubG}%
+\Entry{gtr}{hgothrn-v} {V} {SubG,V}%
\Entry{gtb}{otf-ujgb-h} {UniJIS-UTF16-H} {Uni,90,FWid}%
\Entry{gtb}{otf-ujgb-v} {UniJIS-UTF16-V} {Uni,90,FWid,V}%
\Entry{gtb}{otf-cjgb-h} {Identity-H} {AJ16}%
@@ -918,8 +987,8 @@
\Entry{gtb}{hgothb-v} {V} {90,V}%
\Entry{gtb}{otf-ujgbn-h} {UniJIS2004-UTF16-H} {Uni,04,FWid}%
\Entry{gtb}{otf-ujgbn-v} {UniJIS2004-UTF16-V} {Uni,04,FWid,V}%
-\Entry{gtb}{hgothbn-h} {H} {}%
-\Entry{gtb}{hgothbn-v} {V} {V}%
+\Entry{gtb}{hgothbn-h} {H} {SubG}%
+\Entry{gtb}{hgothbn-v} {V} {SubG,V}%
\Entry{gtx}{otf-ujge-h} {UniJIS-UTF16-H} {Uni,90,FWid}%
\Entry{gtx}{otf-ujge-v} {UniJIS-UTF16-V} {Uni,90,FWid,V}%
\Entry{gtx}{otf-cjge-h} {Identity-H} {AJ16}%
@@ -928,8 +997,8 @@
\Entry{gtx}{hgotheb-v} {V} {90,V}%
\Entry{gtx}{otf-ujgen-h} {UniJIS2004-UTF16-H} {Uni,04,FWid}%
\Entry{gtx}{otf-ujgen-v} {UniJIS2004-UTF16-V} {Uni,04,FWid,V}%
-\Entry{gtx}{hgothebn-h} {H} {}%
-\Entry{gtx}{hgothebn-v} {V} {V}%
+\Entry{gtx}{hgothebn-h} {H} {SubG}%
+\Entry{gtx}{hgothebn-v} {V} {SubG,V}%
\Entry{mgr}{otf-ujmgr-h} {UniJIS-UTF16-H} {Uni,90,FWid}%
\Entry{mgr}{otf-ujmgr-v} {UniJIS-UTF16-V} {Uni,90,FWid,V}%
\Entry{mgr}{otf-cjmgr-h} {Identity-H} {AJ16}%
@@ -938,8 +1007,8 @@
\Entry{mgr}{hmgothr-v} {V} {90,V}%
\Entry{mgr}{otf-ujmgrn-h} {UniJIS2004-UTF16-H} {Uni,04,FWid}%
\Entry{mgr}{otf-ujmgrn-v} {UniJIS2004-UTF16-V} {Uni,04,FWid,V}%
-\Entry{mgr}{hmgothrn-h} {H} {}%
-\Entry{mgr}{hmgothrn-v} {V} {V}%
+\Entry{mgr}{hmgothrn-h} {H} {SubG}%
+\Entry{mgr}{hmgothrn-v} {V} {SubG,V}%
%
\ifpxcz@otf@multi
\Entry{kom}{otf-ukmr-h} {UniKS-UTF16-H} {Uni,FWid}%
@@ -994,34 +1063,40 @@
\Entry{tcg}{upmhm-v} {UniCNS-UTF16-V} {Uni*,V}%
}
\pxcz@mapentry{UPOTF}{%
-\Entry{mnl}{uphminl-h} {UniJIS-UTF16-H} {Uni*,90}%
-\Entry{mnl}{uphminl-v} {UniJIS-UTF16-V} {Uni*,90,V}%
-\Entry{mnl}{uphminln-h} {UniJIS2004-UTF16-H} {Uni*,04}%
-\Entry{mnl}{uphminln-v} {UniJIS2004-UTF16-V} {Uni*,04,V}%
-\Entry{mnr}{uphminr-h} {UniJIS-UTF16-H} {Uni*,90}%
-\Entry{mnr}{uphminr-v} {UniJIS-UTF16-V} {Uni*,90,V}%
-\Entry{mnr}{uphminrn-h} {UniJIS2004-UTF16-H} {Uni*,04}%
-\Entry{mnr}{uphminrn-v} {UniJIS2004-UTF16-V} {Uni*,04,V}%
-\Entry{mnb}{uphminb-h} {UniJIS-UTF16-H} {Uni*,90}%
-\Entry{mnb}{uphminb-v} {UniJIS-UTF16-V} {Uni*,90,V}%
-\Entry{mnb}{uphminbn-h} {UniJIS2004-UTF16-H} {Uni*,04}%
-\Entry{mnb}{uphminbn-v} {UniJIS2004-UTF16-V} {Uni*,04,V}%
-\Entry{gtr}{uphgothr-h} {UniJIS-UTF16-H} {Uni*,90}%
-\Entry{gtr}{uphgothr-v} {UniJIS-UTF16-V} {Uni*,90,V}%
-\Entry{gtr}{uphgothrn-h} {UniJIS2004-UTF16-H} {Uni*,04}%
-\Entry{gtr}{uphgothrn-v} {UniJIS2004-UTF16-V} {Uni*,04,V}%
-\Entry{gtb}{uphgothb-h} {UniJIS-UTF16-H} {Uni*,90}%
-\Entry{gtb}{uphgothb-v} {UniJIS-UTF16-V} {Uni*,90,V}%
-\Entry{gtb}{uphgothbn-h} {UniJIS2004-UTF16-H} {Uni*,04}%
-\Entry{gtb}{uphgothbn-v} {UniJIS2004-UTF16-V} {Uni*,04,V}%
-\Entry{gtx}{uphgotheb-h} {UniJIS-UTF16-H} {Uni*,90}%
-\Entry{gtx}{uphgotheb-v} {UniJIS-UTF16-V} {Uni*,90,V}%
-\Entry{gtx}{uphgothebn-h} {UniJIS2004-UTF16-H} {Uni*,04}%
-\Entry{gtx}{uphgothebn-v} {UniJIS2004-UTF16-V} {Uni*,04,V}%
-\Entry{mgr}{uphmgothr-h} {UniJIS-UTF16-H} {Uni*,90}%
-\Entry{mgr}{uphmgothr-v} {UniJIS-UTF16-V} {Uni*,90,V}%
-\Entry{mgr}{uphmgothrn-h} {UniJIS2004-UTF16-H} {Uni*,04}%
-\Entry{mgr}{uphmgothrn-v} {UniJIS2004-UTF16-V} {Uni*,04,V}%
+\Entry{mnl}{uphminl-h} {UniJIS-UTF16-H} {Uni*,90,Exp}%
+\Entry{mnl}{uphminl-v} {UniJIS-UTF16-V} {Uni*,90,V,Exp}%
+\Entry{mnl}{uphminln-h} {UniJIS2004-UTF16-H} {Uni*,04,Exp}%
+\Entry{mnl}{uphminln-v} {UniJIS2004-UTF16-V} {Uni*,04,V,Exp}%
+\Entry{mnr}{uphminr-h} {UniJIS-UTF16-H} {Uni*,90,Exp}%
+\Entry{mnr}{uphminr-v} {UniJIS-UTF16-V} {Uni*,90,V,Exp}%
+\Entry{mnr}{uphminrn-h} {UniJIS2004-UTF16-H} {Uni*,04,Exp}%
+\Entry{mnr}{uphminrn-v} {UniJIS2004-UTF16-V} {Uni*,04,V,Exp}%
+\Entry{mnb}{uphminb-h} {UniJIS-UTF16-H} {Uni*,90,Exp}%
+\Entry{mnb}{uphminb-v} {UniJIS-UTF16-V} {Uni*,90,V,Exp}%
+\Entry{mnb}{uphminbn-h} {UniJIS2004-UTF16-H} {Uni*,04,Exp}%
+\Entry{mnb}{uphminbn-v} {UniJIS2004-UTF16-V} {Uni*,04,V,Exp}%
+\Entry{gtr}{uphgothr-h} {UniJIS-UTF16-H} {Uni*,90,Exp}%
+\Entry{gtr}{uphgothr-v} {UniJIS-UTF16-V} {Uni*,90,V,Exp}%
+\Entry{gtr}{uphgothrn-h} {UniJIS2004-UTF16-H} {Uni*,04,Exp}%
+\Entry{gtr}{uphgothrn-v} {UniJIS2004-UTF16-V} {Uni*,04,V,Exp}%
+\Entry{gtb}{uphgothb-h} {UniJIS-UTF16-H} {Uni*,90,Exp}%
+\Entry{gtb}{uphgothb-v} {UniJIS-UTF16-V} {Uni*,90,V,Exp}%
+\Entry{gtb}{uphgothbn-h} {UniJIS2004-UTF16-H} {Uni*,04,Exp}%
+\Entry{gtb}{uphgothbn-v} {UniJIS2004-UTF16-V} {Uni*,04,V,Exp}%
+\Entry{gtx}{uphgotheb-h} {UniJIS-UTF16-H} {Uni*,90,Exp}%
+\Entry{gtx}{uphgotheb-v} {UniJIS-UTF16-V} {Uni*,90,V,Exp}%
+\Entry{gtx}{uphgothebn-h} {UniJIS2004-UTF16-H} {Uni*,04,Exp}%
+\Entry{gtx}{uphgothebn-v} {UniJIS2004-UTF16-V} {Uni*,04,V,Exp}%
+\Entry{mgr}{uphmgothr-h} {UniJIS-UTF16-H} {Uni*,90,Exp}%
+\Entry{mgr}{uphmgothr-v} {UniJIS-UTF16-V} {Uni*,90,V,Exp}%
+\Entry{mgr}{uphmgothrn-h} {UniJIS2004-UTF16-H} {Uni*,04,Exp}%
+\Entry{mgr}{uphmgothrn-v} {UniJIS2004-UTF16-V} {Uni*,04,V,Exp}%
+}
+\pxcz@mapentry{GID}{%
+\Entry{mnr}{hminrn-h} {H} {SubG}%
+\Entry{mnr}{hminrn-v} {V} {SubG,V}%
+\Entry{gtr}{hgothrn-h} {H} {SubG}%
+\Entry{gtr}{hgothrn-v} {V} {SubG,V}%
}
\pxcz@mapentry{PXOTF}{%
}
@@ -1069,13 +1144,15 @@
\let\pxcz@otf@weight=d
}{\@ifpackagewith{otf}{bold}{%
\let\pxcz@otf@weight=b
+}{\@ifpackagewith{otf}{expert}{%
+ \let\pxcz@otf@weight=r % 'expert' cancels 'noreplace'
}{\@ifpackagewith{otf}{noreplace}{%
\let\pxcz@otf@weight=n
}{\@ifpackageloaded{otf}{%
\let\pxcz@otf@weight=r
}{%else
\let\pxcz@otf@weight=n
-}}}}
+}}}}}
%% \pxcz@otf@mmivjis: otf jis2004
\@ifpackagewith{otf}{jis2004}{%
\let\pxcz@otf@mmivjis=t%
@@ -1091,7 +1168,7 @@
\edef\pxcz@du@scale{\ifx\jsc@JYn\@undefined 0.962216\else 0.924715\fi}%
\fi
-%% \pxcz@du@decl@shape{<fam>}{<ser>}{<font>}
+%% \pxcz@du@decl@shape{<fam>}{<ser>}<sw>{<tfmname>}{<suffix>}
\@onlypreamble\pxcz@du@decl@shape
\def\pxcz@du@decl@shape#1#2#3#4#5{%
\DeclareFontShape{JY2}{#1}{#2}{diruni}{<->%
@@ -1155,6 +1232,90 @@
\endgroup
}
+\ifpxcz@glyphid %---- <*glyphid>
+
+%%<*> \gid{<number>}
+\DeclareRobustCommand*{\gid}[1]{%
+ \begingroup
+ \kanjishape{dirgid}\selectfont
+ \kchar#1\relax
+ \endgroup}
+
+%% \pxcz@dg@decl@shape{<fam>}{<ser>}<sw>{<tfmname>}
+\@onlypreamble\pxcz@dg@decl@shape
+\def\pxcz@dg@decl@shape#1#2#3#4{%
+\DeclareFontShape{JY2}{#1}{#2}{dirgid}{<->%
+ \pxcz@dg@shape@spec{#3}{#4}{h}}{}%
+\DeclareFontShape{JT2}{#1}{#2}{dirgid}{<->%
+ \pxcz@dg@shape@spec{#3}{#4}{v}}{}}
+\@onlypreamble\pxcz@dg@shape@spec
+\def\pxcz@dg@shape@spec#1#2#3{%
+ \if#1t%
+ s*[\pxcz@du@scale]#2-#3%
+ \else#2\fi}
+
+\if d\pxcz@otf@weight % deluxe
+\pxcz@dg@decl@shape{hmc}{l}t{hminln}%
+\pxcz@dg@decl@shape{hmc}{m}t{hminrn}%
+\pxcz@dg@decl@shape{hmc}{bx}t{hminbn}%
+\pxcz@dg@decl@shape{hgt}{m}t{hgothrn}%
+\pxcz@dg@decl@shape{hgt}{bx}t{hgothbn}%
+\pxcz@dg@decl@shape{hgt}{eb}t{hgothebn}%
+\pxcz@dg@decl@shape{mg}{m}t{hmgothrn}%
+\else\if b\pxcz@otf@weight % bold
+\pxcz@dg@decl@shape{hmc}{m}t{hminrn}%
+\pxcz@dg@decl@shape{hmc}{bx}f{ssub*hgt/m/dirgid}{}%
+\pxcz@dg@decl@shape{hgt}{m}t{hgothbn}%
+\pxcz@dg@decl@shape{hgt}{bx}f{ssub*hgt/m/dirgid}{}%
+\else\if r\pxcz@otf@weight % default
+\pxcz@dg@decl@shape{hmc}{m}t{hminrn}%
+\pxcz@dg@decl@shape{hmc}{bx}f{ssub*hgt/m/dirgid}{}%
+\pxcz@dg@decl@shape{hgt}{m}t{hgothrn}%
+\pxcz@dg@decl@shape{hgt}{bx}f{ssub*hgt/m/dirgid}{}%
+\else % noreplace
+\pxcz@dg@decl@shape{mc}{m}t{hminrn}%
+\pxcz@dg@decl@shape{mc}{bx}f{ssub*gt/m/dirgid}{}%
+\pxcz@dg@decl@shape{gt}{m}t{hgothrn}%
+\pxcz@dg@decl@shape{gt}{bx}f{ssub*gt/m/dirgid}{}%
+\fi\fi\fi
+
+\fi %---- </glyphid>
+
+\ifx t\pxcz@expert %---- <*expert>
+
+%% \pxcz@dx@decl@shape{<fam>}{<ser>}<sw>{<tfmname>}
+\@onlypreamble\pxcz@dx@decl@shape
+\def\pxcz@dx@decl@shape#1#2#3#4{%
+\DeclareFontShape{JY2}{#1}{#2}{n}{<->%
+ \pxcz@dx@shape@spec{#3}{#4}{h}}{}%
+\DeclareFontShape{JT2}{#1}{#2}{n}{<->%
+ \pxcz@dx@shape@spec{#3}{#4}{v}}{}}
+\@onlypreamble\pxcz@dx@shape@spec
+\def\pxcz@dx@shape@spec#1#2#3{%
+ \if#1t%
+ s*[\pxcz@du@scale]#2-#3%
+ \else#2\fi}
+
+\AtEndOfPackage{% this must be after loading pxufont
+\if d\pxcz@otf@weight % deluxe
+\pxcz@dx@decl@shape{ruby}{l}t{otf-cjml}%
+\pxcz@dx@decl@shape{ruby}{m}t{otf-cjmr}%
+\pxcz@dx@decl@shape{ruby}{bx}t{otf-cjmb}%
+\pxcz@dx@decl@shape{rubyg}{m}t{otf-cjgr}%
+\pxcz@dx@decl@shape{rubyg}{bx}t{otf-cjgb}%
+\pxcz@dx@decl@shape{rubyg}{eb}t{otf-cjge}%
+\pxcz@dx@decl@shape{rubymg}{m}t{otf-cjmgr}%
+\else\if b\pxcz@otf@weight % bold
+\pxcz@dx@decl@shape{ruby}{m}t{otf-cjmr}%
+\pxcz@dx@decl@shape{ruby}{bx}t{otf-cjgb}%
+\else % default
+\pxcz@dx@decl@shape{ruby}{m}t{otf-cjmr}%
+\pxcz@dx@decl@shape{ruby}{bx}t{otf-cjgr}%
+\fi\fi
+}
+
+\fi %---- </expert>
+
\fi %---- </diruni-ok>
%% \pxcz@err@diruni
@@ -1301,6 +1462,9 @@
\pxcz@addtospec{UPOTF}%
\fi
\pxcz@addtospec{OTF}%
+ \else
+ \ifpxcz@glyphid \pxcz@addtospec{GID}%
+ \fi
\fi
\ifpxcz@utf \pxcz@addtospec{UTF}%
\fi