From 0515cdb0111b84daef0c66f7427af0d153551436 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 24 Jun 2014 17:35:10 +0000 Subject: fontspec (21jun14) git-svn-id: svn://tug.org/texlive/trunk@34375 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/fontspec/fontspec-luatex.sty | 36 ++++++++++++---------- .../tex/latex/fontspec/fontspec-patches.sty | 28 ++++++++++++++--- .../tex/latex/fontspec/fontspec-xetex.sty | 36 ++++++++++++---------- Master/texmf-dist/tex/latex/fontspec/fontspec.lua | 8 +++-- Master/texmf-dist/tex/latex/fontspec/fontspec.sty | 12 +++++--- 5 files changed, 74 insertions(+), 46 deletions(-) (limited to 'Master/texmf-dist/tex/latex/fontspec') diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty index 62ec78a76a5..e0c14fd0357 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty @@ -14,7 +14,7 @@ %% %% \ProvidesPackage{fontspec-luatex} - [2014/06/01 v2.4 Font selection for XeLaTeX and LuaLaTeX] + [2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX] \ExplSyntaxOn @@ -646,14 +646,17 @@ } \cs_if_exist:cF {g__fontspec_UID_\l__fontspec_fontid_tl} { - \cs_if_exist:cTF {g__fontspec_family_#1_int} - { \int_gincr:c {g__fontspec_family_#1_int} } - { \int_new:c {g__fontspec_family_#1_int} } + % The font name is fully expanded, in case it's defined in terms of macros, before having its spaces zapped: \tl_set:Nx \l__fontspec_tmp_tl {#1} \tl_remove_all:Nn \l__fontspec_tmp_tl {~} + + \cs_if_exist:cTF {g__fontspec_family_ \l__fontspec_tmp_tl _int} + { \int_gincr:c {g__fontspec_family_ \l__fontspec_tmp_tl _int} } + { \int_new:c {g__fontspec_family_ \l__fontspec_tmp_tl _int} } + \tl_gset:cx {g__fontspec_UID_\l__fontspec_fontid_tl} { - \l__fontspec_tmp_tl ( \int_use:c {g__fontspec_family_#1_int} ) + \l__fontspec_tmp_tl ( \int_use:c {g__fontspec_family_ \l__fontspec_tmp_tl _int} ) } } \tl_gset:Nv \l_fontspec_family_tl {g__fontspec_UID_\l__fontspec_fontid_tl} @@ -1265,11 +1268,8 @@ } \__fontspec_keys_define_code:nnn {fontspec-preparse} {BoldFeatures} { - \ \clist_set:Nn \l__fontspec_fontfeat_bf_clist {#1} - \prop_put:NxV \l__fontspec_nfss_prop - {BoldFont-\g__fontspec_curr_series_tl} \l__fontspec_curr_bfname_tl } \__fontspec_keys_define_code:nnn {fontspec-preparse} {ItalicFeatures} { @@ -1384,10 +1384,11 @@ \rmfamily \__fontspec_set_font_dimen:NnN \l__fontspec_tmpa_dim {#1} \font \__fontspec_set_font_dimen:NnN \l__fontspec_tmpb_dim {#1} \l_fontspec_font - \fp_set_from_dim:Nn \l__fontspec_tmpa_fp { \l__fontspec_tmpa_dim } - \fp_set_from_dim:Nn \l__fontspec_tmpb_fp { \l__fontspec_tmpb_dim } - \fp_div:Nn \l__fontspec_tmpa_fp { \l__fontspec_tmpb_fp } - \tl_gset:Nx \l__fontspec_scale_tl { \fp_use:N \l__fontspec_tmpa_fp } + \tl_gset:Nx \l__fontspec_scale_tl + { + \fp_eval:n { \dim_to_fp:n {\l__fontspec_tmpa_dim} / + \dim_to_fp:n {\l__fontspec_tmpb_dim} } + } \__fontspec_info:n {set-scale} \group_end: } @@ -2211,7 +2212,7 @@ } \DeclareSymbolFont{operators}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault \SetSymbolFont{operators}{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault - \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault + \DeclareSymbolFontAlphabet\mathrm{operators} \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault @@ -2219,7 +2220,6 @@ \SetSymbolFont{operators}{bold}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault \tl_if_empty:NTF \g__fontspec_bfmathrm_tl { - \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\itdefault } { @@ -2291,14 +2291,16 @@ %% version 1.3c or higher (your choice). The latest version of %% this license is at: http://www.latex-project.org/lppl.txt %% -%% This work is "author-maintained" by Will Robertson. +%% This work is "maintained" by Will Robertson. %% %% This work consists of this file fontspec.dtx %% and the derived files fontspec.sty, %% fontspec.lua, %% fontspec.cfg, -%% fontspec-xetex.tex, -%% fontspec-luatex.tex, +%% fontspec-xetex.sty, +%% fontspec-luatex.sty, +%% fontspec-patches.sty, +%% fontspec-example.tex, %% and fontspec.pdf. %% %% diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty index 82479c61ab3..a690db0eb37 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty @@ -14,11 +14,27 @@ %% %% \ProvidesPackage{fontspec-patches} - [2014/06/01 v2.4 Font selection for XeLaTeX and LuaLaTeX] + [2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX] -\RequirePackage{fixltx2e}[2006/03/24] \ExplSyntaxOn +\cs_set_protected:Npn \@fnsymbol #1 + { + \int_case:nnF {#1} + { + {0} {} + {1} { \mode_if_math:TF *\textasteriskcentered } + {2} { \mode_if_math:TF \dagger\textdagger } + {3} { \mode_if_math:TF \ddagger\textdaggerdbl } + {4} { \mode_if_math:TF \mathsection\textsection } + {5} { \mode_if_math:TF \mathparagraph\textparagraph } + {6} { \mode_if_math:TF \|\textbardbl } + {7} { \mode_if_math:TF {**}{\textasteriskcentered\textasteriskcentered} } + {8} { \mode_if_math:TF {\dagger\dagger}{\textdagger\textdagger} } + {9} { \mode_if_math:TF {\ddagger\ddagger}{\textdaggerdbl\textdaggerdbl} } + } + { \@ctrerr } + } \DeclareRobustCommand \em { \@nomath\em @@ -138,14 +154,16 @@ %% version 1.3c or higher (your choice). The latest version of %% this license is at: http://www.latex-project.org/lppl.txt %% -%% This work is "author-maintained" by Will Robertson. +%% This work is "maintained" by Will Robertson. %% %% This work consists of this file fontspec.dtx %% and the derived files fontspec.sty, %% fontspec.lua, %% fontspec.cfg, -%% fontspec-xetex.tex, -%% fontspec-luatex.tex, +%% fontspec-xetex.sty, +%% fontspec-luatex.sty, +%% fontspec-patches.sty, +%% fontspec-example.tex, %% and fontspec.pdf. %% %% diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty index 9821d3987d5..9598731ef62 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty @@ -14,7 +14,7 @@ %% %% \ProvidesPackage{fontspec-xetex} - [2014/06/01 v2.4 Font selection for XeLaTeX and LuaLaTeX] + [2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX] \ExplSyntaxOn @@ -642,14 +642,17 @@ } \cs_if_exist:cF {g__fontspec_UID_\l__fontspec_fontid_tl} { - \cs_if_exist:cTF {g__fontspec_family_#1_int} - { \int_gincr:c {g__fontspec_family_#1_int} } - { \int_new:c {g__fontspec_family_#1_int} } + % The font name is fully expanded, in case it's defined in terms of macros, before having its spaces zapped: \tl_set:Nx \l__fontspec_tmp_tl {#1} \tl_remove_all:Nn \l__fontspec_tmp_tl {~} + + \cs_if_exist:cTF {g__fontspec_family_ \l__fontspec_tmp_tl _int} + { \int_gincr:c {g__fontspec_family_ \l__fontspec_tmp_tl _int} } + { \int_new:c {g__fontspec_family_ \l__fontspec_tmp_tl _int} } + \tl_gset:cx {g__fontspec_UID_\l__fontspec_fontid_tl} { - \l__fontspec_tmp_tl ( \int_use:c {g__fontspec_family_#1_int} ) + \l__fontspec_tmp_tl ( \int_use:c {g__fontspec_family_ \l__fontspec_tmp_tl _int} ) } } \tl_gset:Nv \l_fontspec_family_tl {g__fontspec_UID_\l__fontspec_fontid_tl} @@ -1332,11 +1335,8 @@ } \__fontspec_keys_define_code:nnn {fontspec-preparse} {BoldFeatures} { - \ \clist_set:Nn \l__fontspec_fontfeat_bf_clist {#1} - \prop_put:NxV \l__fontspec_nfss_prop - {BoldFont-\g__fontspec_curr_series_tl} \l__fontspec_curr_bfname_tl } \__fontspec_keys_define_code:nnn {fontspec-preparse} {ItalicFeatures} { @@ -1451,10 +1451,11 @@ \rmfamily \__fontspec_set_font_dimen:NnN \l__fontspec_tmpa_dim {#1} \font \__fontspec_set_font_dimen:NnN \l__fontspec_tmpb_dim {#1} \l_fontspec_font - \fp_set_from_dim:Nn \l__fontspec_tmpa_fp { \l__fontspec_tmpa_dim } - \fp_set_from_dim:Nn \l__fontspec_tmpb_fp { \l__fontspec_tmpb_dim } - \fp_div:Nn \l__fontspec_tmpa_fp { \l__fontspec_tmpb_fp } - \tl_gset:Nx \l__fontspec_scale_tl { \fp_use:N \l__fontspec_tmpa_fp } + \tl_gset:Nx \l__fontspec_scale_tl + { + \fp_eval:n { \dim_to_fp:n {\l__fontspec_tmpa_dim} / + \dim_to_fp:n {\l__fontspec_tmpb_dim} } + } \__fontspec_info:n {set-scale} \group_end: } @@ -2287,7 +2288,7 @@ } \DeclareSymbolFont{operators}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault \SetSymbolFont{operators}{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault - \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault + \DeclareSymbolFontAlphabet\mathrm{operators} \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault @@ -2295,7 +2296,6 @@ \SetSymbolFont{operators}{bold}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault \tl_if_empty:NTF \g__fontspec_bfmathrm_tl { - \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\itdefault } { @@ -2367,14 +2367,16 @@ %% version 1.3c or higher (your choice). The latest version of %% this license is at: http://www.latex-project.org/lppl.txt %% -%% This work is "author-maintained" by Will Robertson. +%% This work is "maintained" by Will Robertson. %% %% This work consists of this file fontspec.dtx %% and the derived files fontspec.sty, %% fontspec.lua, %% fontspec.cfg, -%% fontspec-xetex.tex, -%% fontspec-luatex.tex, +%% fontspec-xetex.sty, +%% fontspec-luatex.sty, +%% fontspec-patches.sty, +%% fontspec-example.tex, %% and fontspec.pdf. %% %% diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua index b1f2f299cbb..f21529620ca 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua @@ -86,14 +86,16 @@ end -- version 1.3c or higher (your choice). The latest version of -- this license is at: http://www.latex-project.org/lppl.txt -- --- This work is "author-maintained" by Will Robertson. +-- This work is "maintained" by Will Robertson. -- -- This work consists of this file fontspec.dtx -- and the derived files fontspec.sty, -- fontspec.lua, -- fontspec.cfg, --- fontspec-xetex.tex, --- fontspec-luatex.tex, +-- fontspec-xetex.sty, +-- fontspec-luatex.sty, +-- fontspec-patches.sty, +-- fontspec-example.tex, -- and fontspec.pdf. -- -- diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty index c20dbb3ad22..1eefd221419 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty @@ -14,12 +14,14 @@ %% %% \ProvidesPackage{fontspec} - [2014/06/01 v2.4 Font selection for XeLaTeX and LuaLaTeX] + [2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX] \RequirePackage{expl3}[2011/09/05] \RequirePackage{xparse} \ExplSyntaxOn +\cs_if_exist:NF \lua_now_x:n + { \cs_set_eq:NN \lua_now_x:n \directlua } \msg_new:nnn {fontspec} {cannot-use-pdftex} { The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX~ to~ function. @@ -280,14 +282,16 @@ %% version 1.3c or higher (your choice). The latest version of %% this license is at: http://www.latex-project.org/lppl.txt %% -%% This work is "author-maintained" by Will Robertson. +%% This work is "maintained" by Will Robertson. %% %% This work consists of this file fontspec.dtx %% and the derived files fontspec.sty, %% fontspec.lua, %% fontspec.cfg, -%% fontspec-xetex.tex, -%% fontspec-luatex.tex, +%% fontspec-xetex.sty, +%% fontspec-luatex.sty, +%% fontspec-patches.sty, +%% fontspec-example.tex, %% and fontspec.pdf. %% %% -- cgit v1.2.3