texlive[47613] Master/texmf-dist: zxjafont (4may18)

commits+karl at tug.org commits+karl at tug.org
Sat May 5 00:10:36 CEST 2018


Revision: 47613
          http://tug.org/svn/texlive?view=revision&revision=47613
Author:   karl
Date:     2018-05-05 00:10:36 +0200 (Sat, 05 May 2018)
Log Message:
-----------
zxjafont (4may18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/zxjafont/LICENSE
    trunk/Master/texmf-dist/doc/latex/zxjafont/zxjafont.pdf
    trunk/Master/texmf-dist/doc/latex/zxjafont/zxjafont.tex
    trunk/Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja.md
    trunk/Master/texmf-dist/doc/latex/zxjafont/README.md

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/zxjafont/README
    trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja

Modified: trunk/Master/texmf-dist/doc/latex/zxjafont/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zxjafont/LICENSE	2018-05-04 22:03:45 UTC (rev 47612)
+++ trunk/Master/texmf-dist/doc/latex/zxjafont/LICENSE	2018-05-04 22:10:36 UTC (rev 47613)
@@ -1,12 +1,6 @@
-$BK\%=%U%H%&%'%"$O(B MIT $B%i%$%;%s%9$N2<$GG[I[$5$l$^$9!#(B
-$BCx:n8"$O:n<T$G$"$k!VH,EP(B $B?rG7!JJLL>(B ZR$B!K!W$KB0$7$^$9!#(B
-$B$^$?K\%=%U%H%&%'%"$OL5J]>Z$G$9!#(B
-
-This software is distributed under the MIT License.
-
 The MIT License
 
-Copyright (c) 2015 Takayuki YATO (aka. "ZR")
+Copyright (c) 2018 Takayuki YATO (aka. "ZR")
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Deleted: trunk/Master/texmf-dist/doc/latex/zxjafont/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zxjafont/README	2018-05-04 22:03:45 UTC (rev 47612)
+++ trunk/Master/texmf-dist/doc/latex/zxjafont/README	2018-05-04 22:10:36 UTC (rev 47613)
@@ -1,42 +0,0 @@
-ZXjafont Package
-================
-
-LaTeX: Set up Japanese font families for XeLaTeX
-
-Font selection using fontspec package is very flexible and powerful.
-But users who are used to pLaTeX often feel the setting bothersome,
-as there is no default working font setting (that involves Japanese
-fonts) and they always must give one. This package prepares some
-popular font settings as “presets” and allows users to use them
-simply by referring to their name.
-
-### SYSTEM REQUIREMENTS
-
-  - TeX format: XeLaTeX.
-  - Prerequisite packages: fontspec.
-
-### INSTALLATION
-
-Move the files as follows (in a system compliant to TDS 1.1):
-
-  - `*.sty`   → $TEXMF/tex/xelatex/zxjafont/
-
-And rehash your TEXMF trees if necessary.
-
-### LICENSE
-
-This package is distributed under the MIT License.
-
-Revision History
-----------------
-
-  * Version 0.3  [2015/05/08]
-      - Presets made more alike those of pxchfon.
-  * Version 0.2a [2013/01/28]
-      - Adjustment for new zxjatype.
-  * Version 0.2  [2009/12/22]
-      - First public version.
-
---------------------
-Takayuki YATO (aka. "ZR")  
-http://zrbabbler.sp.land.to/

Deleted: trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja	2018-05-04 22:03:45 UTC (rev 47612)
+++ trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja	2018-05-04 22:10:36 UTC (rev 47613)
@@ -1,52 +0,0 @@
-ZXjafont パッケージバンドル
-===========================
-
-LaTeX: 一般的な和文フォント設定のプリセット
-
-XeLaTeX + fontspec でのフォントファミリ名を直接指定する方式は「好きな
-フォントを指定する」という点では、 pLaTeX よりも格段に使い易いが、日本語
-を扱うためには必ず何らかの設定を行う必要があり、これが煩わしく感じられる
-場合もある。本パッケージでは、pLaTeX において一般的に行われている設定を
-予め用意しておいて、簡単に呼び出せるようにしている。
-
-### 前提環境
-
-  - TeX 処理系: XeLaTeX
-  - 前提パッケージ: fontspec
-
-### 本ソフトウェアの作者のサイト
-
-  - En toi Pythmeni tes TeXnopoleos ~電脳世界の奥底にて~  
-    <http://zrbabbler.sp.land.to/>
-
-  - 以下のページに一部機能の使用例を紹介した。  
-    「ZXjafont パッケージ」
-    <http://zrbabbler.sp.land.to/zxjafont.html>
-
-### インストール
-
-TDS 1.1 に従ったシステムでは、各ファイルを次の場所に移動する。
-
-  - `*.sty`   → $TEXMF/tex/xelatex/zxjafont/
-
-W32TeX を C:\usr\local にインストールした場合は次のようになる。
-
-  - `*.sty`   → C:\usr\local\share\texmf-local\tex\xelatex\zxjafont
-
-### ライセンス
-
-MIT ライセンス
-
-更新履歴
---------
-
-  * Version 0.3  [2015/05/08]
-      - プリセット設定を pxchfon のものに合わせた。
-  * Version 0.2a [2013/01/28]
-      - 新版の zxjatype への対応。
-  * Version 0.2  [2009/12/22]
-      - 最初の公開版。
-
---------------------
-Takayuki YATO (aka. "ZR")  
-http://zrbabbler.sp.land.to/

Added: trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja.md	2018-05-04 22:10:36 UTC (rev 47613)
@@ -0,0 +1,52 @@
+ZXjafont パッケージバンドル
+===========================
+
+LaTeX: 一般的な和文フォント設定のプリセット
+
+XeLaTeX + fontspec でのフォントファミリ名を直接指定する方式は「好きな
+フォントを指定する」という点では、 pLaTeX よりも格段に使い易いが、日本語
+を扱うためには必ず何らかの設定を行う必要があり、これが煩わしく感じられる
+場合もある。本パッケージでは、pLaTeX において一般的に行われている設定を
+予め用意しておいて、簡単に呼び出せるようにしている。
+
+### 前提環境
+
+  * フォーマット: LaTeX
+  * エンジン: XeTeX
+  * 依存パッケージ:
+      - fontspec
+
+### インストール
+
+TDS 1.1 に従ったシステムでは、各ファイルを次の場所に移動する。
+
+  - `*.sty`   → $TEXMF/tex/xelatex/zxjafont
+
+### ライセンス
+
+本パッケージは MIT ライセンスの下で配布される。
+
+
+zxjafont パッケージ ー 本体
+---------------------------
+
+詳細についてはマニュアル `zxjafont.pdf` を参照されたい。
+
+
+更新履歴
+--------
+
+  * Version 0.4  〈2018/05/04〉
+      - プリセット追加:`yu-win10`、`sourcehan(-jp)`、`noto(-jp)`、`ume`。
+      - オプション追加:`90jis`、`jis2004`。
+      - 非推奨のプリセットの使用を警告する。
+  * Version 0.3  〈2015/05/08〉
+      - プリセット設定を pxchfon のものに合わせた。
+  * Version 0.2a 〈2013/01/28〉
+      - 新版の zxjatype への対応。
+  * Version 0.2  〈2009/12/22〉
+      - 最初の公開版。
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+http://zrbabbler.sp.land.to/


Property changes on: trunk/Master/texmf-dist/doc/latex/zxjafont/README-ja.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/zxjafont/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zxjafont/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/zxjafont/README.md	2018-05-04 22:10:36 UTC (rev 47613)
@@ -0,0 +1,46 @@
+ZXjafont Package
+================
+
+LaTeX: Set up Japanese font families for XeLaTeX
+
+Font selection using fontspec package is very flexible and powerful.
+But users who are used to pLaTeX often feel the setting bothersome,
+as there is no default working font setting (that involves Japanese
+fonts) and they always must give one. This package prepares some
+popular font settings as “presets” and allows users to use them
+simply by referring to their name.
+
+### SYSTEM REQUIREMENTS
+
+  - TeX format: XeLaTeX.
+  - Prerequisite packages: fontspec.
+
+### INSTALLATION
+
+Move the files as follows (in a system compliant to TDS 1.1):
+
+  - `*.sty`   → $TEXMF/tex/xelatex/zxjafont/
+
+And rehash your TEXMF trees if necessary.
+
+### LICENSE
+
+This package is distributed under the MIT License.
+
+Revision History
+----------------
+
+  * Version 0.4  〈2018/05/04〉
+      - New preets: `yu-win10`, `sourcehan(-jp)`, `noto(-jp)`, `ume`.
+      - New options: `90jis`, `jis2004`.
+      - The use of deprecated presets is warned.
+  * Version 0.3  〈2015/05/08〉
+      - Presets made more alike those of pxchfon.
+  * Version 0.2a 〈2013/01/28〉
+      - Adjustment for new zxjatype.
+  * Version 0.2  〈2009/12/22〉
+      - First public version.
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+http://zrbabbler.sp.land.to/


Property changes on: trunk/Master/texmf-dist/doc/latex/zxjafont/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/zxjafont/zxjafont.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/zxjafont/zxjafont.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zxjafont/zxjafont.tex	2018-05-04 22:03:45 UTC (rev 47612)
+++ trunk/Master/texmf-dist/doc/latex/zxjafont/zxjafont.tex	2018-05-04 22:10:36 UTC (rev 47613)
@@ -1,26 +1,28 @@
 % 文字コードは UTF-8
 % xelatex で組版する
-\documentclass[a4paper]{bxjsarticle}
-\usepackage{zxjatype}
-\setjamainfont{IPAMincho}
-\setjasansfont{IPAGothic}
-\setjamonofont{IPAGothic}
+\documentclass[xelatex,ja=standard,jafont=ipaex,
+  a4paper]{bxjsarticle}
 \xeCJKDeclareCharClass{CJK}{`■,`※}
-\usepackage{metalogo}
+\usepackage{color}
+\definecolor{myblue}{rgb}{0,0,0.75}
+\definecolor{mygreen}{rgb}{0,0.45,0}
+\usepackage[colorlinks,hyperfootnotes=false]{hyperref}
+\hypersetup{linkcolor=myblue,urlcolor=mygreen}
+\usepackage{bxtexlogo}
+\bxtexlogoimport{*}
 \usepackage{shortvrb}
 \MakeShortVerb{\|}
-\newcommand{\PkgVersion}{0.3}
+\newcommand{\PkgVersion}{0.4}
+\newcommand{\PkgDate}{2018/05/04}
 \newcommand{\Pkg}[1]{\textsf{#1}}
 \newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$}
 \newcommand{\Note}{\par\noindent ※}
 \newcommand{\Means}{:\ }
-\providecommand{\pTeX}{p\TeX}
-\providecommand{\pLaTeX}{p\LaTeX}
 %-----------------------------------------------------------
 \begin{document}
 \title{\Pkg{zxjafont} パッケージ(v\PkgVersion)}
 \author{八登崇之\ (Takayuki YATO; aka.~``ZR'')}
-\date{2015/05/08}
+\date{v\PkgVersion\quad[\PkgDate]}
 \maketitle
 
 %===========================================================
@@ -61,10 +63,11 @@
 ただし、\Pkg{zxjatype}パッケージでは和文と欧文を区別するので、
 それと併用の場合は和文のみにフォント設定が適用される。
 
+%-------------------
 \subsection{メイン設定}
 
 総称ファミリの設定
-(\Pkg{fontspec}の|\setmainfont|、|\setsansfont|、|\setmonofont|)
+(\Pkg{fontspec}の |\setmainfont|、|\setsansfont|、|\setmonofont|)
 を行うもの。
 
 \Note 「メイン設定」は\Pkg{pxchfon}パッケージにおける
@@ -93,8 +96,8 @@
 \Note {\XeTeX}\>は「フォント非埋込のPDF生成」に対応していない。
 
 \paragraph{多ウェイト用の設定}
-明朝・ゴシック各々2ウェイトを用いる設定。%
-\footnote{\Pkg{fontspec}では3ウェイト以上の設定ができない。)}
+明朝・ゴシック各々2ウェイトを用いる設定
+\footnote{\Pkg{fontspec}では3ウェイト以上の設定ができない。)}。
 セリフに明朝、サンセリフと等幅にゴシックを割り当て、
 各々について通常(|\mdseries|)と太字(|\bfseries|)
 を個別に設定する。
@@ -120,23 +123,50 @@
   小塚フォント(Pr6n版)。
 \item |hiragino-pro|\Means
   ヒラギノフォント基本6書体セット(Pro/Std版)。
+\item |hiragino-pron|\Means
+  ヒラギノフォント基本6書体セット(ProN/StdN版)。
 \item |morisawa-pro|\Means
   モリサワフォント基本7書体(Pro版)。
-\item |hiragino-pron|\Means
-  ヒラギノフォント基本6書体セット(ProN/StdN版)。
 \item |morisawa-pr6n|\Means
   モリサワフォント基本7書体(Pr6N版)。
 \item |yu-win|\Means
-  游書体(Windows搭載版)。
+  游書体(Windows~8.1搭載版)。
+\item |yu-win10|\Means
+  游書体(Windows~10搭載版)。%TODO
 \item |yu-osx|\Means
   游書体(Mac OS X搭載版)。
+\item |sourcehan|\Means
+  Source Han Serif(源ノ明朝)+ Source Han Sans(源ノ角ゴシック)、
+  非サブセット版%TODO
+  \footnote{つまり、地域別サブセットOTF版以外のもの。
+    後掲の |noto| も同じ。}。
+\item |noto|\Means
+  Noto Serif CJK + Noto Sans CJK、
+  非サブセット版。
 \end{itemize}
 
+\paragraph{ptex-fontmaps互換のオプション}
+
+\Pkg{ptex-fontmaps}のプリセット名を別名として用意した。
+
+\begin{itemize}
+\item |kozuka|\Means
+  |kozuka-pro| の別名。%TODO
+\item |morisawa|\Means
+  |morisawa-pro| の別名。%TODO
+\end{itemize}
+
+\Note なお、|hiragino-pro| と同義の\Pkg{ptex-fontmaps}の
+プリセット名は |hiragino| であるが、本パッケージの |hiragino| は
+旧版の非推奨の設定であり |hiragino-pro| とは異なる。
+
 \paragraph{旧版の設定}
 
-v0.2a版以前で用意されていたメイン設定。
-現在の版でも使用は可能であるが非推奨である。
+v0.2a版以前で用意されていたメイン設定で、現在では非推奨である。
 
+\Note これらは{\TeX} Live 2019のリリース時を目途にして
+\strong{廃止予定}である。
+
 \begin{itemize}
 \item |kozuka4|\Means
   小塚フォント(Pro版)の単ウェイト使用。
@@ -152,6 +182,7 @@
 \item |moga-mobo|\Means |moga| の別名。※\Pkg{pxchfon}互換用。
 \end{itemize}
 
+%-------------------
 \subsection{サブ設定}
 
 \Pkg{fontspec}では使用するフォントを |\newfontfamily| 命令で
@@ -202,7 +233,8 @@
 と太字(|\bfseries|)の2つに制限している。
 多くのOSでの扱いに合わせているようである。
 
-\subsection{他オプション}
+%-------------------
+\subsection{その他のオプション}
 
 \begin{itemize}
 \item |oneweight|\Means
@@ -228,6 +260,12 @@
 \Pkg{zxjatype}パッケージで指定されている場合はその値、
 なければ1となる。
 
+\item |90jis|\Means
+90JIS字形(2000JIS字形)の使用を指定する。
+
+\item |jis2004|\Means
+2004JIS字形の使用を指定する。
+
 \item |feature={|\Meta{属性リスト}|}|\Means
 このパッケージで指定されるフォント全体に通用する
 \Pkg{fontspec}の属性の指定。
@@ -234,4 +272,6 @@
 
 \end{itemize}
 
+%===========================================================
 \end{document}
+%% EOF

Modified: trunk/Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty	2018-05-04 22:03:45 UTC (rev 47612)
+++ trunk/Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty	2018-05-04 22:10:36 UTC (rev 47613)
@@ -1,82 +1,121 @@
-%
-% zxjafont.sty
-%
-%%%% package declaration
+%%
+%% This is file 'zxjafont.sty'.
+%%
+%% Copyright (c) 2018 Takayuki YATO (aka. "ZR")
+%%   GitHub:   https://github.com/zr-tex8r
+%%   Twitter:  @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
+
+%% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{zxjafont}[2015/05/08 v0.3]
-\RequirePackage{ifxetex}
-\RequireXeTeX
+\ProvidesPackage{zxjafont}[2018/05/03 v0.4-pre]
+\def\zxjf at pkgname{zxjafont}
 
-%%%% preparation
-\def\zxjf at pkgname{zxjafont}
-\def\zxjf at error{\PackageError\zxjf at pkgname}
-\def\zxjf at warn{\PackageInfo\zxjf at pkgname}
+%% preparation
+\RequirePackage{ifxetex}\RequireXeTeX
+\providecommand{\bxDebug}[1]{}
+
+%--------------------------------------- general
+
+%% packages
 \RequirePackage{fontspec}
 \RequirePackage{keyval}
-\ifx\bxUseDebug\relax \let\zxjf at debug\@gobble
-\else \def\zxjf at debug#1{\typeout{\zxjf at pkgname: #1}}
-\fi
+\RequirePackage{etoolbox}
 
-%%%% options handling
+%% errors
+\def\zxjf at err@ivval#1#2{%
+  \PackageError\zxjf at pkgname
+   {Invalid value '#2' for option #1}\@ehc}
+
+%--------------------------------------- handle options
+
+%% constants
+\chardef\zxjf at cjkshape@@none=0
+\chardef\zxjf at cjkshape@@xc=1    % 90jis
+\chardef\zxjf at cjkshape@@mmiv=2  % jis2004
+
+%% variables
+\let\zxjf at main@preset\relax
+\let\zxjf at sub@preset\@empty
+\newif\ifzxjf at prop
+\newif\ifzxjf at oneweight
+\let\zxjf at cjkshape\zxjf at cjkshape@@none
+\let\zxjf at scale\relax
+\let\zxjf at feat\@empty
+\newif\ifzxjf at zxjatype
+
 %% \zxjf at main@preset
 \def\zxjf at all@main at preset{%
   ms,ipa,ipaex,%
-  ms-hg,ipa-hg,ipaex-hg,moga,moga-90,%
+  ms-hg,ipa-hg,ipaex-hg,moga,moga-90,ume,%
   kozuka-pro,kozuka-pr6,kozuka-pr6n,hiragino-pro,hiragino-pron,%
-  morisawa-pro,morisawa-pr6n,yu-win,yu-osx,%
+  morisawa-pro,morisawa-pr6n,yu-win,yu-win10,yu-osx,%
+  sourcehan,sourcehan-jp,noto,noto-jp,%
   kozuka4,kozuka6,kozuka6n,hiragino,%
   ms-dx,ipa-dx,hiragino-dx,moga-mobo}
+
+%% \zxjf at main@sub at preset
 \def\zxjf at all@sub at preset{%
   hg,hiraginomg-pro,hiraginomg-pron,mobo,mobo-90,maruberi,%
   hiraginomg}
-\let\zxjf at main@preset\relax
+
+% preset options
 \def\zxjf at do#1{\DeclareOption{#1}{\def\zxjf at main@preset{#1}}}
 \@for\zxjf at x:=\zxjf at all@main at preset\do{%
   \expandafter\zxjf at do\expandafter{\zxjf at x}}
-\let\zxjf at sub@preset\@empty
 \def\zxjf at do#1{\DeclareOption{#1}{\zxjf at add@sub at preset{#1}}}
 \@for\zxjf at x:=\zxjf at all@sub at preset\do{%
   \expandafter\zxjf at do\expandafter{\zxjf at x}}
 \def\zxjf at add@sub at preset#1{%
   \edef\zxjf at sub@preset{\zxjf at sub@preset#1,}}
-% 
-\newif\ifzxjf at prop
+% 'prop'
 \DeclareOption{prop}{\zxjf at proptrue}
-\newif\ifzxjf at oneweight
+% 'oneweight'
 \DeclareOption{oneweight}{\zxjf at oneweighttrue}
+% '90jis'/'jis2004'
+\DeclareOption{90jis}{\let\zxjf at cjkshape\zxjf at cjkshape@@xc}
+\DeclareOption{jis2004}{\let\zxjf at cjkshape\zxjf at cjkshape@@mmiv}
+
+%% options using keyval
+\DeclareOption*{\def\zxjf at nxt{\setkeys{zxjf}}%
+  \expandafter\zxjf at nxt\expandafter{\CurrentOption}}
+% 'scale=<real>'
 \define at key{zxjf}{scale}{\def\zxjf at scale{#1}}
-% options using keyval
-\let\zxjf at scale\relax
-\define at key{zxjf}{scale}{\def\zxjf at scale{#1}}
-\let\zxjf at feat\@empty
+% 'feature=<text>'
 \define at key{zxjf}{feature}{\def\zxjf at feat{#1}}
-\DeclareOption*{\def\zxjf at nxt{\setkeys{zxjf}}%
-  \expandafter\zxjf at nxt\expandafter{\CurrentOption}}
-% dispatch
+
+%% dispatch
 \let\@org at use@ption\@use at ption
 \def\@use at ption{\csname ds@\CurrentOption \endcsname}
 \ProcessOptions*
 \let\@use at ption\@org at use@ption
-% preset must be given
+
+%% preset must be given
 \ifx\zxjf at main@preset\relax
-  \zxjf at error{Preset name not specified}
-  {You must give one of the following names as option.\MessageBreak
-   \space\space\zxjf at all@main at preset}
-  \endinput\fi
+  \PackageError\zxjf at pkgname
+   {Preset name not specified}
+   {You must give one of the following names as option.\MessageBreak
+    \space\space\zxjf at all@main at preset}
+\expandafter\endinput\fi\relax
 
-%%%% detect bxjatype
-\newif\ifzxjf at zxjatype
+%% detect bxjatype
 \@ifpackageloaded{zxjatype}{\zxjf at zxjatypetrue}{}
 \AtBeginDocument{%
-  \ifzxjf at zxjatype\else\@ifpackageloaded{zxjatype}{%
-      \zxjf at error{zxjatype must be loaded before me}\@ehc
-  }\fi}
+  \unless\ifzxjf at zxjatype
+    \@ifpackageloaded{zxjatype}{%
+      \PackageError\zxjf at pkgname
+       {zxjatype must be loaded before me}\@ehc
+    }{}%
+  \fi}
 \ifzxjf at zxjatype\ifzxjf at prop
-  \zxjf at error{Option 'prop' cannot be used with zxjatype}\@ehc
+  \PackageError\zxjf at pkgname
+   {Option 'prop' cannot be used with zxjatype}\@ehc
   \zxjf at propfalse
 \fi\fi
 
-%%%% decide scale factor
+%% decide scale factor
 \ifx\zxjf at scale\relax
   % If zxjatype is used, try \JaFontScale, \zxjt at scale,
   % and \__zxjt_scale_tl.
@@ -84,8 +123,7 @@
     \ifdefined\JaFontScale \let\zxjf at scale\JaFontScale
     \else\ifdefined\zxjt at scale \let\zxjf at scale\zxjt at scale
     \else\ifcsname __zxjt_scale_tl\endcsname
-      \expandafter\let\expandafter\zxjf at scale
-       \csname __zxjt_scale_tl\endcsname
+      \letcs\zxjf at scale{__zxjt_scale_tl}
     \fi\fi\fi
   \fi
   \ifx\zxjf at scale\relax % still unknown
@@ -98,11 +136,22 @@
     \def\zxjf at scale{1}%
   \fi
 \fi
+
+%% resolve CJKshape
+\edef\zxjf at feat{%
+  \ifcase\zxjf at cjkshape % none
+  \or CJKShape=JIS1990,% 90jis
+  \or CJKShape=JIS2004,% jis2004
+  \fi
+  \zxjf at feat}
+
+%% \zxjf at xfeat
+% All fontspec options including scale.
 \edef\zxjf at xfeat{Scale=\zxjf at scale,\zxjf at feat}
-\zxjf at debug{scale=\zxjf at scale/feat={\zxjf at feat}/%
+\bxDebug{zxjafont>>scale=\zxjf at scale/feat={\zxjf at feat}/%
   preset=\zxjf at main@preset/\zxjf at sub@preset}
 
-%%-------- preset japanese font mappings
+%--------------------------------------- font setup helpers
 
 %% \zxjf at setmainfont{<attributes>}{<fam_name>}, etc.
 \ifzxjf at zxjatype
@@ -110,8 +159,8 @@
 \def\zxjf at setsansfont#1{\setjasansfont[\zxjf at xfeat,#1]}
 \def\zxjf at setmonofont#1{\setjamonofont[\zxjf at xfeat,#1]}
 \def\zxjf at newfamily#1#2#3{%
-  \expandafter\def\csname #1family\expandafter\endcsname\expandafter
-   {\csname a#1family\endcsname\CJKfamily{#1}}%
+  \csedef{#1family}{%
+    \expandonce{\csname a#1family\endcsname}\noexpand\CJKfamily{#1}}%
   \expandafter\newfontfamily\csname a#1family\endcsname[\zxjf at feat,#2]{#3}%
   \setjafamilyfont{#1}[\zxjf at xfeat,#2]{#3}}
 \else
@@ -122,10 +171,13 @@
   \expandafter\newfontfamily\csname #1family\endcsname[\zxjf at xfeat,#2]}
 \fi
 
+%--------------------------------------- preset japanese font mappings
+
 %% \zxjf at declare@preset{<name>}{<text>}, etc.
 \def\zxjf at declare@preset#1{%
   \expandafter\zxjf at decl@preset at a\csname zxjf at the@preset@#1\endcsname}
 \def\zxjf at decl@preset at a#1{\@onlypreamble#1\def#1}
+\zxjf at declare@preset{}{}
 \@onlypreamble\zxjf at uniweight
 \def\zxjf at uniweight#1#2{%
   \zxjf at uniweight@opt{#1}{#2}{}}
@@ -148,21 +200,25 @@
     \zxjf at setsansfont{#6,BoldFont=#4}{#3}%
     \zxjf at setmonofont{#6,BoldFont=#4}{#3}%
   \fi}
+%% \zxjf at declare@preset at with@prop{<name>}{<text>}
+\def\zxjf at declare@preset at with@prop#1#2{%
+  \zxjf at declare@preset{#1}{#2{RawFeature=-palt;-kern}}%
+  \zxjf at declare@preset{#1/prop}{#2{RawFeature=+palt;+Wkern}}}
 
 %% \zxjf at declare@preset at alias{<name1>}{<name2>}
 \def\zxjf at declare@preset at alias#1#2{%
-  \expandafter\let\csname zxjf at the@preset@#1\expandafter\endcsname
-    \csname zxjf at the@preset@#2\endcsname}
+  \csletcs{zxjf at the@preset@#1}{zxjf at the@preset@#2}}
+%% \zxjf at declare@preset at alias@with at prop{<name1>}{<name2>}
+\def\zxjf at declare@preset at alias@with at prop#1#2{%
+  \zxjf at declare@preset at alias{#1}{#2}%
+  \zxjf at declare@preset at alias{#1/prop}{#2/prop}}
 
 %% \zxjf at use@preset{<name>}
 \def\zxjf at use@preset#1{%
-  \ifzxjf at prop \zxjf at use@preset at a{#1/prop}%
-  \else \let\zxjf at nxt\relax \fi
-  \ifx\zxjf at nxt\relax \zxjf at use@preset at a{#1}\fi
+  \undef\zxjf at nxt
+  \ifzxjf at prop \letcs\zxjf at nxt{zxjf at the@preset@#1/prop}\fi
+  \unless\ifdefined\zxjf at nxt \letcs\zxjf at nxt{zxjf at the@preset@#1}\fi
   \zxjf at nxt}
-\def\zxjf at use@preset at a#1{%
-  \expandafter\let\expandafter\zxjf at nxt
-   \csname zxjf at the@preset@#1\endcsname}
 
 %% definitions of main preset mappings
 \zxjf at declare@preset{ms}{%
@@ -196,6 +252,9 @@
 \zxjf at declare@preset{moga-90}{%
   \zxjf at multiweight{MogaEx90Mincho}{MogaEx90Mincho Bold}%
     {MogaEx90Gothic}{MogaEx90Gothic Bold}{MogaEx90Gothic}}
+\zxjf at declare@preset{ume}{%
+  \zxjf at multiweight{Ume Mincho}{Ume Mincho}%
+    {Ume Gothic}{Ume Gothic O5}{Ume Gothic O5}}
 \zxjf at declare@preset{kozuka-pro}{%
   \zxjf at multiweight@opt{KozMinPro-Regular}{KozMinPro-Bold}%
     {KozGoPro-Regular}{KozGoPro-Bold}%
@@ -260,6 +319,10 @@
   \zxjf at multiweight@opt{YuMincho-Regular}{YuMincho-Demibold}%
     {YuGothic-Regular}{YuGothic-Bold}%
     {YuGothic-Regular}{RawFeature=+palt;+kern}}
+\zxjf at declare@preset at with@prop{yu-win10}{%
+  \zxjf at multiweight@opt{YuMincho-Regular}{YuMincho-Demibold}%
+    {YuGothic-Regular}{YuGothic-Bold}%
+    {YuGothic-Medium}}
 \zxjf at declare@preset{yu-osx}{%
   \zxjf at multiweight@opt{YuMincho-Medium}{YuMincho-Demibold}%
     {YuGothic-Medium}{YuGothic-Bold}%
@@ -268,6 +331,22 @@
   \zxjf at multiweight@opt{YuMincho-Medium}{YuMincho-Demibold}%
     {YuGothic-Medium}{YuGothic-Bold}%
     {YuGothic-Medium}{RawFeature=+palt;+kern}}
+\zxjf at declare@preset at with@prop{sourcehan}{%
+  \zxjf at multiweight@opt{SourceHanSerif-Regular}{SourceHanSerif-Bold}%
+    {SourceHanSans-Regular}{SourceHanSans-Bold}%
+    {SourceHanSans-Medium}}
+\zxjf at declare@preset at with@prop{sourcehan-jp}{%
+  \zxjf at multiweight@opt{SourceHanSerifJP-Regular}{SourceHanSerifJP-Bold}%
+    {SourceHanSansJP-Regular}{SourceHanSansJP-Bold}%
+    {SourceHanSansJP-Medium}}
+\zxjf at declare@preset at with@prop{noto}{%
+  \zxjf at multiweight@opt{NotoSerifCJKjp-Regular}{NotoSerifCJKjp-Bold}%
+    {NotoSansCJKjp-Regular}{NotoSansCJKjp-Bold}%
+    {NotoSansCJKjp-Medium}}
+\zxjf at declare@preset at with@prop{noto-jp}{%
+  \zxjf at multiweight@opt{NotoSerifJP-Regular}{NotoSerifJP-Bold}%
+    {NotoSansJP-Regular}{NotoSansJP-Bold}%
+    {NotoSansJP-Medium}}
 %(obsolete)
 \zxjf at declare@preset{kozuka4}{%
   \zxjf at uniweight@opt{Kozuka Mincho Pro}{Kozuka Gothic Pro}%
@@ -294,6 +373,10 @@
   \zxjf at uniweight@opt{Hiragino Mincho Pro W3}{Hiragino Kaku Gothic Pro W6}%
     {RawFeature=+palt;+kern}}
 %(alias)
+\zxjf at declare@preset at alias@with at prop{kozuka}{kozuka-pro}
+\zxjf at declare@preset at alias@with at prop{morisawa}{morisawa-pro}
+\zxjf at declare@preset at alias{moga-mobo}{moga}
+%(alias-obsolete)
 \zxjf at declare@preset at alias{ms-dx}{ms-hg}
 \zxjf at declare@preset at alias{ms-dx/prop}{ms-hg/prop}
 \zxjf at declare@preset at alias{ipa-dx}{ipa-hg}
@@ -300,8 +383,8 @@
 \zxjf at declare@preset at alias{ipa-dx/prop}{ipa-hg/prop}
 \zxjf at declare@preset at alias{hiragino-dx}{hiragino-pro}
 \zxjf at declare@preset at alias{hiragino-dx/prop}{hiragino-pro/prop}
-\zxjf at declare@preset at alias{moga-mobo}{moga}
 
+%% definitions of sub preset mappings
 \zxjf at declare@preset{hg}{%
   \zxjf at newfamily{hgmc}{BoldFont=HGSMinchoE}{HGSMinchoB}%
   \zxjf at newfamily{hgpr}{}{HGSSoeiPresenceEB}%
@@ -342,18 +425,29 @@
 \zxjf at declare@preset{maruberi}{%
   \zxjf at newfamily{mmg}{}{MotoyaLMaru}}
 
-%%%% ... and invokes the specified one!
+%% warn for deprecated presets
+\@for\zxjf at x:={%
+  kozuka4,kozuka6,kozuka6n,hiragino,ms-dx,ipa-dx,hiragino-dx%
+}\do{%
+  \ifx\zxjf at x\zxjf at main@preset
+    \PackageWarningNoLine\zxjf at pkgname
+     {Old preset '\zxjf at x' is deprecated\MessageBreak
+      (see the manual for detail)}%
+  \fi}
+
+%% ... and invokes the specified one!
 \zxjf at use@preset{\zxjf at main@preset}
 \@for\zxjf at x:=\zxjf at sub@preset\do{\zxjf at use@preset\zxjf at x}
 
-%%------ and some extras
+%--------------------------------------- and some extras
 
-\def\useeasyjapanesesettings{%
+%%<*> \useeasyjapanesesettings
+\newcommand*\useeasyjapanesesettings{%
 \XeTeXlinebreaklocale "ja"\relax
 \XeTeXlinebreakskip=0pt plus 1pt minus 0.1pt\relax
 \XeTeXlinebreakpenalty=0\relax
 }
 
-%%------ all done
+%--------------------------------------- all done
 \endinput
 %% EOF



More information about the tex-live-commits mailing list