diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx | 261 |
1 files changed, 154 insertions, 107 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx index 0e2f712220f..69cde28a7e0 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx @@ -2,12 +2,13 @@ % \section{Error/warning/info messages} % % \begin{macrocode} -%<*msg> +%<*fontspec> % \end{macrocode} % % Shorthands for messages: % \begin{macrocode} \cs_new:Npn \@@_error:n { \msg_error:nn {fontspec} } +\cs_new:Npn \@@_error:nn { \msg_error:nnn {fontspec} } \cs_new:Npn \@@_error:nx { \msg_error:nnx {fontspec} } \cs_new:Npn \@@_warning:n { \msg_warning:nn {fontspec} } \cs_new:Npn \@@_warning:nx { \msg_warning:nnx {fontspec} } @@ -18,203 +19,249 @@ \cs_new:Npn \@@_trace:n { \msg_trace:nn {fontspec} } % \end{macrocode} % +% Allow messages to be written with spaces acting as normal: +% \begin{macrocode} +\cs_generate_variant:Nn \msg_new:nnn {nnx} +\cs_generate_variant:Nn \msg_new:nnnn {nnxx} +\cs_new:Nn \@@_msg_new:nnn + { \msg_new:nnx {#1} {#2} { \tl_trim_spaces:n {#3} } } +\cs_new:Nn \@@_msg_new:nnnn + { \msg_new:nnxx {#1} {#2} { \tl_trim_spaces:n {#3} } { \tl_trim_spaces:n {#4} } } +\char_set_catcode_space:n {32} +% \end{macrocode} +% % \subsection{Errors} % % \begin{macrocode} -\msg_new:nnn {fontspec} {no-size-info} +\@@_msg_new:nnn {fontspec} {only-inside-encdef} + { + \exp_not:N#1can only be used in the second argument + to \string\DeclareUnicodeEncoding. + } +\@@_msg_new:nnn {fontspec} {only-import-tu} { - Size~ information~ must~ be~ supplied.\\ - For~ example,~ SizeFeatures={Size={8-12},...}. + The "\string\ImportEncoding" command can only take "TU" as an argument at this stage. } -\msg_new:nnnn {fontspec} {font-not-found} +\@@_msg_new:nnn {fontspec} {no-size-info} { - The~ font~ "#1"~ cannot~ be~ found. + Size information must be supplied.\\ + For example, SizeFeatures={Size={8-12},...}. } +\@@_msg_new:nnnn {fontspec} {font-not-found} { - A~font~might~not~be~found~for~many~reasons.\\ - Check~the~spelling,~where~the~font~is~installed~etc.~etc.\\\\ - When~in~doubt,~ask~someone~for~help! + The font "#1" cannot be found. } -\msg_new:nnnn {fontspec} {rename-feature-not-exist} { - The~ feature~ #1~ doesn't~ appear~ to~ be~ defined. + A font might not be found for many reasons.\\ + Check the spelling, where the font is installed etc. etc.\\\\ + When in doubt, ask someone for help! } +\@@_msg_new:nnnn {fontspec} {rename-feature-not-exist} { - It~ looks~ like~ you're~ trying~ to~ rename~ a~ feature~ that~ doesn't~ exist. + The feature #1 doesn't appear to be defined. } -\msg_new:nnn {fontspec} {no-glyph} { - '\l_fontspec_fontname_tl'~ does~ not~ contain~ glyph~ #1. + It looks like you're trying to rename a feature that doesn't exist. } -\msg_new:nnnn {fontspec} {euler-too-late} +\@@_msg_new:nnn {fontspec} {no-glyph} { - The~ euler~ package~ must~ be~ loaded~ BEFORE~ fontspec. + '\l_fontspec_fontname_tl' does not contain glyph #1. } +\@@_msg_new:nnnn {fontspec} {euler-too-late} { - fontspec~ only~ overwrites~ euler's~ attempt~ to~ - define~ the~ maths~ text~ fonts~ if~ fontspec~ is~ - loaded~ after~ euler.~ Type~ <return>~ to~ proceed~ - with~ incorrect~ \string\mathit,~ \string\mathbf,~ etc. + The euler package must be loaded BEFORE fontspec. } -\msg_new:nnnn {fontspec} {no-xcolor} { - Cannot~ load~ named~ colours~ without~ the~ xcolor~ package. + fontspec only overwrites euler's attempt to + define the maths text fonts if fontspec is + loaded after euler. Type <return> to proceed + with incorrect \string\mathit, \string\mathbf, etc. } +\@@_msg_new:nnnn {fontspec} {no-xcolor} { - Sorry,~ I~ can't~ do~ anything~ to~ help.~ Instead~ of~ loading~ - the~ color~ package,~ use~ xcolor~ instead.~ It's~ better. + Cannot load named colours without the xcolor package. } -\msg_new:nnnn {fontspec} {unknown-color-model} { - Error~ loading~ colour~ `#1';~ unknown~ colour~ model. + Sorry, I can't do anything to help. Instead of loading + the color package, use xcolor instead. } +\@@_msg_new:nnnn {fontspec} {unknown-color-model} { - Sorry,~ I~ can't~ do~ anything~ to~ help.~ Please~ report~ this~ error~ - to~ my~ developer~ with~ a~ minimal~ example~ that~ causes~ the~ problem. + Error loading colour `#1'; unknown colour model. } -\msg_new:nnnn {fontspec} {not-in-addfontfeatures} { - The~ "#1"~ font~ feature~ cannot~ be~ used~ in~ \string\addfontfeatures. + Sorry, I can't do anything to help. Please report this error + to my developer with a minimal example that causes the problem. } +\@@_msg_new:nnnn {fontspec} {not-in-addfontfeatures} { - This~ is~ due~ to~ how~ TeX~ loads~ fonts;~ such~ settings~ - are~ global~ so~ adding~ them~ mid-document~ within~ a~ group~ causes~ - confusion.~ You'll~ need~ to~ define~ multiple~ font~ families~ to~ achieve~ - what~ you~ want. + The "#1" font feature cannot be used in \string\addfontfeatures. + } + { + This is due to how TeX loads fonts; such settings + are global so adding them mid-document within a group causes + confusion. You'll need to define multiple font families to achieve + what you want. } % \end{macrocode} % % \subsection{Warnings} % % \begin{macrocode} -\msg_new:nnn {fontspec} {addfontfeatures-ignored} +\@@_msg_new:nnn {fontspec} {tu-clash} + { + I have found the tuenc.def encoding definition file but the TU encoding is not + defined by the LaTeX2e kernel; attempting to correct but you really should update + to the latest version of LaTeX2e. + } +\@@_msg_new:nnn {fontspec} {tu-missing} + { + The TU encoding seems to be missing; please update to the latest version of LaTeX2e. + } +\@@_msg_new:nnn {fontspec} {addfontfeatures-ignored} { - \string\addfontfeature (s)~ ignored~ \msg_line_context:;~ - it~ cannot~ be~ used~ with~ a~ font~ that~ wasn't~ selected~ by~ a~ fontspec~ command.\\ + \string\addfontfeature (s) ignored \msg_line_context:; + it cannot be used with a font that wasn't selected by a fontspec command.\\ \\ - The~ current~ font~ is~ "\use:c{font@name}".\\ + The current font is "\use:c{font@name}".\\ \int_compare:nTF { \clist_count:n {#1} = 1 } - { The~ requested~ feature~ is~ "#1". } - { The~ requested~ features~ are~ "#1". } + { The requested feature is "#1". } + { The requested features are "#1". } + } +\@@_msg_new:nnn {fontspec} {feature-option-overwrite} + { + Option '#2' of font feature '#1' overwritten. + } +\@@_msg_new:nnn {fontspec} {script-not-exist-latn} + { + Font '\l_fontspec_fontname_tl' does not contain script '#1'.\\ + 'Latin' script used instead. } -\msg_new:nnn {fontspec} {feature-option-overwrite} +\@@_msg_new:nnn {fontspec} {script-not-exist} { - Option~ '#2'~ of~ font~ feature~ '#1'~ overwritten. + Font '\l_fontspec_fontname_tl' does not contain script '#1'. } -\msg_new:nnn {fontspec} {script-not-exist-latn} +\@@_msg_new:nnn {fontspec} {aat-feature-not-exist} { - Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'.\\ - 'Latin'~ script~ used~ instead. + '\l_keys_key_tl=\l_keys_value_tl' feature not supported + for AAT font '\l_fontspec_fontname_tl'. } -\msg_new:nnn {fontspec} {script-not-exist} +\@@_msg_new:nnn {fontspec} {aat-feature-not-exist-in-font} { - Font~ '\l_fontspec_fontname_tl'~ does~ not~ contain~ script~ '#1'. + AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available + in font '\l_fontspec_fontname_tl'. } -\msg_new:nnn {fontspec} {aat-feature-not-exist} +\@@_msg_new:nnn {fontspec} {icu-feature-not-exist} { - '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~ - for~ AAT~ font~ '\l_fontspec_fontname_tl'. + '\l_keys_key_tl=\l_keys_value_tl' feature not supported + for OpenType font '\l_fontspec_fontname_tl' } -\msg_new:nnn {fontspec} {aat-feature-not-exist-in-font} +\@@_msg_new:nnn {fontspec} {icu-feature-not-exist-in-font} { - AAT~ feature~ '\l_keys_key_tl=\l_keys_value_tl'~ (#1)~ not~ available~ - in~ font~ '\l_fontspec_fontname_tl'. + 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:nnn {fontspec} {icu-feature-not-exist} +\@@_msg_new:nnn {fontspec} {no-opticals} { - '\l_keys_key_tl=\l_keys_value_tl'~ feature~ not~ supported~ - for~ OpenType~ font~ '\l_fontspec_fontname_tl' + '\l_fontspec_fontname_tl' doesn't appear to have an Optical Size axis. } -\msg_new:nnn {fontspec} {icu-feature-not-exist-in-font} +\@@_msg_new:nnn {fontspec} {language-not-exist} { - 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'. + Language '#1' not available + for font '\l_fontspec_fontname_tl' + with script '\l_@@_script_name_tl'.\\ + 'Default' language used instead. } -\msg_new:nnn {fontspec} {no-opticals} +\@@_msg_new:nnn {fontspec} {only-xetex-feature} { - '\l_fontspec_fontname_tl'~ doesn't~ appear~ to~ have~ an~ Optical~ Size~ axis. + Ignored XeTeX only feature: '#1'. } -\msg_new:nnn {fontspec} {language-not-exist} +\@@_msg_new:nnn {fontspec} {only-luatex-feature} { - Language~ '#1'~ not~ available~ - for~ font~ '\l_fontspec_fontname_tl'~ - with~ script~ '\l_@@_script_name_tl'.\\ - 'Default'~ language~ used~ instead. + Ignored LuaTeX only feature: '#1'. } -\msg_new:nnn {fontspec} {only-xetex-feature} +\@@_msg_new:nnn {fontspec} {no-mapping} { - Ignored~ XeTeX~ only~ feature:~ '#1'. + Input mapping not (yet?) supported in LuaTeX. } -\msg_new:nnn {fontspec} {only-luatex-feature} +\@@_msg_new:nnn {fontspec} {no-mapping-ligtex} { - Ignored~ LuaTeX~ only~ feature:~ '#1'. + Input mapping not (yet?) supported in LuaTeX.\\ + Use "Ligatures=TeX" instead of "Mapping=tex-text". } -\msg_new:nnn {fontspec} {no-mapping} +\@@_msg_new:nnn {fontspec} {cm-default-obsolete} { - Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX. + The "cm-default" package option is obsolete. } -\msg_new:nnn {fontspec} {no-mapping-ligtex} +\@@_msg_new:nnn {fontspec} {fakebold-only-xetex} { - Input~ mapping~ not~ (yet?)~ supported~ in~ LuaTeX.\\ - Use~ "Ligatures=TeX"~ instead~ of~ "Mapping=tex-text". + The "FakeBold" and "AutoFakeBold" options are only available with XeLaTeX.\\ + Option ignored. } -\msg_new:nnn {fontspec} {cm-default-obsolete} +\@@_msg_new:nnn {fontspec} {font-index-needs-ttc} { - The~ "cm-default"~ package~ option~ is~ obsolete. + The "FontIndex" feature is only supported by TTC (TrueType Collection) fonts.\\ + Feature ignored. } -\msg_new:nnn {fontspec} {fakebold-only-xetex} +\@@_msg_new:nnn {fontspec} {feat-cannot-remove} { - The~ "FakeBold"~ and~ "AutoFakeBold"~ options~ are~ only~ available~ with~ XeLaTeX.\\ - Option~ ignored. + The "#1" feature cannot be deactivated. Request ignored. } % \end{macrocode} -% Info messages: +% +% \subsection{Info messages} +% % \begin{macrocode} -\msg_new:nnn {fontspec} {defining-font} +\@@_msg_new:nnn {fontspec} {defining-font} { - Font~ family~'\l_fontspec_family_tl'~ created~ for~ font~ '#2'~ - with~ options~ [\l_@@_all_features_clist].\\ + Font family '\l_fontspec_family_tl' created for font '#2' + with options [\l_@@_all_features_clist].\\ \\ - This~ font~ family~ consists~ of~ the~ following~ NFSS~ series/shapes:\\ + This font family consists of the following NFSS series/shapes:\\ \l_fontspec_defined_shapes_tl } -\msg_new:nnn {fontspec} {no-font-shape} +\@@_msg_new:nnn {fontspec} {no-font-shape} { - Could~ not~ resolve~ font~ #1~ (it~ probably~ doesn't~ exist). + Could not resolve font "#1" (it probably doesn't exist). } -\msg_new:nnn {fontspec} {set-scale} +\@@_msg_new:nnn {fontspec} {set-scale} { - \l_fontspec_fontname_tl\space scale ~=~ \l_@@_scale_tl. + \l_fontspec_fontname_tl\space scale = \l_@@_scale_tl. } -\msg_new:nnn {fontspec} {setup-math} +\@@_msg_new:nnn {fontspec} {setup-math} { - Adjusting~ the~ maths~ setup~ (use~ [no-math]~ to~ avoid~ this). + Adjusting the maths setup (use [no-math] to avoid this). } -\msg_new:nnn {fontspec} {no-scripts} +\@@_msg_new:nnn {fontspec} {no-scripts} { - Font~ \l_fontspec_fontname_tl\space does~ not~ contain~ any~ OpenType~ `Script'~ information. + Font "\l_fontspec_fontname_tl" does not contain any OpenType `Script' information. } -\msg_new:nnn {fontspec} {opa-twice} +\@@_msg_new:nnn {fontspec} {opa-twice} { - Opacity~ set~ twice,~ in~ both~ Colour~ and~ Opacity.\\ - Using~ specification~ "Opacity=#1". + Opacity set twice, in both Colour and Opacity.\\ + Using specification "Opacity=#1". } -\msg_new:nnn {fontspec} {opa-twice-col} +\@@_msg_new:nnn {fontspec} {opa-twice-col} { - Opacity~ set~ twice,~ in~ both~ Opacity~ and~ Colour.\\ - Using~ an~ opacity~ specification~ in~ hex~ of~ "#1/FF". + Opacity set twice, in both Opacity and Colour.\\ + Using an opacity specification in hex of "#1/FF". } -\msg_new:nnn {fontspec} {bad-colour} +\@@_msg_new:nnn {fontspec} {bad-colour} { - Bad~ colour~ declaration~ "#1".~ - Colour~ must~ be~ one~ of:\\ - *~ a~ named~ xcolor~ colour\\ - *~ a~ six-digit~ hex~ colour~ RRGGBB\\ - *~ an~ eight-digit~ hex~ colour~ RRGGBBTT~ with~ opacity + Bad colour declaration "#1". + Colour must be one of:\\ + * a named xcolor colour\\ + * a six-digit hex colour RRGGBB\\ + * an eight-digit hex colour RRGGBBTT with opacity } % \end{macrocode} % +% Reset `space' behaviour: +% \begin{macrocode} +\char_set_catcode_ignore:n {32} +% \end{macrocode} +% % \begin{macrocode} -%</msg> +%</fontspec> % \end{macrocode} |