summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/platex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-19 21:25:06 +0000
committerKarl Berry <karl@freefriends.org>2019-05-19 21:25:06 +0000
commite050e8c4e5fb24faecd10330f38b4bfa5f7777f7 (patch)
tree07ecbcaa195da52ba1a67e5c47506db356c9b566 /Master/texmf-dist/tex/platex
parent09b6012c4592676d398ffa8d92441583fcd9206f (diff)
pxchfon (19may19)
git-svn-id: svn://tug.org/texlive/trunk@51164 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/platex')
-rw-r--r--Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty306
1 files changed, 144 insertions, 162 deletions
diff --git a/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty b/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
index 6206ddb0c8a..15c9d849754 100644
--- a/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
+++ b/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
@@ -10,14 +10,9 @@
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxchfon}[2019/03/24 v1.4a]
+\ProvidesPackage{pxchfon}[2019/05/15 v1.5]
\def\pxcz@pkgname{pxchfon}
-%% preparations
-\def\pxcz@error{\PackageError\pxcz@pkgname}
-\def\pxcz@warn{\PackageWarning\pxcz@pkgname}
-\def\pxcz@info{\PackageInfo\pxcz@pkgname}
-
%--------------------------------------- general
%% variables
@@ -44,6 +39,9 @@
%% \pxcz@onlypreamble@def\CS
\def\pxcz@onlypreamble@def#1{%
\@onlypreamble#1\def#1}
+%% \pxcz@onlypreamble@let\CS
+\def\pxcz@onlypreamble@let#1{%
+ \@onlypreamble#1\let#1}
%% \pxcz@csuse@or{<csname>}{<default>}
\def\pxcz@csuse@or#1#2{%
@@ -238,29 +236,26 @@
% dvipdfmx of version 20170627 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.
-\@namedef{pxcz@POPT/unicode}{%
+\pxcz@onlypreamble@csdef{pxcz@POPT/unicode}{%
\let\pxcz@directunicode\pxcz@directunicode@full}
-\@namedef{pxcz@POPT/unicode*}{%
+\pxcz@onlypreamble@csdef{pxcz@POPT/unicode*}{%
\pxcz@uniquifytrue
\let\pxcz@directunicode\pxcz@directunicode@full}
-\@namedef{pxcz@POPT/unicode-fwid}{%
+\pxcz@onlypreamble@csdef{pxcz@POPT/unicode-fwid}{%
\pxcz@fullwidthtrue
\let\pxcz@directunicode\pxcz@directunicode@full}
-\@namedef{pxcz@POPT/unicode*-fwid}{%
+\pxcz@onlypreamble@csdef{pxcz@POPT/unicode*-fwid}{%
\pxcz@fullwidthtrue \pxcz@uniquifytrue
\let\pxcz@directunicode\pxcz@directunicode@full}
\DeclareOption*{%
\pxcz@csuse@or{pxcz@POPT/\CurrentOption}{%
\pxcz@parse@opt\CurrentOption
\ifpxcz@ok\else \@unknownoptionerror \fi}}
-\@onlypreamble\pxcz@parse@opt
-\def\pxcz@parse@opt#1{%
+\pxcz@onlypreamble@def\pxcz@parse@opt#1{%
\expandafter\pxcz@parse@opt@a#1\@nnil}
-\@onlypreamble\pxcz@parse@opt@a
-\def\pxcz@parse@opt@a{%
+\pxcz@onlypreamble@def\pxcz@parse@opt@a{%
\futurelet\pxcz@tok\pxcz@parse@opt@b}
-\@onlypreamble\pxcz@parse@opt@b
-\def\pxcz@parse@opt@b{%
+\pxcz@onlypreamble@def\pxcz@parse@opt@b{%
\pxcz@okfalse
\let\pxcz@tmpa\remove@to@nnil
\ifx+\pxcz@tok
@@ -268,13 +263,24 @@
\else\ifx*\pxcz@tok
\pxcz@file@preset@tlfalse \let\pxcz@tmpa\pxcz@parse@opt@c
\fi\fi \pxcz@tmpa}
-\@onlypreamble\pxcz@parse@opt@c
-\def\pxcz@parse@opt@c#1#2\@nnil{%
+\pxcz@onlypreamble@def\pxcz@parse@opt@c#1#2\@nnil{%
\pxcz@oktrue
\edef\pxcz@file@preset{#2}}
% dispatch
\ProcessOptions*
+%% 'unicode*' and 'unicode*-fwid' are DEPRECATED
+\ifpxcz@uniquify
+ \PackageWarningNoLine\pxcz@pkgname
+ {IMPORTANT: Option 'unicode*\ifpxcz@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 near future.\MessageBreak
+ You should update to TL2018 or later and use\MessageBreak
+ option 'unicode\ifpxcz@fullwidth -fwid\fi' instead}
+\fi
+
%% 'everypage' needs 'atbegshi' package
\ifpxcz@everypage
\RequirePackage{atbegshi}
@@ -304,10 +310,11 @@
\else \pxcz@alphafalse
\fi\fi\fi\fi
\ifpxcz@alpha
- \IfFileExists{pxchfon0.def}{\relax}{%
- \pxcz@error{Option 'alphabet' not available in Lite edition}%
- {You must install full edition of PXchfon bundle, or specify
- 'noalphabet'\MessageBreak as package option.}%
+ \IfFileExists{pxchfon0.def}{}{%else
+ \PackageError\pxcz@pkgname
+ {Option 'alphabet' not available in Lite edition}%
+ {You must install full edition of PXchfon bundle, or specify
+ 'noalphabet'\MessageBreak as package option.}%
\pxcz@alphafalse}
\fi
@@ -316,9 +323,10 @@
\else \pxcz@relfalse
\fi
\ifpxcz@rel
- \IfFileExists{pxchfon0.def}{\relax}{%
- \pxcz@error{Option 'relfont' not available in Lite edition}%
- {You must install full edition of PXchfon bundle.}%
+ \IfFileExists{pxchfon0.def}{}{%else
+ \PackageError\pxcz@pkgname
+ {Option 'relfont' not available in Lite edition}%
+ {You must install full edition of PXchfon bundle.}%
\pxcz@relfalse}
\fi
@@ -359,11 +367,11 @@
%% variables
\newif\ifpxcz@warn@unless@all@defined
+\newif\ifpxcz@warn@unless@all@embedded
%% \pxcz@apply@opt@unicode
% Forces the 'unicode' setup (unless a directunicode option was given).
-\@onlypreamble\pxcz@apply@opt@unicode
-\def\pxcz@apply@opt@unicode{%
+\pxcz@onlypreamble@def\pxcz@apply@opt@unicode{%
\ifpxcz@directunicode@default % default -> unicode
\pxcz@warn@unicode
\let\pxcz@directunicode\pxcz@directunicode@full
@@ -377,8 +385,7 @@
%% \pxcz@apply@opt@unicodeP
% Forces the 'unicode+' setup, which is a 'unicode' with switch-font
% enabled on the width features.
-\@onlypreamble\pxcz@apply@opt@unicodeP
-\def\pxcz@apply@opt@unicodeP{%
+\pxcz@onlypreamble@def\pxcz@apply@opt@unicodeP{%
\pxcz@uniquifyfalse
\pxcz@switch@font@xwidtrue % 'unicode+'
\ifnum\pxcz@directunicode=\pxcz@directunicode@full\else
@@ -386,10 +393,9 @@
\let\pxcz@directunicode\pxcz@directunicode@full
\fi}
%% \pxcz@warn@unicode
-\@onlypreamble\pxcz@warn@unicode
-\def\pxcz@warn@unicode{%
+\pxcz@onlypreamble@def\pxcz@warn@unicode{%
\PackageWarningNoLine\pxcz@pkgname
- {The option 'unicode(*)' is enforced, because the\MessageBreak
+ {The option 'unicode' is enforced, because the\MessageBreak
preset '\pxcz@main@preset' is selected.}}
%% the setup
@@ -412,6 +418,10 @@
\pxcz@do{noto+}{\pxcz@apply@opt@unicodeP}
\pxcz@do{noto-otc+}{\pxcz@apply@opt@unicodeP}
\pxcz@do{yu-win10+}{\pxcz@apply@opt@unicodeP}
+% No-embed is not supported under the 'unicode' setup
+\ifnum\pxcz@directunicode=\pxcz@directunicode@full
+ \pxcz@warn@unless@all@embeddedtrue
+\fi
%% apply default for \pxcz@legacycode
\ifx\pxcz@legacycode\relax
@@ -507,11 +517,9 @@
\newcommand*\setschinesegothicfont{\pxcz@setfont{scg}}
\newcommand*\settchineseminchofont{\pxcz@setfont{tcm}}
\newcommand*\settchinesegothicfont{\pxcz@setfont{tcg}}
-\@onlypreamble\pxcz@setfont
-\def\pxcz@setfont#1{\@ifnextchar[%]
+\pxcz@onlypreamble@def\pxcz@setfont#1{\@ifnextchar[%]
{\pxcz@setfont@a{#1}}{\pxcz@setfont@a{#1}[0]}}
-\@onlypreamble\pxcz@setfont@a
-\def\pxcz@setfont@a#1[#2]#3{%
+\pxcz@onlypreamble@def\pxcz@setfont@a#1[#2]#3{%
\edef\pxcz@tmpa{#3}\pxcz@lower\pxcz@tmpa
\pxcz@split{?:}{?\pxcz@tmpa}%
\ifx\pxcz@pre\relax
@@ -521,8 +529,7 @@
\fi
\else \pxcz@setfont@b{#1}{#3}%
\fi}
-\@onlypreamble\pxcz@setfont@b
-\def\pxcz@setfont@b#1#2{%
+\pxcz@onlypreamble@def\pxcz@setfont@b#1#2{%
\@for\pxcz@tmpx:=#1\do{%
\@namedef{pxcz@FS/\pxcz@tmpx}{#2}}}
\@for\pxcz@x:=\pxcz@sym@list\do{%
@@ -539,12 +546,18 @@
}{}%
}
\def\pxcz@asutf@a#1{%
+ \pxcz@warn@depre@asutf
\kchardef\pxcz@tmpa=`#1\relax
\expandafter\pxcz@asutf@b\meaning\pxcz@tmpa\relax
}
\def\pxcz@asutf@b#1"#2\relax{%
\UTF{#2}%
}
+\def\pxcz@warn@depre@asutf{%
+ \PackageWarningNoLine\pxcz@pkgname
+ {Important: Command '\string\asUTF' is DEPRECATED}%
+ \global\let\pxcz@warn@depre@asutf\relax
+}
\fi
%--------------------------------------- fontmap internals
@@ -566,11 +579,9 @@
%%<*> \usecmapforalphabet/\nousecmapforalphabet
\newcommand*\usecmapforalphabet{%
- \global\let\pxcz@cmap@uni\pxcz@cmap@hwuni}
+ \global\pxcz@cmap@alphatrue}
\newcommand*\nousecmapforalphabet{%
- \global\let\pxcz@cmap@uni\pxcz@cmap@directuni}
-\ifpxcz@cmap@alpha \usecmapforalphabet
-\else \nousecmapforalphabet \fi
+ \global\pxcz@cmap@alphafalse}
%% \pxcz@NEF/<sym>
\def\pxcz@do#1#2{%
@@ -643,18 +654,17 @@
\let\pxcz@lopts\relax
\let\pxcz@mopts\relax
\let\pxcz@font@tribe\relax
+\newif\ifpxcz@noembed@used
%% \pxcz@@jpXX
\edef\pxcz@@jpXX{%
\ifpxcz@mmivjis jp04\else jp90\fi}
%% \pxcz@add@lopt
-\@onlypreamble\pxcz@add@lopt
-\def\pxcz@add@lopt#1{%
+\pxcz@onlypreamble@def\pxcz@add@lopt#1{%
\edef\pxcz@lopts{%
\ifx\pxcz@lopts\@empty\else \pxcz@lopts:\fi#1}}
%% \pxcz@uniquify@lopts
-\@onlypreamble\pxcz@uniquify@lopts
-\def\pxcz@uniquify@lopts#1#2{%
+\pxcz@onlypreamble@def\pxcz@uniquify@lopts#1#2{%
\pxcz@oktrue
\def\pxcz@tmpb{jp90}\ifx\pxcz@tmpb\pxcz@lopts\pxcz@okfalse\fi
\def\pxcz@tmpb{jp04}\ifx\pxcz@tmpb\pxcz@lopts\pxcz@okfalse\fi
@@ -664,17 +674,14 @@
\fi}
%% \pxcz@is@jis@cmap
-\@onlypreamble\pxcz@is@jis@cmap
-\def\pxcz@is@jis@cmap{%
+\pxcz@onlypreamble@def\pxcz@is@jis@cmap{%
\pxcz@okfalse
\expandafter\pxcz@is@jis@cmap@a\pxcz@cmap\pxcz@end}
-\@onlypreamble\pxcz@is@jis@cmap@a
-\def\pxcz@is@jis@cmap@a#1#2\pxcz@end{%
+\pxcz@onlypreamble@def\pxcz@is@jis@cmap@a#1#2\pxcz@end{%
\ifx\pxcz@mt#2\pxcz@mt \pxcz@oktrue \fi}
%% \pxcz@force@mmiv@cmap
-\@onlypreamble\pxcz@force@mmiv@cmap
-\def\pxcz@force@mmiv@cmap{%
+\pxcz@onlypreamble@def\pxcz@force@mmiv@cmap{%
\pxcz@is@jis@cmap \ifpxcz@ok
\edef\pxcz@cmap{\pxcz@pfx@jis\pxcz@cmap}%
\else
@@ -685,8 +692,7 @@
\fi}
%% \pxcz@inspect@font@tribe
-\@onlypreamble\pxcz@inspect@font@tribe
-\def\pxcz@inspect@font@tribe{%
+\pxcz@onlypreamble@def\pxcz@inspect@font@tribe{%
\let\pxcz@font@tribe\@empty
\ifx\pxcz@font\@empty
\else\ifx\pxcz@font\pxcz@noembed
@@ -711,8 +717,7 @@
{Font tribe is '\pxcz@font@tribe':\MessageBreak
\@spaces\pxcz@font\@gobble}%
\fi}
-\@onlypreamble\pxcz@inspect@font@tribe@a
-\def\pxcz@inspect@font@tribe@a#1#2#3{%
+\pxcz@onlypreamble@def\pxcz@inspect@font@tribe@a#1#2#3{%
\pxcz@split{#1}{?\pxcz@font}%
\ifx\pxcz@pre\relax\else
\pxcz@split{#2}{\pxcz@font?}%
@@ -723,8 +728,7 @@
%% \pxcz@switch@font@for{<feature>}
% Modifies \pxcz@font, assuming \pxcz@font@tribe is properly set.
-\@onlypreamble\pxcz@switch@font@for
-\def\pxcz@switch@font@for#1{%
+\pxcz@onlypreamble@def\pxcz@switch@font@for#1{%
\pxcz@csletcs{pxcz@tmpb}{pxcz@switch@font@@\pxcz@font@tribe @#1}%
\ifx\pxcz@tmpb\relax\else
%\typeout{#1:\pxcz@font-->\expandafter\pxcz@tmpb\pxcz@font}%
@@ -772,8 +776,7 @@
\fi
%% \pxcz@declare@entry@modifier{<name>}
-\@onlypreamble\pxcz@declare@entry@modifier
-\def\pxcz@declare@entry@modifier#1{%
+\pxcz@onlypreamble@def\pxcz@declare@entry@modifier#1{%
\pxcz@onlypreamble@csdef{pxcz@MEM/#1}}
%% entry modifiers
@@ -808,14 +811,16 @@
\pxcz@add@lopt{jp90}}
% HWid
\pxcz@declare@entry@modifier{HWid}{%
- \ifx\pxcz@font\pxcz@noembed
- \let\pxcz@cmap\pxcz@cmap@hwuni
- \else\ifnum\pxcz@directunicode=\pxcz@directunicode@full
+ \ifx\pxcz@font\pxcz@noembed \pxcz@okfalse
+ \else\ifnum\pxcz@directunicode=\pxcz@directunicode@full \pxcz@oktrue
+ \else\ifpxcz@cmap@alpha \pxcz@okfalse
+ \else \pxcz@oktrue
+ \fi\fi\fi
+ \ifpxcz@ok
\let\pxcz@cmap\pxcz@cmap@directuni
- \else
- \let\pxcz@cmap\pxcz@cmap@uni
\pxcz@switch@font@for{hwid}%
- \fi\fi
+ \else \let\pxcz@cmap\pxcz@cmap@hwuni
+ \fi
\pxcz@add@lopt{hwid}}
% FWid
\pxcz@declare@entry@modifier{FWid}{%
@@ -865,15 +870,13 @@
\let\pxcz@spec\@empty
%% \pxcz@addtospec{<id>}
-\@onlypreamble\pxcz@addtospec
-\def\pxcz@addtospec#1{%
+\pxcz@onlypreamble@def\pxcz@addtospec#1{%
\begingroup
\let\Entry\pxcz@Entry
\@nameuse{pxcz@ME/#1}%
\endgroup}
%% \Entry{<sym>}{<tfm>}{<cmap>}{<modify>,...}
-\@onlypreamble\pxcz@Entry
-\def\pxcz@Entry#1#2#3#4{%
+\pxcz@onlypreamble@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@retainfalse \pxcz@retain@csifalse \pxcz@vertfalse
@@ -887,6 +890,8 @@
% resolve no-embed font spec
\ifx\pxcz@font\pxcz@noembed
\edef\pxcz@font{!\@nameuse{pxcz@NEF/\pxcz@sym}}%
+ \pxcz@retaintrue
+ \global\pxcz@noembed@usedtrue
\fi
% apply layout options when using 'unicode'
\ifnum\pxcz@directunicode<\pxcz@directunicode@full\else
@@ -927,8 +932,7 @@
\fi\fi}
%% \pxcz@do@file@preset
-\@onlypreamble\pxcz@do@file@preset
-\def\pxcz@do@file@preset{%
+\pxcz@onlypreamble@def\pxcz@do@file@preset{%
\ifpxcz@file@preset@tl
\pxcz@do@file@preset@a{ptex-}%
\ifpxcz@uptex \pxcz@do@file@preset@a{uptex-}\fi
@@ -939,8 +943,7 @@
\else
\pxcz@do@file@preset@a{}%
\fi}
-\@onlypreamble\pxcz@do@file@preset@a
-\def\pxcz@do@file@preset@a#1{%
+\pxcz@onlypreamble@def\pxcz@do@file@preset@a#1{%
\pxcz@addtospec@alt\pxcz@mapfile{#1\pxcz@file@preset.map}}
%% \pxcz@addtospec@alt
@@ -952,8 +955,7 @@
%--------------------------------------- map entry definitions
%% \pxcz@mapentry{<id>}{<text>}
-\@onlypreamble\pxcz@mapentry
-\def\pxcz@mapentry#1{%
+\pxcz@onlypreamble@def\pxcz@mapentry#1{%
\pxcz@onlypreamble@csdef{pxcz@ME/#1}}
%% map entries
@@ -1250,14 +1252,12 @@
\fi
%% \pxcz@du@decl@shape{<fam>}{<ser>}<sw>{<tfmname>}{<suffix>}
-\@onlypreamble\pxcz@du@decl@shape
-\def\pxcz@du@decl@shape#1#2#3#4#5{%
+\pxcz@onlypreamble@def\pxcz@du@decl@shape#1#2#3#4#5{%
\DeclareFontShape{JY2}{#1}{#2}{diruni}{<->%
\pxcz@du@shape@spec{#3}{#4}{#5}{h}}{}%
\DeclareFontShape{JT2}{#1}{#2}{diruni}{<->%
\pxcz@du@shape@spec{#3}{#4}{#5}{v}}{}}
-\@onlypreamble\pxcz@du@shape@spec
-\def\pxcz@du@shape@spec#1#2#3#4{%
+\pxcz@onlypreamble@def\pxcz@du@shape@spec#1#2#3#4{%
\if#1t%
s*[\pxcz@du@scale]#2\if t\pxcz@otf@mmivjis#3\fi-#4%
\else#2\fi}
@@ -1303,8 +1303,7 @@
\edef\pxcz@tmpb{{\f@encoding}{\pxcz@tmpa}{\pxcz@tmpb}}%
\expandafter\pxcz@do\pxcz@tmpb}}%
}
-\@onlypreamble\pxcz@force@load@font@fam
-\def\pxcz@force@load@font@fam#1{%
+\pxcz@onlypreamble@def\pxcz@force@load@font@fam#1{%
\begingroup
\edef\f@family{#1}\def\f@series{m}\def\f@shape{n}%
\xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}%
@@ -1323,14 +1322,12 @@
\endgroup}
%% \pxcz@dg@decl@shape{<fam>}{<ser>}<sw>{<tfmname>}
-\@onlypreamble\pxcz@dg@decl@shape
-\def\pxcz@dg@decl@shape#1#2#3#4{%
+\pxcz@onlypreamble@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{%
+\pxcz@onlypreamble@def\pxcz@dg@shape@spec#1#2#3{%
\if#1t%
s*[\pxcz@du@scale]#2-#3%
\else#2\fi}
@@ -1373,7 +1370,8 @@
You must use upLaTeX and load pxchfon after 'otf' package.}
\fi
\def\pxcz@err@diruni{%
- \pxcz@error{Command '\string\diruni' not available}%
+ \PackageError\pxcz@pkgname
+ {Command '\string\diruni' not available}%
{\pxcz@errhelp@diruni\MessageBreak\@ehc}%
\global\let\pxcz@err@diruni\relax}
\AtBeginDocument{%
@@ -1386,22 +1384,29 @@
%--------------------------------------- 'alphabet' option
+%% check for textcomp
+\newif\ifpxcz@textcomp
+\@ifpackageloaded{textcomp}{\pxcz@textcomptrue}{}
+
%% \pxcz@afont@enc@list
\def\pxcz@afont@enc@list{OT1,T1}
+\ifpxcz@textcomp \g@addto@macro\pxcz@afont@enc@list{,TS1}\fi
%% \pxcz@decl@family{<fam>}
-\@onlypreamble\pxcz@decl@family
-\def\pxcz@decl@family#1{%
+\pxcz@onlypreamble@def\pxcz@decl@family#1{%
+ \ifpxcz@textcomp \DeclareEncodingSubset{TS1}{#1}{3}\fi
\@for\pxcz@x:=\pxcz@afont@enc@list\do{%
\DeclareFontFamily{\pxcz@x}{#1}{}}}
%% \pxcz@decl@shape{<fam>}{<ser>}<sw>{<font>}
-\@onlypreamble\pxcz@decl@shape
-\def\pxcz@decl@shape#1#2#3#4{%
+\pxcz@onlypreamble@def\pxcz@decl@shape#1#2#3#4{%
\if s#3%
\@for\pxcz@x:=\pxcz@afont@enc@list\do{%
\DeclareFontShape{\pxcz@x}{#1}{#2}{n}{<->ssub*#4}{}}%
\else
- \DeclareFontShape{OT1}{#1}{#2}{n}{<->#4-l0j}{}%
- \DeclareFontShape {T1}{#1}{#2}{n}{<->#4-l0j}{}% FIXME
+ \DeclareFontShape{OT1}{#1}{#2}{n}{<->#4-l5j}{}%
+ \DeclareFontShape {T1}{#1}{#2}{n}{<->#4-t1}{}%
+ \ifpxcz@textcomp
+ \DeclareFontShape{TS1}{#1}{#2}{n}{<->#4-ts1}{}%
+ \fi
\fi
\@for\pxcz@x:=\pxcz@afont@enc@list\do{%
\DeclareFontShape{\pxcz@x}{#1}{#2}{it}{<->ssub*#1/#2/n}{}%
@@ -1435,11 +1440,11 @@
\pxcz@decl@family{cfjas}%
\pxcz@decl@shape{cfjas}{m}n{cfjas-r}%
\pxcz@decl@shape{cfjas}{bx}s{cfjas/m/n}%
-\@onlypreamble\pxcz@err@dxotf
-\def\pxcz@err@dxotf#1{%
- \pxcz@error{Loaded before '#1' with 'deluxe'}%
- {This package must be loaded after '#1' with 'deluxe' option
- when using both.}}
+\pxcz@onlypreamble@def\pxcz@err@dxotf#1{%
+ \PackageError\pxcz@pkgname
+ {Loaded before '#1' with 'deluxe'}%
+ {This package must be loaded after '#1' with 'deluxe' option
+ when using both.}}
\g@addto@macro\pxcz@check@extra{%
\expandafter\let\expandafter\pxcz@x\csname pxcz@FS/mnr\endcsname
\ifx\pxcz@x\@empty\else
@@ -1463,55 +1468,45 @@
\def\pxcz@mgfamily@hook{\romanfamily{cfjam}}
%% \pxcz@set@page@hook{<text>}
-\@onlypreamble\pxcz@set@page@hook
\ifpxcz@everypage
-\def\pxcz@set@page@hook#1{%
+\pxcz@onlypreamble@def\pxcz@set@page@hook#1{%
\AtBeginShipout{\setbox\AtBeginShipoutBox=\vbox{%
\baselineskip\z@skip\lineskip\z@skip\lineskiplimit\z@
#1\copy\AtBeginShipoutBox}}}
\else
-\def\pxcz@set@page@hook#1{%
+\pxcz@onlypreamble@def\pxcz@set@page@hook#1{%
% this is \AtBeginDvi with forcing of yoko-dir added
\global\setbox\@begindvibox\vbox{\yoko\unvbox\@begindvibox#1}}
\fi
%% \pxcz@check@alldefined{<sym>,...}
-\@onlypreamble\pxcz@check@alldefined
-\def\pxcz@check@alldefined#1{%
+\pxcz@onlypreamble@def\pxcz@check@alldefined#1{%
\pxcz@oktrue
\@for\pxcz@x:={#1}\do{%
\expandafter\ifx\csname pxcz@FS/\pxcz@x\endcsname\@empty
\pxcz@okfalse \fi}}
%% \pxcz@decl@relfont{<fam>}{<afam>}{<ser>,...}
-\@onlypreamble\pxcz@decl@relfont
-\def\pxcz@decl@relfont#1#2#3{%
+\pxcz@onlypreamble@def\pxcz@decl@relfont#1#2#3{%
\@for\pxcz@x:={#3}\do{%
\expandafter\ifx\csname\k@encoding/#1/\pxcz@x/n\endcsname\relax\else
\edef\pxcz@tmpa{\noexpand\DeclareRelationFont
{\k@encoding}{#1}{\pxcz@x}{}{\pxcz@afont@enc}{#2}{\pxcz@x}{}%
}\pxcz@tmpa
\fi}%
- \pxcz@info{Relation font set for \k@encoding/#1}}
+ \PackageInfo\pxcz@pkgname
+ {Relation font set for \k@encoding/#1}}
%% \pxcz@check@afont@enc
-\@onlypreamble\pxcz@check@afont@enc
-\def\pxcz@check@afont@enc{%
+\pxcz@onlypreamble@def\pxcz@check@afont@enc{%
\pxcz@oktrue % OT1 is always okay
- \def\pxcz@tmpa{OT1}\ifx\pxcz@tmpa\pxcz@afont@enc\else
- % otherwise, noembed must not be used
- \@for\pxcz@x:=\pxcz@sym@list\do{%
- \expandafter\ifx\csname pxcz@FS/\pxcz@x\endcsname\pxcz@noembed
- \pxcz@okfalse \fi}%
- \expandafter\ifx\csname\pxcz@afont@enc+cfjar\endcsname\relax
- \pxcz@okfalse \fi
- \fi
+ \expandafter\ifx\csname\pxcz@afont@enc+cfjar\endcsname\relax
+ \pxcz@okfalse \fi
% if not okay, use OT1 instead
\ifpxcz@ok\else \def\pxcz@afont@enc{OT1}\fi}
%% the begin-document hook
-\@onlypreamble\pxcz@doc@hook
-\def\pxcz@doc@hook{%
+\pxcz@onlypreamble@def\pxcz@doc@hook{%
\pxcz@user@hook
\ifx\pxcz@file@preset\relax\else
\pxcz@do@file@preset
@@ -1536,7 +1531,8 @@
% decide alphabet font encoding
\edef\pxcz@afont@enc{\encodingdefault}%
\pxcz@check@afont@enc\ifpxcz@ok\else
- \pxcz@warn{Default encoding is changed to 'OT1' because%
+ \PackageWarningNoLine\pxcz@pkgname
+ {Default encoding is changed to 'OT1' because%
\MessageBreak'alphabet' option is in effect}%
\renewcommand\encodingdefault{OT1}%
\fi
@@ -1593,10 +1589,17 @@
\ifpxcz@ok\else
\PackageWarningNoLine\pxcz@pkgname
{Some font weights are not substituted.\MessageBreak
- Thus some features of pxchfon might not work\MessageBreak
+ So some features of pxchfon might not work\MessageBreak
properly when applied to such weights}%
\fi
\fi
+ % warn if some weights are not embedded, and if necessaty
+ \ifpxcz@warn@unless@all@embedded \ifpxcz@noembed@used
+ \PackageWarningNoLine\pxcz@pkgname
+ {Some font weights have no-embed setting.\MessageBreak
+ So some features of pxchfon might not work\MessageBreak
+ properly when applied to such weights}%
+ \fi\fi
%
\pxcz@check@extra
\pxcz@addtospec{USR}%
@@ -1636,8 +1639,7 @@
%% \pxcz@insf@read@word{<offset>}
% Reads a 32-bit integer from \pxcz@insf@file at the given offset,
% and sets the value (or -1 on error) to \pxcz@cntr.
-\@onlypreamble\pxcz@insf@read@word
-\def\pxcz@insf@read@word#1{%
+\pxcz@onlypreamble@def\pxcz@insf@read@word#1{%
\pxcz@cntr=#1\relax
\edef\pxcz@tmpa{\pdffiledump offset\pxcz@cntr length1{\pxcz@insf@file}}%
\ifnum"0\pxcz@tmpa<"80
@@ -1652,8 +1654,7 @@
%% \pxcz@inspect@flavor{<path>}{<index>}
% Sets the result to \pxcz@cntr.
% 1=CFF, 0=TTF, <0 if error.
-\@onlypreamble\pxcz@inspect@flavor
-\def\pxcz@inspect@flavor#1#2{%
+\pxcz@onlypreamble@def\pxcz@inspect@flavor#1#2{%
\edef\pxcz@insf@file{#1}%
\mathchardef\pxcz@insf@idx=#2\relax
\pxcz@insf@read@word{0}% outer tag
@@ -1684,14 +1685,12 @@
%% \pxcz@kpse@dir@cache
% to spped up \pxcz@kpsewhich
-\@onlypreamble\pxcz@kpse@dir@cache
-\let\pxcz@kpse@dir@cache\@empty
+\pxcz@onlypreamable@let\pxcz@kpse@dir@cache\@empty
%% \pxcz@kpsewhich{<filename>}
% Sets to \pxcz@kpse@dir the directory where the file is found
% (or \relax if not found).
-\@onlypreamble\pxcz@kpsewhich
-\def\pxcz@kpsewhich#1{%
+\pxcz@onlypreamble@def\pxcz@kpsewhich#1{%
\edef\pxcz@tmpa{#1}\let\pxcz@kpse@dir\relax
\let\do\pxcz@kpsewhich@do \pxcz@kpse@dir@cache\relax
\ifx\pxcz@kpse@dir\relax
@@ -1708,15 +1707,13 @@
\fi
\endlinechar\pxcz@tmpz
\fi}
-\@onlypreamble\pxcz@kpsewhich@a
-\def\pxcz@kpsewhich@a#1/#2\pxcz@end{%
+\pxcz@onlypreamble@def\pxcz@kpsewhich@a#1/#2\pxcz@end{%
\ifx\pxcz@end#2\pxcz@end \expandafter\@gobble
\else \expandafter\@firstofone
\fi{%
\edef\pxcz@kpse@dir{\pxcz@kpse@dir#1/}%
\pxcz@kpsewhich@a#2\pxcz@end}}
-\@onlypreamble\pxcz@kpsewhich@do
-\def\pxcz@kpsewhich@do#1{%
+\pxcz@onlypreamble@def\pxcz@kpsewhich@do#1{%
\ifnum0\pdffilesize{#1\pxcz@tmpa}>\z@
\def\pxcz@kpse@dir{#1}%
\expandafter\pxcz@kpsewhich@do@a
@@ -1725,25 +1722,21 @@
%% \pxcz@inspect@flavor@all
% Sets \[pxcz@OT/<sym>].
-\@onlypreamble\pxcz@inspect@flavor@all
-\def\pxcz@inspect@flavor@all{%
+\pxcz@onlypreamble@def\pxcz@inspect@flavor@all{%
\@for\pxcz@tmpa:=\pxcz@sym@list\do{%
\edef\pxcz@tmpa{{\pxcz@tmpa}{\@nameuse{pxcz@FS/\pxcz@tmpa}}}%
\expandafter\pxcz@inspect@flavor@all@a\pxcz@tmpa}}
-\@onlypreamble\pxcz@inspect@flavor@all@a
-\def\pxcz@inspect@flavor@all@a#1#2{%
+\pxcz@onlypreamble@def\pxcz@inspect@flavor@all@a#1#2{%
\def\pxcz@tmpa{#2}%
\ifx\pxcz@tmpa\@empty
\else\ifx\pxcz@tmpa\pxcz@noembed
\@namedef{pxcz@OT/#1}{t}%
\else \pxcz@inspect@flavor@all@b#2\pxcz@end{#1}%
\fi\fi}
-\@onlypreamble\pxcz@inspect@flavor@all@b
-\def\pxcz@inspect@flavor@all@b#1#2\pxcz@end{%
+\pxcz@onlypreamble@def\pxcz@inspect@flavor@all@b#1#2\pxcz@end{%
\edef\pxcz@tmpa{\ifx:#1\else:0:\fi#1#2}%
\expandafter\pxcz@inspect@flavor@all@c\pxcz@tmpa\pxcz@end}
-\@onlypreamble\pxcz@inspect@flavor@all@c
-\def\pxcz@inspect@flavor@all@c:#1:#2\pxcz@end#3{%
+\pxcz@onlypreamble@def\pxcz@inspect@flavor@all@c:#1:#2\pxcz@end#3{%
\pxcz@kpsewhich{#2}%
\unless\ifx\pxcz@kpse@dir\relax
\pxcz@inspect@flavor{\pxcz@kpse@dir#2}{#1}%
@@ -1769,11 +1762,9 @@
\edef\pxcz@dump@text{\pxcz@dump@text#1}}
%% \pxcz@dump@special{<string>}
-\@onlypreamble\pxcz@dump@special
-\def\pxcz@dump@special#1{%
+\pxcz@onlypreamble@def\pxcz@dump@special#1{%
\pxcz@dump@special@a#1\bxcz@end}
-\@onlypreamble\pxcz@dump@special@a
-\def\pxcz@dump@special@a#1 #2\bxcz@end{%
+\pxcz@onlypreamble@def\pxcz@dump@special@a#1 #2\bxcz@end{%
\@nameuse{pxcz@dump@special@#1}\@gobble{#2}}
\@namedef{pxcz@dump@special@pdf:mapline}#1#2{%
\pxcz@add@to@dump@text{\pxcz@rmin#2^^J}}
@@ -1783,8 +1774,7 @@
\ifx-#1\@percentchar\else#1\fi}
%% \pxcz@dump@spec@to{<file-name>}
-\@onlypreamble\pxcz@dump@spec@to
-\def\pxcz@dump@spec@to#1{%
+\pxcz@onlypreamble@def\pxcz@dump@spec@to#1{%
\def\pxcz@dump@text{\@percentchar\space#1^^J}%
\let\special\pxcz@dump@special
\pxcz@spec \let\special\relax
@@ -1794,15 +1784,13 @@
\immediate\closeout\pxcz@fout}
%% \pxcz@do@dumpmap
-\@onlypreamble\pxcz@do@dumpmap
-\def\pxcz@do@dumpmap{%
+\pxcz@onlypreamble@def\pxcz@do@dumpmap{%
\begingroup
\pxcz@dump@spec@to{\jobname.map}%
\endgroup}
%% \pxcz@do@dumpmap@tl
-\@onlypreamble\pxcz@do@dumpmap@tl
-\def\pxcz@do@dumpmap@tl{%
+\pxcz@onlypreamble@def\pxcz@do@dumpmap@tl{%
\begingroup
\let\pxcz@spec@save\pxcz@spec
\pxcz@do@dumpmap@tl@a{STD}{ptex-\jobname}%
@@ -1811,8 +1799,7 @@
\pxcz@do@dumpmap@tl@a{UPOTF}{otf-up-\jobname}%
\global\let\pxcz@spec\pxcz@spec@save
\endgroup}
-\@onlypreamble\pxcz@do@dumpmap@tl@a
-\def\pxcz@do@dumpmap@tl@a#1#2{%
+\pxcz@onlypreamble@def\pxcz@do@dumpmap@tl@a#1#2{%
\global\let\pxcz@spec\@empty
\pxcz@addtospec{#1}%
\pxcz@dump@spec@to{#2.map}}
@@ -1821,16 +1808,13 @@
%--------------------------------------- preset japanese font mappings
%% \pxcz@declare@preset{<name>}{<text>}
-\@onlypreamble\pxcz@declare@preset
-\def\pxcz@declare@preset#1{%
+\pxcz@onlypreamble@def\pxcz@declare@preset#1{%
\pxcz@onlypreamble@csdef{pxcz@the@preset@#1}}
%% \pxcz@declare@preset@alias{<name1>}{<name2>}
-\@onlypreamble\pxcz@declare@preset@alias
-\def\pxcz@declare@preset@alias#1#2{%
- \expandafter\pxcz@decl@preset@alias@a\csname pxcz@the@preset@#1%
+\pxcz@onlypreamble@def\pxcz@declare@preset@alias#1#2{%
+ \expandafter\pxcz@onlypreamble@let\csname pxcz@the@preset@#1%
\expandafter\endcsname\csname pxcz@the@preset@#2\endcsname}
-\def\pxcz@decl@preset@alias@a#1#2{\@onlypreamble#1\let#1#2}
%% \pxcz@abolished@preset
\pxcz@onlypreamble@def\pxcz@abolished@preset{%
@@ -1841,14 +1825,12 @@
\pxcz@onlypreamble@csdef{pxcz@the@preset@\pxcz@x}{\pxcz@abolished@preset}}
%% \pxcz@uniweight{<font-mn>}{<font-gt>}
-\@onlypreamble\pxcz@uniweight
-\def\pxcz@uniweight#1#2{%
+\pxcz@onlypreamble@def\pxcz@uniweight#1#2{%
\setminchofont{#1}\setgothicfont{#2}\setmarugothicfont{#2}}
%% \pxcz@multiweight{<font-mnl>}{<font-mnr>}{<font-mnb>}
%% {<font-gtr>}{<font-gtb>}{<font-gtx>}{<font-gtu>}{<font-mgr>}
-\@onlypreamble\pxcz@multiweight
-\def\pxcz@multiweight#1#2#3#4#5#6#7#8{%
+\pxcz@onlypreamble@def\pxcz@multiweight#1#2#3#4#5#6#7#8{%
\setminchofont{#2}\setgothicfont{#7}\setmarugothicfont{#8}%
\ifpxcz@oneweight\else
\setlightminchofont{#1}\setboldminchofont{#3}%