X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Faddons%2Fluatexja-fontspec-24.sty;h=14f3e3b61720fe63f29f7d1df11bfd43beb1d4a0;hb=131a92df2329649c4b4a68dc27eab790926c63dd;hp=90cccd7946f437cd1fd78c0e4e9d6734e7d6d3e8;hpb=80f10b17c7273d6715a63acb2250ce2446f33160;p=luatex-ja%2Fluatexja.git diff --git a/src/addons/luatexja-fontspec-24.sty b/src/addons/luatexja-fontspec-24.sty index 90cccd7..14f3e3b 100644 --- a/src/addons/luatexja-fontspec-24.sty +++ b/src/addons/luatexja-fontspec-24.sty @@ -3,13 +3,12 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{luatexja-fontspec-24}[2014/10/29 fontspec support of LuaTeX-ja] +\ProvidesPackage{luatexja-fontspec-24}[2015/01/15 fontspec support of LuaTeX-ja] \RequirePackage{l3keys2e,luatexja} \ExplSyntaxOn %%%%%%%% Change Japanese font family by \rmfamily or not -\bool_if:NTF \ltj_fontspec_match -{ +\cs_new:Npn \ltj_fontspec_match_cmd { \renewcommand\jttdefault{\gtdefault} \DeclareRobustCommand\rmfamily {\not@math@alphabet\rmfamily\mathrm @@ -21,12 +20,11 @@ {\not@math@alphabet\ttfamily\mathtt \romanfamily\ttdefault\kanjifamily\jttdefault\selectfont} \DeclareDocumentCommand \setmonojfont { O{} m } { - \ltj_fontspec_set_family:Nnn \jttdefault {#1}{#2} + \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} @@ -302,7 +300,7 @@ \DeclareDocumentCommand \newjfontfamily { m O{} m O{} } { \cs_set_eq:NN \fontspec_set_family:Nnn \ltj_fontspec_set_family:Nnn - \newfontfamily #1 [#2] {#3} [#4] + \newfontfamily #1 [#2,#4] {#3} \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn } @@ -365,28 +363,4 @@ \__fontspec_define_feature_option:nnnnn{CharacterWidth}{VerticalAlternateHalf}{22}{101}{+vhal} \__fontspec_define_feature_option:nnnnn{Kerning}{Vertical} {}{}{+vkrn} - -\ExplSyntaxOff -%%%%%%%% Now we completely ignore kanjifont definition file. -\@ltj@use@fdfalse - -% We must redefine \try@load@fontshape to ignore kanjifont definitions at all. -\def\try@load@fontshape{% - \expandafter - \ifx\csname \f@encoding+\f@family\endcsname\relax - \directlua{luatexja.jfont.is_kenc('\luatexluaescapestring{\f@encoding}')}% -\ifin@\else % Alphabetic font - \@font@info{Try loading font information for \f@encoding+\f@family}% - \global\expandafter\let - \csname\f@encoding+\f@family\endcsname\@empty - \nfss@catcodes - \let\nfss@catcodes\relax - \edef\reserved@a{% - \lowercase{% - \noexpand\InputIfFileExists{\f@encoding\f@family.fd}}}% - \reserved@a\relax - {\@input@{\f@encoding\f@family.fd}}% -\fi - \fi} - \endinput