diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-16 20:50:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-16 20:50:34 +0000 |
commit | 1d94e11374efd2df67fc1f555b35b0ba661edb94 (patch) | |
tree | d67b06cfc3cecdc5ed27f8e1b9160ff8b4382d88 /Master/texmf-dist | |
parent | 71e75f5809b91f87b0008504ab8e6e2516e84ca1 (diff) |
fontspec (16jul17)
git-svn-id: svn://tug.org/texlive/trunk@44820 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/fontspec/README.md | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fontspec/fontspec.pdf | bin | 959394 -> 962250 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx | 39 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx | 35 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec.dtx | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty | 71 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty | 71 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fontspec/fontspec.lua | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fontspec/fontspec.sty | 2 |
13 files changed, 177 insertions, 74 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/README.md b/Master/texmf-dist/doc/latex/fontspec/README.md index 611e9f7d7c3..2ffe16b0a95 100644 --- a/Master/texmf-dist/doc/latex/fontspec/README.md +++ b/Master/texmf-dist/doc/latex/fontspec/README.md @@ -69,6 +69,14 @@ To add features to the font family currently in use: Change history -------------- +- v2.6b (2017/07/16) + + * Fix conflict with Polyglossia and `Scale=MatchLowercase`. + * New feature `IgnoreFontspecFile` to avoid loading the `.fontspec` file for a font. + * Fix regression with `\fontspec_if_feature:nTF` + (which broke `realscripts`, oops — must improve my test suite) + + - v2.6a (2017/03/31) * Fix crashing bug with `..Reset` and `ResetAll` keys. diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf Binary files differindex 14a1a53f302..b4af7013e32 100644 --- a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf +++ b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx index 33da24e5bd2..d28517a09c9 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx @@ -118,7 +118,9 @@ % \end{macro} % % \begin{macro}{\fontspec_if_feature:nnnTF} -% Test whether the currently selected font with raw OpenType script tag |#1| and raw OpenType language tag |#2| contains the raw OpenType feature tag |#3|. E.g.: |\fontspec_if_feature:nTF {latn} {ROM} {pnum} {True} {False}| +% Test whether the currently selected font with raw OpenType script tag |#1| and +% raw OpenType language tag |#2| contains the raw OpenType feature tag |#3|. +% E.g.:\\ | \fontspec_if_feature:nTF {latn} {ROM} {pnum} {True} {False}| % Returns false if the font is not loaded by fontspec or is not an OpenType % font. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex index 3a1da2019ac..f49d164f652 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex @@ -62,10 +62,11 @@ To reset default font features, simply call the command with an empty argument: Using the |+| form of the command appends the \meta{font features} to any already-selected defaults. -\section{Default settings from a file} +\section{Font settings from file} -In addition to the defaults that may be specified in the document as described above, when a font is first loaded, a configuration file is searched +In addition to the defaults that may be specified in the document as described above, when a font is first loaded, a font settings file is searched for with the name `\meta{fontname}\texttt{.fontspec}'.\footnote{Located in the current folder or within a standard \texttt{texmf} location.} +If you want to \emph{disable} this feature on a per-font basis, use the \feat{IgnoreFontspecFile} font option. The contents of this file can be used to specify default font features without having to have this information present within each document. diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx index 2de5752f0df..7c4daabcd19 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx @@ -43,6 +43,8 @@ \@@_if_detect_external:nT {#2} { \keys_set:nn {fontspec-preparse-external} {Path} } + \keys_set_known:nn {fontspec-preparse-cfg} {#1} + \@@_init_ttc:n {#2} \@@_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2} @@ -138,17 +140,20 @@ % This file could set font-specific options for the font about to be loaded. % \begin{macrocode} \cs_new:Nn \@@_load_external_fontoptions:Nn - { + { + \bool_if:NT \l_@@_fontcfg_bool + { %<debug> \typeout{:: @@_load_external_fontoptions:Nn \exp_not:N #1 {#2} } - \@@_sanitise_fontname:Nn #1 {#2} - \tl_set:Nx \l_@@_ext_filename_tl {#1.fontspec} - \tl_remove_all:Nn \l_@@_ext_filename_tl {~} - \prop_if_in:NVF \g_@@_fontopts_prop #1 - { - \exp_args:No \file_if_exist:nT { \l_@@_ext_filename_tl } - { \file_input:n { \l_@@_ext_filename_tl } } - } - } + \@@_sanitise_fontname:Nn #1 {#2} + \tl_set:Nx \l_@@_ext_filename_tl {#1.fontspec} + \tl_remove_all:Nn \l_@@_ext_filename_tl {~} + \prop_if_in:NVF \g_@@_fontopts_prop #1 + { + \exp_args:No \file_if_exist:nT { \l_@@_ext_filename_tl } + { \file_input:n { \l_@@_ext_filename_tl } } + } + } + } % \end{macrocode} % \end{macro} % @@ -1023,11 +1028,19 @@ % reads in the string, delimited by a space; this input is padded with \cmd\@empty s % and anything beyond four chars is snipped. The \cmd\@empty s then are used to reconstruct % the spaces in the string to number calculation. +% +% For backwards compatibility this code also strips a leading |+| or |-|. % \begin{macrocode} \cs_set:Nn \@@_iv_str_to_num:Nn - { - \@@_iv_str_to_num:w #1 \q_nil #2 \c_empty_tl \c_empty_tl \q_nil - } + { + \@@_strip_leading_sign:Nw #1#2 \q_nil + } +\cs_set:Npn \@@_strip_leading_sign:Nw #1#2#3 \q_nil + { + \bool_if:nTF { \str_if_eq_p:nn {#2} {+} || \str_if_eq_p:nn {#2} {-} } + { \@@_iv_str_to_num:w #1 \q_nil #3 \c_empty_tl \c_empty_tl \q_nil } + { \@@_iv_str_to_num:w #1 \q_nil #2#3 \c_empty_tl \c_empty_tl \q_nil } + } \cs_set:Npn \@@_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil { \int_set:Nn #1 diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx index f81e1680d5b..9b2516cf26a 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx @@ -15,7 +15,7 @@ \clist_set:Nn \g_@@_all_keyval_modules_clist { fontspec, fontspec-opentype, fontspec-aat, - fontspec-preparse, fontspec-preparse-external, fontspec-preparse-nested, + fontspec-preparse, fontspec-preparse-cfg, fontspec-preparse-external, fontspec-preparse-nested, fontspec-renderer } % \end{macrocode} @@ -40,6 +40,18 @@ % % These features are extracted from the font feature list before all others. % +% \paragraph{Don't load font config file} +% \begin{macrocode} +\@@_keys_define_code:nnn {fontspec-preparse-cfg} {IgnoreFontspecFile} + { + \bool_set_false:N \l_@@_fontcfg_bool + } +\@@_keys_define_code:nnn {fontspec-preparse-external} {NoFontCfg} + { + \bool_set_false:N \l_@@_fontcfg_bool + } +% \end{macrocode} +% % \begin{macro}{Path} % For fonts that aren't installed in the system. If no argument is given, the font is located % with |kpsewhich|; it's either in the current directory or the \TeX\ tree. Otherwise, the @@ -420,18 +432,29 @@ % This script is executed for every extra shape, which seems wasteful, % but allows alternate italic shapes from a separate font, say, to % be loaded and to be auto-scaled correctly. Even if this would be ugly. +% +% To begin, change to \cs{rmfamily} but use internal commands in case cs{rmfamily} +% has been overwritten. +% (Note that changing \cs{rmfamily} with fontspec resets \cs{encodingdefault} +% appropriately.) % \begin{macrocode} \cs_new:Nn \@@_calc_scale:n { \group_begin: - \rmfamily + + \fontencoding { \encodingdefault } + \fontfamily { \rmdefault } + \selectfont + \@@_set_font_dimen:NnN \l_@@_tmpa_dim {#1} \font \@@_set_font_dimen:NnN \l_@@_tmpb_dim {#1} \l_fontspec_font + \tl_gset:Nx \l_@@_scale_tl - { - \fp_eval:n { \dim_to_fp:n {\l_@@_tmpa_dim} / - \dim_to_fp:n {\l_@@_tmpb_dim} } - } + { + \fp_eval:n { \dim_to_fp:n {\l_@@_tmpa_dim} / + \dim_to_fp:n {\l_@@_tmpb_dim} } + } + \@@_info:n {set-scale} \group_end: } diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx index eb2f0e0b39c..0c8957d6253 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx @@ -32,6 +32,8 @@ \bool_new:N \l_@@_ot_bool \bool_new:N \l_@@_mm_bool \bool_new:N \l_@@_graphite_bool +\bool_new:N \l_@@_fontcfg_bool +\bool_set_true:N \l_@@_fontcfg_bool % \end{macrocode} % For dealing with legacy maths: % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx index e62bed49f9e..a75d0a54495 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx @@ -56,9 +56,9 @@ % \begin{macrocode} \prg_new_conditional:Nnn \@@_if_merge_shape:n {TF} { - \bool_if:nTF + \bool_lazy_and:nnTF + { \tl_if_exist_p:c { \@@_shape_merge:nn {\f@shape} {#1} } } { - \tl_if_exist_p:c { \@@_shape_merge:nn {\f@shape} {#1} } && \cs_if_exist_p:c { \f@encoding/\f@family/\f@series/ diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx index e460179754e..b212234bd0b 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx @@ -79,14 +79,14 @@ And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf. %<fontspec&xetexx>\ProvidesExplPackage{fontspec-xetex}% %<fontspec&luatex>\ProvidesExplPackage{fontspec-luatex}% %<*fontspec> - {2017/03/31}{2.6a}{Font selection for XeLaTeX and LuaLaTeX} + {2017/07/16}{2.6b}{Font selection for XeLaTeX and LuaLaTeX} %</fontspec> %<lua>fontspec = fontspec or {} %<lua>local fontspec = fontspec %<lua>fontspec.module = { %<lua> name = "fontspec", -%<lua> version = "2.6a", -%<lua> date = "2017/03/31", +%<lua> version = "2.6b", +%<lua> date = "2017/07/16", %<lua> description = "Font selection for XeLaTeX and LuaLaTeX", %<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson", %<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson", diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty index 662376bb378..f28ab55f99a 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty @@ -32,7 +32,7 @@ \RequirePackage{expl3} \RequirePackage{xparse} \ProvidesExplPackage{fontspec-luatex}% - {2017/03/31}{2.6a}{Font selection for XeLaTeX and LuaLaTeX} + {2017/07/16}{2.6b}{Font selection for XeLaTeX and LuaLaTeX} \bool_new:N \l__fontspec_firsttime_bool \bool_new:N \l__fontspec_nobf_bool \bool_new:N \l__fontspec_noit_bool @@ -45,6 +45,8 @@ \bool_new:N \l__fontspec_ot_bool \bool_new:N \l__fontspec_mm_bool \bool_new:N \l__fontspec_graphite_bool +\bool_new:N \l__fontspec_fontcfg_bool +\bool_set_true:N \l__fontspec_fontcfg_bool \bool_new:N \g__fontspec_math_euler_bool \bool_new:N \g__fontspec_math_lucida_bool \bool_new:N \g__fontspec_pkg_euler_loaded_bool @@ -1053,6 +1055,8 @@ \__fontspec_if_detect_external:nT {#2} { \keys_set:nn {fontspec-preparse-external} {Path} } + \keys_set_known:nn {fontspec-preparse-cfg} {#1} + \__fontspec_init_ttc:n {#2} \__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2} @@ -1110,16 +1114,19 @@ } } \cs_new:Nn \__fontspec_load_external_fontoptions:Nn - { - \__fontspec_sanitise_fontname:Nn #1 {#2} - \tl_set:Nx \l__fontspec_ext_filename_tl {#1.fontspec} - \tl_remove_all:Nn \l__fontspec_ext_filename_tl {~} - \prop_if_in:NVF \g__fontspec_fontopts_prop #1 - { - \exp_args:No \file_if_exist:nT { \l__fontspec_ext_filename_tl } - { \file_input:n { \l__fontspec_ext_filename_tl } } - } - } + { + \bool_if:NT \l__fontspec_fontcfg_bool + { + \__fontspec_sanitise_fontname:Nn #1 {#2} + \tl_set:Nx \l__fontspec_ext_filename_tl {#1.fontspec} + \tl_remove_all:Nn \l__fontspec_ext_filename_tl {~} + \prop_if_in:NVF \g__fontspec_fontopts_prop #1 + { + \exp_args:No \file_if_exist:nT { \l__fontspec_ext_filename_tl } + { \file_input:n { \l__fontspec_ext_filename_tl } } + } + } + } \cs_new:Nn \__fontspec_extract_all_features:n { \bool_if:NTF \l__fontspec_disable_defaults_bool @@ -1585,9 +1592,15 @@ \tl_clear:N \l__fontspec_punctspace_adjust_tl } \cs_set:Nn \__fontspec_iv_str_to_num:Nn - { - \__fontspec_iv_str_to_num:w #1 \q_nil #2 \c_empty_tl \c_empty_tl \q_nil - } + { + \__fontspec_strip_leading_sign:Nw #1#2 \q_nil + } +\cs_set:Npn \__fontspec_strip_leading_sign:Nw #1#2#3 \q_nil + { + \bool_if:nTF { \str_if_eq_p:nn {#2} {+} || \str_if_eq_p:nn {#2} {-} } + { \__fontspec_iv_str_to_num:w #1 \q_nil #3 \c_empty_tl \c_empty_tl \q_nil } + { \__fontspec_iv_str_to_num:w #1 \q_nil #2#3 \c_empty_tl \c_empty_tl \q_nil } + } \cs_set:Npn \__fontspec_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil { \int_set:Nn #1 @@ -1838,7 +1851,7 @@ \clist_set:Nn \g__fontspec_all_keyval_modules_clist { fontspec, fontspec-opentype, fontspec-aat, - fontspec-preparse, fontspec-preparse-external, fontspec-preparse-nested, + fontspec-preparse, fontspec-preparse-cfg, fontspec-preparse-external, fontspec-preparse-nested, fontspec-renderer } \cs_new:Nn \__fontspec_keys_define_code:nnn @@ -1850,6 +1863,14 @@ \__fontspec_keys_define_code:nnn {fontspec-addfeatures} {#1} { \__fontspec_error:nx {not-in-addfontfeatures} {#1} } } +\__fontspec_keys_define_code:nnn {fontspec-preparse-cfg} {IgnoreFontspecFile} + { + \bool_set_false:N \l__fontspec_fontcfg_bool + } +\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {NoFontCfg} + { + \bool_set_false:N \l__fontspec_fontcfg_bool + } \__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Path} { \bool_set_true:N \l__fontspec_nobf_bool @@ -2084,14 +2105,20 @@ \cs_new:Nn \__fontspec_calc_scale:n { \group_begin: - \rmfamily + + \fontencoding { \encodingdefault } + \fontfamily { \rmdefault } + \selectfont + \__fontspec_set_font_dimen:NnN \l__fontspec_tmpa_dim {#1} \font \__fontspec_set_font_dimen:NnN \l__fontspec_tmpb_dim {#1} \l_fontspec_font + \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} } - } + { + \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: } @@ -3396,9 +3423,9 @@ } \prg_new_conditional:Nnn \__fontspec_if_merge_shape:n {TF} { - \bool_if:nTF + \bool_lazy_and:nnTF + { \tl_if_exist_p:c { \__fontspec_shape_merge:nn {\f@shape} {#1} } } { - \tl_if_exist_p:c { \__fontspec_shape_merge:nn {\f@shape} {#1} } && \cs_if_exist_p:c { \f@encoding/\f@family/\f@series/ diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty index 89a2168a0b8..ddc64587645 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty @@ -32,7 +32,7 @@ \RequirePackage{expl3} \RequirePackage{xparse} \ProvidesExplPackage{fontspec-xetex}% - {2017/03/31}{2.6a}{Font selection for XeLaTeX and LuaLaTeX} + {2017/07/16}{2.6b}{Font selection for XeLaTeX and LuaLaTeX} \bool_new:N \l__fontspec_firsttime_bool \bool_new:N \l__fontspec_nobf_bool \bool_new:N \l__fontspec_noit_bool @@ -45,6 +45,8 @@ \bool_new:N \l__fontspec_ot_bool \bool_new:N \l__fontspec_mm_bool \bool_new:N \l__fontspec_graphite_bool +\bool_new:N \l__fontspec_fontcfg_bool +\bool_set_true:N \l__fontspec_fontcfg_bool \bool_new:N \g__fontspec_math_euler_bool \bool_new:N \g__fontspec_math_lucida_bool \bool_new:N \g__fontspec_pkg_euler_loaded_bool @@ -1050,6 +1052,8 @@ \__fontspec_if_detect_external:nT {#2} { \keys_set:nn {fontspec-preparse-external} {Path} } + \keys_set_known:nn {fontspec-preparse-cfg} {#1} + \__fontspec_init_ttc:n {#2} \__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2} @@ -1106,16 +1110,19 @@ } } \cs_new:Nn \__fontspec_load_external_fontoptions:Nn - { - \__fontspec_sanitise_fontname:Nn #1 {#2} - \tl_set:Nx \l__fontspec_ext_filename_tl {#1.fontspec} - \tl_remove_all:Nn \l__fontspec_ext_filename_tl {~} - \prop_if_in:NVF \g__fontspec_fontopts_prop #1 - { - \exp_args:No \file_if_exist:nT { \l__fontspec_ext_filename_tl } - { \file_input:n { \l__fontspec_ext_filename_tl } } - } - } + { + \bool_if:NT \l__fontspec_fontcfg_bool + { + \__fontspec_sanitise_fontname:Nn #1 {#2} + \tl_set:Nx \l__fontspec_ext_filename_tl {#1.fontspec} + \tl_remove_all:Nn \l__fontspec_ext_filename_tl {~} + \prop_if_in:NVF \g__fontspec_fontopts_prop #1 + { + \exp_args:No \file_if_exist:nT { \l__fontspec_ext_filename_tl } + { \file_input:n { \l__fontspec_ext_filename_tl } } + } + } + } \cs_new:Nn \__fontspec_extract_all_features:n { \bool_if:NTF \l__fontspec_disable_defaults_bool @@ -1618,9 +1625,15 @@ \tl_clear:N \l__fontspec_punctspace_adjust_tl } \cs_set:Nn \__fontspec_iv_str_to_num:Nn - { - \__fontspec_iv_str_to_num:w #1 \q_nil #2 \c_empty_tl \c_empty_tl \q_nil - } + { + \__fontspec_strip_leading_sign:Nw #1#2 \q_nil + } +\cs_set:Npn \__fontspec_strip_leading_sign:Nw #1#2#3 \q_nil + { + \bool_if:nTF { \str_if_eq_p:nn {#2} {+} || \str_if_eq_p:nn {#2} {-} } + { \__fontspec_iv_str_to_num:w #1 \q_nil #3 \c_empty_tl \c_empty_tl \q_nil } + { \__fontspec_iv_str_to_num:w #1 \q_nil #2#3 \c_empty_tl \c_empty_tl \q_nil } + } \cs_set:Npn \__fontspec_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil { \int_set:Nn #1 @@ -1959,7 +1972,7 @@ \clist_set:Nn \g__fontspec_all_keyval_modules_clist { fontspec, fontspec-opentype, fontspec-aat, - fontspec-preparse, fontspec-preparse-external, fontspec-preparse-nested, + fontspec-preparse, fontspec-preparse-cfg, fontspec-preparse-external, fontspec-preparse-nested, fontspec-renderer } \cs_new:Nn \__fontspec_keys_define_code:nnn @@ -1971,6 +1984,14 @@ \__fontspec_keys_define_code:nnn {fontspec-addfeatures} {#1} { \__fontspec_error:nx {not-in-addfontfeatures} {#1} } } +\__fontspec_keys_define_code:nnn {fontspec-preparse-cfg} {IgnoreFontspecFile} + { + \bool_set_false:N \l__fontspec_fontcfg_bool + } +\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {NoFontCfg} + { + \bool_set_false:N \l__fontspec_fontcfg_bool + } \__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Path} { \bool_set_true:N \l__fontspec_nobf_bool @@ -2208,14 +2229,20 @@ \cs_new:Nn \__fontspec_calc_scale:n { \group_begin: - \rmfamily + + \fontencoding { \encodingdefault } + \fontfamily { \rmdefault } + \selectfont + \__fontspec_set_font_dimen:NnN \l__fontspec_tmpa_dim {#1} \font \__fontspec_set_font_dimen:NnN \l__fontspec_tmpb_dim {#1} \l_fontspec_font + \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} } - } + { + \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: } @@ -3672,9 +3699,9 @@ } \prg_new_conditional:Nnn \__fontspec_if_merge_shape:n {TF} { - \bool_if:nTF + \bool_lazy_and:nnTF + { \tl_if_exist_p:c { \__fontspec_shape_merge:nn {\f@shape} {#1} } } { - \tl_if_exist_p:c { \__fontspec_shape_merge:nn {\f@shape} {#1} } && \cs_if_exist_p:c { \f@encoding/\f@family/\f@series/ diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua index e78349f6e7c..7cbb0c0b31c 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua @@ -15,8 +15,8 @@ fontspec = fontspec or {} local fontspec = fontspec fontspec.module = { name = "fontspec", - version = "2.6a", - date = "2017/03/31", + version = "2.6b", + date = "2017/07/16", description = "Font selection for XeLaTeX and LuaLaTeX", author = "Khaled Hosny, Philipp Gesang, Will Robertson", copyright = "Khaled Hosny, Philipp Gesang, Will Robertson", diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty index 9c2f6854a16..783521b01e4 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty @@ -13,7 +13,7 @@ \RequirePackage{expl3} \RequirePackage{xparse} \ProvidesExplPackage{fontspec}% - {2017/03/31}{2.6a}{Font selection for XeLaTeX and LuaLaTeX} + {2017/07/16}{2.6b}{Font selection for XeLaTeX and LuaLaTeX} \sys_if_engine_luatex:T { \RequirePackage{luaotfload} \directlua{require("fontspec")} |