diff options
author | Karl Berry <karl@freefriends.org> | 2024-05-08 19:33:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-05-08 19:33:43 +0000 |
commit | a2b1e144f8c72c4e95ca6576f4e8e73e5b51085b (patch) | |
tree | deac848028d3986031f4e6bb396b05b9fb90d678 /Master | |
parent | 42a2e6123235230d846115088015ce249c8aa3c5 (diff) |
fontspec (8may24)
git-svn-id: svn://tug.org/texlive/trunk@71210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
15 files changed, 95 insertions, 122 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/CHANGES.md b/Master/texmf-dist/doc/latex/fontspec/CHANGES.md index 7dab8151f3c..47c3b7128e2 100644 --- a/Master/texmf-dist/doc/latex/fontspec/CHANGES.md +++ b/Master/texmf-dist/doc/latex/fontspec/CHANGES.md @@ -1,6 +1,22 @@ Change history ============== +## v2.9d (2024/05/07) + + * Now that `Script` and `Language` are retained even if the font doesn't support them, + we can no longer check for font feature existence before applying the OpenType tags. + This release removes checking. (#515) + + * Fix bug/regression in loading font families constructed from fonts with different file + extensions; e.g.: (#514) + + \setmainfont{MyLato} + [ + UprightFont = Lato-Regular.ttf , + BoldFont = FiraSans-Bold.otf , + ] + + ## v2.9c (2024/05/03) * Fix copy/paste regression bug with the `Language` feature (primarily exposed through `babel` package). (#513) diff --git a/Master/texmf-dist/doc/latex/fontspec/README.md b/Master/texmf-dist/doc/latex/fontspec/README.md index 6624bcca6b3..0f66c469019 100644 --- a/Master/texmf-dist/doc/latex/fontspec/README.md +++ b/Master/texmf-dist/doc/latex/fontspec/README.md @@ -11,7 +11,27 @@ available with OpenType (and other) fonts, including upper and lower case number proportional and monospaced numbers, swash letters, ligature control, and many many others. -See the documentation `fontspec.pdf` for full information. + +Documentation +------------- + +See the PDF documentation for complete user information (including examples): + + texdoc fontspec + +Additional online documentation is provided at: + <http://latex3.github.io/fontspec/> + +The package code is documented in typeset PDF form via + + texdoc fontspec-code + +Licence +------- + +This package is distributed under the terms and conditions of the LaTeX Project Public License (LPPL), version 1.3a or higher. + +The maintainer of the package is Will Robertson and the LaTeX3 project. Summary of user commands @@ -50,9 +70,6 @@ To add features to the font family currently in use: Package details --------------- -Repository documentation is provided at: - <http://latex3.github.io/fontspec/> - Release versions of fontspec are available from CTAN: <http://www.ctan.org/pkg/fontspec> @@ -70,7 +87,11 @@ package by running If you wish to manually download the latest release version from CTAN, get the pre-built TDS package and extract it into your local texmf tree: - http://mirror.ctan.org/install/macros/latex/contrib/fontspec.tds.zip + http://mirror.ctan.org/install/macros/unicodetex/latex/fontspec.tds.zip + +Historical releases are available via GitHub: + <https://github.com/latex3/fontspec/releases> + <https://github.com/latex3/fontspec/tags> If you wish to use the latest development version from Github, use git to obtain the latest repository code with diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf Binary files differindex 576b93ee4ca..cf04b4a6a2a 100644 --- a/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf +++ b/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf Binary files differindex 0ceac30d40a..643375da1ea 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-code-api.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx index be63bcc0566..2b210124725 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx @@ -388,6 +388,7 @@ \@@_tl_new_if_free:N #1 #4 #1 \l_fontspec_family_tl \tl_set:Nn \l_@@_fontface_cs_tl {\l_fontspec_font} % reset +%<debug>\typeout{::::::~END~fontspec_set_family:Nnn} } \cs_new:Nn \fontspec_gset_family:Nnn { \@@_set_family:NnnN #1 {#2} {#3} \tl_gset_eq:NN } \cs_new:Nn \fontspec_set_family:Nnn { \@@_set_family:NnnN #1 {#2} {#3} \tl_set_eq:NN } diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx index 16e2922b396..fd52183c183 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx @@ -37,13 +37,11 @@ \@@_font_suppress_not_found_error: \@@_init: - \@@_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2} - \@@_sanitise_fontname:Nn \l_@@_fontname_up_tl {#2} - \@@_sanitise_fontname:Nn \l_@@_basename_tl {#2} + \@@_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2} + \tl_set_eq:NN \l_@@_fontname_up_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l_@@_basename_tl \l_fontspec_fontname_tl %<debug>\typeout{^^J::::::::::::::: l_fontspec_fontname_tl~ =~ \l_fontspec_fontname_tl } -%<debug>\typeout{::::::::::::::: _fontname_up_tl~ =~ \l_@@_fontname_up_tl } -%<debug>\typeout{::::::::::::::: l_@@_extension_tl~ =~ \l_@@_extension_tl } \@@_if_detect_external:nT {#2} { \keys_set:nn {fontspec-preparse-external} {Path} } @@ -80,6 +78,7 @@ \group_end: \tl_set_eq:NN \l_fontspec_family_tl \g_@@_nfss_family_tl +%<debug>\typeout{::::::::::::::::::::::::::::::} } % \end{macrocode} % \end{macro} @@ -107,6 +106,7 @@ { \tl_if_in:NnT #1 {##1} { +%<debug> \typeout{::@@_process_ext:N~ --~ Removing~ EXT:~ ##1} \tl_remove_once:Nn #1 {##1} \tl_set:Nn \l_@@_extension_tl {##1} \@@_font_is_file: @@ -143,9 +143,9 @@ { \str_if_eq:eeT { \str_lowercase:f {\l_@@_extension_tl} } {.ttc} { - \@@_sanitise_fontname:Nn \l_@@_fontname_it_tl {#1} - \@@_sanitise_fontname:Nn \l_@@_fontname_bf_tl {#1} - \@@_sanitise_fontname:Nn \l_@@_fontname_bfit_tl {#1} + \tl_set_eq:NN \l_@@_fontname_it_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l_@@_fontname_bf_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l_@@_fontname_bfit_tl \l_fontspec_fontname_tl } } % \end{macrocode} @@ -253,7 +253,8 @@ { %<debug>\typeout{:: @@_load_font} -%<debug>\typeout{Set~ base~ font~ for~ preliminary~ analysis: \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } + \@@_sanitise_fontname:Nn \l_@@_fontname_up_tl { \l_@@_fontname_up_tl } +%<debug>\typeout{Set~ base~ font~ for~ preliminary~ analysis:~ "\l_@@_fontname_up_tl"~ with~ features~ "\l_@@_pre_feat_sclist" } \@@_primitive_font_set:NnnF \l_@@_test_font { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } { \l_@@_pre_feat_sclist } } { \f@size pt - 2sp } @@ -543,6 +544,7 @@ % \begin{macrocode} \cs_new:Nn \@@_set_faces_aux:nnnnn { +%<debug> \typeout{:: @@_set_faces_aux:nnnnn \exp_not:n { {#1} {#2} {#3} {#4} {#5} } } \fontspec_complete_fontname:Nn \l_@@_curr_fontname_tl {#3} \@@_make_font_shapes:Nnnnn \l_@@_curr_fontname_tl {#1} {#2} {#4} {#5} } @@ -557,8 +559,10 @@ \cs_new:Nn \fontspec_complete_fontname:Nn { \tl_set:Nx #1 {#2} - \tl_replace_all:Nne #1 {*} {\l_@@_basename_tl} - \@@_process_ext:N #1 + \tl_if_in:NnF \l_fontspec_fontname_tl {*} + { + \tl_replace_all:Nne #1 {*} {\l_@@_basename_tl} + } } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx index a844b0e0560..bd83f8556ca 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx @@ -173,7 +173,7 @@ % \begin{macrocode} \@@_keys_define_code:nnn {fontspec-preparse} {Script} { -%<XE> \keys_set:nn {fontspec-renderer} {Renderer=OpenType} +%<XE> \tl_if_empty:NT \l_@@_renderer_tl { \keys_set:nn {fontspec-renderer} {Renderer=OpenType} } \tl_set:Nn \l_@@_script_name_tl {#1} } % \end{macrocode} @@ -181,7 +181,7 @@ % \begin{macrocode} \@@_keys_define_code:nnn {fontspec-preparse} {Language} { -%<XE> \keys_set:nn {fontspec-renderer} {Renderer=OpenType} +%<XE> \tl_if_empty:NT \l_@@_renderer_tl { \keys_set:nn {fontspec-renderer} {Renderer=OpenType} } \tl_set:Nn \l_@@_lang_name_tl {#1} } % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx index 16b328fad3d..2904f7350e1 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx @@ -149,17 +149,6 @@ AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available in font '\l_fontspec_fontname_tl'. } -\@@_msg_new:nn {icu-feature-not-exist} - { - '\l_keys_key_tl=\l_keys_value_tl' feature not supported - for OpenType font '\l_fontspec_fontname_tl' - } -\@@_msg_new:nn {icu-feature-not-exist-in-font} - { - OpenType feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available - for font '\l_fontspec_fontname_tl' - with script '\l_@@_script_name_tl' and language '\l_@@_lang_name_tl'. - } \@@_msg_new:nn {no-opticals} { '#1' doesn't appear to have an Optical Size axis. diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx index d78e0a8be9d..dab45952c6e 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx @@ -127,21 +127,8 @@ \cs_new:Nn \@@_make_OT_feature:nnn { %<debug> \typeout{:: @@_make_OT_feature:nnn \exp_not:n { {#1}{#2}{#3} } } - - \bool_set_true:N \l_@@_proceed_bool - - \tl_if_empty:nF {#1} - { - \exp_args:No \@@_check_ot_feat:NnF \l_@@_fontface_cs_tl {#1} - { - \@@_warning:nx {icu-feature-not-exist-in-font} {#1} - \bool_set_false:N \l_@@_proceed_bool - } - } - \@@_remove_clashing_featstr:x { #2 , \@@_swap_plus_minus:n {#2} , #3 } - - \bool_if:NT \l_@@_proceed_bool { \@@_update_featstr:n {#2} } + \@@_update_featstr:n {#2} } \cs_generate_variant:Nn \@@_make_OT_feature:nnn {xxx} % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx index c2be0378c5a..e0639364044 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx @@ -68,7 +68,6 @@ \bool_new:N \l_@@_scriptlang_exist_bool \bool_new:N \g_@@_em_normalise_slant_bool \bool_new:N \l_@@_external_kpse_bool -\bool_new:N \l_@@_proceed_bool % \end{macrocode} % % \begin{macro}{\l_@@_never_check_bool} diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx index e3002ff5e54..ea7bbffe55e 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx @@ -70,7 +70,7 @@ \ProvidesExplFile{fontspec.dtx} %</dtx> %<*fontspec> - {2024/05/03}{2.9c}{Font selection for XeLaTeX and LuaLaTeX} + {2024/05/07}{2.9d}{Font selection for XeLaTeX and LuaLaTeX} %</fontspec> % \end{macrocode} % @@ -89,8 +89,8 @@ %<lua>local fontspec = fontspec %<lua>fontspec.module = { %<lua> name = "fontspec", -%<lua> version = "2.9c", -%<lua> date = "2024/05/03", +%<lua> version = "2.9d", +%<lua> date = "2024/05/07", %<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 17efa49db69..4fe9f75c91f 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty @@ -40,7 +40,7 @@ \RequirePackage{xparse} \ProvidesExplPackage{fontspec-luatex}% - {2024/05/03}{2.9c}{Font selection for XeLaTeX and LuaLaTeX} + {2024/05/07}{2.9d}{Font selection for XeLaTeX and LuaLaTeX} %%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <latex3.github.io/fontspec> %%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <latex3.github.io/fontspec> @@ -68,7 +68,6 @@ \bool_new:N \l__fontspec_scriptlang_exist_bool \bool_new:N \g__fontspec_em_normalise_slant_bool \bool_new:N \l__fontspec_external_kpse_bool -\bool_new:N \l__fontspec_proceed_bool \bool_new:N \l__fontspec_never_check_bool \int_new:N \l__fontspec_script_int \int_new:N \l__fontspec_language_int @@ -335,17 +334,6 @@ AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available in font '\l_fontspec_fontname_tl'. } -\__fontspec_msg_new:nn {icu-feature-not-exist} - { - '\l_keys_key_tl=\l_keys_value_tl' feature not supported - for OpenType font '\l_fontspec_fontname_tl' - } -\__fontspec_msg_new:nn {icu-feature-not-exist-in-font} - { - OpenType feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available - for font '\l_fontspec_fontname_tl' - with script '\l__fontspec_script_name_tl' and language '\l__fontspec_lang_name_tl'. - } \__fontspec_msg_new:nn {no-opticals} { '#1' doesn't appear to have an Optical Size axis. @@ -1186,9 +1174,9 @@ \__fontspec_font_suppress_not_found_error: \__fontspec_init: - \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2} - \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl {#2} - \__fontspec_sanitise_fontname:Nn \l__fontspec_basename_tl {#2} + \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2} + \tl_set_eq:NN \l__fontspec_fontname_up_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l__fontspec_basename_tl \l_fontspec_fontname_tl \__fontspec_if_detect_external:nT {#2} @@ -1257,9 +1245,9 @@ { \str_if_eq:eeT { \str_lowercase:f {\l__fontspec_extension_tl} } {.ttc} { - \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_it_tl {#1} - \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bf_tl {#1} - \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bfit_tl {#1} + \tl_set_eq:NN \l__fontspec_fontname_it_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl } } \cs_new:Nn \__fontspec_load_external_fontoptions:N @@ -1321,6 +1309,7 @@ \cs_new:Nn \__fontspec_load_font: { + \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl { \l__fontspec_fontname_up_tl } \__fontspec_primitive_font_set:NnnF \l__fontspec_test_font { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } { \l__fontspec_pre_feat_sclist } } { \f@size pt - 2sp } @@ -1492,8 +1481,10 @@ \cs_new:Nn \fontspec_complete_fontname:Nn { \tl_set:Nx #1 {#2} - \tl_replace_all:Nne #1 {*} {\l__fontspec_basename_tl} - \__fontspec_process_ext:N #1 + \tl_if_in:NnF \l_fontspec_fontname_tl {*} + { + \tl_replace_all:Nne #1 {*} {\l__fontspec_basename_tl} + } } \cs_new:Nn \__fontspec_add_nfssfont:nnnn { @@ -1903,21 +1894,8 @@ } \cs_new:Nn \__fontspec_make_OT_feature:nnn { - - \bool_set_true:N \l__fontspec_proceed_bool - - \tl_if_empty:nF {#1} - { - \exp_args:No \__fontspec_check_ot_feat:NnF \l__fontspec_fontface_cs_tl {#1} - { - \__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} - \bool_set_false:N \l__fontspec_proceed_bool - } - } - \__fontspec_remove_clashing_featstr:x { #2 , \__fontspec_swap_plus_minus:n {#2} , #3 } - - \bool_if:NT \l__fontspec_proceed_bool { \__fontspec_update_featstr:n {#2} } + \__fontspec_update_featstr:n {#2} } \cs_generate_variant:Nn \__fontspec_make_OT_feature:nnn {xxx} \cs_new:Nn \__fontspec_swap_plus_minus:n { \__fontspec_swap_plus_minus_aux:Nq #1 \q_nil } diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty index d0068bb3b76..242e8141c0e 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty @@ -40,7 +40,7 @@ \RequirePackage{xparse} \ProvidesExplPackage{fontspec-xetex}% - {2024/05/03}{2.9c}{Font selection for XeLaTeX and LuaLaTeX} + {2024/05/07}{2.9d}{Font selection for XeLaTeX and LuaLaTeX} %%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <latex3.github.io/fontspec> %%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <latex3.github.io/fontspec> @@ -68,7 +68,6 @@ \bool_new:N \l__fontspec_scriptlang_exist_bool \bool_new:N \g__fontspec_em_normalise_slant_bool \bool_new:N \l__fontspec_external_kpse_bool -\bool_new:N \l__fontspec_proceed_bool \bool_new:N \l__fontspec_never_check_bool \int_new:N \l__fontspec_script_int \int_new:N \l__fontspec_language_int @@ -335,17 +334,6 @@ AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available in font '\l_fontspec_fontname_tl'. } -\__fontspec_msg_new:nn {icu-feature-not-exist} - { - '\l_keys_key_tl=\l_keys_value_tl' feature not supported - for OpenType font '\l_fontspec_fontname_tl' - } -\__fontspec_msg_new:nn {icu-feature-not-exist-in-font} - { - OpenType feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available - for font '\l_fontspec_fontname_tl' - with script '\l__fontspec_script_name_tl' and language '\l__fontspec_lang_name_tl'. - } \__fontspec_msg_new:nn {no-opticals} { '#1' doesn't appear to have an Optical Size axis. @@ -1182,9 +1170,9 @@ \__fontspec_font_suppress_not_found_error: \__fontspec_init: - \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2} - \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl {#2} - \__fontspec_sanitise_fontname:Nn \l__fontspec_basename_tl {#2} + \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2} + \tl_set_eq:NN \l__fontspec_fontname_up_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l__fontspec_basename_tl \l_fontspec_fontname_tl \__fontspec_if_detect_external:nT {#2} @@ -1253,9 +1241,9 @@ { \str_if_eq:eeT { \str_lowercase:f {\l__fontspec_extension_tl} } {.ttc} { - \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_it_tl {#1} - \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bf_tl {#1} - \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bfit_tl {#1} + \tl_set_eq:NN \l__fontspec_fontname_it_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l_fontspec_fontname_tl + \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl } } \cs_new:Nn \__fontspec_load_external_fontoptions:N @@ -1317,6 +1305,7 @@ \cs_new:Nn \__fontspec_load_font: { + \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl { \l__fontspec_fontname_up_tl } \__fontspec_primitive_font_set:NnnF \l__fontspec_test_font { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } { \l__fontspec_pre_feat_sclist } } { \f@size pt - 2sp } @@ -1495,8 +1484,10 @@ \cs_new:Nn \fontspec_complete_fontname:Nn { \tl_set:Nx #1 {#2} - \tl_replace_all:Nne #1 {*} {\l__fontspec_basename_tl} - \__fontspec_process_ext:N #1 + \tl_if_in:NnF \l_fontspec_fontname_tl {*} + { + \tl_replace_all:Nne #1 {*} {\l__fontspec_basename_tl} + } } \cs_new:Nn \__fontspec_add_nfssfont:nnnn { @@ -1945,21 +1936,8 @@ } \cs_new:Nn \__fontspec_make_OT_feature:nnn { - - \bool_set_true:N \l__fontspec_proceed_bool - - \tl_if_empty:nF {#1} - { - \exp_args:No \__fontspec_check_ot_feat:NnF \l__fontspec_fontface_cs_tl {#1} - { - \__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1} - \bool_set_false:N \l__fontspec_proceed_bool - } - } - \__fontspec_remove_clashing_featstr:x { #2 , \__fontspec_swap_plus_minus:n {#2} , #3 } - - \bool_if:NT \l__fontspec_proceed_bool { \__fontspec_update_featstr:n {#2} } + \__fontspec_update_featstr:n {#2} } \cs_generate_variant:Nn \__fontspec_make_OT_feature:nnn {xxx} \cs_new:Nn \__fontspec_swap_plus_minus:n { \__fontspec_swap_plus_minus_aux:Nq #1 \q_nil } @@ -2321,12 +2299,12 @@ } \__fontspec_keys_define_code:nnn {fontspec-preparse} {Script} { - \keys_set:nn {fontspec-renderer} {Renderer=OpenType} + \tl_if_empty:NT \l__fontspec_renderer_tl { \keys_set:nn {fontspec-renderer} {Renderer=OpenType} } \tl_set:Nn \l__fontspec_script_name_tl {#1} } \__fontspec_keys_define_code:nnn {fontspec-preparse} {Language} { - \keys_set:nn {fontspec-renderer} {Renderer=OpenType} + \tl_if_empty:NT \l__fontspec_renderer_tl { \keys_set:nn {fontspec-renderer} {Renderer=OpenType} } \tl_set:Nn \l__fontspec_lang_name_tl {#1} } \__fontspec_keys_define_code:nnn {fontspec-preparse} {FontIndex} diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua index f5507973c77..c889bc65b2c 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua @@ -23,8 +23,8 @@ fontspec = fontspec or {} local fontspec = fontspec fontspec.module = { name = "fontspec", - version = "2.9c", - date = "2024/05/03", + version = "2.9d", + date = "2024/05/07", 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 ca1d17e2165..b0c70f2b249 100644 --- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty +++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty @@ -24,7 +24,7 @@ \RequirePackage{xparse} \ProvidesExplPackage{fontspec}% - {2024/05/03}{2.9c}{Font selection for XeLaTeX and LuaLaTeX} + {2024/05/07}{2.9d}{Font selection for XeLaTeX and LuaLaTeX} %%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <latex3.github.io/fontspec> \bool_new:N \g__fontspec_cfg_bool |