diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-17 21:28:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-17 21:28:23 +0000 |
commit | 590f92a6661f059e1c49b7b453c6c43149865628 (patch) | |
tree | 4a6e2c981817b1e58634f3f6c03fc48cd0c0ada8 /Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx | |
parent | df2e480fb0e83b9160de826127a9200714b9f3f2 (diff) |
fontspec (17jan19)
git-svn-id: svn://tug.org/texlive/trunk@49739 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx | 80 |
1 files changed, 52 insertions, 28 deletions
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 da2374cde13..d73f0f62b18 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx @@ -239,6 +239,15 @@ \@@_primitive_font_gset:Nnn \l_fontspec_font { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } {\f@size pt} \l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly + \@@_check_script:NnTF \l_fontspec_font {DFLT} + { +%<debug>\typeout{Has~Opentype~scripts} + \bool_set_false:N \l_@@_scripts_missing_bool + } + { +%<debug>\typeout{No~Opentype~scripts} + \bool_set_true:N \l_@@_scripts_missing_bool + } } % \end{macrocode} % \end{macro} @@ -304,33 +313,42 @@ %<debug> \typeout{:: _set_scriptlang:} \bool_if:NT \l_@@_firsttime_bool { - \tl_if_empty:NTF \l_@@_script_name_tl + \bool_if:NTF \l_@@_scripts_missing_bool { - \@@_check_script:NnTF \l_fontspec_font {latn} +%<debug> \typeout{:::: NADA} + \@@_info:n {no-scripts} + } + { + \tl_if_empty:NTF \l_@@_script_name_tl + { + \@@_check_script:NnTF \l_fontspec_font {latn} + { +%<debug> \typeout{:::: Defaulting to latn script} + \tl_set:Nn \l_@@_script_name_tl {Latin} + \tl_if_empty:NT \l_@@_lang_name_tl + { + \tl_set:Nn \l_@@_lang_name_tl {Default} + } + \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl} + \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl} +%<debug> \typeout{:::: Script=\l_@@_script_name_tl, Language=\l_@@_lang_name_tl} + } + { +%<debug> \typeout{:::: Default script only} + \@@_info:n {dflt-script} + \keys_set:nx {fontspec-opentype} {Script=Default} + \keys_set:nx {fontspec-opentype} {Language=Default} + } + } { - \tl_set:Nn \l_@@_script_name_tl {Latin} \tl_if_empty:NT \l_@@_lang_name_tl { \tl_set:Nn \l_@@_lang_name_tl {Default} } +%<debug> \typeout{:::: Script=\l_@@_script_name_tl, Language=\l_@@_lang_name_tl} \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl} \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl} -%<debug> \typeout{:::: Script=\l_@@_script_name_tl, Language=\l_@@_lang_name_tl} } - { -%<debug> \typeout{:::: NADA} - \@@_info:n {no-scripts} - \bool_set_true:N \l_@@_never_check_bool - } - } - { - \tl_if_empty:NT \l_@@_lang_name_tl - { - \tl_set:Nn \l_@@_lang_name_tl {Default} - } -%<debug> \typeout{:::: Script=\l_@@_script_name_tl, Language=\l_@@_lang_name_tl} - \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl} - \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl} } } } @@ -1138,25 +1156,31 @@ \int_compare:nT { \tl_count:n {#6} > 2 } { \@@_error:nx {ot-tag-too-long} {#2#3#4#5#6} } - \str_if_eq:eeTF {#2#3#4#5#6} {DFLT} - { \int_zero:N #1 } + \int_set:Nn #1 { - \int_set:Nn #1 - { - `#2 * "1000000 - + `#3 * "10000 - + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100 - + \ifx \c_empty_tl #5 32 \else `#5 \fi - } + `#2 * "1000000 + + `#3 * "10000 + + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100 + + \ifx \c_empty_tl #5 32 \else `#5 \fi } } % \end{macrocode} % % \begin{macrocode} -\cs_generate_variant:Nn \@@_iv_str_to_num:Nn {No} +%</XE> % \end{macrocode} +% \end{macro} % +% \begin{macro}{\@@_lang_dflt_correct:N} % \begin{macrocode} +%<*XE> +\cs_new_protected:Nn \@@_lang_dflt_correct:N + { + \int_compare:nNnT {#1} = {1145457748} % "DFLT" + { + \int_zero:N #1 + } + } %</XE> % \end{macrocode} % \end{macro} |