summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/addons
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/addons')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty358
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty101
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty351
4 files changed, 320 insertions, 501 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty
deleted file mode 100644
index dd6bd5b284c..00000000000
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty
+++ /dev/null
@@ -1,358 +0,0 @@
-%
-% luatexja-fontspec-24.sty
-%
-
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec-24}[2017/04/19 fontspec support of LuaTeX-ja]
-\RequirePackage{l3keys2e,luatexja}
-\ExplSyntaxOn
-
-%%%%%%%% Change Japanese font family by \rmfamily or not
-\cs_new:Npn \ltj_fontspec_match_cmd {
- \renewcommand\jttdefault{\gtdefault}
- \@ltj@match@familytrue
- \DeclareDocumentCommand \setmonojfont { O{} m } {
- \ltj_fontspec_set_family:Nnn \jttdefault {##1}{##2}
- \normalfont
- }
-}
-\bool_if:NT \ltj_fontspec_match_bool \ltj_fontspec_match_cmd
-%%%%%%%% Messages
-
-\msg_new:nnn {luatexja-fontspec} {addjfontfeatures-ignored}
-{
- \string\addjfontfeature (s)~ ignored;\\
- it~ cannot~ be~ used~ with~ a~ font~ that~ wasn't~ selected~ by~ luatexja-fontspec.
-}
-
-\msg_new:nnn {luatexja-fontspec} {altfont-ignored-by-norange}
-{
- ignored~ sublist~ `#1'~ in~ AltFont~ (no~ range~ is~ specified).
-}
-
-\msg_new:nnn {luatexja-fontspec} {altfont-ignored-by-rangeonly}
-{
- ignored~ sublist~ `#1'~ in~ AltFont~ (only~ range~ is~ specified).
-}
-
-\cs_generate_variant:Nn \prg_new_conditional:Nnn {Nnx}
-
-%%%%%%%% Internal control sequences
-%% Each CS is ltj_fontspec version that corresponds to original CS of fontspec.
-\cs_new:Nn \ltj_fontspec_define_option:nn {
- \__fontspec_keys_define_code:nnn {fontspec} {#1} {#2}
-}
-\cs_new:Nn \ltj_fontspec_define_preparse_external:nn {
- \__fontspec_keys_define_code:nnn {fontspec-preparse-external} {#1} {#2}
-}
-\cs_new:Nn \ltj_fontspec_define_altfont_option:nn {
- \__fontspec_keys_define_code:nnn {fontspec-ltjaltfont} {#1} {#2}
-}
-
-%% Alternate Fonts
-%% Spec: AltFont = {
-%% ...
-%% { Range = <range>, <font features> },
-%% { Range = <range>, Font = <font name>, <font features> },
-%% { Range = <range>, Font = <font name> },
-%% ...
-%% }
-\tl_new:N \l_ltj_fontspec_altname_tl
-\tl_new:N \l_ltj_fontspec_altrange_tl
-\clist_new:N \l_ltj_fontspec_altfont_clist
-\clist_new:N \l_ltj_fontspec_altfont_leftover_clist
-\int_new:N \g_ltj_fontspec_altnumber_int
-
-\ltj_fontspec_define_altfont_option:nn {Range} {
- \tl_set:Nn \l_ltj_fontspec_altrange_tl {#1}
-}
-\ltj_fontspec_define_altfont_option:nn {Font} {
- \fontspec_complete_fontname:Nn \l_ltj_fontspec_altname_tl {#1}
-}
-\__fontspec_keys_define_code:nnn {fontspec-ltjaltfont-reparse} {AltFont} {
- \clist_put_right:Nn \l_ltj_fontspec_altfont_clist { #1 }
-}
-\__fontspec_keys_define_code:nnn {fontspec-ltjaltfont-reparse} {YokoFeatures} {
- \clist_put_right:Nn \l_ltj_fontspec_fontfeat_yoko_clist { #1 }
-}
-\__fontspec_keys_define_code:nnn {fontspec-ltjaltfont-reparse} {TateFeatures} {
- \clist_put_right:Nn \l_ltj_fontspec_fontfeat_tate_clist { #1 }
-}
-\__fontspec_keys_define_code:nnn {fontspec-ltjaltfont-reparse} {TateFont} {
- \tl_if_empty:nF {#1} {
- \fontspec_complete_fontname:Nn \l_ltj_fontspec_fontname_tate_tl {#1}
- }
-}
-%%
-\clist_new:N \l_ltj_fontspec_fontfeat_yoko_clist
-\clist_new:N \l_ltj_fontspec_fontfeat_tate_clist
-\tl_new:N \l_ltj_fontspec_fontname_tate_tl
-
-\cs_new:Npn \ltj_fontspec_DeclareFontFamily #1 #2 #3 {
- \DeclareKanjiFamily {JY3} {#2} {#3}
- \DeclareKanjiFamily {JT3} {#2} {#3}
-}
-
-\cs_set_eq:NN \__ltj_orig_fontspec_select:nn \fontspec_select:nn
-\cs_new:Nn \ltj_fontspec_select:nn {
- \group_begin:
- \ltj_fontspec_define_option:nn {AltFont} {
- \clist_put_right:Nn \l_ltj_fontspec_altfont_clist {##1}
- }
- \ltj_fontspec_define_option:nn {CID} {
- \__fontspec_update_featstr:n {cid=##1}
- }
- \ltj_fontspec_define_option:nn {Kanjiskip} {
- \str_if_eq_x:nnTF {false} { \str_lower_case:n { ##1 } }{
- \__fontspec_update_featstr:n {-ltjksp}
- } {
- \__fontspec_update_featstr:n {+ltjksp}
- }
- }
- \ltj_fontspec_define_option:nn {JFM} {
- \__fontspec_update_featstr:n {jfm=##1}
- }
- % vary by shape
- \ltj_fontspec_define_option:nn {YokoFeatures} {
- \clist_put_right:Nn \l_ltj_fontspec_fontfeat_yoko_clist { ##1 }
- }
- \ltj_fontspec_define_option:nn {TateFeatures} {
- \clist_put_right:Nn \l_ltj_fontspec_fontfeat_tate_clist { ##1 }
- }
- \ltj_fontspec_define_option:nn {TateFont}
- {
- \tl_if_empty:nF {##1} {
- \fontspec_complete_fontname:Nn \l_ltj_fontspec_fontname_tate_tl {##1}
- }
- }
- \ltj_fontspec_define_option:nn {JFM-var} {
- \__fontspec_update_featstr:n {jfmvar=##1}
- }
- \ltj_fontspec_define_preparse_external:nn {NoEmbed} {
- \cs_set:Nn \__fontspec_namewrap:n {psft:####1}
- }
- %% Omit the warning message
- %% "OpenType feature 'Kerning=Off' (-kern) not available ..."
- \ltj_fontspec_define_option:nn {Kerning/Off} {
- \__fontspec_update_featstr:n {-kern}
- }
- \clist_set:Nx \g__fontspec_default_fontopts_clist {
- YokoFeatures = { JFM=ujis }, TateFeatures = { JFM=ujisv },
- Scale=\fp_use:N \g_ltj_fontspec_scale_fp, Kerning=Off, Script=CJK,
- \g__ltj_fontspec_default_fontopts_clist
- }
- \prop_set_eq:NN \g__fontspec_fontopts_prop \g__ltj_fontspec_fontopts_prop
- \cs_set_eq:NN \__fontspec_make_font_shapes:Nnnnn \ltj_fontspec_make_font_shapes:Nnnnn
- \cs_set_eq:NN \DeclareFontFamily \ltj_fontspec_DeclareFontFamily
- \tl_set:Nn \g_fontspec_encoding_tl {JY3}
- \__ltj_orig_fontspec_select:nn{#1}{#2}
- \group_end:
-}
-
-%% declare_shape
-
-\cs_new:Nn \ltj_fontspec_declare_shape_yoko:nnnn {
- \ltj_fontspec_declare_shape_aux:nnnnnn {#1} {#2} {#3} {#4} { JY3 } { \l_ltj_fontspec_fontfeat_yoko_clist }
-}
-\cs_new:Nn \ltj_fontspec_declare_shape_tate:nnnn {
- \ltj_fontspec_declare_shape_aux:nnnnnn {#1} {#2} {#3} {#4} { JT3 } { \l_ltj_fontspec_fontfeat_tate_clist }
-}
-\cs_new:Nn \ltj_fontspec_declare_shape:nnnn {
- \ltj_fontspec_declare_shape_yoko:nnnn {#1} {#2} {#3} {#4}
- \ltj_fontspec_declare_shape_tate:nnnn {#1} {#2} {#3} {#4}
-}
-\cs_generate_variant:Nn \ltj_fontspec_declare_shape:nnnn {nnxx}
-\cs_generate_variant:Nn \ltj_fontspec_declare_shape_yoko:nnnn {nnxx}
-\cs_generate_variant:Nn \ltj_fontspec_declare_shape_tate:nnnn {nnxx}
-
-\cs_new:Nn \ltj_fontspec_declare_shape_aux:nnnnnn
- {
- \tl_clear:N \l__fontspec_nfss_tl
- \tl_clear:N \l__fontspec_nfss_sc_tl
- \tl_set_eq:NN \l__fontspec_saved_fontname_tl \l_fontspec_fontname_tl
-
- \tl_set:Nn \g_fontspec_encoding_tl {#5}
- \tl_set:Nn \l__fontspec_nfss_enc_tl {#5}
- \exp_args:Nx \clist_map_inline:nn {#4}
- {
- \tl_clear:N \l__fontspec_size_tl
- \tl_set_eq:NN \l__fontspec_sizedfont_tl \l__fontspec_saved_fontname_tl % in case not spec'ed
-
- \keys_set_known:nxN {fontspec-sizing} { \exp_after:wN \use:n ##1 }
- \l__fontspec_sizing_leftover_clist
- \tl_if_empty:NT \l__fontspec_size_tl { \__fontspec_error:n {no-size-info} }
-
- \str_if_eq:nnTF { #5 } { JY3 } {
- % "normal"
- \__fontspec_load_fontname:n {\l__fontspec_sizedfont_tl}
- } {
- \tl_if_empty:NTF \l_ltj_fontspec_fontname_tate_tl
- { \__fontspec_load_fontname:n {\l__fontspec_sizedfont_tl} }
- { \__fontspec_load_fontname:n {\l_ltj_fontspec_fontname_tate_tl} }
- }
- \__fontspec_setup_nfss:Nnn \l__fontspec_nfss_tl {#3} {#6}
- }
- \bool_set_true:N \l__fontspec_nosc_bool
- \__fontspec_declare_shapes_normal:nn {#1} {#2}
- \__fontspec_declare_shape_slanted:nn {#1} {#2}
- }
-
-\cs_new:Nn \ltj_fontspec_set_family:Nnn {
- \cs_set_eq:NN \fontspec_select:nn \ltj_fontspec_select:nn
- \__ltj_orig_fontspec_set_family:Nnn #1 {#2} {#3}
- \cs_set_eq:NN \fontspec_select:nn \__ltj_orig_fontspec_select:nn
-}
-\cs_set_eq:NN \__ltj_orig_fontspec_set_family:Nnn \fontspec_set_family:Nnn
-\cs_set_eq:NN \__ltj_orig_fontspec_make_font_shapes:Nnnnn \__fontspec_make_font_shapes:Nnnnn
-\cs_set_eq:NN \__ltj_fontspec_orig_DeclareFontShape \DeclareFontShape
-
-\cs_new:Nn \ltj_fontspec_make_font_shapes:Nnnnn {
- \group_begin:
- %% 基底フォント
- \cs_set_eq:NN \__fontspec_font_set:Nnn \use_none:nnn
- \cs_set_eq:NN \__fontspec_font_if_null:NT \use_none:nn
- \cs_set_eq:NN \__fontspec_declare_shape:nnxx \ltj_fontspec_declare_shape:nnxx
- \__ltj_orig_fontspec_make_font_shapes:Nnnnn {#1} {#2} {#3} {#4} {#5}
- %%
- \ltj_fontspec_make_font_shapes_alt:Nnnnnn {#1}{#2}{#3}
- {#4, \l_ltj_fontspec_fontfeat_yoko_clist}{#5} {JY3 }
- \ltj_fontspec_make_font_shapes_alt:Nnnnnn {#1}{#2}{#3}
- {#4, \l_ltj_fontspec_fontfeat_tate_clist}{#5} {JT3}
- \group_end:
- }
-
-%%% Altfont 内部処理部
-\cs_new:Nn \ltj_fontspec_make_font_shapes_alt:Nnnnnn {
- \group_begin:
- \str_if_eq:nnTF { #6 } { JY3 } {
- \cs_set_eq:NN \__fontspec_declare_shape:nnxx \ltj_fontspec_declare_shape_yoko:nnxx
- }{
- \cs_set_eq:NN \__fontspec_declare_shape:nnxx \ltj_fontspec_declare_shape_tate:nnxx
- }
- \keys_set_known:nn {fontspec-ltjaltfont-reparse} { #4 }
- \clist_if_empty:NF \l_ltj_fontspec_altfont_clist {
- \int_gzero:N \g_ltj_fontspec_altnumber_int
- \clist_map_inline:Nn \l_ltj_fontspec_altfont_clist {
- \tl_clear:N \l_ltj_fontspec_altrange_tl
- \tl_set:Nn \l_ltj_fontspec_altname_tl { #1 }
- \tl_set:Nn \l_tmpa_tl { #1 }
-
- \keys_set_known:nxN {fontspec-ltjaltfont} { \exp_after:wN \use:n ##1 }
- \l_ltj_fontspec_altfont_leftover_clist
- \keys_set_known:nn {fontspec-ltjaltfont-reparse} { \exp_after:wN \use:n ##1 }
-
- \tl_if_empty:NT \l_ltj_fontspec_altrange_tl {
- \msg_warning:nnn {luatexja-fontspec} {altfont-ignored-by-norange} { ##1 }
- } {
- \bool_if:nTF {
- \tl_if_eq_p:NN \l_ltj_fontspec_altname_tl \l_tmpa_tl
- &&
- \tl_if_empty_p:N \l_ltj_fontspec_altfont_leftover_clist
- } {
- \msg_warning:nnn {luatexja-fontspec} {altfont-ignored-by-rangeonly} { ##1 }
- } {
- \__ltj_orig_fontspec_make_font_shapes:Nnnnn
- { \l_ltj_fontspec_altname_tl } {#2}
- {#3 _ alt \int_use:N \g_ltj_fontspec_altnumber_int }
- {#4, \l_ltj_fontspec_altfont_leftover_clist }
- {#5}
- \DeclareAlternateKanjiFont
- { #6 }{ \l_fontspec_family_tl }{#2}{#3}%
- { #6 }{ \l_fontspec_family_tl }{#2}
- { #3 _alt \int_use:N \g_ltj_fontspec_altnumber_int }
- { \l_ltj_fontspec_altrange_tl }
- \int_gincr:N \g_ltj_fontspec_altnumber_int
- }
- }
- }
- }
- \group_end:
-}
-
-
-%%%%%%%% User commands
-\DeclareDocumentCommand \jfontspec { O{} m O{} } {
- \ltj_fontspec_set_family:Nnn \k@family {#1,#3}{#2}
- \selectfont
- \ignorespaces
-}
-
-\DeclareDocumentCommand \setmainjfont { O{} m O{} } {
- \ltj_fontspec_set_family:Nnn \mcdefault {#1,#3}{#2}
- \DeclareSymbolFont{mincho}{JY3}{\l_fontspec_family_tl}{m}{n}
- \SetSymbolFont{mincho}{bold}{JY3}{\l_fontspec_family_tl}{bx}{n}
- \normalfont
-}
-
-\DeclareDocumentCommand \setsansjfont { O{} m O{} } {
- \ltj_fontspec_set_family:Nnn \gtdefault {#1,#3}{#2}
- \DeclareMathAlphabet{\mathgt}{JY3}{\l_fontspec_family_tl}{m}{n}
- \normalfont
-}
-
-\DeclareDocumentCommand \newjfontfamily { m O{} m O{} } {
- \cs_set_eq:NN \fontspec_set_family:Nnn \ltj_fontspec_set_family:Nnn
- \newfontfamily #1 [#2,#4] {#3}
- \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn
-}
-
-\DeclareDocumentCommand \newjfontface { m O{} m O{} } {
- \newjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
-}
-
-\clist_new:N \g__ltj_fontspec_default_fontopts_clist
-\prop_new:N \g__ltj_fontspec_fontopts_prop
-\DeclareDocumentCommand \defaultjfontfeatures { t+ o m }
- {
- \IfNoValueTF {#2}
- { \__ltj_fontspec_set_default_features:nn {#1} {#3} }
- { \__ltj_fontspec_set_font_default_features:nnn {#1} {#2} {#3} }
- \ignorespaces
- }
-\cs_new:Nn \__ltj_fontspec_set_default_features:nn
- {
- \clist_set_eq:NN \l__ltj_fontspec_tmp_clist \g__fontspec_default_fontopts_clist
- \clist_set_eq:NN \g__fontspec_default_fontopts_clist \g__ltj_fontspec_default_fontopts_clist
- \__fontspec_set_default_features:nn {#1} {#2}
- \clist_set_eq:NN \g__ltj_fontspec_default_fontopts_clist \g__fontspec_default_fontopts_clist
- \clist_set_eq:NN \g__fontspec_default_fontopts_clist \l__ltj_fontspec_tmp_clist
- }
-\cs_new:Nn \__ltj_fontspec_set_font_default_features:nnn
- {
- \prop_set_eq:NN \l__ltj_fontspec_tmp_prop \g__fontspec_fontopts_prop
- \prop_set_eq:NN \g__fontspec_fontopts_prop \g__ltj_fontspec_fontopts_prop
- \__fontspec_set_font_default_features:nnn {#1} {#2} {#3}
- \prop_set_eq:NN \g__ltj_fontspec_fontopts_prop \g__fontspec_fontopts_prop
- \prop_set_eq:NN \g__fontspec_fontopts_prop \l__ltj_fontspec_tmp_prop
- }
-
-\DeclareDocumentCommand \addjfontfeatures {m} {
- \ltj_fontspec_if_fontspec_font:TF
- {
- \group_begin:
- \tl_set_eq:NN \f@family \k@family
- \cs_set_eq:NN \fontspec_select:nn \ltj_fontspec_select:nn
- \addfontfeatures {#1}
- \group_end:
- \fontfamily\l_fontspec_family_tl\selectfont
- }{
- \msg_warning:nn {luatexja-fontspec} {addjfontfeatures-ignored}
- }
- \ignorespaces
-}
-
-\cs_set_eq:NN \addjfontfeature \addjfontfeatures
-
-\prg_new_conditional:Nnn \ltj_fontspec_if_fontspec_font: {TF,T,F}
-{
- \cs_if_exist:cTF {g__fontspec_ \k@family _prop} \prg_return_true: \prg_return_false:
-}
-
-%%% CJKShape=JIS2004
-\__fontspec_define_feature_option:nnnnn{CJKShape}{JIS2004}{20}{100}{+jp04}
-%%% CharacterWidth={VerticalAlternateProportional, VerticalAlternateHalf}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{VerticalAlternateProportional}{22}{100}{+vpal}
-\__fontspec_define_feature_option:nnnnn{CharacterWidth}{VerticalAlternateHalf}{22}{101}{+vhal}
-\__fontspec_define_feature_option:nnnnn{Kerning}{Vertical} {}{}{+vkrn}
-
-\endinput
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty
index c3ae22a79f2..848eedbd68a 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec}[2017/05/05 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec}[2017/06/25 fontspec support of LuaTeX-ja]
\RequirePackage{l3keys2e,luatexja}
\ExplSyntaxOn
@@ -26,10 +26,11 @@
unknown .code:n = \PassOptionsToPackage { \l_keys_key_tl } {fontspec},
}
\ProcessKeysOptions{ luatexja-fontspec }
-\RequirePackage{fontspec}[2014/06/01]% v2.4
-\@ifpackagelater{fontspec}{2017/01/01}%
- {\RequirePackage{luatexja-fontspec-25c}}% v2.5c
- {\RequirePackage{luatexja-fontspec-24}}% --v2.5a
+\RequirePackage{fontspec}[2017/01/01]% v2.5c
+\RequirePackage{luatexja-fontspec-25c}
+%\@ifpackagelater{fontspec}{2017/01/01}%
+% {\RequirePackage{luatexja-fontspec-25c}}% v2.5c
+% {\RequirePackage{luatexja-fontspec-24}}% --v2.5a
\ExplSyntaxOff
%%%%%%%% Now we completely ignore kanjifont definition file.
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty
index 845b1a2aa74..ad421d0e1d4 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty
@@ -64,7 +64,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-otf}[2017/05/05]
+ \ProvidesPackage{luatexja-otf}[2017/05/20]
\fi %</LaTeX>
% Load core module if not yet.
@@ -97,8 +97,107 @@
\RequirePackage{luatexja-ajmacros}
\else %<*!LaTeX>
\input luatexja-ajmacros.sty %
+ % \bou is defined in lltjext, \mbox is defined in LaTeX kernel
+ \def\boutenchar{\char\euc"A1A2}%"
+ \def\bou#1{\ifvmode\leavevmode\fi\@bou#1\end}
+ \def\@bou#1{%
+ \ifx#1\end \let\next=\relax
+ \else
+ \ifnum\ltjgetparameter{direction}=3\relax
+ \hbox to\z@{\vbox to\z@{\boxmaxdepth\maxdimen
+ \vss\moveleft0.2\zw\hbox{\yoko\boutenchar}\nointerlineskip
+ \hbox{\char\euc"A1A1}}\hss}\nobreak#1\relax
+ \else
+ \hbox to\z@{\vbox to\z@{\boxmaxdepth\maxdimen
+ \vss\moveleft-0.2\zw\hbox{\boutenchar}\nointerlineskip
+ \hbox{\char\euc"A1A1}}\hss}\nobreak#1\relax
+ \fi
+ \let\next=\@bou
+ \fi\next}
+ \long\def\mbox#1{\leavevmode\hbox{#1}}
\fi %</LaTeX>
+% macros from otf.sty
+%for literature
+\protected\def\ajKunoji{%
+ \ifnum\ltjgetparameter{direction}=3 \mbox{\UTF{3033}\UTF{3035}}\else
+ \@PackageError{luatexja-otf}{A TATE character in YOKO mode!}{Change a direction to TATE.}%2003/03/12
+ \fi}
+\protected\def\ajKunojiwithBou{%
+ \ifnum\ltjgetparameter{direction}=3 \mbox{\bou{\mbox{\UTF{3033}}}\bou{\mbox{\UTF{3035}}}}\else
+ \@PackageError{luatexja-otf}{A TATE character in YOKO mode!}{Change a direction to TATE.}%2003/03/12
+ \fi}
+\protected\def\ajDKunoji{%
+ \ifnum\ltjgetparameter{direction}=3 \mbox{\UTF{3034}\UTF{3035}}\else
+ \@PackageError{luatexja-otf}{A TATE character in YOKO mode!}{Change a direction to TATE.}%2003/03/12
+ \fi}
+\protected\def\ajDKunojiwithBou{%
+ \ifnum\ltjgetparameter{direction}=3 \mbox{\bou{\mbox{\UTF{3034}}}\bou{\mbox{\UTF{3035}}}}\else
+ \@PackageError{luatexja-otf}{A TATE character in YOKO mode!}{Change a direction to TATE.}%2003/03/12
+ \fi}
+\protected\def\ajNinoji{\CID{12106}}
+\protected\def\ajvarNinoji{%
+ \ifnum\ltjgetparameter{direction}=3 \CID{12107}\else
+ \@PackageError{luatexja-otf}{A TATE character in YOKO mode!}{Change a direction to TATE.}%2003/03/12
+ \fi}
+\protected\def\ajYusuriten{%
+ \ifnum\ltjgetparameter{direction}=3 \CID{16193}\else
+ \@PackageError{luatexja-otf}{A TATE character in YOKO mode!}{Change a direction to TATE.}%2003/03/12
+ \fi}
+\protected\def\ajMasu{\UTF{303c}}
+\protected\def\ajYori{\UTF{309f}}
+\protected\def\ajKoto{\UTF{30ff}}
+\protected\def\ajUta{\UTF{303d}}
+%dingbats
+\protected\def\ajCommandKey{\UTF{2318}}
+\protected\def\ajReturnKey{\UTF{23ce}}
+\protected\def\ajCheckmark{\UTF{2713}}
+\protected\def\ajVisibleSpace{\UTF{2423}}
+\protected\def\ajSenteMark{\UTF{2617}}
+\protected\def\ajGoteMark{\UTF{2616}}
+\protected\def\ajClub{\UTF{2663}}
+\protected\def\ajHeart{\UTF{2661}}
+\protected\def\ajSpade{\UTF{2660}}
+\protected\def\ajDiamond{\UTF{2662}}
+\protected\def\ajvarClub{\UTF{2667}}
+\protected\def\ajvarHeart{\UTF{2665}}
+\protected\def\ajvarSpade{\UTF{2664}}
+\protected\def\ajvarDiamond{\UTF{2666}}
+\protected\def\ajPhone{\UTF{260e}}
+\protected\def\ajPostal{\UTF{3020}}
+\protected\def\ajvarPostal{\UTF{3036}}
+\protected\def\ajSun{\UTF{2600}}
+\protected\def\ajCloud{\UTF{2601}}
+\protected\def\ajUmbrella{\UTF{2602}}
+\protected\def\ajSnowman{\UTF{2603}}
+\protected\def\ajJIS{\UTF{3004}}
+\protected\def\ajJAS{\CID{12088}}
+\protected\def\ajBall{\CID{12097}}
+\protected\def\ajHotSpring{\UTF{2668}}
+\protected\def\ajWhiteSesame{\UTF{fe46}}
+\protected\def\ajBlackSesame{\UTF{fe45}}
+\protected\def\ajWhiteFlorette{\UTF{2740}}
+\protected\def\ajBlackFlorette{\UTF{273f}}
+\protected\def\ajRightBArrow{\CID{8206}}
+\protected\def\ajLeftBArrow{\CID{8207}}
+\protected\def\ajUpBArrow{\CID{8208}}
+\protected\def\ajDownBArrow{\CID{8209}}
+\protected\def\ajRightHand{\CID{8219}}
+\protected\def\ajLeftHand{\CID{8220}}
+\protected\def\ajUpHand{\CID{8221}}
+\protected\def\ajDownHand{\CID{8222}}
+\protected\def\ajRightScissors{\CID{12176}}
+\protected\def\ajLeftScissors{\CID{12175}}
+\protected\def\ajUpScissors{\CID{12177}}
+\protected\def\ajDownScissors{\CID{12178}}
+\protected\def\ajRightWArrow{\CID{12197}}
+\protected\def\ajLeftWArrow{\CID{12196}}
+\protected\def\ajUpWArrow{\CID{12198}}
+\protected\def\ajDownWArrow{\CID{12199}}
+\protected\def\ajRightDownArrow{\CID{12202}}
+\protected\def\ajLeftDownArrow{\CID{12203}}
+\protected\def\ajLeftUpArrow{\CID{12204}}
+\protected\def\ajRightUpArrow{\CID{12205}}
%%------------------ all done
\ltj@otf@AtEnd
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty
index 6a71e23d24f..d5c3d1a07bf 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty
@@ -1,5 +1,5 @@
% luatexja-preset.sty
-\ProvidesPackage{luatexja-preset}[2017/05/05 Japanese font presets]
+\ProvidesPackage{luatexja-preset}[2017/07/30 Japanese font presets]
\RequirePackage{expl3,l3keys2e}
\RequirePackage{luatexja}
@@ -58,22 +58,40 @@
% font preset
\bool_new:N \l_ltjpreset_office_bool % MS Office の HG 系フォントを使っているか
\bool_new:N \l_ltjpreset_noembed_bool % 非埋込か
-\clist_new:N \l_ltjpreset_font_list
+
+\prop_new:N \l_ltjpreset_font_prop
+\keys_define:nn { ltjpreset_set_font_list } {
+ mc .code:n =
+ \prop_put:Nnn \l_ltjpreset_font_prop { mc-l } {#1}
+ \prop_put:Nnn \l_ltjpreset_font_prop { mc-m } {#1}
+ \prop_put:Nnn \l_ltjpreset_font_prop { mc-bx } {#1},
+ gt .code:n =
+ \prop_put:Nnn \l_ltjpreset_font_prop { gt-u } {#1}
+ \prop_put:Nnn \l_ltjpreset_font_prop { gt-m } {#1}
+ \prop_put:Nnn \l_ltjpreset_font_prop { gt-bx } {#1}
+ \prop_put:Nnn \l_ltjpreset_font_prop { gt-eb } {#1},
+ unknown .code:n =
+ \prop_put:Non \l_ltjpreset_font_prop { \l_keys_key_tl } {#1}
+}
+
+
\cs_new:Npn \ltjpreset_set_uni:nn #1#2 {
- \ltjpreset_set_multi:n { #1, #2, #2, #2, #2, #2, #2 }
+ \keys_set:nn { ltjpreset_set_font_list } {
+ mc = #1, gt = #2, mc-bx = #2, mg-m = #2,
+ }
}
\cs_new:Npn \ltjpreset_set_multi:n #1 {
- \clist_set:Nn \l_ltjpreset_font_list { #1 }
+ \keys_set:nn { ltjpreset_set_font_list } { #1 }
\bool_set_false:N \l_ltjpreset_office_bool
\bool_set_false:N \l_ltjpreset_noembed_bool
}
\cs_new:Npn \ltjpreset_set_office:nn #1 #2{
\ltjpreset_set_multi:n {
- #1, HGMinchoE , % mc/m, mc/bx
- HGGothicM , HGGothicE , % gt/m, gt/bx (multiweight))
- #2 , HGSoeiKakugothicUB , % gt/m (uni), gt/eb
- HGMaruGothicMPRO % mg/m
+ mc-m = #1, mc-bx = HGMinchoE ,
+ gt-m = HGGothicM , gt-bx = HGGothicE ,
+ gt-u = #2 , gt-eb = HGSoeiKakugothicUB ,
+ mg-m = HGMaruGothicMPRO
}
\bool_set_true:N \l_ltjpreset_office_bool
}
@@ -93,98 +111,83 @@
%% Pro
\ltjpreset_declare_option:nn{kozuka-pro}{
\ltjpreset_set_multi:n {
- KozMinPro-Regular , % mc/m
- KozMinPro-Bold , % mc/bx
- KozGoPro-Regular , % gt/m (multi)
- KozGoPro-Bold , % gt/bx
- KozGoPro-Medium , % gt/m (uni)
- KozGoPro-Heavy , % gt/eb
- KozGoPro-Heavy % mg/m
+ mc-m = KozMinPro-Regular, mc-bx = KozMinPro-Bold,
+ gt-m = KozGoPro-Regular, gt-bx = KozGoPro-Bold,
+ gt-u = KozGoPro-Medium, gt-eb = KozGoPro-Heavy,
+ mg-m = KozGoPro-Heavy, mc-l = KozMinPro-Light,
}
}
%% Pr6
\ltjpreset_declare_option:nn{kozuka-pr6}{
\ltjpreset_set_multi:n {
- KozMinProVI-Regular , % mc/m
- KozMinProVI-Bold , % mc/bx
- KozGoProVI-Regular , % gt/m (multi)
- KozGoProVI-Bold , % gt/bx
- KozGoProVI-Medium , % gt/m (uni)
- KozGoProVI-Heavy , % gt/eb
- KozGoProVI-Heavy % mg/m
+ mc-m = KozMinProVI-Regular, mc-bx = KozMinProVI-Bold,
+ gt-m = KozGoProVI-Regular, gt-bx = KozGoProVI-Bold,
+ gt-u = KozGoProVI-Medium, gt-eb = KozGoProVI-Heavy,
+ mg-m = KozGoProVI-Heavy, mc-l = KozMinProVI-Light,
}
}
%% Pr6N
\ltjpreset_declare_option:nn{kozuka-pr6n}{
\ltjpreset_set_multi:n {
- KozMinPr6N-Regular , % mc/m
- KozMinPr6N-Bold , % mc/bx
- KozGoPr6N-Regular , % gt/m (multi)
- KozGoPr6N-Bold , % gt/bx
- KozGoPr6N-Medium , % gt/m (uni)
- KozGoPr6N-Heavy , % gt/eb
- KozGoPr6N-Heavy % mg/m
+ mc-m = KozMinPr6N-Regular, mc-bx = KozMinPr6N-Bold,
+ gt-m = KozGoPr6N-Regular, gt-bx = KozGoPr6N-Bold,
+ gt-u = KozGoPr6N-Medium, gt-eb = KozGoPr6N-Heavy,
+ mg-m = KozGoPr6N-Heavy, mc-l = KozMinPr6N-Light,
}
}
% ヒラギノ (OSX)
\ltjpreset_declare_option:nn{hiragino-pro}{
\ltjpreset_set_multi:n {
- HiraMinPro-W3 ,
- HiraMinPro-W6 ,
- HiraKakuPro-W3 , % gt/m (multi)
- HiraKakuPro-W6 ,
- HiraKakuPro-W6 , % gt/m (uni)
- HiraKakuStd-W8 ,
- HiraMaruPro-W4 ,
+ mc-m = HiraMinPro-W3, mc-bx = HiraMinPro-W6,
+ gt-m = HiraKakuPro-W3, gt-bx = HiraKakuPro-W6,
+ gt-u = HiraKakuPro-W6, gt-eb = HiraKakuStd-W8,
+ mg-m = HiraMaruPro-W4, mc-l = HiraMinPro-W2,
}
}
\ltjpreset_declare_option:nn{hiragino-pron}{
\ltjpreset_set_multi:n {
- HiraMinProN-W3 ,
- HiraMinProN-W6 ,
- HiraKakuProN-W3 , % gt/m (multi)
- HiraKakuProN-W6 ,
- HiraKakuProN-W6 , % gt/m (uni)
- HiraKakuStdN-W8 ,
- HiraMaruProN-W4 ,
+ mc-m = HiraMinProN-W3, mc-bx = HiraMinProN-W6,
+ gt-m = HiraKakuProN-W3, gt-bx = HiraKakuProN-W6,
+ gt-u = HiraKakuProN-W6, gt-eb = HiraKakuStdN-W8,
+ mg-m = HiraMaruProN-W4, mc-l = HiraMinProN-W2,
}
}
% モリサワ
\ltjpreset_declare_option:nn{morisawa-pro}{
\ltjpreset_set_multi:n {
- A-OTF-RyuminPro-Light.otf , A-OTF-FutoMinA101Pro-Bold.otf , % mc/m, mc/bx
- A-OTF-GothicBBBPro-Medium.otf , A-OTF-FutoGoB101Pro-Bold.otf , % gt/m, gt/bx (multiweight))
- A-OTF-GothicBBBPro-Medium.otf , A-OTF-MidashiGoPro-MB31.otf , % gt/m (uni), gt/eb
- A-OTF-Jun101Pro-Light.otf % mg/m
+ mc = A-OTF-RyuminPro-Light.otf, mc-bx = A-OTF-FutoMinA101Pro-Bold.otf,
+ gt-m = A-OTF-GothicBBBPro-Medium.otf , gt-bx = A-OTF-FutoGoB101Pro-Bold.otf,
+ gt-u = A-OTF-GothicBBBPro-Medium.otf , gt-eb = A-OTF-MidashiGoPro-MB31.otf,
+ mg-m = A-OTF-Jun101Pro-Light.otf,
}
}
\ltjpreset_declare_option:nn{morisawa-pr6n}{
\ltjpreset_set_multi:n {
- A-OTF-RyuminPr6N-Light.otf , A-OTF-FutoMinA101Pr6N-Bold.otf , % mc/m, mc/bx
- A-OTF-GothicBBBPr6N-Medium.otf , A-OTF-FutoGoB101Pr6N-Bold.otf , % gt/m, gt/bx (multiweight))
- A-OTF-GothicBBBPr6N-Medium.otf , A-OTF-MidashiGoPr6N-MB31.otf , % gt/m (uni), gt/eb
- A-OTF-ShinMGoPr6N-Light.otf % mg/m
+ mc = A-OTF-RyuminPr6N-Light.otf, mc-bx = A-OTF-FutoMinA101Pr6N-Bold.otf,
+ gt-m = A-OTF-GothicBBBPr6N-Medium.otf , gt-bx = A-OTF-FutoGoB101Pr6N-Bold.otf,
+ gt-u = A-OTF-GothicBBBPr6N-Medium.otf , gt-eb = A-OTF-MidashiGoPr6N-MB31.otf,
+ mg-m = A-OTF-Jun101Pr6N-Light.otf,
}
}
% 游明朝/游ゴシック (Win8.1)
\ltjpreset_declare_option:nn{yu-win}{
\ltjpreset_set_multi:n {
- YuMincho-Regular , YuMincho-Demibold , % mc/m, mc/bx
- YuGothic-Regular , YuGothic-Bold , % gt/m, gt/bx (multiweight))
- YuGothic-Regular , YuGothic-Bold , % gt/m (uni), gt/eb
- YuGothic-Bold % mg/m
+ mc-m = YuMincho-Regular, mc-bx = YuMincho-Demibold,
+ gt-m = YuGothic-Regular, gt-bx = YuGothic-Bold,
+ gt-u = YuGothic-Regular, gt-eb = YuGothic-Bold,
+ mg-m = YuGothic-Bold, mc-l = YuMincho-Light
}
}
% Win10
\ltjpreset_declare_option:nn{yu-win10}{
\ltjpreset_set_multi:n {
- YuMincho-Regular , YuMincho-Demibold , % mc/m, mc/bx
- YuGothic-Regular , YuGothic-Bold , % gt/m, gt/bx (multiweight))
- YuGothic-Medium , YuGothic-Bold , % gt/m (uni), gt/eb
- YuGothic-Bold % mg/m
+ mc-m = YuMincho-Regular, mc-bx = YuMincho-Demibold,
+ gt-m = YuGothic-Regular, gt-bx = YuGothic-Bold,
+ gt-u = YuGothic-Medium, gt-eb = YuGothic-Bold,
+ mg-m = YuGothic-Bold, mc-l = YuMincho-Light
}
}
@@ -192,51 +195,88 @@
% according to http://support.apple.com/kb/HT5944
\ltjpreset_declare_option:nn{yu-osx}{
\ltjpreset_set_multi:n {
- YuMincho~Medium , YuMincho~Demibold , % mc/m, mc/bx
- YuGothic~Medium , YuGothic~Bold , % gt/m, gt/bx (multiweight))
- YuGothic~Medium , YuGothic~Bold , % gt/m (uni), gt/eb
- YuGothic~Bold % mg/m
+ mc = YuMincho~Medium, mc-bx = YuMincho~Demibold,
+ gt-m = YuGothic~Medium, gt-u = YuGothic~Medium,
+ gt-bx = YuGothic~Bold, gt-eb = YuGothic~Bold,
+ mg-m = YuGothic~Bold
}
}
% moga-mobo
\ltjpreset_declare_option:nn{moga-mobo}{
\ltjpreset_set_multi:n {
- Moga90Mincho, Moga90Mincho~Bold , % mc/m, mc/bx
- Moga90Gothic, Moga90Gothic~Bold, % gt/m, gt/bx (multiweight))
- Moga90Gothic, Moga90Gothic~Bold, % gt/m (uni), gt/eb
- Mobo90Gothic % mg/m
+ mc = Moga90Mincho, mc-bx = Moga90Mincho~Bold,
+ gt-m = Moga90Gothic, gt-bx = Moga90Gothic~Bold,
+ gt-u = Moga90Gothic, gt-eb = Moga90Gothic~Bold,
+ mg-m = Mobo90Gothic
}
}
\ltjpreset_declare_option:nn{moga-mobo-ex}{
\ltjpreset_set_multi:n {
- MogaEx90Mincho, MogaEx90Mincho~Bold , % mc/m, mc/bx
- MogaEx90Gothic, MogaEx90Gothic~Bold, % gt/m, gt/bx (multiweight))
- MogaEx90Gothic, MogaEx90Gothic~Bold, % gt/m (uni), gt/eb
- MoboEx90Gothic % mg/m
+ mc = MogaEx90Mincho, mc-bx = MogaEx90Mincho~Bold,
+ gt-m = MogaEx90Gothic, gt-bx = MogaEx90Gothic~Bold,
+ gt-u = MogaEx90Gothic, gt-eb = MogaEx90Gothic~Bold,
+ mg-m = MoboEx90Gothic
}
}
% Ume fones
\ltjpreset_declare_option:nn{ume}{
\ltjpreset_set_multi:n {
- Ume~Mincho, Ume~Mincho,
- Ume~Gothic, Ume~Gothic~O5,
- Ume~Gothic~O5, Ume~Gothic~O5,
- Ume~Gothic~O4
+ mc = Ume~Mincho,
+ gt-m = Ume~Gothic, gt-bx = Ume~Gothic~O5,
+ gt-u = Ume~Gothic~O5, gt-eb = Ume~Gothic~O5,
+ mg-m = Ume~Gothic~O4
}
}
% Source Han {Serif,Sans}
\ltjpreset_declare_option:nn{sourcehan}{
\ltjpreset_set_multi:n {
- Source~Han~Serif~Regular, % mc/m
- Source~Han~Serif~Bold, % mc/bx
- Source~Han~Sans~Normal, % gt/m (multi)
- Source~Han~Sans~Bold, % gt/bx
- Source~Han~Sans~Medium, % gt/m (uni)
- Source~Han~Sans~Heavy, % gt/eb
- Source~Han~Sans~Heavy % mg/m
+ mc-m = Source~Han~Serif~Regular,
+ mc-bx = Source~Han~Serif~Bold,
+ gt-m = Source~Han~Sans~Regular,
+ gt-bx = Source~Han~Sans~Bold,
+ gt-u = Source~Han~Sans~Medium,
+ gt-eb = Source~Han~Sans~Heavy,
+ mg-m = Source~Han~Sans~Heavy,
+ mc-l = Source~Han~Serif~Light,
+ }
+}
+\ltjpreset_declare_option:nn{sourcehan-jp}{
+ \ltjpreset_set_multi:n {
+ mc-m = Source~Han~Serif~JP~Regular,
+ mc-bx = Source~Han~Serif~JP~Bold,
+ gt-m = Source~Han~Sans~JP~Regular,
+ gt-bx = Source~Han~Sans~JP~Bold,
+ gt-u = Source~Han~Sans~JP~Medium,
+ gt-eb = Source~Han~Sans~JP~Heavy,
+ mg-m = Source~Han~Sans~JP~Heavy,
+ mc-l = Source~Han~Serif~JP~Light,
+ }
+}
+\ltjpreset_declare_option:nn{noto-otc}{
+ \ltjpreset_set_multi:n {
+ mc-m = Noto~Serif~CJK~Regular,
+ mc-bx = Noto~Serif~CJK~Bold,
+ gt-m = Noto~Sans~CJK~Regular,
+ gt-bx = Noto~Sans~CJK~Bold,
+ gt-u = Noto~Sans~CJK~Medium,
+ gt-eb = Noto~Sans~CJK~Black,
+ mg-m = Noto~Sans~CJK~Black,
+ mc-l = Noto~Serif~CJK~Light,
+ }
+}
+\ltjpreset_declare_option:nn{noto-otf}{
+ \ltjpreset_set_multi:n {
+ mc-m = Noto~Serif~CJK~JP~Regular,
+ mc-bx = Noto~Serif~CJK~JP~Bold,
+ gt-m = Noto~Sans~CJK~JP~Regular,
+ gt-bx = Noto~Sans~CJK~JP~Bold,
+ gt-u = Noto~Sans~CJK~JP~Medium,
+ gt-eb = Noto~Sans~CJK~JP~Black,
+ mg-m = Noto~Sans~CJK~JP~Black,
+ mc-l = Noto~Serif~CJK~JP~Light,
}
}
@@ -289,56 +329,54 @@
%% KozMinPr6N, HiraMinProN-W3 の場合はjp04 feature がないので,nlck にする
\tl_set:Nn \l_tmpa_tl {, CJKShape=JIS2004 }
\tl_if_eq:NNTF \l_ltjpreset_kanji_shape_tl \l_tmpa_tl {
- \clist_if_in:NnT \l_ltjpreset_font_list { KozMinPr6N-Regular }
+ \tl_set:Nx \l_tmpb_tl { \prop_item:Nn \l_ltjpreset_font_prop { mc-m } }
+ \tl_if_in:NnT \l_tmpb_tl { KozMinPr6N-Regular }
{ \bool_set_true:N \l_ltjpreset_shape_nlck_bool }
- \clist_if_in:NnT \l_ltjpreset_font_list { HiraMinProN-W3 }
+ \tl_if_in:NnT \l_tmpb_tl { HiraMinProN-W3 }
{ \bool_set_true:N \l_ltjpreset_shape_nlck_bool }
- \clist_if_in:NnT \l_ltjpreset_font_list { Moga90Mincho }
+ \tl_if_in:NnT \l_tmpb_tl { Moga90Mincho }
{
- \tl_remove_all:Nn \l_ltjpreset_font_list {90}
+ \prop_clear:N \l_tmpa_prop
+ \prop_map_inline:Nn \l_ltjpreset_font_prop {
+ \tl_set:Nn \l_tmpb_tl { #2 }
+ \tl_remove_all:Nn \l_tmpb_tl {90}
+ \prop_put:Nnx \l_tmpa_prop { #1 } { \tl_use:N \l_tmpb_tl }
+ }
+ \prop_set_eq:NN \l_ltjpreset_font_prop \l_tmpa_prop
\tl_clear:N \l_ltjpreset_kanji_shape_tl
}
- \clist_if_in:NnT \l_ltjpreset_font_list { MogaEx90Mincho }
+ \tl_if_in:NnT \l_tmpb_tl { MogaEx90Mincho }
{
- \tl_remove_all:Nn \l_ltjpreset_font_list {90}
+ \prop_clear:N \l_tmpa_prop
+ \prop_map_inline:Nn \l_ltjpreset_font_prop {
+ \tl_set:Nn \l_tmpb_tl { #2 }
+ \tl_remove_all:Nn \l_tmpb_tl {90}
+ \prop_put:Nnx \l_tmpa_prop { #1 } { \tl_use:N \l_tmpb_tl }
+ }
+ \prop_set_eq:NN \l_ltjpreset_font_prop \l_tmpa_prop
\tl_clear:N \l_ltjpreset_kanji_shape_tl
}
}{
\tl_set:Nn \l_tmpa_tl {, CJKShape=JIS1990 }
\tl_if_eq:NNT \l_ltjpreset_kanji_shape_tl \l_tmpa_tl {
- \clist_if_in:NnT \l_ltjpreset_font_list { Moga90Mincho }
- { \tl_clear:N \l_ltjpreset_kanji_shape_tl }
+ \tl_set:Nx \l_tmpb_tl { \prop_item:Nn \l_ltjpreset_font_prop { mc-m } }
+ \tl_if_in:NnT \l_tmpb_tl { Moga90Mincho }
+ { \tl_clear:N \l_ltjpreset_kanji_shape_tl }
}
}
%%%% リストからの展開
% mc/m
-\clist_pop:NN \l_ltjpreset_font_list \l_tmpa_tl
-\cs_set:Nx \ltjpreset_font_mc_m: { \tl_use:N \l_tmpa_tl }
-
-% mc/bx
-\clist_pop:NN \l_ltjpreset_font_list \l_tmpa_tl
-\cs_set:Nx \ltjpreset_font_mc_bx: { \tl_use:N \l_tmpa_tl }
-
-% gt/m
-\clist_pop:NN \l_ltjpreset_font_list \l_tmpa_tl
-\cs_set:Nx \ltjpreset_font_gt_m: { \tl_use:N \l_tmpa_tl }
-
-% gt/bx
-\clist_pop:NN \l_ltjpreset_font_list \l_tmpa_tl
-\cs_set:Nx \ltjpreset_font_gt_bx: { \tl_use:N \l_tmpa_tl }
+\cs_set:Nx \ltjpreset_font_mc_l: { \prop_item:Nn \l_ltjpreset_font_prop { mc-l } }
+\cs_set:Nx \ltjpreset_font_mc_m: { \prop_item:Nn \l_ltjpreset_font_prop { mc-m } }
+\cs_set:Nx \ltjpreset_font_mc_bx: { \prop_item:Nn \l_ltjpreset_font_prop { mc-bx } }
+\cs_set:Nx \ltjpreset_font_gt_m: { \prop_item:Nn \l_ltjpreset_font_prop { gt-m } }
+\cs_set:Nx \ltjpreset_font_gt_u: { \prop_item:Nn \l_ltjpreset_font_prop { gt-u } }
+\cs_set:Nx \ltjpreset_font_gt_bx: { \prop_item:Nn \l_ltjpreset_font_prop { gt-bx } }
+\cs_set:Nx \ltjpreset_font_gt_eb: { \prop_item:Nn \l_ltjpreset_font_prop { gt-eb } }
+\cs_set:Nx \ltjpreset_font_mg_m: { \prop_item:Nn \l_ltjpreset_font_prop { mg-m } }
-% gt/m-uni
-\clist_pop:NN \l_ltjpreset_font_list \l_tmpa_tl
-\cs_set:Nx \ltjpreset_font_gt_n_uni: { \tl_use:N \l_tmpa_tl }
-
-% gt/eb
-\clist_pop:NN \l_ltjpreset_font_list \l_tmpa_tl
-\cs_set:Nx \ltjpreset_font_gt_eb: { \tl_use:N \l_tmpa_tl }
-
-% mg/m
-\clist_pop:NN \l_ltjpreset_font_list \l_tmpa_tl
-\cs_set:Nx \ltjpreset_font_mg: { \tl_use:N \l_tmpa_tl }
+%\prop_show:N \l_ltjpreset_font_prop
%% HG 系フォント + JIS2004/90JIS のときはフォント名を置換
\bool_if:NT \l_ltjpreset_office_bool {
@@ -347,8 +385,8 @@
\cs_set:Nx \ltjpreset_font_mc_bx: { hgrme04.ttc }
\cs_set:Nx \ltjpreset_font_gt_bx: { hgrge04.ttc }
\cs_set:Nx \ltjpreset_font_gt_eb: { hgrsgu04.ttc }
- \cs_set:Nx \ltjpreset_font_mg: { hgrsmp04.ttf }
- \cs_set_eq:NN \ltjpreset_font_gt_m: \ltjpreset_font_gt_n_uni:
+ \cs_set:Nx \ltjpreset_font_mg_m: { hgrsmp04.ttf }
+ \cs_set_eq:NN \ltjpreset_font_gt_m: \ltjpreset_font_gt_u:
% HG ゴシックM のときはそうはいかないので 1 ウェイト時のゴシック体を使う
}
\tl_set:Nn \l_tmpa_tl {, CJKShape=JIS1990 }
@@ -356,10 +394,17 @@
\cs_set:Nx \ltjpreset_font_mc_bx: { hgrme.ttc }
\cs_set:Nx \ltjpreset_font_gt_bx: { hgrge.ttc }
\cs_set:Nx \ltjpreset_font_gt_eb: { hgrsgu.ttc }
- \cs_set:Nx \ltjpreset_font_mg: { hgrsmp.ttf }
+ \cs_set:Nx \ltjpreset_font_mg_m: { hgrsmp.ttf }
}
}
+% mc/l
+\tl_set:Nx \l_tmpa_tl { \ltjpreset_font_mc_l: }
+\tl_if_empty:NT \l_tmpa_tl {\tl_set:Nn \l_tmpa_tl {~}}
+\cs_set:Nx \ltjpreset_font_mc_l: {
+ \tl_if_blank:nTF \l_tmpa_tl { \ltjpreset_font_mc_m: } {\tl_use:N \l_tmpa_tl }
+}
+
%% 90JIS/JIS2004 字形指定のオプション
\bool_if:NTF \l_ltjpreset_nfssonly_bool {
\tl_set:Nn \l_tmpa_tl {, CJKShape=JIS1990 }
@@ -380,6 +425,30 @@
}
}
+
+%%%%%%%% 存在判定
+\cs_new:Nn \ltjpreset_substitute:nnnn {
+ \group_begin:
+ \suppressfontnotfounderror=1
+ \font \l_ltjpreset_font_test: = "\cs:w ltjpreset_font_#1_#2: \cs_end:"\relax
+ \ifx \l_ltjpreset_font_test: \nullfont
+ \msg_warning:nnxxxx { luatexja-preset }{ no-font }
+ { \cs:w ltjpreset_font_#1_#2: \cs_end: }{ #1/#2 }
+ { \cs:w ltjpreset_font_#3_#4: \cs_end: }{ #3/#4 }
+ \cs_gset_eq:cc { ltjpreset_font_#1_#2: } { ltjpreset_font_#3_#4: }
+ \fi
+ \group_end:
+}
+
+\msg_new:nnn { luatexja-preset }{ no-font }{
+ Font~ #1~ (#2)~ is~ not~found.~ Hence~ I~ substitute~ #3~ (#4)~ for~ it.
+}
+\bool_if:NT \l_ltjpreset_deluxe_bool {
+ \ltjpreset_substitute:nnnn { gt } { eb } { gt } { bx }
+ \ltjpreset_substitute:nnnn { mg } { m } { gt } { bx }
+ \ltjpreset_substitute:nnnn { mc } { l } { mc } { m }
+}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%% nfss only
\bool_if:NTF \l_ltjpreset_nfssonly_bool {
@@ -392,23 +461,23 @@
\DeclareFontShape{JY3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp]
{\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3"
: jfm=\tl_use:N \ltjpreset_use_jfm_yoko_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl
- ; script=cjk \bool_if:NT \l_ltjpreset_expert_bool { ;+hkna }}
+ ; script=hani \bool_if:NT \l_ltjpreset_expert_bool { ;+hkna }}
} {}
\DeclareFontShape{JT3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp]
{\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3"
: jfm=\tl_use:N \ltjpreset_use_jfm_tate_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl;
- ; script=cjk \bool_if:NT \l_ltjpreset_expert_bool { ;+vkna }}
+ ; script=hani \bool_if:NT \l_ltjpreset_expert_bool { ;+vkna }}
} {}
\bool_if:NT \l_ltjpreset_expert_bool {
\DeclareFontShape{JY3}{#1}{#2}{rb}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp]
{\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3"
: jfm=\tl_use:N \ltjpreset_use_jfm_yoko_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ;+ruby
- ; script=kana }
+ ; script=kana}
} {}
\DeclareFontShape{JT3}{#1}{#2}{rb}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp]
{\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3"
: jfm=\tl_use:N \ltjpreset_use_jfm_tate_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ;+ruby
- ; script=kana }
+ ; script=kana}
} {}
}
}
@@ -424,7 +493,7 @@
\bool_if:NTF \l_ltjpreset_bold_bool {
\cs_set_eq:NN \ltjpreset_font_gt_m: \ltjpreset_font_gt_bx:
}{
- \cs_set_eq:NN \ltjpreset_font_gt_m: \ltjpreset_font_gt_n_uni:
+ \cs_set_eq:NN \ltjpreset_font_gt_m: \ltjpreset_font_gt_u:
}
\cs_set_eq:NN \ltjpreset_font_gt_bx: \ltjpreset_font_gt_m:
\cs_set_eq:NN \ltjpreset_font_mc_bx: \ltjpreset_font_gt_m:
@@ -448,14 +517,17 @@
\bool_if:NTF \l_ltjpreset_deluxe_bool {
\DeclareKanjiFamily{JY3}{ltjpmg}{}\DeclareKanjiFamily{JT3}{ltjpmg}{}
- \ltj_preset_define_family:nnn {ltjpmg} {m} {\ltjpreset_font_mg:}
- \ltj_preset_define_family:nnn {ltjpg} {eb} {\ltjpreset_font_gt_eb:}
+ \def\ltdefault{l}
+ \DeclareRobustCommand\ltseries { \not@math@alphabet\ltseries\relax\fontseries\ltdefault\selectfont }
+ \ltj_preset_define_family:nnn {ltjpm} {l} {\ltjpreset_font_mc_l:}
\def\ebdefault{eb}
- \DeclareRobustCommand\ebseries { \not@math@alphabet\ebseries\relaxfontseries\ebdefault\selectfont }
- \DeclareRobustCommand\gtebfamily { \kanjifamily{ltjpg}\fontseries{eb}\selectfont }
+ \DeclareRobustCommand\ebseries { \not@math@alphabet\ebseries\relax\fontseries\ebdefault\selectfont }
+ \DeclareRobustCommand\gtebfamily { \kanjifamily{ltjpg}\fontseries{\ebdefault}\selectfont }
\DeclareTextFontCommand{\textgteb}{\gtebfamily}
+ \ltj_preset_define_family:nnn {ltjpg} {eb} {\ltjpreset_font_gt_eb:}
\DeclareRobustCommand\mgfamily { \not@math@alphabet\mgfamily\relax\kanjifamily{ltjpmg}\selectfont }
\DeclareTextFontCommand{\textmg}{\mgfamily}
+ \ltj_preset_define_family:nnn {ltjpmg} {m} {\ltjpreset_font_mg_m:}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -493,20 +565,19 @@
\bool_if:NTF \l_ltjpreset_deluxe_bool {
%% mg
\newjfontfamily \mgfamily [
- BoldFont = \ltjpreset_font_mg:,
+ BoldFont = \ltjpreset_font_mg_m:,
\bool_if:NT \l_ltjpreset_noembed_bool { NoEmbed, }
\tl_use:N \l_ltjpreset_add_features_tl
- ] { \ltjpreset_font_mg: }
+ ] { \ltjpreset_font_mg_m: }
\DeclareTextFontCommand{\textmg}{\mgfamily}
%% gt/eb
-%% 注意: ファミリは 'gteb'.シリーズは \mdseries のまま.
-%% \bfseries を追加したほうが良い?
- \newjfontfamily \gtebfamily [
- BoldFont = \ltjpreset_font_gt_eb:,
- \bool_if:NT \l_ltjpreset_noembed_bool { NoEmbed, }
- \tl_use:N \l_ltjpreset_add_features_tl
- ] { \ltjpreset_font_gt_eb: }
+ \def\ebdefault{eb}
+ \DeclareRobustCommand\ebseries { \not@math@alphabet\ebseries\relax\fontseries\ebdefault\selectfont }
+ \DeclareRobustCommand\gtebfamily { \kanjifamily{\gtdefault}\fontseries{\ebdefault}\selectfont }
\DeclareTextFontCommand{\textgteb}{\gtebfamily}
+%% mc/l
+ \def\ltdefault{l}
+ \DeclareRobustCommand\ltseries { \not@math@alphabet\ltseries\relax\fontseries\ltdefault\selectfont }
\bool_if:NT \l_ltjpreset_bold_bool {
\cs_set_eq:NN \ltjpreset_font_mc_bx: \ltjpreset_font_gt_bx:
}
@@ -514,7 +585,7 @@
\bool_if:NTF \l_ltjpreset_bold_bool {
\cs_set_eq:NN \ltjpreset_font_gt_m: \ltjpreset_font_gt_bx:
}{
- \cs_set_eq:NN \ltjpreset_font_gt_m: \ltjpreset_font_gt_n_uni:
+ \cs_set_eq:NN \ltjpreset_font_gt_m: \ltjpreset_font_gt_u:
}
\cs_set_eq:NN \ltjpreset_font_gt_bx: \ltjpreset_font_gt_m:
\cs_set_eq:NN \ltjpreset_font_mc_bx: \ltjpreset_font_gt_m:
@@ -526,11 +597,17 @@
\addjfontfeature{ Kerning=Off }
\setmainjfont [
+ \bool_if:NT \l_ltjpreset_deluxe_bool {
+ FontFace={l}{n}{\ltjpreset_font_mc_l:},
+ }
BoldFont = \ltjpreset_font_mc_bx:
\bool_if:NT \l_ltjpreset_noembed_bool { , NoEmbed },
\tl_use:N \l_ltjpreset_add_features_tl
] { \ltjpreset_font_mc_m: }
\setsansjfont [
+ \bool_if:NT \l_ltjpreset_deluxe_bool {
+ FontFace={eb}{n}{\ltjpreset_font_gt_eb:},
+ }
BoldFont = \ltjpreset_font_gt_bx:
\bool_if:NT \l_ltjpreset_noembed_bool { , NoEmbed },
\tl_use:N \l_ltjpreset_add_features_tl