diff options
author | Karl Berry <karl@freefriends.org> | 2017-02-21 00:35:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-02-21 00:35:20 +0000 |
commit | 3bbc63d38cf997ca6f9ca5700f4f9f98b014e0d9 (patch) | |
tree | f97d4d0a3999b87a34cfee47958c778979bf8eaa /Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty | |
parent | 6e8dfd310421201e3ac8847d1e8b8fa98e81c4d8 (diff) |
luatexja (19feb17)
git-svn-id: svn://tug.org/texlive/trunk@43283 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty new file mode 100644 index 00000000000..f0b0cacb627 --- /dev/null +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty @@ -0,0 +1,67 @@ +% +% lltjp-fontspec-immediate.sty +% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{lltjp-fontspec-immediate}[2017/01/28 Patch to fontspec for LuaTeX-ja] + +\RequirePackage{fontspec,luatexja} +\ExplSyntaxOn + +\@ifpackagelater{fontspec}{2017/01/01}{ +%%%%%%%% fontspec v2.5c overwrites \rmfamily etc. in \setmainfont +\DeclareDocumentCommand \setmainfont { O{} m O{} } + { + \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2} + \tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family + \use:x { \exp_not:n { \DeclareRobustCommand \rmfamily } + { + \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl } + \exp_not:N \fontfamily { \g__fontspec_rmfamily_family } + \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\mcdefault\exp_not:N\fi%%% + \exp_not:N \selectfont + } + } + \str_if_eq_x:nnT {\familydefault} {\rmdefault} + { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl } + \normalfont + \ignorespaces + } +\DeclareDocumentCommand \setsansfont { O{} m O{} } + { + \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2} + \tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family + \use:x { \exp_not:n { \DeclareRobustCommand \sffamily } + { + \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl } + \exp_not:N \fontfamily { \g__fontspec_sffamily_family } + \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\gtdefault\exp_not:N\fi%%% + \exp_not:N \selectfont + } + } + \str_if_eq_x:nnT {\familydefault} {\sfdefault} + { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl } + \normalfont + \ignorespaces + } +\DeclareDocumentCommand \setmonofont { O{} m O{} } + { + \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2} + \tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family + \use:x { \exp_not:n { \DeclareRobustCommand \ttfamily } + { + \exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl } + \exp_not:N \fontfamily { \g__fontspec_ttfamily_family } + \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\jttdefault\exp_not:N\fi%%% + \exp_not:N \selectfont + } + } + \str_if_eq_x:nnT {\familydefault} {\ttdefault} + { \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl } + \normalfont + \ignorespaces + } +} +\ExplSyntaxOff +\endinput + |