diff options
author | Karl Berry <karl@freefriends.org> | 2020-01-17 21:52:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-01-17 21:52:08 +0000 |
commit | 174c54df1310c532361eef3548596d2796faf2c7 (patch) | |
tree | b41535e39aa4a41195d1869650bc0e2a3c1b5510 /Master/texmf-dist/tex/latex/zxjafont | |
parent | 0c34c9eec28d2893147bb7a8f1321253c87c299d (diff) |
zxjafont (17jan20)
git-svn-id: svn://tug.org/texlive/trunk@53435 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/zxjafont')
-rw-r--r-- | Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty | 347 |
1 files changed, 178 insertions, 169 deletions
diff --git a/Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty b/Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty index 3966a5929b2..f9172fec5e0 100644 --- a/Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty +++ b/Master/texmf-dist/tex/latex/zxjafont/zxjafont.sty @@ -10,27 +10,55 @@ %% package declaration \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{zxjafont}[2020/01/12 v0.6] +\ProvidesPackage{zxjafont}[2020/01/18 v0.7] \def\zxjf@pkgname{zxjafont} %% preparation \RequirePackage{ifxetex}\RequireXeTeX \providecommand{\bxDebug}[1]{} +%%<+> \zxjafontFeature +% The default features for fonts declared by this package. +% (Used if defined.) + %--------------------------------------- general %% packages \RequirePackage{fontspec} \RequirePackage{keyval} -\RequirePackage{etoolbox} +\RequirePackage{etoolbox}[2011/01/03]% v2.1 %% errors \def\zxjf@err@ivval#1#2{% \PackageError\zxjf@pkgname {Invalid value '#2' for option #1}\@ehc} +%% \zxjf@cond\ifXXX...\fi{<true>}{<false>} +\@gobbletwo\if\if \def\zxjf@cond#1\fi{% + #1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + +%% \zxjf@with@cs\CS{<csname>} +\def\zxjf@with@cs#1#2{% + \expandafter#1\csname#2\endcsname} + +%% \zxjf@onlypreamble@def\CS +\def\zxjf@onlypreamble@def#1{% + \@onlypreamble#1\def#1} +%% \zxjf@onlypreamble@let\CS +\def\zxjf@onlypreamble@let#1{% + \@onlypreamble#1\let#1} + +%% \if\zxjf@isvalid{<csname>}...\fi +\def\zxjf@isvalid#1{% + \ifcsvoid{#1}{F}{T}T} + %--------------------------------------- handle options +%% errors +\zxjf@onlypreamble@def\zxjf@warn@niopt#1{% + \PackageWarningNoLine\zxjf@pkgname + {Option '#1' is not implemented}} + %% constants \chardef\zxjf@cjkshape@@none=0 \chardef\zxjf@cjkshape@@xc=1 % 90jis @@ -41,13 +69,14 @@ \let\zxjf@sub@preset\@empty \newif\ifzxjf@prop \newif\ifzxjf@oneweight +\newif\ifzxjf@bold \let\zxjf@cjkshape\zxjf@cjkshape@@none \let\zxjf@scale\relax -\let\zxjf@feat\@empty +\let\zxjf@feature\@empty \newif\ifzxjf@zxjatype -%% \zxjf@main@preset -\def\zxjf@all@main@preset{% +%% \zxjf@all@main@preset +\zxjf@onlypreamble@def\zxjf@all@main@preset{% %(uniweight) ms,ipa,ipaex,% %(multiweight) @@ -58,8 +87,8 @@ %(alias) kozuka,morisawa,moga-mobo-ex,noto-otf,hiragino} -%% \zxjf@main@sub@preset -\def\zxjf@all@sub@preset{% +%% \zxjf@all@sub@preset +\zxjf@onlypreamble@def\zxjf@all@sub@preset{% hg,hiraginomg-pro,hiraginomg-pron,mobo,mobo-90,maruberi,% hiraginomg} @@ -67,26 +96,32 @@ \def\zxjf@do#1{\DeclareOption{#1}{\def\zxjf@main@preset{#1}}} \@for\zxjf@x:=\zxjf@all@main@preset\do{% \expandafter\zxjf@do\expandafter{\zxjf@x}} -\def\zxjf@do#1{\DeclareOption{#1}{\zxjf@add@sub@preset{#1}}} +\def\zxjf@do#1{\DeclareOption{#1}{\appto\zxjf@sub@preset{#1,}}} \@for\zxjf@x:=\zxjf@all@sub@preset\do{% \expandafter\zxjf@do\expandafter{\zxjf@x}} -\def\zxjf@add@sub@preset#1{% - \edef\zxjf@sub@preset{\zxjf@sub@preset#1,}} % 'prop' \DeclareOption{prop}{\zxjf@proptrue} \DeclareOption{noprop}{\zxjf@propfalse} % 'oneweight' \DeclareOption{oneweight}{\zxjf@oneweighttrue} \DeclareOption{nooneweight}{\zxjf@oneweightfalse} +\DeclareOption{nodeluxe}{\zxjf@oneweighttrue} +\DeclareOption{deluxe}{\zxjf@oneweightfalse} +% 'bold' +\DeclareOption{bold}{\zxjf@boldtrue} +\DeclareOption{nobold}{\zxjf@boldfalse} % '90jis'/'jis2004' \DeclareOption{jis90}{\let\zxjf@cjkshape\zxjf@cjkshape@@xc} \DeclareOption{90jis}{\let\zxjf@cjkshape\zxjf@cjkshape@@xc} \DeclareOption{jis2004}{\let\zxjf@cjkshape\zxjf@cjkshape@@mmiv} \DeclareOption{2004jis}{\let\zxjf@cjkshape\zxjf@cjkshape@@mmiv} +\DeclareOption{nojisshape}{\let\zxjf@cjkshape\zxjf@cjkshape@@none} +% dummy options for compatibility with luatexja-preset +\DeclareOption{match}{}% xeCJK always work as 'match' is on +\DeclareOption{expert}{\zxjf@warn@niopt{expert}} % abolished presets -\@onlypreamble\zxjf@err@abpre -\def\zxjf@err@abpre#1{% +\zxjf@onlypreamble@def\zxjf@err@abpre#1{% \PackageError\zxjf@pkgname {The old preset '#1' is *abolished*}{\@ehc}} \@for\zxjf@x:={% @@ -94,18 +129,18 @@ }\do{\DeclareOption{\zxjf@x}{\zxjf@err@abpre{\CurrentOption}}} %% options using keyval -\DeclareOption*{\def\zxjf@nxt{\setkeys{zxjf}}% - \expandafter\zxjf@nxt\expandafter{\CurrentOption}} +\DeclareOption*{\def\zxjf@do{\setkeys{zxjf}}% + \expandafter\zxjf@do\expandafter{\CurrentOption}} % 'scale=<real>' \define@key{zxjf}{scale}{\def\zxjf@scale{#1}} % 'feature=<text>' -\define@key{zxjf}{feature}{\def\zxjf@feat{#1}} +\define@key{zxjf}{feature}{\def\zxjf@feature{#1}} %% dispatch -\let\@org@use@ption\@use@ption -\def\@use@ption{\csname ds@\CurrentOption \endcsname} +\zxjf@onlypreamble@let\zxjf@org@use@ption\@use@ption +\def\@use@ption{\csname ds@\CurrentOption \endcsname}% FIXME \ProcessOptions* -\let\@use@ption\@org@use@ption +\let\@use@ption\zxjf@org@use@ption %% preset must be given \ifx\zxjf@main@preset\relax @@ -115,7 +150,7 @@ \space\space\zxjf@all@main@preset} \expandafter\endinput\fi\relax -%% detect bxjatype +%% detect zxjatype \@ifpackageloaded{zxjatype}{\zxjf@zxjatypetrue}{} \AtBeginDocument{% \unless\ifzxjf@zxjatype @@ -132,12 +167,12 @@ %% decide scale factor \ifx\zxjf@scale\relax - % If zxjatype is used, try \JaFontScale, \zxjt@scale, + % If zxjatype is used, try \zxjatypeJaScale, \zxjt@scale, % and \__zxjt_scale_tl. \ifzxjf@zxjatype - \ifdefined\JaFontScale \let\zxjf@scale\JaFontScale - \else\ifdefined\zxjt@scale \let\zxjf@scale\zxjt@scale - \else\ifcsname __zxjt_scale_tl\endcsname + \ifdefined\zxjatypeJaScale \let\zxjf@scale\zxjatypeJaScale + \else\if\zxjf@isvalid{zxjt@scale}\let\zxjf@scale\zxjt@scale + \else\if\zxjf@isvalid{__zxjt_scale_tl}% \letcs\zxjf@scale{__zxjt_scale_tl} \fi\fi\fi \fi @@ -152,227 +187,206 @@ \fi \fi -%% resolve CJKshape -\edef\zxjf@feat{% +%% \zxjf@whole@feature +% All fontspec options including scale. +\edef\zxjf@whole@feature{% + Scale=\zxjf@scale + % CJKShape \ifcase\zxjf@cjkshape % none - \or CJKShape=JIS1990,% 90jis - \or CJKShape=JIS2004,% jis2004 + \or ,CJKShape=JIS1990% 90jis + \or ,CJKShape=JIS2004% jis2004 \fi - \zxjf@feat} - -%% \zxjf@xfeat -% All fontspec options including scale. -\edef\zxjf@xfeat{Scale=\zxjf@scale,\zxjf@feat} -\bxDebug{zxjafont>>scale=\zxjf@scale/feat={\zxjf@feat}/% + \ifdefined\zxjafontFeature + ,\expandonce\zxjafontFeature + \fi + \unless\ifx\zxjf@feature\@empty + ,\expandonce\zxjf@feature + \fi} +\bxDebug{zxjafont>>scale=\zxjf@scale/feat={\zxjf@whole@feature}/% preset=\zxjf@main@preset/\zxjf@sub@preset} %--------------------------------------- font setup helpers +%% \zxjf@font@set +\zxjf@onlypreamble@def\zxjf@font@set#1#2{% + \noexpand#1[\expandonce\zxjf@whole@feature,#2]} +%% \zxjf@newfamily@gen\CSnewjafamily +\@onlypreamble\zxjf@newfamily@gen\edef\zxjf@newfamily@gen{% + \noexpand\zxjf@newfamily@gen@a + {\expandonce\zxjf@feature}{\expandonce\zxjf@whole@feature}} +\zxjf@onlypreamble@def\zxjf@newfamily@gen@a#1#2#3{% + \def\zxjf@newfamily##1##2##3{% + \csedef{##1family}{% + \expandonce{\csname a##1family\endcsname}\noexpand\CJKfamily{##1}}% + \zxjf@with@cs\newfontfamily{a##1family}[#1,##2]{##3}% + #3{##1}[#2,##2]{##3}}} + %% \zxjf@setmainfont{<attributes>}{<fam_name>}, etc. \ifzxjf@zxjatype -\def\zxjf@setmainfont#1{\setjamainfont[\zxjf@xfeat,#1]} -\def\zxjf@setsansfont#1{\setjasansfont[\zxjf@xfeat,#1]} -\def\zxjf@setmonofont#1{\setjamonofont[\zxjf@xfeat,#1]} -\def\zxjf@newfamily#1#2#3{% - \csedef{#1family}{% - \expandonce{\csname a#1family\endcsname}\noexpand\CJKfamily{#1}}% - \expandafter\newfontfamily\csname a#1family\endcsname[\zxjf@feat,#2]{#3}% - \setjafamilyfont{#1}[\zxjf@xfeat,#2]{#3}} +\edef\zxjf@setmainfont#1{\zxjf@font@set\setjamainfont{#1}} +\edef\zxjf@setsansfont#1{\zxjf@font@set\setjasansfont{#1}} +\edef\zxjf@setmonofont#1{\zxjf@font@set\setjamonofont{#1}} +\zxjf@newfamily@gen{\setjafamilyfont} \else -\def\zxjf@setmainfont#1{\setmainfont[\zxjf@xfeat,#1]} -\def\zxjf@setsansfont#1{\setsansfont[\zxjf@xfeat,#1]} -\def\zxjf@setmonofont#1{\setmonofont[\zxjf@xfeat,#1]} -\def\zxjf@newfamily#1#2{% - \expandafter\newfontfamily\csname #1family\endcsname[\zxjf@xfeat,#2]} +\edef\zxjf@setmainfont#1{\zxjf@font@set\setmainfont{#1}} +\edef\zxjf@setsansfont#1{\zxjf@font@set\setsansfont{#1}} +\edef\zxjf@setmonofont#1{\zxjf@font@set\setmonofont{#1}} +\edef\zxjf@newfamily#1#2{% + \unexpanded{\zxjf@with@cs\newfontfamily}{#1family}% + [\expandonce\zxjf@whole@feature,#2]} \fi %--------------------------------------- preset japanese font mappings %% \zxjf@declare@preset{<name>}{<text>}, etc. -\def\zxjf@declare@preset#1{% - \expandafter\zxjf@decl@preset@a\csname zxjf@the@preset@#1\endcsname} -\def\zxjf@decl@preset@a#1{\@onlypreamble#1\def#1} +\zxjf@onlypreamble@def\zxjf@declare@preset#1{% + \zxjf@with@cs\zxjf@onlypreamble@def{zxjf@the@preset@#1}} \zxjf@declare@preset{}{} -\@onlypreamble\zxjf@uniweight -\def\zxjf@uniweight#1#2{% - \zxjf@uniweight@opt{#1}{#2}{}} -\@onlypreamble\zxjf@uniweight@opt -\def\zxjf@uniweight@opt#1#2#3{% +\zxjf@onlypreamble@def\zxjf@uniweight#1#2#3{% \zxjf@setmainfont{#3,BoldFont=#2}{#1}% - \zxjf@setsansfont{#3}{#2}% - \zxjf@setmonofont{#3}{#2}} -\@onlypreamble\zxjf@multiweight -\def\zxjf@multiweight#1#2#3#4#5{% - \zxjf@multiweight@opt{#1}{#2}{#3}{#4}{#5}{}} -\@onlypreamble\zxjf@multiweight@opt -\def\zxjf@multiweight@opt#1#2#3#4#5#6{% - \ifzxjf@oneweight + \zxjf@setsansfont{#3,BoldFont=#2}{#2}% + \zxjf@setmonofont{#3,BoldFont=#2}{#2}} +\zxjf@onlypreamble@def\zxjf@multiweight#1#2#3#4#5#6{% + \ifzxjf@bold + \zxjf@setmainfont{#6,BoldFont=#4}{#1}% + \zxjf@setsansfont{#6,BoldFont=#4}{#4}% + \zxjf@setmonofont{#6,BoldFont=#4}{#4}% + \else\ifzxjf@oneweight \zxjf@setmainfont{#6,BoldFont=#5}{#1}% - \zxjf@setsansfont{#6}{#5}% - \zxjf@setmonofont{#6}{#5}% + \zxjf@setsansfont{#6,BoldFont=#5}{#5}% + \zxjf@setmonofont{#6,BoldFont=#5}{#5}% \else \zxjf@setmainfont{#6,BoldFont=#2}{#1}% \zxjf@setsansfont{#6,BoldFont=#4}{#3}% \zxjf@setmonofont{#6,BoldFont=#4}{#3}% - \fi} + \fi\fi} %% \zxjf@declare@preset@with@prop{<name>}{<text>} -\def\zxjf@declare@preset@with@prop#1#2{% +\zxjf@onlypreamble@def\zxjf@declare@preset@with@prop#1#2{% \zxjf@declare@preset{#1}{#2{RawFeature=-palt;-kern}}% \zxjf@declare@preset{#1/prop}{#2{RawFeature=+palt;+kern}}} %% \zxjf@declare@preset@alias{<name1>}{<name2>} -\def\zxjf@declare@preset@alias#1#2{% +\zxjf@onlypreamble@def\zxjf@declare@preset@alias#1#2{% + \zxjf@with@cs\@onlypreamble{zxjf@the@preset@#1}% \csletcs{zxjf@the@preset@#1}{zxjf@the@preset@#2}} %% \zxjf@declare@preset@alias@with@prop{<name1>}{<name2>} -\def\zxjf@declare@preset@alias@with@prop#1#2{% +\zxjf@onlypreamble@def\zxjf@declare@preset@alias@with@prop#1#2{% \zxjf@declare@preset@alias{#1}{#2}% \zxjf@declare@preset@alias{#1/prop}{#2/prop}} %% \zxjf@use@preset{<name>} -\def\zxjf@use@preset#1{% - \undef\zxjf@nxt - \ifzxjf@prop \letcs\zxjf@nxt{zxjf@the@preset@#1/prop}\fi - \unless\ifdefined\zxjf@nxt \letcs\zxjf@nxt{zxjf@the@preset@#1}\fi - \zxjf@nxt} +\zxjf@onlypreamble@def\zxjf@use@preset#1{% + \undef\zxjf@do + \ifzxjf@prop \letcs\zxjf@do{zxjf@the@preset@#1/prop}\fi + \unless\ifdefined\zxjf@do \letcs\zxjf@do{zxjf@the@preset@#1}\fi + \zxjf@do} %% definitions of main preset mappings \zxjf@declare@preset{ms}{% - \zxjf@uniweight{MS-Mincho}{MS-Gothic}} + \zxjf@uniweight{MS-Mincho}{MS-Gothic}{}} \zxjf@declare@preset{ms/prop}{% - \zxjf@uniweight{MS-PMincho}{MS-PGothic}} + \zxjf@uniweight{MS-PMincho}{MS-PGothic}{}} \zxjf@declare@preset{ms-hg}{% \zxjf@multiweight{MS-Mincho}{HGMinchoE}% - {HGGothicM}{HGGothicE}{MS-Gothic}} + {HGGothicM}{HGGothicE}{MS-Gothic}{}} \zxjf@declare@preset{ms-hg/prop}{% \zxjf@multiweight{MS-PMincho}{HGPMinchoE}% - {HGPGothicM}{HGGothicE}{MS-PGothic}} + {HGPGothicM}{HGGothicE}{MS-PGothic}{}} \zxjf@declare@preset{ipa}{% - \zxjf@uniweight{IPAMincho}{IPAGothic}} + \zxjf@uniweight{IPAMincho}{IPAGothic}{}} \zxjf@declare@preset{ipa/prop}{% - \zxjf@uniweight{IPAPMincho}{IPAPGothic}} + \zxjf@uniweight{IPAPMincho}{IPAPGothic}{}} \zxjf@declare@preset{ipa-hg}{% \zxjf@multiweight{IPAMincho}{HGMinchoE}% - {HGGothicM}{HGGothicE}{IPAGothic}} + {HGGothicM}{HGGothicE}{IPAGothic}{}} \zxjf@declare@preset{ipa-hg/prop}{% \zxjf@multiweight{IPAPMincho}{HGPMinchoE}% - {HGPGothicM}{HGGothicE}{IPAPGothic}} + {HGPGothicM}{HGGothicE}{IPAPGothic}{}} \zxjf@declare@preset{ipaex}{% - \zxjf@uniweight{ipaexm.ttf}{ipaexg.ttf}} + \zxjf@uniweight{ipaexm.ttf}{ipaexg.ttf}{}} \zxjf@declare@preset{ipaex-hg}{% \zxjf@multiweight{ipaexm.ttf}{HGSMinchoE}% - {HGSGothicM}{HGSGothicE}{ipaexg.ttf}} + {HGSGothicM}{HGSGothicE}{ipaexg.ttf}{}} \zxjf@declare@preset{moga}{% \zxjf@multiweight{MogaExMincho}{MogaExMincho Bold}% - {MogaExGothic}{MogaExGothic Bold}{MogaExGothic}} + {MogaExGothic}{MogaExGothic Bold}{MogaExGothic}{}} \zxjf@declare@preset{moga-90}{% \zxjf@multiweight{MogaEx90Mincho}{MogaEx90Mincho Bold}% - {MogaEx90Gothic}{MogaEx90Gothic Bold}{MogaEx90Gothic}} + {MogaEx90Gothic}{MogaEx90Gothic Bold}{MogaEx90Gothic}{}} \zxjf@declare@preset{ume}{% \zxjf@multiweight{Ume Mincho}{Ume Mincho}% - {Ume Gothic}{Ume Gothic O5}{Ume Gothic O5}} -\zxjf@declare@preset{kozuka-pro}{% - \zxjf@multiweight@opt{KozMinPro-Regular}{KozMinPro-Bold}% - {KozGoPro-Regular}{KozGoPro-Bold}% - {KozGoPro-Medium}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{kozuka-pro/prop}{% - \zxjf@multiweight@opt{KozMinPro-Regular}{KozMinPro-Bold}% + {Ume Gothic}{Ume Gothic O5}{Ume Gothic O5}{}} +\zxjf@declare@preset@with@prop{kozuka-pro}{% + \zxjf@multiweight{KozMinPro-Regular}{KozMinPro-Bold}% {KozGoPro-Regular}{KozGoPro-Bold}% - {KozGoPro-Medium}{RawFeature=+palt;+kern}} -\zxjf@declare@preset{kozuka-pr6}{% - \zxjf@multiweight@opt{KozMinProVI-Regular}{KozMinProVI-Bold}% + {KozGoPro-Medium}} +\zxjf@declare@preset@with@prop{kozuka-pr6}{% + \zxjf@multiweight{KozMinProVI-Regular}{KozMinProVI-Bold}% {KozGoProVI-Regular}{KozGoProVI-Bold}% - {KozGoProVI-Medium}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{kozuka-pr6/prop}{% - \zxjf@multiweight@opt{KozMinProVI-Regular}{KozMinProVI-Bold}% - {KozGoProVI-Regular}{KozGoProVI-Bold}% - {KozGoProVI-Medium}{RawFeature=+palt;+kern}} -\zxjf@declare@preset{kozuka-pr6n}{% - \zxjf@multiweight@opt{KozMinPr6N-Regular}{KozMinPr6N-Bold}% - {KozGoPr6N-Regular}{KozGoPr6N-Bold}% - {KozGoPr6N-Medium}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{kozuka-pr6n/prop}{% - \zxjf@multiweight@opt{KozMinPr6N-Regular}{KozMinPr6N-Bold}% + {KozGoProVI-Medium}} +\zxjf@declare@preset@with@prop{kozuka-pr6n}{% + \zxjf@multiweight{KozMinPr6N-Regular}{KozMinPr6N-Bold}% {KozGoPr6N-Regular}{KozGoPr6N-Bold}% - {KozGoPr6N-Medium}{RawFeature=+palt;+kern}} -\zxjf@declare@preset{hiragino-pro}{% - \zxjf@multiweight@opt{Hiragino Mincho Pro W3}{Hiragino Mincho Pro W6}% - {Hiragino Kaku Gothic Pro W3}{Hiragino Kaku Gothic Pro W6}% - {Hiragino Kaku Gothic Pro W6}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{hiragino-pro/prop}{% - \zxjf@multiweight@opt{Hiragino Mincho Pro W3}{Hiragino Mincho Pro W6}% + {KozGoPr6N-Medium}} +\zxjf@declare@preset@with@prop{hiragino-pro}{% + \zxjf@multiweight{Hiragino Mincho Pro W3}{Hiragino Mincho Pro W6}% {Hiragino Kaku Gothic Pro W3}{Hiragino Kaku Gothic Pro W6}% - {Hiragino Kaku Gothic Pro W6}{RawFeature=+palt;+kern}} -\zxjf@declare@preset{hiragino-pron}{% - \zxjf@multiweight@opt{Hiragino Mincho ProN W3}{Hiragino Mincho ProN W6}% + {Hiragino Kaku Gothic Pro W6}} +\zxjf@declare@preset@with@prop{hiragino-pron}{% + \zxjf@multiweight{Hiragino Mincho ProN W3}{Hiragino Mincho ProN W6}% {Hiragino Kaku Gothic ProN W3}{Hiragino Kaku Gothic ProN W6}% - {Hiragino Kaku Gothic ProN W6}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{hiragino-pron/prop}{% - \zxjf@multiweight@opt{Hiragino Mincho ProN W3}{Hiragino Mincho ProN W6}% - {Hiragino Kaku Gothic ProN W3}{Hiragino Kaku Gothic ProN W6}% - {Hiragino Kaku Gothic ProN W6}{RawFeature=+palt;+kern}} -\zxjf@declare@preset{morisawa-pro}{% - \zxjf@multiweight@opt{A-OTF-RyuminPro-Light.otf}{A-OTF-FutoMinA101Pro-Bold.otf}% - {A-OTF-GothicBBBPro-Medium.otf}{A-OTF-FutoGoB101Pro-Bold.otf}% - {A-OTF-GothicBBBPro-Medium.otf}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{morisawa-pro/prop}{% - \zxjf@multiweight@opt{A-OTF-RyuminPro-Light.otf}{A-OTF-FutoMinA101Pro-Bold.otf}% + {Hiragino Kaku Gothic ProN W6}} +\zxjf@declare@preset@with@prop{morisawa-pro}{% + \zxjf@multiweight{A-OTF-RyuminPro-Light.otf}{A-OTF-FutoMinA101Pro-Bold.otf}% {A-OTF-GothicBBBPro-Medium.otf}{A-OTF-FutoGoB101Pro-Bold.otf}% - {A-OTF-GothicBBBPro-Medium.otf}{RawFeature=+palt;+kern}} -\zxjf@declare@preset{morisawa-pr6n}{% - \zxjf@multiweight@opt{A-OTF-RyuminPr6N-Light.otf}{A-OTF-FutoMinA101Pr6N-Bold.otf}% - {A-OTF-GothicBBBPr6N-Medium.otf}{A-OTF-FutoGoB101Pr6N-Bold.otf}% - {A-OTF-GothicBBBPr6N-Medium.otf}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{morisawa-pr6n/prop}{% - \zxjf@multiweight@opt{A-OTF-RyuminPr6N-Light.otf}{A-OTF-FutoMinA101Pr6N-Bold.otf}% + {A-OTF-GothicBBBPro-Medium.otf}} +\zxjf@declare@preset@with@prop{morisawa-pr6n}{% + \zxjf@multiweight{A-OTF-RyuminPr6N-Light.otf}{A-OTF-FutoMinA101Pr6N-Bold.otf}% {A-OTF-GothicBBBPr6N-Medium.otf}{A-OTF-FutoGoB101Pr6N-Bold.otf}% - {A-OTF-GothicBBBPr6N-Medium.otf}{RawFeature=+palt;+kern}} -\zxjf@declare@preset{yu-win}{% - \zxjf@multiweight@opt{YuMincho-Regular}{YuMincho-Demibold}% + {A-OTF-GothicBBBPr6N-Medium.otf}} +\zxjf@declare@preset@with@prop{yu-win}{% + \zxjf@multiweight{YuMincho-Regular}{YuMincho-Demibold}% {YuGothic-Regular}{YuGothic-Bold}% - {YuGothic-Regular}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{yu-win/prop}{% - \zxjf@multiweight@opt{YuMincho-Regular}{YuMincho-Demibold}% - {YuGothic-Regular}{YuGothic-Bold}% - {YuGothic-Regular}{RawFeature=+palt;+kern}} + {YuGothic-Regular}} \zxjf@declare@preset@with@prop{yu-win10}{% - \zxjf@multiweight@opt{YuMincho-Regular}{YuMincho-Demibold}% + \zxjf@multiweight{YuMincho-Regular}{YuMincho-Demibold}% {YuGothic-Regular}{YuGothic-Bold}% {YuGothic-Medium}} -\zxjf@declare@preset{yu-osx}{% - \zxjf@multiweight@opt{YuMincho-Medium}{YuMincho-Demibold}% - {YuGothic-Medium}{YuGothic-Bold}% - {YuGothic-Medium}{RawFeature=-palt;-kern}} -\zxjf@declare@preset{yu-osx/prop}{% - \zxjf@multiweight@opt{YuMincho-Medium}{YuMincho-Demibold}% +\zxjf@declare@preset@with@prop{yu-osx}{% + \zxjf@multiweight{YuMincho-Medium}{YuMincho-Demibold}% {YuGothic-Medium}{YuGothic-Bold}% - {YuGothic-Medium}{RawFeature=+palt;+kern}} + {YuGothic-Medium}} \zxjf@declare@preset@with@prop{sourcehan}{% - \zxjf@multiweight@opt{SourceHanSerif-Regular}{SourceHanSerif-Bold}% + \zxjf@multiweight{SourceHanSerif-Regular}{SourceHanSerif-Bold}% {SourceHanSans-Regular}{SourceHanSans-Bold}% {SourceHanSans-Medium}} \zxjf@declare@preset@with@prop{sourcehan-jp}{% - \zxjf@multiweight@opt{SourceHanSerifJP-Regular}{SourceHanSerifJP-Bold}% + \zxjf@multiweight{SourceHanSerifJP-Regular}{SourceHanSerifJP-Bold}% {SourceHanSansJP-Regular}{SourceHanSansJP-Bold}% {SourceHanSansJP-Medium}} \zxjf@declare@preset@with@prop{noto}{% - \zxjf@multiweight@opt{NotoSerifCJKjp-Regular}{NotoSerifCJKjp-Bold}% + \zxjf@multiweight{NotoSerifCJKjp-Regular}{NotoSerifCJKjp-Bold}% {NotoSansCJKjp-Regular}{NotoSansCJKjp-Bold}% {NotoSansCJKjp-Medium}} \zxjf@declare@preset@with@prop{noto-jp}{% - \zxjf@multiweight@opt{NotoSerifJP-Regular}{NotoSerifJP-Bold}% + \zxjf@multiweight{NotoSerifJP-Regular}{NotoSerifJP-Bold}% {NotoSansJP-Regular}{NotoSansJP-Bold}% {NotoSansJP-Medium}} \zxjf@declare@preset@with@prop{haranoaji}{% - \zxjf@multiweight@opt{HaranoAjiMincho-Regular}{HaranoAjiMincho-Bold}% + \zxjf@multiweight{HaranoAjiMincho-Regular}{HaranoAjiMincho-Bold}% {HaranoAjiGothic-Regular}{HaranoAjiGothic-Bold}% {HaranoAjiGothic-Medium}} %(alias) \zxjf@declare@preset@alias@with@prop{kozuka}{kozuka-pro} \zxjf@declare@preset@alias@with@prop{morisawa}{morisawa-pro} \zxjf@declare@preset@alias{moga-mobo-ex}{moga} -\zxjf@declare@preset@alias{noto-otf}{noto} -\zxjf@declare@preset@alias{hiragino}{hiragino-pro} +\zxjf@declare@preset@alias@with@prop{noto-otf}{noto} +\zxjf@declare@preset@alias@with@prop{hiragino}{hiragino-pro} +%% \zxjf@declare@sub@preset@nf@with@prop{<name>}{<fam>}{<font>} +\zxjf@onlypreamble@def\zxjf@declare@sub@preset@nf@with@prop#1#2#3{% + \zxjf@declare@preset{#1}{\zxjf@newfamily{#2}{RawFeature=-palt;-kern}{#3}}% + \zxjf@declare@preset{#1/prop}{\zxjf@newfamily{#2}{RawFeature=+palt;+kern}{#3}}} %% definitions of sub preset mappings \zxjf@declare@preset{hg}{% \zxjf@newfamily{hgmc}{BoldFont=HGSMinchoE}{HGSMinchoB}% @@ -396,21 +410,16 @@ \zxjf@newfamily{hggs}{}{HGPGyoshotai}% \zxjf@newfamily{hgpp}{}{HGPSoeiKakupoptai}% } -\zxjf@declare@preset{hiraginomg-pro}{% - \zxjf@newfamily{hmg}{RawFeature=-palt;-kern}{Hiragino Maru Gothic Pro W4}} -\zxjf@declare@preset{hiraginomg-pro/prop}{% - \zxjf@newfamily{hmg}{RawFeature=+palt;+kern}{Hiragino Maru Gothic Pro W4}} -\zxjf@declare@preset{hiraginomg-pron}{% - \zxjf@newfamily{hmg}{RawFeature=-palt;-kern}{Hiragino Maru Gothic ProN W4}} -\zxjf@declare@preset{hiraginomg-pron/prop}{% - \zxjf@newfamily{hmg}{RawFeature=+palt;+kern}{Hiragino Maru Gothic ProN W4}} -\zxjf@declare@preset@alias{hiraginomg}{hiraginomg-pro} -\zxjf@declare@preset@alias{hiraginomg/prop}{hiraginomg-pro/prop} +\zxjf@declare@sub@preset@nf@with@prop{hiraginomg-pro}% + {hmg}{Hiragino Maru Gothic Pro W4} +\zxjf@declare@sub@preset@nf@with@prop{hiraginomg-pron}% + {hmg}{Hiragino Maru Gothic ProN W4} +\zxjf@declare@preset@alias@with@prop{hiraginomg}{hiraginomg-pro} \zxjf@declare@preset{mobo}{% - \zxjf@newfamily{mobo}{Bold=MoboExGothic Bold}{MoboExGothic}} + \zxjf@newfamily{mobo}{BoldFont=MoboExGothic Bold}{MoboExGothic}} \zxjf@declare@preset{mobo-90}{% - \zxjf@newfamily{mobo}{Bold=MoboEx90Gothic Bold}{MoboEx90Gothic}} + \zxjf@newfamily{mobo}{BoldFont=MoboEx90Gothic Bold}{MoboEx90Gothic}} \zxjf@declare@preset{maruberi}{% \zxjf@newfamily{mmg}{}{MotoyaLMaru}} |