texlive[68103] Master/texmf-dist: pxchfon (30aug23)

commits+karl at tug.org commits+karl at tug.org
Wed Aug 30 01:20:19 CEST 2023


Revision: 68103
          http://tug.org/svn/texlive?view=revision&revision=68103
Author:   karl
Date:     2023-08-30 01:20:18 +0200 (Wed, 30 Aug 2023)
Log Message:
-----------
pxchfon (30aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/platex/pxchfon/README-ja.md
    trunk/Master/texmf-dist/doc/platex/pxchfon/README.md
    trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdf
    trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex
    trunk/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty

Modified: trunk/Master/texmf-dist/doc/platex/pxchfon/README-ja.md
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/platex/pxchfon/README.md
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex	2023-08-28 23:43:02 UTC (rev 68102)
+++ trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex	2023-08-29 23:20:18 UTC (rev 68103)
@@ -13,11 +13,11 @@
   pdftitle={pxchfonパッケージ},
   pdfauthor={八登崇之}}
 \usepackage{bxtexlogo}
-\bxtexlogoimport{*}
+\bxtexlogoimport{*,logo-e}
 \usepackage{shortvrb}
 \MakeShortVerb{\|}
-\newcommand{\PkgVersion}{1.9b}
-\newcommand{\PkgDate}{2023/08/18}
+\newcommand{\PkgVersion}{2.0}
+\newcommand{\PkgDate}{2023/08/28}
 \newcommand{\Pkg}[1]{\textsf{#1}}
 \newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$}
 \newcommand{\Note}{\par\noindent ※}
@@ -34,6 +34,7 @@
 
 %===========================================================
 \section{概要}
+\label{sec:Introduction}
 
 {\pLaTeX}/{\upLaTeX}+dvipdfmxのワークフローでPDF文書を作る場合に、
 標準の和文フォント(明朝・ゴシック)に対して実際に使われる
@@ -55,12 +56,18 @@
 
 %===========================================================
 \section{前提環境}
+\label{sec:Prerequisites}
 
 \begin{itemize}
 \item {\TeX}フォーマット\Means {\LaTeX}
-\item {\TeX}エンジン\Means {\pTeX}/{\upTeX}
+\item {\TeX}エンジン\Means
+  \begin{itemize}
+  \item \pTeX(3.0版以降)
+  \item \upTeX(0.10版以降)
+  \end{itemize}
+  \Note 一部の機能は{\eTeX}拡張を必要とする。
 \item DVIウェア\Means dvipdfmx
-  (詳細は\ref{sec:Loading}節参照)
+  (詳細は\ref{sec:Loading}節と\ref{sec:Other-Drivers}を参照)
 \item 前提パッケージ\Means
   \begin{itemize}
   \item \Pkg{atbegshi}パッケージ(|everypage| オプション使用時)
@@ -90,7 +97,7 @@
   \footnote{現状では、|dvipdfmx| 以外のドライバ指定は
     全て |nodvidriver| と等価である。}%
   他のDVIウェアにおける動作については
-  \ref{sec:Other-Drivers}節を参照。
+  \ref{sec:Other-Drivers}を参照。
   ドライバオプションの既定値は |dvipdfmx| である。
 \item \Strong{プリセット指定オプション}(|ms|、|haranoaji| 等)
   名前に対応するプリセット指定を有効にする。
@@ -111,11 +118,12 @@
   指定のマップファイルを読み込む」ことを指示する。
   \Note 詳細については\ref{sec:MapFileLoad}節を参照。
 \item |alphabet|\Means
-  欧文フォントも指定されたフォントの英数字部分で置き換える。
+  欧文フォントも(本パッケージの機能で)
+  指定されたフォントの英数字部分で置き換える。
   (明朝が |\rmfamily|、ゴシックが |\sffamily| に適用される。)
   \Note 技術的制約のため
   \footnote{プロポーショナル幅のフォントを使うためには、
-    そのフォントに合わせた{\TeX}側の論理フォント(TFM)を
+    そのフォントの字幅に合わせた{\TeX}側の論理フォント(TFM)を
     事前に用意する必要があるため。
     和文が全角幅しか使えないのも同じ理由である。}、
   \Strong{半角等幅のフォント}しかサポートされないことに注意してほしい。
@@ -122,18 +130,26 @@
   つまり、この設定を使うと欧文が全て等幅になってしまう。
   「部分的に欧文フォントを和文フォントに合わせたい」という場合は、
   後述の |relfont| オプションの使用も検討されたい。
-  \Note プリセット指定オプション\Strong{不使用}の場合は
-  こちらが既定で有効になる。
-  すなわち\Strong{欧文フォントも置き換えられる}。
 \item |noalphabet|\Means
   |alphabet| の否定。
   欧文フォントは変更しない。
 %  インストール時に欧文用の設定をしていない場合は必ずこれを
 %  指定する必要がある。
-  \Note プリセット指定オプション使用の場合はこちらが既定で有効になる。
+  \Note |alphabet| と |noalphabet| と後述の |relfont| の3つの
+  オプションは排他である。
+  プリセット指定オプション\Strong{使用}の場合は、
+  このうち |noalphabet| が既定で有効になる。
+  プリセット指定オプション\Strong{不使用}の場合は、
+  以前の版では |alphabet| が既定になっていた。
+  今でもこの動作は維持されているが、
+  2.0版以降はこの既定設定を利用することは\Strong{非推奨}%
+  \footnote{プリセット指定オプションの有無により既定が変わる仕様は
+    好ましくないため。}%
+  となり、プリセット不使用の場合は
+  3つのオプションの何れかを指定することが推奨される。
 \item |otf|(既定)\Means
   \Pkg{japanese-otf}パッケージの使用時に、
-  そのフォントも置き換えの対象とする。
+  そのフォントも置換の対象とする。
 \item |nootf|\Means
   |otf| の否定。
   \Pkg{japanese-otf}パッケージのフォントは置き換えない。
@@ -196,50 +212,22 @@
 \item |noeverypage|(既定)\Means
   |everypage|の否定。
   出力DVIの先頭ページにのみフォントマップ設定を書き込む。
-\item \Strong{Unicode直接指定オプション}\Means
+\item |unicode|[|=|\Meta{値}]\Means
+  Unicode直接指定。
   一部または全部のフォントについて、エンコーディング指定方式を
   “CMap指定”から“Unicode直接指定”に変更する。
-  |nodirectunicode|(既定:CMap設定のまま)、
-  |directunicode|、|directunicode*|、
-  |unicode*|、|unicode| の5種類の指定がある。
+  有効な値は |false|(既定)、|UTF|、|simple|、|full| の4つである。
+  値を省略して「|unicode|」だけ書いた場合は |full| が指定される。
   \Note 詳細については\ref{sec:DirectUnicode}節を参照。
   \Note 一部のプリセット指定(|sourcehan|等)は
-  Unicode直接指定の既定値を変更する。
+  |unicode| の既定値を変更する。
   \Note Unicode直接指定を有効にするオプションを指定しても、
     置換されて\Strong{いない}ウェイトはUnicode直接指定にならない。
     (詳しくは\ref{ssec:DirectUnicodeNotice}節の注意を参照。)
-%\item |directunicode|\Means
-%  \Pkg{japanese-otf}パッケージのUnicode出力用フォント(|\UTF{}| の出力)
-%  について、Unicodeを用いてフォントのグリフにアクセスするように
-%  設定する。
-%  この設定を用いると、当該のフォントのもつ任意のUnicode文字
-%  (ただし全角幅に限る)が利用可能になる。
-%  \footnote{通常は、Unicodeを一旦Adobe-Japan1のCIDに変換して、
-%  CIDでフォントのグリフにアクセスするという処理になる。
-%  このため、Adobe-Japan1のグリフと対応しないUnicode文字は
-%  普通は使えない。なお、\texttt{directunicode} は0.6c版では
-%  横書きのみの対応であったが、0.7版で縦書きにも対応した。
-%  ただし、dvipdfmxの仕様の都合で、縦書き用グリフにはならない。
-%  また、現状では実質的に効果がBMP内の文字に限られる。}
-%\item |directunicode*|\Means
-%  |directunicode| の設定を適用し、さらに、{\upTeX}標準の
-%  和文フォントにもUnicodeを用いたグリフアクセスを設定する。
-%  \Note これは、「非標準的なCMapをもつOpenTypeフォント
-%  \footnote{例えば、Adobeの「Source Han Sans」など。}%
-%  を\Pkg{pxchfon}で使いたい」
-%  という要求のための部分的な解決法である。
-%  このオプションを利用する場合、状況によって一部の出力が異常になる
-%  可能性があることに予め注意すべきである。
-%  例えば、|prefer2004jis| は機能しなくなるし、また縦組の約物の
-%  出力は異常になる。
-%\item |nodirectunicode|(既定)\Means
-%  |directunicode| の否定。
 \item |usecmapforalphabet|\Means
   |alphabet| または |relfont| を指定して日本語フォントの英数字部分を
   欧文フォントとして使う際に、そのエンコーディング指定方式を
   “CMap指定”にする。
-%  \Note “CMap指定”と“Unicode直接指定”の違いについては
-%  \ref{sec:DirectUnicode}節を参照。
   \Note 半角英数字用の\texttt{UniJIS-UCS2-HW-H}というCMapが指定される。
   \Note AJ1のグリフ集合をもつOpenTypeフォントの場合、既定では
   \footnote{|unicode| オプションが指定されない場合。}%
@@ -247,7 +235,7 @@
   このオプションを指定して半角幅のものを使う必要がある。
 \item |nousecmapforalphabet|(既定)\Means
   |usecmapforalphabet| の否定。
-  \Note 和文と異なり、欧文フォントでは実質的に“Unicode直接指定”の方が
+  \Note 和文と異なり、欧文フォントでは実質的にUnicode直接指定の方が
   既定となっている。
   \Note 一部のプリセット指定は |usecmapforalphabet| の指定を強制する。
 \item |dumpmap|\Means
@@ -282,6 +270,7 @@
     しかし、CFFグリフのフォントに対してCSI指定があっても特に問題は
     起こらず、また、フォントのグリフ種別の判断する処理は少し時間が
     かかるため、既定では厳密な判定は行わない。
+  \Note 2014/05/06以降の版の{\logoe-(u)\pTeX}が必要である。
 \item |nostrictcsi|(既定)\Means
   |strictcsi| の否定。
   |Identity-H|/|-V| に対するCSI指定は常に出力される。
@@ -288,6 +277,37 @@
   \Note さすがにファイルに出力されたマップ行に不備があるのは
     避けたいので、|dumpmap(tl)| が指定された場合は、
     既定が |strictcsi| に変更される。
+\item |fullwidth|\Means
+  Unicode直接指定が有効である場合に、
+  全角幅のグリフを優先させる。
+  \Note 全角幅想定の文字が使える可能性が増えるという利点がある一方で、
+  半角幅想定の文字が使える可能性が減るという欠点もある。
+\item |nofullwidth|(既定)\Means
+  |fullwidth| の否定。
+\item |legacycode=|\Meta{値}\Means
+  Unicode直接指定を全体に採用した場合
+  \footnote{つまり、|unicode| オプションの値が |simple|
+    または |full| である場合。
+    ただし現状では |unicode| の値がこれ以外の場合でも |legacycode|
+    の値は設定可能であるが、恐らく既定の |apply| 以外の設定は
+    無益であろう。}%
+  にエンコーディングがUnicodeではない原メトリック和文TFMに関する
+  マップ行に対する取扱を規定する。
+  有効な値は以下の通り\Means
+  \begin{itemize}
+  \item |apply|(既定)\Means
+    “CMap指定”のマップ行を出力する。
+  \item |ignore|\Means
+    マップ行を出力しない。
+  \item |suppress|\Means
+    当該のTFMの無効化を指示するマップ行を出力する。
+  \end{itemize}
+  \Note |legacycode-replace| が真の場合は既定値が |suppress| に
+  変更される。
+\item |legacycode-replace=|\Meta{真偽値}\Means
+  \Pkg{pxufont}パッケージを読み込んで、原メトリック和文TFMについて
+  エンコーディングがUnicodeのもののみが利用されるようにする。
+  既定値は偽だが、|unicode| オプションが |full| の場合は真に変更される。
 \item |expert|(既定)\Means
   Unicode直接指定が有効な場合
   に\Pkg{japanese-otf}の |expert| オプション
@@ -302,10 +322,20 @@
   が有効の場合にのみ利用できる。
 \item |noglyphid|(既定)\Means
   |glyphid| の否定。
+\item |maybe-multiweight|\Means
+  「|deluxe| オプション付きの\Pkg{japanese-otf}パッケージが読み込まれて
+  いないにもかかわらず多ウェイト用のフォント設定命令が使われた」
+  際に出る警告を抑止する。%
+  \footnote{例えば
+    「単ウェイト・多ウェイト兼用を意図したフォント設定命令を
+    テンプレートに記述している」
+    「\Pkg{japanese-otf}以外でその和文TFMを流用している」
+    などの状況を想定している。}
 \end{itemize}
 
 %===========================================================
 \section{機能}
+\label{sec:Usage}
 
 以下に該当する和文(CJK)用の論理フォント(原メトリックTFM)について、
 それに対応する物理フォント(OpenTypeフォント)を
@@ -438,17 +468,13 @@
   \Note pdf{\TeX}の |\pdfmapline| に相当する機能。
 \item |\diruni|\Means
   現在の和文フォントを“Unicode直接入力”
-  (フォントマップを“Unicode直接指定”にした上で
+  (フォントマップをUnicode直接指定にした上で
   さらに和文VFをバイパスする)
   の状態に切り替える(宣言型命令)。
   これにより、実際のフォントに存在する任意の全角幅の
   文字が出力可能となる。
   その代わり、この状態では、約物の周りの空き調整が無効になる。
-%  詳細については\ref{sec:Loading}節の |directunicode| オプションの
-%  説明を参照されたい。
-  \Note “Unicode直接指定”のオプションの何れか
-  (|unicode|等)が有効であり、
-  かつ現在の和文ファミリについてフォントの置き換えが有効に
+  \Note 現在のウェイトについてUnicode直接指定が有効に
   なっている必要がある。
   \Note この命令自体は単にNFSSのシェープ値を |diruni| という値に変えて
   いるだけであり、このシェープに“Unicode直接入力”のフォントが
@@ -459,8 +485,7 @@
   現在の和文フォントで、指定の値のGIDをもつグリフを出力する。
   \Note 全角幅のグリフでないと正常に出力されない。
   \Note エンジンが{\upLaTeX}であり、
-  |unicode| オプションが指定されていて、かつ、
-  現在の和文ファミリについてフォントの置き換えが有効に
+  かつ、現在のウェイトについてUnicode直接指定が
   有効になっている必要がある。
 \end{itemize}
 
@@ -471,14 +496,14 @@
 このパッケージの元々の意図は、標準のフォントを
 普段使っているものと全く別の書体に変えることであったが、
 例えば「普段使う設定が複数ありそれを簡単に切り替えたい」という
-場合にも有用である。
-そこで、{\pTeX}において広く行われている設定をパッケージ内に
+場合にも有用であることがわかった。
+そこで、{(u)\pLaTeX}において広く行われている設定をパッケージ内に
 組み込んで、パッケージオプションでそれを呼び出すという機能が
 後になって追加された。
 \footnote{元々は\Pkg{pxjafont}という別のパッケージで
 提供されていた機能であるが、
 0.5版からこのパッケージに組み入れることにした。
-詳しくは付録\ref{sec:Pkg-pxjafont}を参照。}
+詳しくは\ref{sec:Package-pxjafont}を参照。}
 
 パッケージオプションにプリセット名を指定すると予め決められたフォント
 ファイル名が |\setminchofont| 等の命令で設定される。
@@ -737,6 +762,8 @@
 \setxboldgothicfont[3]{HiraginoSans-W8.ttc}
 \setmarugothicfont[1]{HiraginoSansR-W4.ttc}
 \end{verbatim}\end{quote}
+\Note 「新しいmacOSのヒラギノフォント」用のプリセットについては
+  \ref{ssec:Package-pxchfon-extras}節を参照されたい。
 
 \item |morisawa-pro|\Means
   モリサワフォント基本7書体(Pro版)。
@@ -924,6 +951,7 @@
 
 %-------------------
 \subsection{pxchfon-extrasパッケージ}
+\label{ssec:Package-pxchfon-extras}
 
 本パッケージの方針として、
 「プロプライエタリなフォントを利用するためのプリセット設定」
@@ -979,6 +1007,24 @@
 \item |hiragino-dx|\Means |hiragino-pro| の別名。
 \end{itemize}
 
+以下に挙げるプリセット設定は{\TeX}~Live 2017%
+(dvipdfmx 20170318版)のために用意された特殊な設定である。
+1.5版においてこれらのプリセットは\Strong{非推奨}となり、
+2.0版で廃止された。
+これらのプリセットを利用していた場合は、
+\Strong{{\TeX}システムを更新}(dvipdfmxを20170918版以降に)した上で、
+“本来の正しい設定”に移行することを推奨する。
+
+\begin{itemize}
+\item |sourcehan+|、|sourcehan-otc+|、|noto+|、|noto-otc+|:\\
+  →代わりに|+|無しの名前(|sourcehan| 等)を指定する。
+  \Note |unicode| は自動的に有効になる。
+  \Note 日本語版以外のフォントはもはや不要である。
+
+\item |yu-win10+|:\\
+  →代わりに |yu-win10| と |unicode| を指定する。
+\end{itemize}
+
 %===========================================================
 \section{ファイルプリセット機能}
 \label{sec:FilePreset}
@@ -1191,9 +1237,9 @@
 \footnote{例えば、Adobe開発のフリーフォントの
 「Source Han Serif(源ノ明朝)」など。}%
 が普及しつつあり、そのようなフォントでは異体字の切替などの
-付加機能を専ら“OpenType属性の指定”により行うことを想定している。
+付加機能を専ら「OpenType属性の指定」により行うことを想定している。
 これに対応するため、dvipdfmxのマップ指定において
-“OpenType属性の指定”がサポートされるようになった。
+OpenType属性の指定がサポートされるようになった。
 
 \Pkg{pxchfon}では和文フォントのエンコーディングに対する
 Unicode直接指定をサポートしている。
@@ -1205,33 +1251,50 @@
 過渡的な要素が多く混ざっていてやや煩雑になっていることに
 注意してほしい。
 
-\paragraph{“Unicode直接指定”オプション}
-以下のパッケージオプションを指定することで
+\paragraph{Unicode直接指定オプション}
+|unicode| オプションを指定することで
 Unicode直接指定の有効・無効を切り替えられる。
 
 \begin{itemize}
-\item |unicode|\Means
+\item |unicode|[|=full|]\Means
   全般的にUnicode直接指定を利用する。
   最も理想的な設定であるが、\Strong{{\TeX}~Live 2018以降のdvipdfmx}%
   (20170918版以降)が必要である。
-\item |unicode*|\Means
-  {\TeX}~Live 2017のdvipdfmx(20170318版)専用の\Strong{過渡的}な設定。
-  \Note 1.5版以降では\Strong{非推奨}であり、
-  2.0版で\Strong{廃止}される予定である。
-\item |directunicode*|\Means
+\item |unicode=all|\Means
   全般的にUnicode直接指定を利用するが、
   古い({\TeX}~Live 2016以前の)dvipdfmxに
   対応するために、OpenType属性の指定を全く行わない。
   つまり、入力のUnicode文字に対する既定のグリフが常に出力され、
   異体字の区別は全て無効になる。
-\item |directunicode|\Means
+\item |unicode=UTF|\Means
   \Pkg{japanese-otf}の|\UTF|入力のフォントに限って
   Unicode直接指定を利用する。
-  |directunicode*| と同じくOpenType属性の指定を全く行わない。
-  \Note 前述の通り |directunicode*| はデメリットが強いため、
+  |all| と同じくOpenType属性の指定を全く行わない。
+  \Note 前述の通り |all| はデメリットが強いため、
   適用範囲を限定したもの。
+\item |unicode=false|\Means
+  Unicode直接指定を利用せず、全般的にCMap指定を適用する。
 \end{itemize}
 
+\Note 単に |unicode| と指定するのは |unicode=full| と等価になる。
+\Note 以前は |unicode=all| は |directunicode*|、
+|unicode=UTF| は |directunicode| という指定方法であったが、
+極めて解りにくいので2.0版で「key-value型の |unicode| オプション」
+に統一された。
+従来の形式も当面はサポートされるが新しい |unicode| の使用を推奨する。%
+\footnote{なお「単独の |unicode|」も従来の動作を維持しているが、
+  これは古い形式ではなく
+  「新しい |unicode| の指定法の一種」として扱う。}
+
+{\TeX}~Live 2017のdvipdfmx(20170318版)専用の\Strong{過渡的}な設定
+である |unicode*| は2.0版で\Strong{廃止}された。
+これを使っている場合は、\Strong{{\TeX}システムを更新}%
+(dvipdfmxを20170918版以降に)した上で、
+代わりに |unicode| を指定することを推奨
+\footnote{|unicode=all| は{\TeX}~Live 2017でも使えるが、
+  出力は元々の |unicode*| より劣化する。}%
+する。
+
 \paragraph{Unicode直接指定専用プリセット}
 
 以下に挙げるプリセット設定は“AJ1でない”OpenTypeフォントを
@@ -1251,27 +1314,6 @@
 \item |noto-jp|
 \end{itemize}
 
-\paragraph{特殊プリセット指定\<(非推奨)}
-
-以下に挙げるプリセット設定は{\TeX}~Live 2017%
-(dvipdfmx 20170318版)のために用意された特殊な設定である。
-
-1.5版においてこれらのプリセットは\Strong{非推奨}となった。
-2.0版で廃止される予定である。
-そのため、これらのプリセットを利用している場合は、
-\Strong{{\TeX}システムを更新}(dvipdfmxを20170918版以降に)した上で、
-“本来の正しい設定”に移行することを推奨する。
-
-\begin{itemize}
-\item |sourcehan+|、|sourcehan-otc+|、|noto+|、|noto-otc+|:\\
-  →代わりに|+|無しの名前(|sourcehan| 等)を指定する。
-  \Note 前述の通り、|unicode| は自動的に補われる。
-  \Note 日本語版以外のフォントはもはや不要である。
-
-\item |yu-win10+|:\\
-  →代わりに |yu-win10| と |unicode| を指定する。
-\end{itemize}
-
 %-------------------
 \subsection{Unicode直接指定に関する注意事項}
 \label{ssec:DirectUnicodeNotice}
@@ -1471,18 +1513,16 @@
 
 %===========================================================
 \section{pxjafontパッケージ}
-\label{sec:Pkg-pxjafont}
+\label{sec:Package-pxjafont}
 
 現在の版の\Pkg{pxchfon}パッケージは旧来の\Pkg{pxjafont}の機能を
 取り込んでいるため、\Pkg{pxjafont}は不要である。
 古い環境との互換性のため\Pkg{pxjafont}を残していたが、
-1.0版において\Pkg{pxjafont}の使用を\Strong{非推奨}の扱いとした。
-(2.0版においてに\Strong{廃止}予定。)
+2.0版において\Strong{廃止}された。
 
-\Pkg{pxjafont}を利用しているユーザは、
+\Pkg{pxjafont}を利用していたユーザは、
 \ref{sec:Preset}節を参照して現在の\Pkg{pxchfon}用の
 適切な設定に書き直す必要がある。
-
 \Note 古いプリセット名の中に廃止されたものがあるので注意。
 
 %===========================================================
@@ -1589,7 +1629,7 @@
 日本語用のフォントについて用いられることが想定されている。
 \item 「Unicode直接指定オプション」は中国語・韓国語のフォントに対しても
 有効である。
-|directunicode| の場合は「\Pkg{japanese-otf}パッケージのUnicode入力命令」
+|unicode=UTF| の場合は「\Pkg{japanese-otf}パッケージのUnicode入力命令」
 (|\UTFK|、|\UTFM|、等)が対象となり、
 それ以外はこれに加えて{\upTeX}標準のフォントも
 対象になる。

Modified: trunk/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty	2023-08-28 23:43:02 UTC (rev 68102)
+++ trunk/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty	2023-08-29 23:20:18 UTC (rev 68103)
@@ -10,14 +10,18 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxchfon}[2023/08/18 v1.9b]
+\ProvidesPackage{pxchfon}[2023/08/28 v2.0]
 \def\pxcz at pkgname{pxchfon}
 
 %--------------------------------------- general
 
+%% packages
+\RequirePackage{keyval}
+
 %% variables
 \newif\ifpxcz at ok
 \newif\ifpxcz at utf
+\let\pxcz at value\relax
 \let\pxcz at pre\relax
 \let\pxcz at post\relax
 
@@ -55,6 +59,29 @@
 \def\pxcz at lower@a#1\pxcz at end#2{%
   \lowercase{\def#2{#1}}}
 
+%% \pxcz at setkeys{<text>}{<error>}
+\pxcz at onlypreamble@def\pxcz at setkeys#1#2{%
+  \def\KV at errx##1{#2}%
+  \edef\pxcz at do{\noexpand\setkeys{pxchfon}{#1}}\pxcz at do
+  \let\KV at errx\pxcz at org@KV at errx}
+\let\pxcz at org@KV at errx\KV at errx
+
+%% \pxcz at handle@kvopt{<key>}{<cs-key>}{<value>}{<code>}
+%% \pxcz at handle@bool at kvopt{<key>}{<cs-key>}{<value>}
+\pxcz at onlypreamble@def\pxcz at handle@kvopt{%
+  \pxcz at handle@kvopt at a{@@}}
+\pxcz at onlypreamble@def\pxcz at handle@bool at kvopt#1#2#3{%
+  \pxcz at handle@kvopt at a{}{#1}{#2}{#3}{\pxcz at value}}
+\pxcz at onlypreamble@def\pxcz at handle@kvopt at a#1#2#3#4{%
+  \@nameuse{pxcz@#3 at giventrue}%
+  \pxcz at csletcs{pxcz at value}{pxcz@#3#1#4}%
+  \ifx\pxcz at value\relax
+    \PackageError\pxcz at pkgname
+     {Invalid value for option key '#2'\MessageBreak (#4)}%
+    \expandafter\@gobble
+  \else \expandafter\@firstofone
+  \fi}
+
 %% \pxcz at split{<at>}{<target>}
 \def\pxcz at split#1#2{%
   \edef\pxcz at tmpx{{#1}{#2}}%
@@ -73,13 +100,10 @@
 %--------------------------------------- environment check
 
 %% check for 'pxjafont' package
-% if old version of pxjafont is loaded (probably this package is
-% required from pxjafont), then I abort here with an error message.
 \@ifpackageloaded{pxjafont}{%
-  \ifx\pxAliasedPxjafont\@undefined
-    \PackageError\pxcz at pkgname
-     {FATAL: Old 'pxjafont' is loaded}{\@ehc}
-  \expandafter\@@end\fi}{}
+  \PackageError\pxcz at pkgname
+   {Old 'pxjafont' is loaded}{\@ehc}
+  \endinput}{}
 
 %% \ifpxcz at uptex
 \newif\ifpxcz at uptex \pxcz at uptexfalse
@@ -96,10 +120,32 @@
 \edef\pxcz at JYn{%
   \ifpxcz at uptex JY2\else JY1\fi}
 
+%% \ifpxcz at lite@mode
+\newif\ifpxcz at lite@mode
+\IfFileExists{pxchfon0.def}{}{%else
+  \PackageInfo\pxcz at pkgname
+   {Working in Lite mode\@gobble}%
+  \pxcz at lite@modetrue}
+
+%% \ifpxcz at otf@loaded
 %% \ifpxcz at otf@deluxe
+%% \pxcz at otf@weight: otf weight mode
+\newif\ifpxcz at otf@loaded \pxcz at otf@loadedtrue
 \newif\ifpxcz at otf@deluxe \pxcz at otf@deluxefalse
-\@ifpackagewith{otf}{deluxe}{\pxcz at otf@deluxetrue}{}
-\@ifpackagewith{pxotf}{deluxe}{\pxcz at otf@deluxetrue}{}
+% watch out for priority...
+\@ifpackagewith{otf}{deluxe}{%
+  \pxcz at otf@deluxetrue \let\pxcz at otf@weight=d
+}{\@ifpackagewith{otf}{bold}{%
+  \let\pxcz at otf@weight=b
+}{\@ifpackagewith{otf}{expert}{%
+  \let\pxcz at otf@weight=r % 'expert' cancels 'noreplace'
+}{\@ifpackagewith{otf}{noreplace}{%
+  \let\pxcz at otf@weight=n
+}{\@ifpackageloaded{otf}{%
+  \let\pxcz at otf@weight=r
+}{%else
+  \pxcz at otf@loadedfalse \let\pxcz at otf@weight=n
+}}}}}
 
 %% \ifpxcz at otf@multi
 \newif\ifpxcz at otf@multi \pxcz at otf@multifalse
@@ -109,6 +155,21 @@
 \newif\ifpxcz at otf@expert \pxcz at otf@expertfalse
 \@ifpackagewith{otf}{expert}{\pxcz at otf@experttrue}{}
 
+%% \ifpxcz at otf@mmivjis: 'jis2004' of otf is used?
+\newif\ifpxcz at otf@mmivjis \pxcz at otf@mmivjisfalse
+\@ifpackagewith{otf}{jis2004}{\pxcz at otf@mmivjistrue}{}
+
+%% \pxcz at jascale
+\ifpxcz at uptex % do not consider JFM scale
+  \let\pxcz at jascale\utf at sc@le
+  \ifx\pxcz at jascale\@undefined
+    \let\pxcz at jascale\Cjascale
+  \fi
+  \ifx\pxcz at jascale\@undefined
+    \edef\pxcz at jascale{\ifx\jsc at JYn\@undefined 0.962216\else 0.924715\fi}%
+  \fi
+\fi
+
 %% \pxcz at pxufont@avail
 \IfFileExists{pxufont-ruby.sty}{\chardef\pxcz at pxufont@avail=2 }{%
 \IfFileExists{pxufont.sty}{\chardef\pxcz at pxufont@avail=1 }{%
@@ -127,6 +188,11 @@
 \newif\ifpxcz at old@hook at system
 \@ifl at t@r\fmtversion{2020/10/01}{}{\pxcz at old@hook at systemtrue}
 
+%% \pxcz at hy@disable at commands{<code>}
+\pxcz at onlypreamble@def\pxcz at hy@disable at commands{%
+  \providecommand*\pdfstringdefPreHook{}%
+  \g at addto@macro\pdfstringdefPreHook}
+
 %--------------------------------------- custom presets
 
 %% \pxcz at custom@presets
@@ -184,30 +250,28 @@
 
 %% variables
 \newif\ifpxcz at enabled \pxcz at enabledtrue
-\let\pxcz at alphabet=n
+\let\pxcz at alphabet\relax
 \newif\ifpxcz at otf \pxcz at otftrue
 \newif\ifpxcz at cmap@alpha
 \newif\ifpxcz at mmivjis
 \newif\ifpxcz at everypage
 \newif\ifpxcz at oneweight
-\newif\ifpxcz at uniquify
 \newif\ifpxcz at fullwidth
-\let\pxcz at directunicode\relax
+\let\pxcz at unicode\relax
 \let\pxcz at main@preset\relax
 \let\pxcz at file@preset\relax
 \newif\ifpxcz at file@preset at tl
-\newif\ifpxcz at alpha
-\newif\ifpxcz at rel
 \newif\ifpxcz at dumpmap
 \newif\ifpxcz at dumpmap@tl
 \newif\ifpxcz at switch@font \pxcz at switch@fonttrue
-\newif\ifpxcz at switch@font at xwid
 \newif\ifpxcz at switch@font at xjis
 \let\pxcz at strict@csi\relax
-\newif\ifpxcz at directunicode@default
+\newif\ifpxcz at unicode@given
 \let\pxcz at legacycode\relax
+\newif\ifpxcz at legacycode@replace
+\newif\ifpxcz at legacycode@replace at given
 \let\pxcz at expert\relax
-\newif\ifpxcz at glyphid
+\chardef\pxcz at glyphid\z@
 \newif\ifpxcz at autojfmsync
 
 %% process options
@@ -240,14 +304,23 @@
 % (no)oneweight
 \DeclareOption{oneweight}{\pxcz at oneweighttrue}
 \DeclareOption{nooneweight}{\pxcz at oneweightfalse}
-% (no)directunicode / directunicode*
-\chardef\pxcz at directunicode@none=0
-\chardef\pxcz at directunicode@otf=1
-\chardef\pxcz at directunicode@all=2
-\chardef\pxcz at directunicode@full=3
-\DeclareOption{directunicode*}{\let\pxcz at directunicode\pxcz at directunicode@all}
-\DeclareOption{directunicode}{\let\pxcz at directunicode\pxcz at directunicode@otf}
-\DeclareOption{nodirectunicode}{\let\pxcz at directunicode\pxcz at directunicode@none}
+% unicode=<name>
+\chardef\pxcz at unicode@@false=0
+\chardef\pxcz at unicode@@UTF=1
+\chardef\pxcz at unicode@@simple=2
+\chardef\pxcz at unicode@@full=3
+\chardef\pxcz at unicode@@true=\pxcz at unicode@@full
+\define at key{pxchfon}{unicode}[true]{%
+  \pxcz at handle@kvopt{unicode}{unicode}{#1}{%
+    \let\pxcz at unicode\pxcz at value}}
+\DeclareOption{nounicode}{\setkeys{pxchfon}{unicode=false}}
+% (old options)
+\DeclareOption{directunicode*}{\setkeys{pxchfon}{unicode=simple}}
+\DeclareOption{directunicode}{\setkeys{pxchfon}{unicode=UTF}}
+\DeclareOption{nodirectunicode}{\setkeys{pxchfon}{unicode=false}}
+% (no)fullwidth
+\DeclareOption{fullwidth}{\pxcz at fullwidthtrue}
+\DeclareOption{nofullwidth}{\pxcz at fullwidthfalse}
 % (no)dumpmap
 \DeclareOption{dumpmap}{\pxcz at dumpmaptrue}
 \DeclareOption{nodumpmap}{\pxcz at dumpmapfalse}
@@ -260,24 +333,55 @@
 % (no)strictcsi
 \DeclareOption{strictcsi}{\let\pxcz at strict@csi=t}
 \DeclareOption{nostrictcsi}{\let\pxcz at strict@csi=f}
-% XXXXX-legacycode
-\chardef\pxcz at legacycode@apply=0
-\chardef\pxcz at legacycode@ignore=1
-\chardef\pxcz at legacycode@suppress=2
-\chardef\pxcz at legacycode@replace=3
-\DeclareOption{apply-legacycode}{\let\pxcz at legacycode\pxcz at legacycode@apply}
-\DeclareOption{ignore-legacycode}{\let\pxcz at legacycode\pxcz at legacycode@ignore}
-\DeclareOption{suppress-legacycode}{\let\pxcz at legacycode\pxcz at legacycode@suppress}
-\DeclareOption{replace-legacycode}{\let\pxcz at legacycode\pxcz at legacycode@replace}
+% legacycode=<name>
+\chardef\pxcz at legacycode@@apply=0
+\chardef\pxcz at legacycode@@ignore=1
+\chardef\pxcz at legacycode@@suppress=2
+\define at key{pxchfon}{legacycode}{%
+  \pxcz at handle@kvopt{legacycode}{legacycode}{#1}{%
+    \let\pxcz at legacycode\pxcz at value}}
+% legacycode-replace=<bool>
+\define at key{pxchfon}{legacycode-replace}[true]{%
+  \pxcz at handle@bool at kvopt{legacycode-replace}{legacycode at replace}{#1}}
 % (no)expert
 \DeclareOption{expert}{\let\pxcz at expert=t}
 \DeclareOption{noexpert}{\let\pxcz at expert=f}
 % (no)glyphid
-\DeclareOption{glyphid}{\pxcz at glyphidtrue}
-\DeclareOption{noglyphid}{\pxcz at glyphidfalse}
+\DeclareOption{glyphid}{\chardef\pxcz at glyphid=2 }
+\DeclareOption{noglyphid}{\chardef\pxcz at glyphid=0 }
 % (no)autojfmsync
 \DeclareOption{autojfmsync}{\pxcz at autojfmsynctrue}
 \DeclareOption{noautojfmsync}{\pxcz at autojfmsyncfalse}
+% maybe-multiweight
+\DeclareOption{maybe-multiweight}{\let\pxchfonMaybeMultiweight=t}
+% use=<spec>
+\define at key{pxchfon}{use}{%
+  \pxcz at okfalse
+  \pxcz at split{:}{#1}\ifx\pxcz at pre\relax
+    \pxcz at handle@use at b{file}{#1}%
+  \else
+    \pxcz at handle@use at a{file}{file}%
+    \pxcz at handle@use at a{tl-ja}{ja}%
+    \pxcz at handle@use at a{tl-ko}{ko}%
+    \pxcz at handle@use at a{tl-sc}{sc}%
+    \pxcz at handle@use at a{tl-tc}{tc}%
+    \pxcz at handle@use at a{tl}{ja}%
+  \fi
+  \ifpxcz at ok\else
+    \PackageError\pxcz at pkgname
+     {The value for option 'use' has an invalid prefix:\MessageBreak
+      ('\pxcz at pre:')}%
+     {\@ehc}%
+  \fi}
+\pxcz at onlypreamble@def\pxcz at handle@use at a#1#2{%
+  \ifpxcz at ok\else
+    \def\pxcz at tmpb{#1}\ifx\pxcz at pre\pxcz at tmpb
+      \pxcz at handle@use at b{#2}{\pxcz at post}%
+  \fi\fi}
+\pxcz at onlypreamble@def\pxcz at handle@use at b#1#2{%
+  \edef\pxcz at use@list{\pxcz at use@list\pxcz at use@do{#1}{#2}}%
+  \pxcz at oktrue}
+
 % preset spec options
 \pxcz at onlypreamble@def\pxcz at all@main at preset{%
   noembed,%
@@ -287,10 +391,9 @@
   ms-hg,ipa-hg,ipaex-hg,moga-mobo,moga-mobo-ex,moga-maruberi,ume,%
   kozuka-pro,kozuka-pr6,kozuka-pr6n,hiragino-pro,hiragino-pron,%
   hiragino-elcapitan-pro,hiragino-elcapitan-pron,%
-  morisawa-pro,morisawa-pr6n,yu-win,yu-win10,yu-win10+,yu-osx,%
+  morisawa-pro,morisawa-pr6n,yu-win,yu-win10,yu-osx,%
   sourcehan-otc,sourcehan,sourcehan-jp,noto-otc,noto,noto-jp,%
   haranoaji,%
-  sourcehan-otc+,sourcehan+,noto-otc+,noto+,%
   sourcehan-otc!,sourcehan!,sourcehan-jp!,noto-otc!,noto!,noto-jp!,%
   noto-otf!,%
   %(alias)
@@ -297,6 +400,7 @@
   hiragino,noto-otf,%
   noEmbed,kozuka,hiragino-elcapitan,morisawa}
 \pxcz at onlypreamble@def\pxcz at all@abolished at preset{%
+  sourcehan+,sourcehan-otc+,noto+,noto-otc+,yu-win10+,
   ipa-otf,ipa-otf-dx,kozuka4,kozuka6,kozuka6n,
   ms-dx,ipa-ttf,ipa-ttf-dx,ipav2,ipav2-dx,ipa-dx,hiragino-dx}
 \def\pxcz at do#1{\DeclareOption{#1}{\def\pxcz at main@preset{#1}}}
@@ -310,25 +414,21 @@
 %% 'local-only' constant options
 % The 'unicode' option means a Unicode-oriented mapping, and requires
 % dvipdfmx of version 20170918 or later. The 'unicode-fwid' is a variant.
-% The 'unicode*(-fwid)' option is a transitional (deteriorated) version
-% of 'unicode(-fwid)' and can work with dvipdfmx of version 20170318.
-% NOTE: 'unicode*(-fwid)' is DEPRECATED and will be abolished in v2.0.
-\pxcz at onlypreamble@csdef{pxcz at POPT/unicode}{%
-  \let\pxcz at directunicode\pxcz at directunicode@full}
-\pxcz at onlypreamble@csdef{pxcz at POPT/unicode*}{%
-  \pxcz at uniquifytrue
-  \let\pxcz at directunicode\pxcz at directunicode@full}
-\pxcz at onlypreamble@csdef{pxcz at POPT/unicode-fwid}{%
-  \pxcz at fullwidthtrue
-  \let\pxcz at directunicode\pxcz at directunicode@full}
-\pxcz at onlypreamble@csdef{pxcz at POPT/unicode*-fwid}{%
-  \pxcz at fullwidthtrue \pxcz at uniquifytrue
-  \let\pxcz at directunicode\pxcz at directunicode@full}
+% The 'unicode*(-fwid)' option is ABOLISHED.
+\define at key{pxchfon}{unicode*}[]{%
+  \PackageError\pxcz at pkgname
+   {Option 'unicode*' is ABOLISHED!\MessageBreak
+    You should update to TL2018 or later and use\MessageBreak
+    option 'unicode' instead}%
+   {This option was to invoke a transitional setting\MessageBreak
+    that was specially tailored for TL2017.\MessageBreak
+    \@ehc}}
 % general option handler
 \DeclareOption*{%
-  \pxcz at csuse@or{pxcz at POPT/\CurrentOption}{%
-    \pxcz at parse@opt\CurrentOption
-    \ifpxcz at ok\else \@unknownoptionerror \fi}}
+  \pxcz at parse@opt\CurrentOption
+  \ifpxcz at ok\else
+    \pxcz at setkeys{\CurrentOption}{\@unknownoptionerror}%
+  \fi}
 
 %% \pxcz at use@list
 \pxcz at onlypreamble@let\pxcz at use@list\@empty
@@ -337,13 +437,6 @@
 %% \pxcz at parse@opt{<option>}
 \pxcz at onlypreamble@def\pxcz at parse@opt#1{%
   \pxcz at okfalse
-  \pxcz at parse@opt at b{use=file:}{#1}{file}%
-  \pxcz at parse@opt at b{use=tl-ja:}{#1}{ja}%
-  \pxcz at parse@opt at b{use=tl-ko:}{#1}{ko}%
-  \pxcz at parse@opt at b{use=tl-sc:}{#1}{sc}%
-  \pxcz at parse@opt at b{use=tl-tc:}{#1}{tc}%
-  \pxcz at parse@opt at b{use=tl:}{#1}{ja}%
-  \pxcz at parse@opt at b{use=}{#1}{file}%
   \pxcz at parse@opt at a{+}{#1}{\pxcz at file@preset at tltrue}%
   \pxcz at parse@opt at a{*}{#1}{\pxcz at file@preset at tlfalse}%
   \pxcz at parse@opt at a{tl:}{#1}{\pxcz at file@preset at tltrue}%
@@ -354,33 +447,23 @@
       #3\let\pxcz at file@preset\pxcz at post \pxcz at oktrue
     \fi
   \fi}
-\pxcz at onlypreamble@def\pxcz at parse@opt at a#1#2#3{% for file preloads
+\pxcz at onlypreamble@def\pxcz at parse@opt at a#1#2#3{%
   \ifpxcz at ok\else
     \pxcz at split{#1}{#2}\ifx\pxcz at pre\@empty
       #3\let\pxcz at file@preset\pxcz at post \pxcz at oktrue
     \fi
   \fi}
-\pxcz at onlypreamble@def\pxcz at parse@opt at b#1#2#3{% for file presets
-  \ifpxcz at ok\else
-    \pxcz at split{#1}{#2}\ifx\pxcz at pre\@empty
-      \edef\pxcz at use@list{\pxcz at use@list\pxcz at use@do{#3}{\pxcz at post}}%
-      \pxcz at oktrue
-    \fi
-  \fi}
 
 %% dispatch
 \ProcessOptions*
 
-%% 'unicode*' and 'unicode*-fwid' are DEPRECATED
-\ifpxcz at uniquify
-  \PackageWarningNoLine\pxcz at pkgname
-   {IMPORTANT: Option 'unicode*\ifpxcz at fullwidth -fwid\fi'
-    is DEPRECATED!\MessageBreak
-    This option invokes a transitional setting that\MessageBreak
-    is specially tailored for TL2017, and will be\MessageBreak
-    abolished in v2.0 (soon to be released).\MessageBreak
-    You should update to TL2018 or later and use\MessageBreak
-    option 'unicode\ifpxcz at fullwidth -fwid\fi' instead}
+%% adjust \pxcz at pxufont@avail
+\ifpxcz at enabled\else
+  % pxufont-ruby (virtually) requires dvipdfmx.
+  % (But if it is already loaded, it cannot be helped.)
+  \ifnum\pxcz at pxufont@avail=2 \ifnum\pxcz at pxufont@loaded<2
+    \chardef\pxcz at pxufont@avail=1
+  \fi\fi
 \fi
 
 %% 'everypage' needs 'atbegshi' package
@@ -388,56 +471,39 @@
 \RequirePackage{atbegshi}
 \fi\fi
 
-%% apply default value for \pxcz at directunicode
-\ifx\pxcz at directunicode\relax
-  \let\pxcz at directunicode\pxcz at directunicode@none
+%% apply default value for \pxcz at unicode
+\ifpxcz at unicode@given\else
+  \let\pxcz at unicode\pxcz at unicode@@false
   \ifnum\pxcz at pxufont@loaded>0
     \PackageWarningNoLine\pxcz at pkgname
      {Option 'unicode' is enabled, since the package\MessageBreak
       'pxufont' is already loaded}
-    \let\pxcz at directunicode\pxcz at directunicode@full
+    \let\pxcz at unicode\pxcz at unicode@@full
   \fi
-  \pxcz at directunicode@defaulttrue
 \fi
 
 %% set 'pxcz at alpha'
-\@tempswafalse
-\if\pxcz at main@preset\relax
-  \if\pxcz at file@preset\relax \@tempswatrue \fi
+%% apply default value for \pxcz at alphabet
+\if\pxcz at alphabet\relax
+  \ifx\pxcz at main@preset\relax \ifx\pxcz at file@preset\relax
+    % TODO: warn
+    \let\pxcz at alphabet=t
+  \fi\fi
+  \if\pxcz at alphabet\relax
+    \let\pxcz at alphabet=f
+  \fi
 \fi
-\if      t\pxcz at alphabet \pxcz at alphatrue
-\else\if f\pxcz at alphabet \pxcz at alphafalse
-\else\if r\pxcz at alphabet \pxcz at alphafalse
-\else\if at tempswa \pxcz at alphatrue
-\else  \pxcz at alphafalse
-\fi\fi\fi\fi
-\ifpxcz at alpha
-  \IfFileExists{pxchfon0.def}{}{%else
-    \PackageError\pxcz at pkgname
-     {Option 'alphabet' not available in Lite edition}%
-     {You must install full edition of PXchfon bundle, or specify
-      'noalphabet'\MessageBreak as package option.}%
-  \pxcz at alphafalse}
-\fi
 
-%% set 'pxcz at rel'
-\if r\pxcz at alphabet \pxcz at reltrue
-\else \pxcz at relfalse
-\fi
-\ifpxcz at rel
-  \IfFileExists{pxchfon0.def}{}{%else
-    \PackageError\pxcz at pkgname
-     {Option 'relfont' not available in Lite edition}%
-     {You must install full edition of PXchfon bundle.}%
-  \pxcz at relfalse}
-\fi
-
 %% \ifpxcz at alphafont
 % Whether or not alphabet fonts are used.
 \newif\ifpxcz at alphafont
-\ifpxcz at alpha \pxcz at alphafonttrue
-\else\ifpxcz at rel \pxcz at alphafonttrue
-\else \pxcz at alphafontfalse
+\if f\pxcz at alphabet \else \pxcz at alphafonttrue \fi
+\ifpxcz at alphafont\ifpxcz at lite@mode
+  \PackageError\pxcz at pkgname
+   {Font settings for alphabetic logical fonts\MessageBreak
+    are not supported in Lite edition}%
+   {You must install full edition of PXchfon bundle.}%
+  \pxcz at alphafontfalse \let\pxcz at alphabet=f
 \fi\fi
 
 %% apply default for \pxcz at strict@csi
@@ -461,7 +527,6 @@
 \ifpxcz at switch@font
   \pxcz at switch@font at xjistrue
 \else
-  \let\pxcz at switch@font at xwidtrue\pxcz at switch@font at xwidfalse
   \let\pxcz at switch@font at xjistrue\pxcz at switch@font at xjisfalse
 \fi
 
@@ -472,7 +537,7 @@
 \endgroup
 \AtBeginDocument{%
   \@tempswatrue
-  \ifnum\pxcz at directunicode<\pxcz at directunicode@full\else
+  \ifnum\pxcz at unicode<\pxcz at unicode@@full\else
     \pxcz at get@dvipdfmx at version
     \ifx\pxcz at dvipdfmx@version\@undefined\else
       \ifnum\pxcz at dvipdfmx@version<20170918
@@ -495,25 +560,9 @@
 %% \pxcz at apply@opt at unicode
 % Forces the 'unicode' setup (unless a directunicode option was given).
 \pxcz at onlypreamble@def\pxcz at apply@opt at unicode{%
-  \ifpxcz at directunicode@default %  default -> unicode
+  \ifpxcz at unicode@given\else % default -> unicode
     \pxcz at warn@unicode
-    \let\pxcz at directunicode\pxcz at directunicode@full
-    \pxcz at uniquifyfalse
-  \else\ifnum\pxcz at directunicode=\pxcz at directunicode@full
-    \ifpxcz at uniquify % unicode* -> 'unicode+'
-      \pxcz at switch@font at xwidtrue \pxcz at uniquifyfalse
-    \fi % unicode -> (unchanged)
-  \else \pxcz at uniquifyfalse % otherwise, enable switch-font
-  \fi\fi}
-%% \pxcz at apply@opt at unicodeP
-% Forces the 'unicode+' setup, which is a 'unicode' with switch-font
-% enabled on the width features.
-\pxcz at onlypreamble@def\pxcz at apply@opt at unicodeP{%
-  \pxcz at uniquifyfalse
-  \pxcz at switch@font at xwidtrue % 'unicode+'
-  \ifnum\pxcz at directunicode=\pxcz at directunicode@full\else
-    \pxcz at warn@unicode
-    \let\pxcz at directunicode\pxcz at directunicode@full
+    \let\pxcz at unicode\pxcz at unicode@@full
   \fi}
 %% \pxcz at warn@unicode
 \pxcz at onlypreamble@def\pxcz at warn@unicode{%
@@ -526,7 +575,6 @@
   \edef\pxcz at tmpa{#1}%
   \pxcz at cond\ifx\pxcz at main@preset\pxcz at tmpa\fi
       {\@firstofone}{\@gobble}}
-% A 'XXXX+' preset forces 'unicode+' setting.
 % 'sourcehan(-otc)' and 'noto(-otc)' force 'unicode' setting.
 \pxcz at do{sourcehan}{\pxcz at apply@opt at unicode}
 \pxcz at do{sourcehan-otc}{\pxcz at apply@opt at unicode}
@@ -535,59 +583,59 @@
 \pxcz at do{noto-otf}{\pxcz at apply@opt at unicode}
 \pxcz at do{noto-otc}{\pxcz at apply@opt at unicode}
 \pxcz at do{noto-jp}{\pxcz at apply@opt at unicode}
-\pxcz at do{sourcehan+}{\pxcz at apply@opt at unicodeP}
-\pxcz at do{sourcehan-otc+}{\pxcz at apply@opt at unicodeP}
-\pxcz at do{noto+}{\pxcz at apply@opt at unicodeP}
-\pxcz at do{noto-otc+}{\pxcz at apply@opt at unicodeP}
-\pxcz at do{yu-win10+}{\pxcz at apply@opt at unicodeP}
 \pxcz at custom@apply at opt@unicode
 % No-embed is not supported under the 'unicode' setup
-\ifnum\pxcz at directunicode=\pxcz at directunicode@full
+\ifnum\pxcz at unicode=\pxcz at unicode@@full
   \pxcz at warn@unless at all@embeddedtrue
 \fi
 
+%% apply default for pxcz at legacycode@replace
+\ifpxcz at legacycode@replace at given\else
+  \ifnum\pxcz at unicode=\pxcz at unicode@@full
+    \pxcz at legacycode@replacetrue
+  \fi
+\fi
+
 %% apply default for \pxcz at legacycode
 \ifx\pxcz at legacycode\relax
-  \ifnum\pxcz at directunicode=\pxcz at directunicode@full
-    \let\pxcz at legacycode\pxcz at legacycode@replace
-  \else \let\pxcz at legacycode\pxcz at legacycode@apply
+  \ifpxcz at legacycode@replace
+    \let\pxcz at legacycode\pxcz at legacycode@@suppress
+  \else \let\pxcz at legacycode\pxcz at legacycode@@apply
   \fi
 \fi
 
-%% 'replace-legacycode' requires the 'pxufont' package
-\ifnum\pxcz at legacycode=\pxcz at legacycode@replace
+%% 'lecacycode=replace' requires the 'pxufont' package
+\ifpxcz at legacycode@replace
   \ifnum\pxcz at pxufont@avail<1
     \PackageError\pxcz at pkgname
-     {The option 'replace-lecacycode' requires the 'pxufont'\MessageBreak
+     {The option 'lecacycode-replace' requires the 'pxufont'\MessageBreak
        package, but it is not installed}%
-     {The option 'suprress-lecacycode' is applied as fallback.\MessageBreak
-      \@ehc}
-    \let\pxcz at legacycode\pxcz at legacycode@suppress
+     {\@ehc}
+    \pxcz at legacycode@replacefalse
   \fi
 \fi
 
 %% check requirements for 'glyphid'
-\ifpxcz at glyphid
+\ifnum\pxcz at glyphid>0
   \pxcz at oktrue
-  \ifnum\pxcz at legacycode=\pxcz at legacycode@replace\else \pxcz at okfalse \fi
+  \ifpxcz at enabled\else \pxcz at okfalse \fi
+  \ifpxcz at legacycode@replace\else \pxcz at okfalse \fi
+  \ifnum\pxcz at unicode<\pxcz at unicode@@simple \pxcz at okfalse \fi
   \ifpxcz at uptex\else \pxcz at okfalse \fi
   \ifnum\pxcz at pxufont@avail<2 \pxcz at okfalse \fi
   \ifpxcz at ok\else
-    \PackageError\pxcz at pkgname
-     {The option 'glyphid' cannot be used here. You must\MessageBreak
+    \PackageWarningNoLine\pxcz at pkgname
+     {The option 'glyphid' will not work. You must\MessageBreak
       use upLaTeX and the 'unicode' option, and package\MessageBreak
       'pxufont' of v0.5 or later must be installed}
-     {\@ehc}
-    \pxcz at glyphidfalse
+    \chardef\pxcz at glyphid=1 % fallback mode
   \fi
 \fi
 
 %% check requirements for 'expert'
 \pxcz at oktrue
-\ifnum\pxcz at legacycode=\pxcz at legacycode@replace\else \pxcz at okfalse \fi
-\ifnum\pxcz at directunicode=\pxcz at directunicode@full\else \pxcz at okfalse \fi
-\ifpxcz at uniquify \pxcz at okfalse \fi % no 'unicode*'
-\ifpxcz at switch@font at xwid \pxcz at okfalse \fi % no 'unicode+'
+\ifpxcz at legacycode@replace\else \pxcz at okfalse \fi
+\ifnum\pxcz at unicode=\pxcz at unicode@@full\else \pxcz at okfalse \fi
 \ifnum\pxcz at pxufont@avail<2 \pxcz at okfalse \fi
 \ifpxcz at ok\else
   \if t\pxcz at expert % explicitly given
@@ -619,6 +667,9 @@
 
 %--------------------------------------- user interface
 
+%% variables
+\newif\ifpxcz at deluxe@used
+
 %% \pxcz at sym@list
 \def\pxcz at sym@list{%
   mnl,mnr,mnb,gtr,gtb,gtx,gtu,mgr,%
@@ -629,50 +680,52 @@
 %%<*> \setminchofont/\setgothicfont/etc.
 \newcommand*\setminchofont{\pxcz at setfont{mnl,mnr,mnb}}
 \newcommand*\setgothicfont{\pxcz at setfont{gtr,gtb,gtx,gtu}}
-\newcommand*\setlightminchofont{\pxcz at setfont{mnl}}
-\newcommand*\setmediumminchofont{\pxcz at setfont{mnr}}
-\newcommand*\setboldminchofont{\pxcz at setfont{mnb}}
-\newcommand*\setmediumgothicfont{\pxcz at setfont{gtr}}
-\newcommand*\setboldgothicfont{\pxcz at setfont{gtb}}
-\newcommand*\setxboldgothicfont{\pxcz at setfont{gtx}}
-\newcommand*\setoneweightgothicfont{\pxcz at setfont{gtu}}
-\newcommand*\setmarugothicfont{\pxcz at setfont{mgr}}
+\newcommand*\setlightminchofont{\pxcz at setfont@dx{mnl}}
+\newcommand*\setmediumminchofont{\pxcz at setfont@dx{mnr}}
+\newcommand*\setboldminchofont{\pxcz at setfont@dx{mnb}}
+\newcommand*\setmediumgothicfont{\pxcz at setfont@dx{gtr}}
+\newcommand*\setboldgothicfont{\pxcz at setfont@dx{gtb}}
+\newcommand*\setxboldgothicfont{\pxcz at setfont@dx{gtx}}
+\newcommand*\setoneweightgothicfont{\pxcz at setfont@dx{gtu}}
+\newcommand*\setmarugothicfont{\pxcz at setfont@dx{mgr}}
 
 \newcommand*\setkoreanminchofont{\pxcz at setfont{koml,komr,komb}}
 \newcommand*\setkoreangothicfont{\pxcz at setfont{kogr,kogb,kogx,kogu,komgr}}
-\newcommand*\setkoreanlightminchofont{\pxcz at setfont{koml}}
-\newcommand*\setkoreanmediumminchofont{\pxcz at setfont{komr}}
-\newcommand*\setkoreanboldminchofont{\pxcz at setfont{komb}}
-\newcommand*\setkoreanmediumgothicfont{\pxcz at setfont{kogr}}
-\newcommand*\setkoreanboldgothicfont{\pxcz at setfont{kogb}}
-\newcommand*\setkoreanxboldgothicfont{\pxcz at setfont{kogx}}
-\newcommand*\setkoreanoneweightgothicfont{\pxcz at setfont{kogu}}
-\newcommand*\setkoreanmarugothicfont{\pxcz at setfont{komgr}}
+\newcommand*\setkoreanlightminchofont{\pxcz at setfont@dx{koml}}
+\newcommand*\setkoreanmediumminchofont{\pxcz at setfont@dx{komr}}
+\newcommand*\setkoreanboldminchofont{\pxcz at setfont@dx{komb}}
+\newcommand*\setkoreanmediumgothicfont{\pxcz at setfont@dx{kogr}}
+\newcommand*\setkoreanboldgothicfont{\pxcz at setfont@dx{kogb}}
+\newcommand*\setkoreanxboldgothicfont{\pxcz at setfont@dx{kogx}}
+\newcommand*\setkoreanoneweightgothicfont{\pxcz at setfont@dx{kogu}}
+\newcommand*\setkoreanmarugothicfont{\pxcz at setfont@dx{komgr}}
 
 \newcommand*\setschineseminchofont{\pxcz at setfont{scml,scmr,scmb}}
 \newcommand*\setschinesegothicfont{\pxcz at setfont{scgr,scgb,scgx,scgu,scmgr}}
-\newcommand*\setschineselightminchofont{\pxcz at setfont{scml}}
-\newcommand*\setschinesemediumminchofont{\pxcz at setfont{scmr}}
-\newcommand*\setschineseboldminchofont{\pxcz at setfont{scmb}}
-\newcommand*\setschinesemediumgothicfont{\pxcz at setfont{scgr}}
-\newcommand*\setschineseboldgothicfont{\pxcz at setfont{scgb}}
-\newcommand*\setschinesexboldgothicfont{\pxcz at setfont{scgx}}
-\newcommand*\setschineseoneweightgothicfont{\pxcz at setfont{scgu}}
-\newcommand*\setschinesemarugothicfont{\pxcz at setfont{scmgr}}
+\newcommand*\setschineselightminchofont{\pxcz at setfont@dx{scml}}
+\newcommand*\setschinesemediumminchofont{\pxcz at setfont@dx{scmr}}
+\newcommand*\setschineseboldminchofont{\pxcz at setfont@dx{scmb}}
+\newcommand*\setschinesemediumgothicfont{\pxcz at setfont@dx{scgr}}
+\newcommand*\setschineseboldgothicfont{\pxcz at setfont@dx{scgb}}
+\newcommand*\setschinesexboldgothicfont{\pxcz at setfont@dx{scgx}}
+\newcommand*\setschineseoneweightgothicfont{\pxcz at setfont@dx{scgu}}
+\newcommand*\setschinesemarugothicfont{\pxcz at setfont@dx{scmgr}}
 
 \newcommand*\settchineseminchofont{\pxcz at setfont{tcml,tcmr,tcmb}}
 \newcommand*\settchinesegothicfont{\pxcz at setfont{tcgr,tcgb,tcgx,tcgu,tcmgr}}
-\newcommand*\settchineselightminchofont{\pxcz at setfont{tcml}}
-\newcommand*\settchinesemediumminchofont{\pxcz at setfont{tcmr}}
-\newcommand*\settchineseboldminchofont{\pxcz at setfont{tcmb}}
-\newcommand*\settchinesemediumgothicfont{\pxcz at setfont{tcgr}}
-\newcommand*\settchineseboldgothicfont{\pxcz at setfont{tcgb}}
-\newcommand*\settchinesexboldgothicfont{\pxcz at setfont{tcgx}}
-\newcommand*\settchineseoneweightgothicfont{\pxcz at setfont{tcgu}}
-\newcommand*\settchinesemarugothicfont{\pxcz at setfont{tcmgr}}
+\newcommand*\settchineselightminchofont{\pxcz at setfont@dx{tcml}}
+\newcommand*\settchinesemediumminchofont{\pxcz at setfont@dx{tcmr}}
+\newcommand*\settchineseboldminchofont{\pxcz at setfont@dx{tcmb}}
+\newcommand*\settchinesemediumgothicfont{\pxcz at setfont@dx{tcgr}}
+\newcommand*\settchineseboldgothicfont{\pxcz at setfont@dx{tcgb}}
+\newcommand*\settchinesexboldgothicfont{\pxcz at setfont@dx{tcgx}}
+\newcommand*\settchineseoneweightgothicfont{\pxcz at setfont@dx{tcgu}}
+\newcommand*\settchinesemarugothicfont{\pxcz at setfont@dx{tcmgr}}
 
 \pxcz at onlypreamble@def\pxcz at setfont#1{\@ifnextchar[%]
   {\pxcz at setfont@a{#1}}{\pxcz at setfont@a{#1}[0]}}
+\pxcz at onlypreamble@def\pxcz at setfont@dx{%
+  \pxcz at deluxe@usedtrue\pxcz at setfont}
 \pxcz at onlypreamble@def\pxcz at setfont@a#1[#2]#3{%
   \edef\pxcz at tmpa{#3}\pxcz at lower\pxcz at tmpa
   \pxcz at split{?:}{?\pxcz at tmpa}%
@@ -689,31 +742,23 @@
 \@for\pxcz at x:=\pxcz at sym@list\do{%
   \@namedef{pxcz at FS/\pxcz at x}{}}
 
-%--------------------------------------- '\asUTF'
-% NB. This feature is superseded by the \diruni command.
-\ifpxcz at uptex
+%%<*> \maybemultiweight
+\newcommand*\maybemultiweight{%
+  \let\pxchfonMaybeMultiweight=t}
 
-%%<*> \asUTF{<jachar>}
-\AtBeginDocument{%
-  \@ifpackageloaded{otf}{%
-    \providecommand*\asUTF{\pxcz at asutf@a}%
-  }{}%
-}
-\def\pxcz at asutf@a#1{%
-  \pxcz at warn@depre at asutf
-  \kchardef\pxcz at tmpa=`#1\relax
-  \expandafter\pxcz at asutf@b\meaning\pxcz at tmpa\relax
-}
-\def\pxcz at asutf@b#1"#2\relax{%
-  \UTF{#2}%
-}
-\def\pxcz at warn@depre at asutf{%
-  \PackageWarningNoLine\pxcz at pkgname
-   {Important: Command '\string\asUTF' is DEPRECATED}%
-  \global\let\pxcz at warn@depre at asutf\relax
-}
+% check for usage of multi-weight commands
+\ifx t\pxchfonMaybeMultiweight\else
+  \AtBeginDocument{%
+    \ifpxcz at deluxe@used\ifpxcz at otf@deluxe\else
+      \PackageWarningNoLine\pxcz at pkgname
+       {Setting for multi-weight usage of japanese-otf\MessageBreak
+        font set is employed, but 'deluxe' option\MessageBreak
+        of japanese-otf is not enabled!\MessageBreak
+        You should specify 'maybe-multiweight' option\MessageBreak
+        if you really intend the present setting}
+    \fi\fi}
+\fi
 
-\fi
 %--------------------------------------- fontmap internals
 
 %% \pxcz at noembed
@@ -817,15 +862,6 @@
 \pxcz at onlypreamble@def\pxcz at add@lopt#1{%
   \edef\pxcz at lopts{%
     \ifx\pxcz at lopts\@empty\else \pxcz at lopts:\fi#1}}
-%% \pxcz at uniquify@lopts
-\pxcz at onlypreamble@def\pxcz at uniquify@lopts#1#2{%
-  \pxcz at oktrue
-  \def\pxcz at tmpb{jp90}\ifx\pxcz at tmpb\pxcz at lopts\pxcz at okfalse\fi
-  \def\pxcz at tmpb{jp04}\ifx\pxcz at tmpb\pxcz at lopts\pxcz at okfalse\fi
-  \ifx\@empty\pxcz at lopts\if t#1\pxcz at okfalse\fi\fi
-  \ifpxcz at ok
-    \edef\pxcz at lopts{#2}%
-  \fi}
 
 %% \pxcz at is@jis at cmap
 \pxcz at onlypreamble@def\pxcz at is@jis at cmap{%
@@ -889,28 +925,6 @@
     \edef\pxcz at font{\expandafter\pxcz at tmpb\pxcz at font}%
   \fi}
 % entries
-\ifpxcz at switch@font at xwid
-  \def\pxcz at switch@font@@sourcehanC at fwid#1:0:{:2:}
-  \def\pxcz at switch@font@@sourcehanC at hwid#1:0:{:1:}
-  \def\pxcz at switch@font@@sourcehan at fwid#1-{#1SC-}
-  \def\pxcz at switch@font@@sourcehan at hwid#1-{#1K-}
-  \def\pxcz at switch@font@@notoC at fwid#1:0:{:2:}
-  \def\pxcz at switch@font@@notoC at hwid#1:0:{:1:}
-  \def\pxcz at switch@font@@noto at fwid#1jp{#1sc}
-  \def\pxcz at switch@font@@noto at hwid#1jp{#1kr}
-  \def\pxcz at switch@font@@yugoth at fwid#1:0:{:1:}
-  \def\pxcz at switch@font@@yumin at fwid#1.ttf{%
-    \@nameuse{pxcz at SFYM/#1.ttf}}
-  \def\pxcz at switch@font@@yuminU at fwid#1.TTF{%
-    \@nameuse{pxcz at SFYM/#1.TTF}}
-  \def\pxcz at do#1{\@namedef{pxcz at SFYM/#1}}
-  \pxcz at do{yuminl.ttf}{:1:YuGothL.ttc}
-  \pxcz at do{yumin.ttf}{:1:YuGothR.ttc}
-  \pxcz at do{yumindb.ttf}{:1:YuGothM.ttc}
-  \pxcz at do{YUMINL.TTF}{:1:YUGOTHL.TTC}
-  \pxcz at do{YUMIN.TTF}{:1:YUGOTHR.TTC}
-  \pxcz at do{YUMINDB.TTF}{:1:YUGOTHM.TTC}
-\fi
 \ifpxcz at switch@font at xjis
   \@namedef{pxcz at switch@font@@mogamobo at jp90}#1.ttc{%
     \pxcz at csuse@or{pxcz at SFMG/#1.ttc}{#1.ttc}}
@@ -936,7 +950,7 @@
 %% entry modifiers
 % Uni: Changes cmap to 'unicode' if directunicode.
 \pxcz at declare@entry at modifier{Uni}{%
-  \ifnum\pxcz at directunicode<\pxcz at directunicode@otf\else
+  \ifnum\pxcz at unicode<\pxcz at unicode@@UTF\else
     \ifx\pxcz at font\pxcz at noembed\else
       \let\pxcz at cmap\pxcz at cmap@directuni
     \fi
@@ -943,7 +957,7 @@
   \fi}
 % Uni*: Changes cmap to 'unicode' if directunicode*.
 \pxcz at declare@entry at modifier{Uni*}{%
-  \ifnum\pxcz at directunicode<\pxcz at directunicode@all\else
+  \ifnum\pxcz at unicode<\pxcz at unicode@@simple\else
     \ifx\pxcz at font\pxcz at noembed\else
       \let\pxcz at cmap\pxcz at cmap@directuni
     \fi
@@ -966,7 +980,7 @@
 % HWid
 \pxcz at declare@entry at modifier{HWid}{%
   \ifx\pxcz at font\pxcz at noembed \pxcz at okfalse
-  \else\ifnum\pxcz at directunicode=\pxcz at directunicode@full \pxcz at oktrue
+  \else\ifnum\pxcz at unicode=\pxcz at unicode@@full \pxcz at oktrue
   \else\ifpxcz at cmap@alpha \pxcz at okfalse
   \else \pxcz at oktrue
   \fi\fi\fi
@@ -1048,20 +1062,13 @@
     \global\pxcz at noembed@usedtrue
   \fi
   % apply layout options when using 'unicode'
-  \ifnum\pxcz at directunicode<\pxcz at directunicode@full\else
+  \ifnum\pxcz at unicode<\pxcz at unicode@@full\else
     \ifx\pxcz at cmap\pxcz at cmap@directuni
-      \ifpxcz at uniquify
-        \pxcz at uniquify@lopts{t}{\pxcz@@jpXX}%
         \ifpxcz at fullwidth
-          \pxcz at add@lopt{fwid}%
-        \fi
-      \else
-        \ifpxcz at fullwidth
           \pxcz at split{wid}\pxcz at lopts\ifx\pxcz at pre\relax
             \pxcz at add@lopt{fwid}%
           \fi
         \fi
-      \fi
       \ifx\pxcz at lopts\@empty\else
         \edef\pxcz at mopts{\pxcz at mopts\space -l \pxcz at lopts}%
       \fi
@@ -1069,8 +1076,8 @@
   \fi
   % suppress legacy-code mappings unless 'apply-legacycode'
   \ifx\pxcz at cmap\pxcz at cmap@directuni\else \ifpxcz at retain\else
-    \ifnum\pxcz at legacycode=\pxcz at legacycode@apply % no-op
-    \else\ifnum\pxcz at legacycode=\pxcz at legacycode@ignore
+    \ifnum\pxcz at legacycode=\pxcz at legacycode@@apply % no-op
+    \else\ifnum\pxcz at legacycode=\pxcz at legacycode@@ignore
       \let\pxcz at font\@empty % skip
     \else\ifx\pxcz at font\@empty\else
       \let\pxcz at font\pxcz at kill@mapping % kill
@@ -1420,35 +1427,34 @@
 
 %% variables
 \newif\ifpxcz at diruni@ok
-\let\pxcz at otf@weight\relax
 
 %% check if \diruni is available
 \ifpxcz at uptex
-  \@ifpackageloaded{otf}{% directunicode needs otf
-    \ifnum\pxcz at directunicode>\z@ \pxcz at diruni@oktrue \fi
-  }{%else
-    \ifnum\pxcz at directunicode<\pxcz at directunicode@all\else
-      \pxcz at diruni@oktrue % directunicode* does not need otf
+  \ifpxcz at otf@loaded % direct Unicode needs otf
+    \ifnum\pxcz at unicode>\z@ \pxcz at diruni@oktrue \fi
+  \else
+    \ifnum\pxcz at unicode<\pxcz at unicode@@simple\else
+      \pxcz at diruni@oktrue % 'unicode=UTF' does not need otf
       \AtBeginDocument{% loading otf later causes inconsistency
         \@ifpackageloaded{otf}{\pxcz at diruni@okfalse}{}}%
     \fi
-  }
+  \fi
 \fi
 
 %%<*> \diruni
-\@ifdefinable{\diruni}{%
-  \DeclareRobustCommand*{\diruni}{%
+\newcommand*{\diruni}{\pxcz at diruni}
+\DeclareRobustCommand*{\pxcz at diruni}{%
     \not at math@alphabet\diruni\relax
     \ifx\cy at encoding\pxcz at JYn % if in standard Japanese encoding
       \expandafter\let\csname UTF \endcsname\pxcz at du@UTF
       \kanjishape{diruni}\selectfont
     \fi
-  }}
+}
 
 %%<*> \textdiruni{<text>}
 \@ifdefinable{\textdiruni}{%
   \DeclareRobustCommand*{\textdiruni}[1]{%
-    \relax\ifmmode\hbox\fi{\diruni#1}%
+    \relax\ifmmode\hbox\fi{\pxcz at diruni#1}%
   }}
 
 %% \pxcz at du@UTF
@@ -1456,44 +1462,27 @@
   \kchar"#1\relax}
 
 %% redefinition in PDF-strings
-\providecommand*\pdfstringdefPreHook{}
-\g at addto@macro\pdfstringdefPreHook{%
-  \let\diruni\@empty
+\pxcz at hy@disable at commands{%
+  \let\pxcz at diruni\@empty
   \let\textdiruni\@firstofone
 }
 
+%% \pxcz at err@diruni
+\def\pxcz at err@diruni{%
+  \global\let\pxcz at diruni\relax
+  \PackageError\pxcz at pkgname
+   {Command '\string\(text)diruni' not available}%
+   {You must use upLaTeX and load pxchfon
+    \ifcase\pxcz at unicode with 'unicode' option%
+    \else pxchfon after 'otf' package%
+    \fi .\MessageBreak\@ehc}}
+\AtBeginDocument{%
+  \ifpxcz at diruni@ok \let\pxcz at err@diruni\relax
+  \else \let\pxcz at diruni\pxcz at err@diruni
+  \fi}
+
 \ifpxcz at diruni@ok   %---- <*diruni-ok>
 
-%% \pxcz at otf@weight: otf weight mode
-% watch out for priority...
-\@ifpackagewith{otf}{deluxe}{%
-  \let\pxcz at otf@weight=d
-}{\@ifpackagewith{otf}{bold}{%
-  \let\pxcz at otf@weight=b
-}{\@ifpackagewith{otf}{expert}{%
-  \let\pxcz at otf@weight=r % 'expert' cancels 'noreplace'
-}{\@ifpackagewith{otf}{noreplace}{%
-  \let\pxcz at otf@weight=n
-}{\@ifpackageloaded{otf}{%
-  \let\pxcz at otf@weight=r
-}{%else
-  \let\pxcz at otf@weight=n
-}}}}}
-%% \pxcz at otf@mmivjis: otf jis2004
-\@ifpackagewith{otf}{jis2004}{%
-  \let\pxcz at otf@mmivjis=t%
-}{%else
-  \let\pxcz at otf@mmivjis=f%
-}
-%% \pxcz at du@scale
-\let\pxcz at du@scale\utf at sc@le
-\ifx\pxcz at du@scale\@undefined
-  \let\pxcz at du@scale\Cjascale
-\fi
-\ifx\pxcz at du@scale\@undefined
-  \edef\pxcz at du@scale{\ifx\jsc at JYn\@undefined 0.962216\else 0.924715\fi}%
-\fi
-
 %% \pxcz at du@decl at shape{<fam>}{<ser>}<sw>{<tfmname>}{<suffix>}
 \pxcz at onlypreamble@def\pxcz at du@decl at shape#1#2#3#4#5{%
 \DeclareFontShape{JY2}{#1}{#2}{diruni}{<->%
@@ -1502,7 +1491,7 @@
     \pxcz at du@shape at spec{#3}{#4}{#5}{v}}{}}
 \pxcz at onlypreamble@def\pxcz at du@shape at spec#1#2#3#4{%
   \if#1t%
-    s*[\pxcz at du@scale]#2\if t\pxcz at otf@mmivjis#3\fi-#4%
+    s*[\pxcz at jascale]#2\ifpxcz at otf@mmivjis#3\fi-#4%
   \else#2\fi}
 
 \if d\pxcz at otf@weight % deluxe
@@ -1524,7 +1513,7 @@
 \pxcz at du@decl at shape{hgt}{m}t{otf-ujgr}{n}%
 \pxcz at du@decl at shape{hgt}{bx}f{ssub*hgt/m/diruni}{}%
 \else                 % noreplace
-\ifnum\pxcz at directunicode>\@ne % (directunicode*)
+\ifnum\pxcz at unicode>\@ne % (directunicode*)
 \pxcz at du@decl at shape{mc}{m}t{uprml}{}%
 \pxcz at du@decl at shape{mc}{bx}f{ssub*gt/m/diruni}{}%
 \pxcz at du@decl at shape{gt}{m}t{upgbm}{}%
@@ -1555,19 +1544,33 @@
   \endgroup
 }
 
-\ifpxcz at glyphid     %---- <*glyphid>
+\fi                 %---- </diruni-ok>
 
+%--------------------------------------- 'glyphid'
+
+%% \pxcz at geta
+\chardef\pxcz at geta=\jis"222E\relax
+
+\ifnum\pxcz at glyphid=2 %---- <*glyphid>
+
+%% check integrity
+\ifpxcz at otf@loaded\else
+  \AtBeginDocument{% loading otf later causes inconsistency
+    \@ifpackageloaded{otf}{%
+      \PackageWarningNoLine\pxcz at pkgname
+       {The option 'glyphid' will not work. You must\MessageBreak
+        load pxchfon after 'otf' package}%
+    \def\gid{\pxcz at gid@fb}}{}}
+\fi
+
 %%<*> \gid{<number>}
-\DeclareRobustCommand*{\gid}[1]{%
+\newcommand*{\gid}{\pxcz at gid}
+\DeclareRobustCommand*{\pxcz at gid}[1]{%
   \begingroup
     \kanjishape{dirgid}\selectfont
     \kchar#1\pxcz at gid@jfm at sync
   \endgroup}
 \let\pxcz at gid@jfm at sync\relax
-\def\pxcz at hy@gid#1{?}
-\g at addto@macro\pdfstringdefPreHook{%
-  \let\gid\pxcz at hy@gid
-}
 
 %% \pxcz at dg@decl at shape{<fam>}{<ser>}<sw>{<tfmname>}
 \pxcz at onlypreamble@def\pxcz at dg@decl at shape#1#2#3#4{%
@@ -1577,7 +1580,7 @@
     \pxcz at dg@shape at spec{#3}{#4}{v}}{}}
 \pxcz at onlypreamble@def\pxcz at dg@shape at spec#1#2#3{%
   \if#1t%
-    s*[\pxcz at du@scale]#2-#3%
+    s*[\pxcz at jascale]#2-#3%
   \else#2\fi}
 
 \if d\pxcz at otf@weight % deluxe
@@ -1607,28 +1610,19 @@
 
 \fi                 %---- </glyphid>
 
-\fi                 %---- </diruni-ok>
+\ifnum\pxcz at glyphid>0
+  %% \pxcz at gid@fb
+  \providecommand*{\gid}{\pxcz at gid@fb}
+  \DeclareRobustCommand*{\pxcz at gid@fb}[1]{%
+    \begingroup \kchar\pxcz at geta \endgroup}
 
-%% \pxcz at err@diruni
-\ifcase\pxcz at directunicode
-  \def\pxcz at errhelp@diruni{%
-    You must use upLaTeX and load pxchfon with 'directunicode(*)' option.}
-\else
-  \def\pxcz at errhelp@diruni{%
-    You must use upLaTeX and load pxchfon after 'otf' package.}
+  % redefinition in PDF-strings
+  \begingroup \kansujichar1=\pxcz at geta \kcatcode\pxcz at geta=18
+    \xdef\pxcz at hy@gid#1{\kansuji1}
+  \endgroup
+  \pxcz at hy@disable at commands{%
+    \let\gid\pxcz at hy@gid}
 \fi
-\def\pxcz at err@diruni{%
-  \PackageError\pxcz at pkgname
-   {Command '\string\diruni' not available}%
-   {\pxcz at errhelp@diruni\MessageBreak\@ehc}%
-  \global\let\pxcz at err@diruni\relax}
-\AtBeginDocument{%
-  \ifpxcz at diruni@ok
-    \let\pxcz at err@diruni\relax
-    \let\pxcz at errhelp@diruni\relax
-  \else
-    \let\diruni\pxcz at err@diruni
-  \fi}
 
 %--------------------------------------- 'alphabet' option
 
@@ -1705,7 +1699,6 @@
         \pxcz at Entry{gtr}{r-cfjas-r- at PXcjk0@}{unicode}{HWid}}%
   \fi\fi
   \@ifpackagewith{otf}{deluxe}{\pxcz at err@dxotf{otf}}{}%
-  \@ifpackagewith{pxotf}{deluxe}{\pxcz at err@dxotf{pxotf}}{}%
 }
 \fi                 %---- </otfdx>
 \fi                 %---- </alphabet>
@@ -1788,7 +1781,7 @@
   \ifx t\pxcz at strict@csi
     \pxcz at inspect@flavor at all
   \fi
-  \ifpxcz at alpha % 'alphabet'
+  \if t\pxcz at alphabet % 'alphabet'
     \pxcz at check@alldefined{mnl,mnr,mnb}\ifpxcz at ok
       \renewcommand\rmdefault{cfjar}%
       \pxcz at set@bfdefault at to@bx{rm}%
@@ -1816,7 +1809,7 @@
     \normalfont
     \pxcz at addtospec{ALPHA}%
   \fi
-  \ifpxcz at rel % 'relfont'
+  \if r\pxcz at alphabet % 'relfont'
     \edef\pxcz at afont@enc{\encodingdefault}%
     \pxcz at check@afont at enc
     \pxcz at check@alldefined{mnl,mnr,mnb}%
@@ -1832,27 +1825,23 @@
   \ifpxcz at uptex\else
     \pxcz at addtospec{STD}%
   \fi
-  \ifnum0\ifnum\pxcz at legacycode=\pxcz at legacycode@replace 1\fi
+  \ifnum0\ifpxcz at legacycode@replace 1\fi
          \ifpxcz at uptex 1\fi >\z@
     \pxcz at addtospec{UPSTD}%
   \fi
   \ifpxcz at otf
-    \ifnum0\ifnum\pxcz at legacycode=\pxcz at legacycode@replace 1\fi
+    \ifnum0\ifpxcz at legacycode@replace 1\fi
            \ifpxcz at uptex 1\fi >\z@
       \pxcz at addtospec{UPOTF}%
     \fi
     \pxcz at addtospec{OTF}%
   \fi
-  \ifpxcz at glyphid \pxcz at addtospec{GID}%
+  \ifnum\pxcz at glyphid=2 \pxcz at addtospec{GID}%
   \fi
   \ifx t\pxcz at expert \pxcz at addtospec{EXPERT}%
   \fi
   \ifpxcz at utf \pxcz at addtospec{UTF}%
   \fi
-  \@ifpackageloaded{pxotf}{\pxcz at oktrue}{\pxcz at okfalse}%
-  \@ifpackageloaded{pxfontenc}{\pxcz at oktrue}{}%
-  \ifpxcz at ok \pxcz at addtospec{PXOTF}%
-  \fi
   % warn if some weights are not substituted, and if necessaty
   \ifpxcz at warn@unless at all@defined
     \ifpxcz at otf@deluxe
@@ -2089,7 +2078,7 @@
 %%<+> \jfmsyncbox{<width>}{<text>}
 \DeclareRobustCommand*{\jfmsyncbox}[2]{%
   \makebox[#1][l]{#2\jfmsync}}
-\g at addto@macro\pdfstringdefPreHook{%
+\pxcz at hy@disable at commands{%
   \let\jfmsyncbox\@secondoftwo}
 
 \ifpxcz at enabled     %---- when using dvipdfmx
@@ -2299,12 +2288,6 @@
 \pxcz at declare@preset at alias{hiragino-elcapitan}{hiragino-elcapitan-pro}
 \pxcz at declare@preset at alias{morisawa}{morisawa-pro}
 \pxcz at declare@preset at alias{noto-otf}{noto}
-%(plus-variants)
-\pxcz at declare@preset at alias{sourcehan+}{sourcehan}
-\pxcz at declare@preset at alias{sourcehan-otc+}{sourcehan-otc}
-\pxcz at declare@preset at alias{noto+}{noto}
-\pxcz at declare@preset at alias{noto-otc+}{noto-otc}
-\pxcz at declare@preset at alias{yu-win10+}{yu-win10}
 %(bang-variants)
 \pxcz at declare@preset at alias{sourcehan!}{sourcehan}
 \pxcz at declare@preset at alias{sourcehan-otc!}{sourcehan-otc}
@@ -2317,12 +2300,13 @@
 %% ... and invokes the specified one!
 \if\pxcz at main@preset\relax\else
 \pxcz at use@preset{\pxcz at main@preset}
+\pxcz at deluxe@usedfalse
 \fi
 
 %% load pxufont
 \ifx t\pxcz at expert
   \RequirePackage{pxufont-ruby}[]
-\else\ifnum\pxcz at legacycode=\pxcz at legacycode@replace
+\else\ifpxcz at legacycode@replace
   \RequirePackage{pxufont}[]
 \fi\fi
 

Deleted: trunk/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty	2023-08-28 23:43:02 UTC (rev 68102)
+++ trunk/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty	2023-08-29 23:20:18 UTC (rev 68103)
@@ -1,24 +0,0 @@
-%%
-%% This is file 'pxjafont.sty'.
-%%
-%% Copyright (c) 2009-2023 Takayuki YATO (aka. "ZR")
-%%   GitHub:   https://github.com/zr-tex8r
-%%   Twitter:  @zr_tex8r
-%%
-%% This package is distributed under the MIT License.
-%%
-
-%% package declaration
-\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxjafont}
-%% show warning
-\PackageWarning{pxchfon}
- {!!!!!!!!!!!! IMPORTANT WARNING !!!!!!!!!!!!\MessageBreak
-  The package 'pxjafont' is obsolete and its use is\MessageBreak
-  deprecated. please refer to the manual of pxchfon.\MessageBreak
-  The warning is issued}
-%% delegate
-\let\pxAliasedPxjafont=t
-\RequirePackageWithOptions{pxchfon}[]
-\endinput
-%% EOF



More information about the tex-live-commits mailing list.