summaryrefslogtreecommitdiff
path: root/language/japanese/pxchfon
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-09 03:01:25 +0000
committerNorbert Preining <norbert@preining.info>2019-10-09 03:01:25 +0000
commit8d5625f5e48587e6ca4304739304ed11b17cb26c (patch)
treef2c8b0e5f20681e9a35e6c3d33d2ec6a81d05e22 /language/japanese/pxchfon
parente5ffc42ed260285f76383ae18dd0f4a603c07fa8 (diff)
CTAN sync 201910090301
Diffstat (limited to 'language/japanese/pxchfon')
-rw-r--r--language/japanese/pxchfon/README-ja.md2
-rw-r--r--language/japanese/pxchfon/README.md2
-rw-r--r--language/japanese/pxchfon/pxchfon.sty84
3 files changed, 74 insertions, 14 deletions
diff --git a/language/japanese/pxchfon/README-ja.md b/language/japanese/pxchfon/README-ja.md
index 7fec784750..338970f5b4 100644
--- a/language/japanese/pxchfon/README-ja.md
+++ b/language/japanese/pxchfon/README-ja.md
@@ -54,6 +54,8 @@ MITライセンスの下で配布される。
更新履歴
--------
+ * Version 1.6 ‹2019/10/07›
+ - プリセット `haranoaji` を追加。
* Version 1.5a ‹2019/07/10›
- バグ修正。
* Version 1.5 ‹2019/05/15›
diff --git a/language/japanese/pxchfon/README.md b/language/japanese/pxchfon/README.md
index 72450c9bd7..1327701937 100644
--- a/language/japanese/pxchfon/README.md
+++ b/language/japanese/pxchfon/README.md
@@ -39,6 +39,8 @@ This package is distributed under the MIT License.
Revision History
----------------
+ * Version 1.6 ‹2019/10/07›
+ - Preset `haranoaji`.
* Version 1.5a ‹2019/07/10›
- Bug fix.
* Version 1.5 ‹2019/05/15›
diff --git a/language/japanese/pxchfon/pxchfon.sty b/language/japanese/pxchfon/pxchfon.sty
index c667ab8b88..0ac4b38ebb 100644
--- a/language/japanese/pxchfon/pxchfon.sty
+++ b/language/japanese/pxchfon/pxchfon.sty
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxchfon}[2019/07/10 v1.5a]
+\ProvidesPackage{pxchfon}[2019/10/07 v1.6]
\def\pxcz@pkgname{pxchfon}
%--------------------------------------- general
@@ -113,6 +113,50 @@
\chardef\pxcz@pxufont@loaded=0
}
+%--------------------------------------- custom presets
+
+%% \pxcz@custom@presets
+\pxcz@onlypreamble@let\pxcz@custom@presets\@empty
+%% \pxcz@custom@apply@opt@unicode
+\pxcz@onlypreamble@let\pxcz@custom@apply@opt@unicode\@empty
+%% freeze
+\pxcz@onlypreamble@let\pxcz@custom\relax
+\let\pxcz@uniweight\relax
+\let\pxcz@multiweight\relax
+
+%% \pxcz@declare@oneweight@preset{<name>}{<m>}{<g>}
+\pxcz@onlypreamble@def\pxcz@declare@oneweight@preset#1#2#3{%
+ \xdef\pxcz@custom@presets{\pxcz@custom@presets
+ \pxcz@custom{#1}{\pxcz@uniweight{#2}{#3}}}}
+%% \pxcz@declare@multiweight@preset{<name>}{<1>}...{<8>}
+\pxcz@onlypreamble@def\pxcz@declare@multiweight@preset#1#2#3#4#5#6#7#8#9{%
+ \xdef\pxcz@custom@presets{\pxcz@custom@presets
+ \pxcz@custom{#1}{\pxcz@multiweight{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}}}
+%%<+> \pxchfonDeclareOneWeightPreset{<name>}{<m>}{<g>}
+\@onlypreamble\pxchfonDeclareOneWeightPreset
+\newcommand*\pxchfonDeclareOneWeightPreset[1]{%
+ \pxcz@declare@oneweight@preset{user:#1}}
+%%<+> \pxchfonDeclareMultiWeightPreset{<name>}{<1>}...{<8>}
+\@onlypreamble\pxchfonDeclareMultiWeightPreset
+\newcommand*\pxchfonDeclareMultiWeightPreset[1]{%
+ \pxcz@declare@multiweight@preset{user:#1}}
+
+%% Load custom preset definitions
+\IfFileExists{pxchfon-extras.def}{%
+ \PackageInfo\pxcz@pkgname
+ {Extra preset settings are loaded\@gobble}%
+ \input{pxchfon-extras.def}%
+}{}
+\IfFileExists{pxchfon.cfg}{%
+ \PackageInfo\pxcz@pkgname
+ {Custom preset settings are loaded\@gobble}%
+ \begingroup
+ \makeatother\input{pxchfon.cfg}%
+ \endgroup
+}{}
+\let\pxcz@declare@oneweight@preset\@undefined
+\let\pxcz@declare@multiweight@preset\@undefined
+
%--------------------------------------- handle options
%% variables
@@ -218,6 +262,7 @@
hiragino-elcapitan-pro,hiragino-elcapitan-pron,%
morisawa-pro,morisawa-pr6n,yu-win,yu-win10,yu-win10+,yu-osx,%
sourcehan-otc,sourcehan,sourcehan-jp,noto-otc,noto,noto-jp,%
+ haranoaji,%
sourcehan-otc+,sourcehan+,noto-otc+,noto+,%
%(alias)
hiragino,noto-otf,%
@@ -231,6 +276,8 @@
\expandafter\pxcz@do\expandafter{\pxcz@x}}
\@for\pxcz@x:=\pxcz@all@abolished@preset\do{%
\expandafter\pxcz@do\expandafter{\pxcz@x}}
+\def\pxcz@custom#1#2{\pxcz@do{#1}}
+\pxcz@custom@presets
% others
% The 'unicode' option means a Unicode-oriented mapping, and requires
% dvipdfmx of version 20170627 or later. The 'unicode-fwid' is a variant.
@@ -252,20 +299,17 @@
\pxcz@parse@opt\CurrentOption
\ifpxcz@ok\else \@unknownoptionerror \fi}}
\pxcz@onlypreamble@def\pxcz@parse@opt#1{%
- \expandafter\pxcz@parse@opt@a#1\@nnil}
-\pxcz@onlypreamble@def\pxcz@parse@opt@a{%
- \futurelet\pxcz@tok\pxcz@parse@opt@b}
-\pxcz@onlypreamble@def\pxcz@parse@opt@b{%
\pxcz@okfalse
- \let\pxcz@tmpa\remove@to@nnil
- \ifx+\pxcz@tok
- \pxcz@file@preset@tltrue \let\pxcz@tmpa\pxcz@parse@opt@c
- \else\ifx*\pxcz@tok
- \pxcz@file@preset@tlfalse \let\pxcz@tmpa\pxcz@parse@opt@c
- \fi\fi \pxcz@tmpa}
-\pxcz@onlypreamble@def\pxcz@parse@opt@c#1#2\@nnil{%
- \pxcz@oktrue
- \edef\pxcz@file@preset{#2}}
+ \pxcz@parse@opt@a{+}{#1}{\pxcz@file@preset@tltrue}%
+ \pxcz@parse@opt@a{*}{#1}{\pxcz@file@preset@tlfalse}%
+ \pxcz@parse@opt@a{tl:}{#1}{\pxcz@file@preset@tltrue}%
+ \pxcz@parse@opt@a{file:}{#1}{\pxcz@file@preset@tlfalse}}
+\pxcz@onlypreamble@def\pxcz@parse@opt@a#1#2#3{%
+ \ifpxcz@ok\else
+ \pxcz@split{#1}{#2}\ifx\pxcz@pre\@empty
+ #3\let\pxcz@file@preset\pxcz@post \pxcz@oktrue
+ \fi
+ \fi}
% dispatch
\ProcessOptions*
@@ -418,6 +462,7 @@
\pxcz@do{noto+}{\pxcz@apply@opt@unicodeP}
\pxcz@do{noto-otc+}{\pxcz@apply@opt@unicodeP}
\pxcz@do{yu-win10+}{\pxcz@apply@opt@unicodeP}
+\pxcz@custom@apply@opt@unicode
% No-embed is not supported under the 'unicode' setup
\ifnum\pxcz@directunicode=\pxcz@directunicode@full
\pxcz@warn@unless@all@embeddedtrue
@@ -1841,6 +1886,10 @@
\pxcz@onlypreamble@def\pxcz@use@preset#1{%
\csname pxcz@the@preset@#1\endcsname}
+%% Redefine \pxcz@custom
+\let\pxcz@custom\pxcz@declare@preset
+\pxcz@custom@presets
+
%% definitions of main preset mappings
\pxcz@declare@preset{noembed}{%
\pxcz@uniweight{*}{*}}
@@ -1975,6 +2024,13 @@
{NotoSansJP-Regular.otf}{NotoSansJP-Bold.otf}%
{NotoSansJP-Black.otf}{NotoSansJP-Medium.otf}%
{NotoSansJP-Medium.otf}}
+\pxcz@declare@preset{haranoaji}{%
+ \usecmapforalphabet
+ \pxcz@multiweight{HaranoAjiMincho-Light.otf}%
+ {HaranoAjiMincho-Regular.otf}{HaranoAjiMincho-Bold.otf}%
+ {HaranoAjiGothic-Regular.otf}{HaranoAjiGothic-Bold.otf}%
+ {HaranoAjiGothic-Heavy.otf}{HaranoAjiGothic-Medium.otf}%
+ {HaranoAjiGothic-Medium.otf}}
%(alias)
\pxcz@declare@preset@alias{hiragino}{hiragino-pro}
\pxcz@declare@preset@alias{noEmbed}{noembed}