summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-25 21:39:16 +0000
committerKarl Berry <karl@freefriends.org>2019-01-25 21:39:16 +0000
commit23edf44c0fa366f56bbf60968fb3d292de1c013b (patch)
tree3c6ed55b24548cb0d7f114436561b8dfdde3dcb7 /Master/texmf-dist/tex/latex/fontspec
parent0e0ce19bee540ba50ee3da3872ac10007cfde60f (diff)
fontspec (25jan19)
git-svn-id: svn://tug.org/texlive/trunk@49816 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontspec')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty84
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty70
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua4
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty4
4 files changed, 80 insertions, 82 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index e456b46917b..264240aec4c 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -41,7 +41,7 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-luatex}%
- {2019/01/24}{2.7}{Font selection for XeLaTeX and LuaLaTeX}
+ {2019/01/25}{2.7a}{Font selection for XeLaTeX and LuaLaTeX}
%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
%%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
@@ -498,6 +498,10 @@
{
\int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
}
+\cs_set:Npn \__fontspec_lua_function:ne #1#2 { \lua_now:e { fontspec.#1 ("#2") } }
+\cs_set:Npn \__fontspec_lua_function:nee #1#2#3 { \lua_now:e { fontspec.#1 ("#2","#3") } }
+\cs_set:Npn \__fontspec_lua_function:neee #1#2#3#4 { \lua_now:e { fontspec.#1 ("#2","#3","#4") } }
+\cs_set:Npn \__fontspec_lua_function:neeee #1#2#3#4#5 { \lua_now:e { fontspec.#1 ("#2","#3","#4","#5") } }
\cs_generate_variant:Nn \int_set:Nn {Nv}
\cs_generate_variant:Nn \keys_set:nn {nx}
\cs_generate_variant:Nn \keys_set_known:nnN {nx}
@@ -1860,7 +1864,7 @@
\cs_if_eq:NNTF #1 \font
{ \tl_set:Nx \l__fontspec_tmp_tl {\curr@fontshape/\f@size} }
{ \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
- \directlua{fontspec.check_ot_script("\l__fontspec_tmp_tl", "#2")}
+ \lua_now:e { fontspec.check_ot_script("\l__fontspec_tmp_tl", "#2") }
\bool_if:NTF \l__fontspec_check_bool
{
\prg_return_true:
@@ -1888,10 +1892,7 @@
\cs_if_eq:NNTF #1 \font
{ \tl_set:Nx \l__fontspec_tmp_tl {\curr@fontshape/\f@size} }
{ \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
- \directlua
- {
- fontspec.check_ot_lang( "\l__fontspec_tmp_tl", "#2", "#3" )
- }
+ \__fontspec_lua_function:neee {check_ot_lang} {\l__fontspec_tmp_tl} {#2} {#3}
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
}
@@ -1915,10 +1916,7 @@
\cs_if_eq:NNTF #1 \font
{ \tl_set:Nx \l__fontspec_tmp_tl {\curr@fontshape/\f@size} }
{ \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
- \directlua
- {
- fontspec.check_ot_feat("\l__fontspec_tmp_tl", "#2", "#3", "#4")
- }
+ \__fontspec_lua_function:neeee {check_ot_feat} {\l__fontspec_tmp_tl} {#2} {#3} {#4}
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
}
@@ -2409,7 +2407,7 @@
\tl_put_right:Nn \l__fontspec_postadjust_tl
{ \__fontspec_primitive_font_set_hyphenchar:Nn \font { \l__fontspec_hyphenchar_tl } }
}
- { \__fontspec_error:nx {no-glyph}{\l_fontspec_fontname_tl}{#1} }
+ { \__fontspec_error:nxx {no-glyph}{\l_fontspec_fontname_tl}{#1} }
}
}
@@ -2670,6 +2668,10 @@
\__fontspec_define_opentype_feature:nnnnn {Fractions} {Off} {frac} {-frac} {}
\__fontspec_define_opentype_feature:nnnnn {Fractions} {Reset} {} {} {+frac,-frac}
\__fontspec_define_opentype_onoffreset:nnnnn {Fractions} {Alternate} {afrc} {afrc} {-frac}
+\__fontspec_define_opentype_feature_group:n {LocalForms}
+\__fontspec_define_opentype_feature:nnnnn {LocalForms} {On} {locl} {+locl} {}
+\__fontspec_define_opentype_feature:nnnnn {LocalForms} {Off} {locl} {-locl} {}
+\__fontspec_define_opentype_feature:nnnnn {LocalForms} {Reset} {} {} {+locl,-locl}
\__fontspec_define_opentype_feature_group:n {Style}
\__fontspec_define_opentype_feature:nnnnn {Style} {ResetAll} {} {}
@@ -2839,12 +2841,13 @@
\clist_map_break:
}
}
+
\bool_if:NF \l__fontspec_scriptlang_exist_bool
{
\bool_if:nF { \str_if_eq_p:ee {#1} {CustomDefault} }
{
\tl_clear:N \l__fontspec_script_name_tl
- \__fontspec_warning:nx {no-script} {\l_fontspec_fontname_tl} {#1}
+ \__fontspec_warning:nxx {no-script} {\l_fontspec_fontname_tl} {#1}
}
\bool_if:nF
@@ -3848,25 +3851,13 @@
%%^^A%% fontspec-code-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
-\DeclareRobustCommand{\-}
- {
- \discretionary
- {
- \char\ifnum\hyphenchar\font<\z@
- \xlx@defaulthyphenchar
- \else
- \hyphenchar\font
- \fi
- }{}{}
- }
-\def\xlx@defaulthyphenchar{`\-}
-\cs_new:Nn \fontspec_visible_space:
+\cs_new_protected:Nn \fontspec_visible_space:
{
\__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
{ \char"2423\scan_stop: }
{ \fontspec_visible_space_fallback: }
}
-\cs_new:Nn \fontspec_visible_space_fallback:
+\cs_new_protected:Nn \fontspec_visible_space_fallback:
{
{
\usefont{\g_fontspec_encoding_tl}{lmtt}{\f@series}{\f@shape}
@@ -3880,23 +3871,30 @@
\cs_set_eq:NN^^20\fontspec_visible_space:%
}%
\group_end:
-\def\verb
- {
- \relax\ifmmode\hbox\else\leavevmode\null\fi
- \bgroup
- \verb@eol@error \let\do\@makeother \dospecials
- \verbatim@font\@noligs
- \@ifstar\__fontspecsverb\@verb
- }
-\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
\AtBeginDocument
{
- \fontspec_patch_verbatim:
- \fontspec_patch_moreverb:
- \fontspec_patch_fancyvrb:
- \fontspec_patch_listings:
+ \cs_if_exist:NF \verbvisiblespace
+ {
+\__fontspec_patch_verb:
+\__fontspec_patch_verbatim:
+\__fontspec_patch_moreverb:
+\__fontspec_patch_fancyvrb:
+\__fontspec_patch_listings:
+}
}
-\cs_set:Npn \fontspec_patch_verbatim:
+\cs_new_protected:Npn \__fontspec_patch_verb:
+ {
+\def\verb
+{
+\relax\ifmmode\hbox\else\leavevmode\null\fi
+\bgroup
+\verb@eol@error \let\do\@makeother \dospecials
+\verbatim@font\@noligs
+\@ifstar\__fontspecsverb\@verb
+}
+\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
+}
+\cs_new_protected:Npn \__fontspec_patch_verbatim:
{
\@ifpackageloaded{verbatim}
{
@@ -3912,7 +3910,7 @@
}
}
}
-\cs_set:Npn \fontspec_patch_moreverb:
+\cs_new_protected:Npn \__fontspec_patch_moreverb:
{
\@ifpackageloaded{moreverb}
{
@@ -3927,14 +3925,14 @@
}
}{}
}
-\cs_set:Npn \fontspec_patch_fancyvrb:
+\cs_new_protected:Npn \__fontspec_patch_fancyvrb:
{
\@ifpackageloaded{fancyvrb}
{
\cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
}{}
}
-\cs_set:Npn \fontspec_patch_listings:
+\cs_new_protected:Npn \__fontspec_patch_listings:
{
\@ifpackageloaded{listings}
{
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index cf7f95bf6cf..02f23259be2 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -41,7 +41,7 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2019/01/24}{2.7}{Font selection for XeLaTeX and LuaLaTeX}
+ {2019/01/25}{2.7a}{Font selection for XeLaTeX and LuaLaTeX}
%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
%%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
@@ -2541,7 +2541,7 @@
\tl_put_right:Nn \l__fontspec_postadjust_tl
{ \__fontspec_primitive_font_set_hyphenchar:Nn \font { \l__fontspec_hyphenchar_tl } }
}
- { \__fontspec_error:nx {no-glyph}{\l_fontspec_fontname_tl}{#1} }
+ { \__fontspec_error:nxx {no-glyph}{\l_fontspec_fontname_tl}{#1} }
}
}
@@ -2622,7 +2622,7 @@
\bool_if:nT { !\l__fontspec_ot_bool && !\l__fontspec_mm_bool }
{
\bool_if:NT \l__fontspec_firsttime_bool
- { \__fontspec_warning:n {no-opticals} {\l_fontspec_fontname_tl} }
+ { \__fontspec_warning:nx {no-opticals} {\l_fontspec_fontname_tl} }
}
}
\keys_define:nn {fontspec}
@@ -2823,6 +2823,10 @@
\__fontspec_define_opentype_feature:nnnnn {Fractions} {Off} {frac} {-frac} {}
\__fontspec_define_opentype_feature:nnnnn {Fractions} {Reset} {} {} {+frac,-frac}
\__fontspec_define_opentype_onoffreset:nnnnn {Fractions} {Alternate} {afrc} {afrc} {-frac}
+\__fontspec_define_opentype_feature_group:n {LocalForms}
+\__fontspec_define_opentype_feature:nnnnn {LocalForms} {On} {locl} {+locl} {}
+\__fontspec_define_opentype_feature:nnnnn {LocalForms} {Off} {locl} {-locl} {}
+\__fontspec_define_opentype_feature:nnnnn {LocalForms} {Reset} {} {} {+locl,-locl}
\__fontspec_define_opentype_feature_group:n {Style}
\__fontspec_define_opentype_feature:nnnnn {Style} {ResetAll} {} {}
@@ -2987,12 +2991,13 @@
\clist_map_break:
}
}
+
\bool_if:NF \l__fontspec_scriptlang_exist_bool
{
\bool_if:nF { \str_if_eq_p:ee {#1} {CustomDefault} }
{
\tl_clear:N \l__fontspec_script_name_tl
- \__fontspec_warning:nx {no-script} {\l_fontspec_fontname_tl} {#1}
+ \__fontspec_warning:nxx {no-script} {\l_fontspec_fontname_tl} {#1}
}
\bool_if:nF
@@ -4133,25 +4138,13 @@
%%^^A%% fontspec-code-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
-\DeclareRobustCommand{\-}
- {
- \discretionary
- {
- \char\ifnum\hyphenchar\font<\z@
- \xlx@defaulthyphenchar
- \else
- \hyphenchar\font
- \fi
- }{}{}
- }
-\def\xlx@defaulthyphenchar{`\-}
-\cs_new:Nn \fontspec_visible_space:
+\cs_new_protected:Nn \fontspec_visible_space:
{
\__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
{ \char"2423\scan_stop: }
{ \fontspec_visible_space_fallback: }
}
-\cs_new:Nn \fontspec_visible_space_fallback:
+\cs_new_protected:Nn \fontspec_visible_space_fallback:
{
{
\usefont{\g_fontspec_encoding_tl}{lmtt}{\f@series}{\f@shape}
@@ -4165,23 +4158,30 @@
\cs_set_eq:NN^^20\fontspec_visible_space:%
}%
\group_end:
-\def\verb
- {
- \relax\ifmmode\hbox\else\leavevmode\null\fi
- \bgroup
- \verb@eol@error \let\do\@makeother \dospecials
- \verbatim@font\@noligs
- \@ifstar\__fontspecsverb\@verb
- }
-\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
\AtBeginDocument
{
- \fontspec_patch_verbatim:
- \fontspec_patch_moreverb:
- \fontspec_patch_fancyvrb:
- \fontspec_patch_listings:
+ \cs_if_exist:NF \verbvisiblespace
+ {
+\__fontspec_patch_verb:
+\__fontspec_patch_verbatim:
+\__fontspec_patch_moreverb:
+\__fontspec_patch_fancyvrb:
+\__fontspec_patch_listings:
+}
}
-\cs_set:Npn \fontspec_patch_verbatim:
+\cs_new_protected:Npn \__fontspec_patch_verb:
+ {
+\def\verb
+{
+\relax\ifmmode\hbox\else\leavevmode\null\fi
+\bgroup
+\verb@eol@error \let\do\@makeother \dospecials
+\verbatim@font\@noligs
+\@ifstar\__fontspecsverb\@verb
+}
+\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
+}
+\cs_new_protected:Npn \__fontspec_patch_verbatim:
{
\@ifpackageloaded{verbatim}
{
@@ -4197,7 +4197,7 @@
}
}
}
-\cs_set:Npn \fontspec_patch_moreverb:
+\cs_new_protected:Npn \__fontspec_patch_moreverb:
{
\@ifpackageloaded{moreverb}
{
@@ -4212,14 +4212,14 @@
}
}{}
}
-\cs_set:Npn \fontspec_patch_fancyvrb:
+\cs_new_protected:Npn \__fontspec_patch_fancyvrb:
{
\@ifpackageloaded{fancyvrb}
{
\cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
}{}
}
-\cs_set:Npn \fontspec_patch_listings:
+\cs_new_protected:Npn \__fontspec_patch_listings:
{
\@ifpackageloaded{listings}
{
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index e67eed16e82..5cc60a81597 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -23,8 +23,8 @@ fontspec = fontspec or {}
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = "2.7",
- date = "2019/01/24",
+ version = "2.7a",
+ date = "2019/01/25",
description = "Font selection for XeLaTeX and LuaLaTeX",
author = "Khaled Hosny, Philipp Gesang, Will Robertson",
copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
index 7178fb7f2d3..e46c9205de6 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -21,13 +21,13 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec}%
- {2019/01/24}{2.7}{Font selection for XeLaTeX and LuaLaTeX}
+ {2019/01/25}{2.7a}{Font selection for XeLaTeX and LuaLaTeX}
%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
\sys_if_engine_luatex:T
{
\RequirePackage{luaotfload}
- \directlua{require("fontspec")}
+ \lua_now:e{require("fontspec")}
\RequirePackageWithOptions{fontspec-luatex}
\endinput
}