From 046963860d7f8995aeab170152087a59d935c1ee Mon Sep 17 00:00:00 2001 From: Will Robertson Date: Sat, 11 May 2024 16:16:28 +0930 Subject: [PATCH] be quiet when script/lang not found closes #421 --- doc/CHANGES.md | 13 +++++++++++++ fontspec-code-feat-opentype.dtx | 4 ++-- fontspec-code-msg.dtx | 12 ++++++------ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 47c3b71..638e456 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -1,6 +1,19 @@ Change history ============== +## v2.9e (2024/05/11) + + * Fix regression with automatic detection and selection of small caps when the font + script or language was requested but not found. (#517) + + * Add additional tests to check against regressions. (#516, #518) + + * Improve message in log file when defining a font without small caps. + + * Demote warnings when Script or Language are requested but not found to the log file + instead of the console. (#421) + + ## v2.9d (2024/05/07) * Now that `Script` and `Language` are retained even if the font doesn't support them, diff --git a/fontspec-code-feat-opentype.dtx b/fontspec-code-feat-opentype.dtx index 2f041f2..b4d5db7 100644 --- a/fontspec-code-feat-opentype.dtx +++ b/fontspec-code-feat-opentype.dtx @@ -476,7 +476,7 @@ \bool_if:NF \l_@@_scriptlang_exist_bool { %\typeout{Script~not~found!} - \@@_warning:nxx {no-script} {\l_fontspec_fontname_tl} {#1} + \@@_info:nxx {script-not-exist} {\l_fontspec_fontname_tl} {#1} \clist_set:Nn \l_tmpa_clist {#2} \clist_get:NN \l_tmpa_clist \l_@@_script_tl \exp_args:Noo \@@_check_script:NnF \l_@@_fontface_cs_tl \l_@@_script_tl @@ -558,7 +558,7 @@ \bool_if:NF \l_@@_scriptlang_exist_bool { %\typeout{Lang~not~found!} - \@@_warning:nx {language-not-exist} {#1} + \@@_info:nx {language-not-exist} {#1} \clist_set:Nn \l_tmpa_clist {#2} \clist_get:NN \l_tmpa_clist \l_@@_lang_tl \exp_args:Noo \@@_check_lang:NnF \l_@@_fontface_cs_tl \l_@@_lang_tl diff --git a/fontspec-code-msg.dtx b/fontspec-code-msg.dtx index 2904f73..9def7ad 100644 --- a/fontspec-code-msg.dtx +++ b/fontspec-code-msg.dtx @@ -153,6 +153,12 @@ { '#1' doesn't appear to have an Optical Size axis. } +\@@_msg_new:nn {script-not-exist} + { + Script '#2' not explicitly supported within font '#1'. + Check the typeset output, and if it is okay then ignore this warning. + Otherwise a different font should be chosen. + } \@@_msg_new:nn {language-not-exist} { Language '#1' not explicitly supported @@ -232,12 +238,6 @@ { Adjusting the maths setup (use [no-math] to avoid this). } -\@@_msg_new:nn {no-script} - { - Script '#2' not explicitly supported within font '#1'. - Check the typeset output, and if it is okay then ignore this warning. - Otherwise a different font should be chosen. - } \@@_msg_new:nn {opa-twice} { Opacity set twice, in both Colour and Opacity.\\