diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/xebabel.def')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/xebabel.def | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/xebabel.def b/Master/texmf-dist/tex/generic/babel/xebabel.def index 1b0c1bb36d6..f451a4b71bc 100644 --- a/Master/texmf-dist/tex/generic/babel/xebabel.def +++ b/Master/texmf-dist/tex/generic/babel/xebabel.def @@ -96,6 +96,26 @@ \AddBabelHook{babel-fontspec}{beforestart}{\bbl@ckeckstdfonts} \DisableBabelHook{babel-fontspec} \bbl@trace{Font handling with fontspec} +\ifx\ExplSyntaxOn\@undefined\else + \ExplSyntaxOn + \catcode`\ =10 + \def\bbl@loadfontspec{% + \usepackage{fontspec}% + \expandafter + \def\csname msg~text~>~fontspec/language-not-exist\endcsname##1##2##3##4{% + Font '\l_fontspec_fontname_tl' is using the\\% + default features for language '##1'.\\% + That's usually fine, because many languages\\% + require no specific features, but if the output is\\% + not as expected, consider selecting another font.} + \expandafter + \def\csname msg~text~>~fontspec/no-script\endcsname##1##2##3##4{% + Font '\l_fontspec_fontname_tl' is using the\\% + default features for script '##2'.\\% + That's not always wrong, but if the output is\\% + not as expected, consider selecting another font.}} + \ExplSyntaxOff +\fi \@onlypreamble\babelfont \newcommand\babelfont[2][]{% 1=langs/scripts 2=fam \bbl@foreach{#1}{% @@ -107,7 +127,7 @@ \edef\bbl@tempa{#1}% \def\bbl@tempb{#2}% Used by \bbl@bblfont \ifx\fontspec\@undefined - \usepackage{fontspec}% + \bbl@loadfontspec \fi \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} |