diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-22 22:34:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-22 22:34:22 +0000 |
commit | 4f70a140932277cc2ef6292e47ebe25c5d8c3230 (patch) | |
tree | 09c23cbf4ffd71fde1b8049902f73511adef85d9 /Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx | |
parent | 60a21cad39ca930406807ef85e67b5b3f8407b2a (diff) |
fontspec (22jan17)
git-svn-id: svn://tug.org/texlive/trunk@43016 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx index 84975859eea..202b16e1b19 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx @@ -28,7 +28,7 @@ \msg_redirect_module:nnn { fontspec } { warning } { none } \msg_redirect_module:nnn { fontspec } { info } { none } } -\ExecuteOptions{config,math,euenc} +\ExecuteOptions{config,math,tuenc} \ProcessOptions* % \end{macrocode} % @@ -39,13 +39,28 @@ % % Soon to be the default, with a just-in-case check: % \begin{macrocode} -\tl_set:Nn \g_fontspec_encoding_tl {TU} -\file_if_exist:nF {tuenc.def} { \bool_set_true:N \g_@@_euenc_bool } -\bool_if:NT \g_@@_euenc_bool +\bool_if:NF \g_@@_euenc_bool + { + \file_if_exist:nTF {tuenc.def} + { + \cs_if_exist:cF {T@TU} + { + \@@_warning:n {tu-clash} + \DeclareFontEncoding{TU}{}{} + \DeclareFontSubstitution{TU}{lmr}{m}{n} + } + } + { + \@@_warning:n {tu-missing} + \bool_set_true:N \g_@@_euenc_bool + } + } +\bool_if:NTF \g_@@_euenc_bool { %<xetexx> \tl_set:Nn \g_fontspec_encoding_tl {EU1} %<luatex> \tl_set:Nn \g_fontspec_encoding_tl {EU2} } + { \tl_set:Nn \g_fontspec_encoding_tl { TU } } % \end{macrocode} % % \begin{macrocode} @@ -54,7 +69,10 @@ \tl_set:Nn \ttdefault {lmtt} \RequirePackage[\g_fontspec_encoding_tl]{fontenc} \tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode if needed -\normalsize % to overcome the encoding changing the current font size +% \end{macrocode} +% To overcome the encoding changing the current font size, but only if a class has been loaded first: +% \begin{macrocode} +\tl_if_in:NnT \@filelist {.cls} { \normalsize } % \end{macrocode} % Dealing with a couple of the problems introduced by \pkg{babel}: % \begin{macrocode} |