summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-09-22 22:54:18 +0000
committerKarl Berry <karl@freefriends.org>2017-09-22 22:54:18 +0000
commitd51add942fa9edcf2de40adbb7ce915bcba38768 (patch)
tree3bde82167b1510ffd8fa01ba5b030161e15fbc44 /Master/texmf-dist/tex
parent95a2badc031cd53b7456fbda90afd45806639e62 (diff)
fontspec (22sep17)
git-svn-id: svn://tug.org/texlive/trunk@45381 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty298
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty298
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua4
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty2
4 files changed, 319 insertions, 283 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index 54bb94c2835..ae6bb9c4b7d 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -4,26 +4,27 @@
%%
%% The original source files were:
%%
-%% fontspec.dtx (with options: `fontspec,luatex')
-%% fontspec-vars.dtx (with options: `fontspec,luatex')
-%% fontspec-msg.dtx (with options: `fontspec,luatex')
-%% fontspec-opening.dtx (with options: `fontspec,luatex')
-%% fontspec-fontload.dtx (with options: `fontspec,luatex')
-%% fontspec-user.dtx (with options: `fontspec,luatex')
-%% fontspec-api.dtx (with options: `fontspec,luatex')
-%% fontspec-internal.dtx (with options: `fontspec,luatex')
-%% fontspec-opentype.dtx (with options: `fontspec,luatex')
-%% fontspec-graphite.dtx (with options: `fontspec,luatex')
-%% fontspec-keyval.dtx (with options: `fontspec,luatex')
-%% fontspec-feat-opentype.dtx (with options: `fontspec,luatex')
-%% fontspec-scripts.dtx (with options: `fontspec,luatex')
-%% fontspec-lang.dtx (with options: `fontspec,luatex')
-%% fontspec-feat-aat.dtx (with options: `fontspec,luatex')
-%% fontspec-enc.dtx (with options: `fontspec,luatex')
-%% fontspec-math.dtx (with options: `fontspec,luatex')
-%% fontspec-closing.dtx (with options: `fontspec,luatex')
-%% fontspec-xfss.dtx (with options: `fontspec,luatex')
-%% fontspec-patches.dtx (with options: `fontspec,luatex')
+%% fontspec.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-vars.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-msg.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-opening.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-fontload.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-interfaces.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-user.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-api.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-internal.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-opentype.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-graphite.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-keyval.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-feat-opentype.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-scripts.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-lang.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-feat-aat.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-enc.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-math.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-closing.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-xfss.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-patches.dtx (with options: `fontspec,LU,luatex')
%% ------------------------------------------------
%% The FONTSPEC package for XeLaTeX/LuaLaTeX
%% (C) 2004--2017 Will Robertson and Khaled Hosny
@@ -32,7 +33,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-luatex}%
- {2017/08/14}{2.6d}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
@@ -471,24 +472,116 @@
\prg_return_false:
\fi:
}
+\cs_new:Nn \__fontspec_primitive_font_set_hyphenchar:Nn
+ {
+ \tex_hyphenchar:D #1 = #2 \scan_stop:
+ }
\NewDocumentCommand \fontspec { O{} m O{} }
{
- \__fontspec_main_fontspec:nnn {#1} {#2} {#3}
+ \__fontspec_main_fontspec:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmainfont { O{} m O{} }
+ {
+ \__fontspec_main_setmainfont:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setsansfont { O{} m O{} }
+ {
+ \__fontspec_main_setsansfont:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmonofont { O{} m O{} }
+ {
+ \__fontspec_main_setmonofont:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmathrm { O{} m O{} }
+ {
+ \__fontspec_main_setmathrm:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setboldmathrm { O{} m O{} }
+ {
+ \__fontspec_main_setboldmathrm:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmathsf { O{} m O{} }
+ {
+ \__fontspec_main_setmathsf:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmathtt { O{} m O{} }
+ {
+ \__fontspec_main_setmathtt:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setromanfont { O{} m O{} }
+ {
+ \__fontspec_main_setmainfont:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \newfontfamily { m O{} m O{} }
+ {
+ \__fontspec_main_newfontfamily:nnn {#1} {#2,#4} {#3}
+ }
+\NewDocumentCommand \newfontface { m O{} m O{} }
+ {
+ \__fontspec_main_newfontface:nnn {#1} {#2,#4} {#3}
+ }
+\NewDocumentCommand \defaultfontfeatures { t+ o m }
+ {
+ \__fontspec_main_defaultfontfeatures:nnn {#1} {#2} {#3}
+ }
+\NewDocumentCommand \addfontfeatures {m}
+ {
+ \__fontspec_main_addfontfeatures:n {#1}
+ }
+\NewDocumentCommand \addfontfeature {m}
+ {
+ \__fontspec_main_addfontfeatures:n {#1}
+ }
+\NewDocumentCommand \newfontfeature {mm}
+ {
+ \__fontspec_main_newfontfeature:nn {#1} {#2}
+ }
+\NewDocumentCommand \newAATfeature {mmmm}
+ {
+ \__fontspec_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
+ }
+\NewDocumentCommand \newopentypefeature {mmm}
+ {
+ \__fontspec_main_newopentypefeature:nnn {#1} {#2} {#3}
+ }
+\NewDocumentCommand \newICUfeature {mmm}
+ {
+ \__fontspec_main_newopentypefeature:nnn {#1} {#2} {#3}
+ }
+\NewDocumentCommand \aliasfontfeature {mm}
+ {
+ \__fontspec_main_aliasfontfeature:nn {#1} {#2}
+ }
+\NewDocumentCommand \aliasfontfeatureoption {mmm}
+ {
+ \__fontspec_main_aliasfontfeatureoption:nnn {#1} {#2} {#3}
+ }
+\NewDocumentCommand \newfontscript {mm}
+ {
+ \fontspec_new_script:nn {#1} {#2}
+ }
+\NewDocumentCommand \newfontlanguage {mm}
+ {
+ \fontspec_new_lang:nn {#1} {#2}
+ }
+\NewDocumentCommand \DeclareFontsExtensions {m}
+ {
+ \__fontspec_main_DeclareFontsExtensions:n {#1}
+ }
+\NewDocumentCommand \IfFontFeatureActiveTF {mmm}
+ {
+ \__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
}
-\cs_set:Nn \__fontspec_main_fontspec:nnn
+\cs_set:Nn \__fontspec_main_fontspec:nn
{
- \fontspec_set_family:Nnn \f@family {#1,#3} {#2}
+ \fontspec_set_family:Nnn \f@family {#1} {#2}
\fontencoding { \l__fontspec_nfss_enc_tl }
\selectfont
\ignorespaces
}
-\DeclareDocumentCommand \setmainfont { O{} m O{} }
- {
- \__fontspec_main_setmainfont:nnn {#1} {#2} {#3}
- }
-\cs_set:Nn \__fontspec_main_setmainfont:nnn
+\cs_set:Nn \__fontspec_main_setmainfont:nn
{
- \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1} {#2}
\tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
{
@@ -499,16 +592,13 @@
}
\str_if_eq_x:nnT {\familydefault} {\rmdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__fontspec_setmainfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
-\DeclareDocumentCommand \setsansfont { O{} m O{} }
- {
- \__fontspec_main_setsansfont:nnn {#1} {#2} {#3}
- }
-\cs_set:Nn \__fontspec_main_setsansfont:nnn
+\cs_set:Nn \__fontspec_main_setsansfont:nn
{
- \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1} {#2}
\tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
{
@@ -519,16 +609,13 @@
}
\str_if_eq_x:nnT {\familydefault} {\sfdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__fontspec_setsansfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
-\DeclareDocumentCommand \setmonofont { O{} m O{} }
- {
- \__fontspec_main_setmonofont:nnn {#1} {#2} {#3}
- }
-\cs_set:Nn \__fontspec_main_setmonofont:nnn
+\cs_set:Nn \__fontspec_main_setmonofont:nn
{
- \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1} {#2}
\tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
{
@@ -539,45 +626,37 @@
}
\str_if_eq_x:nnT {\familydefault} {\ttdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__fontspec_setmonofont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
-\DeclareDocumentCommand \setromanfont { O{} m O{} }
+\cs_set:Nn \__fontspec_main_setmathrm:nn
{
- \__fontspec_main_setmainfont:nnn {#1} {#2} {#3}
+ \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {Renderer=Basic,#1} {#2}
+ \__fontspec_setmathrm_hook:nn {#1} {#2}
}
-\DeclareDocumentCommand \setmathrm { O{} m O{} }
+\cs_set:Nn \__fontspec_main_setboldmathrm:nn
{
- \__fontspec_main_setmathrm:nnn {#1} {#2} {#3}
+ \fontspec_set_family:Nnn \g__fontspec_bfmathrm_tl {Renderer=Basic,#1} {#2}
+ \__fontspec_setboldmathrm_hook:nn {#1} {#2}
}
-\cs_set:Nn \__fontspec_main_setmathrm:nnn
- {
- \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2}
- }
-\DeclareDocumentCommand \setboldmathrm { O{} m O{} }
- {
- \__fontspec_main_setboldmathrm:nnn {#1} {#2} {#3}
- }
-\cs_set:Nn \__fontspec_main_setboldmathrm:nnn
- {
- \fontspec_set_family:Nnn \g__fontspec_bfmathrm_tl {#1} {#2}
- }
-\DeclareDocumentCommand \setmathsf { O{} m O{} }
+\cs_set:Nn \__fontspec_main_setmathsf:nn
{
- \__fontspec_main_setmathsf:nnn {#1} {#2} {#3}
+ \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {Renderer=Basic,#1} {#2}
+ \__fontspec_setmathsf_hook:nn {#1} {#2}
}
-\cs_set:Nn \__fontspec_main_setmathsf:nnn
- {
- \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2}
- }
-\DeclareDocumentCommand \setmathtt { O{} m O{} }
+\cs_set:Nn \__fontspec_main_setmathtt:nn
{
- \__fontspec_main_setmathtt:nnn {#1} {#2} {#3}
+ \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {Renderer=Basic,#1} {#2}
+ \__fontspec_setmathtt_hook:nn {#1} {#2}
}
-\cs_set:Nn \__fontspec_main_setmathtt:nnn
- {
- \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2}
- }
+\cs_set_eq:NN \__fontspec_setmainfont_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setsansfont_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setmonofont_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setmathrm_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setmathsf_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setmathtt_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setboldmathrm_hook:nn \use_none:nn
\@onlypreamble\setmathrm
\@onlypreamble\setboldmathrm
\@onlypreamble\setmathsf
@@ -585,13 +664,9 @@
\tl_set:Nn \g__fontspec_mathrm_tl {\rmdefault}
\tl_set:Nn \g__fontspec_mathsf_tl {\sfdefault}
\tl_set:Nn \g__fontspec_mathtt_tl {\ttdefault}
-\DeclareDocumentCommand \newfontfamily { m O{} m O{} }
- {
- \__fontspec_main_newfontfamily:nnnn {#1} {#2} {#3} {#4}
- }
-\cs_set:Nn \__fontspec_main_newfontfamily:nnnn
+\cs_set:Nn \__fontspec_main_newfontfamily:nnn
{
- \fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2,#4} {#3}
+ \fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2} {#3}
\use:x
{
\exp_not:N \DeclareRobustCommand \exp_not:N #1
@@ -602,15 +677,11 @@
}
}
}
-\DeclareDocumentCommand \newfontface { m O{} m O{} }
- {
- \__fontspec_main_newfontface:nnnn {#1} {#2} {#3} {#4}
- }
-\cs_set:Nn \__fontspec_main_newfontface:nnnn
+\cs_set:Nn \__fontspec_main_newfontface:nnn
{
- \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+ \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
}
-\DeclareDocumentCommand \defaultfontfeatures { t+ o m }
+\cs_set:Nn \__fontspec_main_defaultfontfeatures:nnn
{
\IfNoValueTF {#2}
{ \__fontspec_set_default_features:nn {#1} {#3} }
@@ -644,10 +715,6 @@
}
}
}
-\DeclareDocumentCommand \addfontfeatures {m}
- {
- \__fontspec_main_addfontfeatures:n {#1}
- }
\cs_set:Nn \__fontspec_main_addfontfeatures:n
{
\fontspec_if_fontspec_font:TF
@@ -670,11 +737,6 @@
}
\ignorespaces
}
-\cs_set_eq:NN \addfontfeature \addfontfeatures
-\DeclareDocumentCommand \newfontfeature {mm}
- {
- \__fontspec_main_newfontfeature:nn {#1} {#2}
- }
\cs_set:Nn \__fontspec_main_newfontfeature:nn
{
\keys_define:nn { fontspec }
@@ -685,10 +747,6 @@
}
}
}
-\DeclareDocumentCommand \newAATfeature {mmmm}
- {
- \__fontspec_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
- }
\cs_set:Nn \__fontspec_main_newAATfeature:nnnn
{
\keys_if_exist:nnF { fontspec } {#1}
@@ -699,10 +757,6 @@
\__fontspec_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
}
-\DeclareDocumentCommand \newopentypefeature {mmm}
- {
- \__fontspec_main_newopentypefeature:nnn {#1} {#2} {#3}
- }
\cs_set:Nn \__fontspec_main_newopentypefeature:nnn
{
\keys_if_exist:nnF { fontspec / options } {#1}
@@ -719,14 +773,6 @@
{
\str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2}
}
-\DeclareDocumentCommand \newICUfeature {mmm}
- {
- \__fontspec_main_newopentypefeature:nnn {#1} {#2} {#3}
- }
-\DeclareDocumentCommand \aliasfontfeature {mm}
- {
- \__fontspec_main_aliasfontfeature:nn {#1} {#2}
- }
\cs_set:Nn \__fontspec_main_aliasfontfeature:nn
{
\bool_set_false:N \l__fontspec_alias_bool
@@ -744,10 +790,6 @@
\bool_if:NF \l__fontspec_alias_bool
{ \__fontspec_warning:nx {rename-feature-not-exist} {#1} }
}
-\DeclareDocumentCommand \aliasfontfeatureoption {mmm}
- {
- \__fontspec_main_aliasfontfeatureoption:nnn {#1} {#2} {#3}
- }
\cs_set:Nn \__fontspec_main_aliasfontfeatureoption:nnn
{
\bool_set_false:N \l__fontspec_alias_bool
@@ -777,29 +819,12 @@
\bool_if:NF \l__fontspec_alias_bool
{ \__fontspec_warning:nx {rename-feature-not-exist} {#1/#2} }
}
-\DeclareDocumentCommand \newfontscript {mm}
- {
- \fontspec_new_script:nn {#1} {#2}
- }
-\DeclareDocumentCommand \newfontlanguage {mm}
- {
- \fontspec_new_lang:nn {#1} {#2}
- }
-\DeclareDocumentCommand \DeclareFontsExtensions {m}
- {
- \__fontspec_main_DeclareFontsExtensions:n {#1}
- }
\cs_set:Nn \__fontspec_main_DeclareFontsExtensions:n
{
\clist_set:Nn \l__fontspec_extensions_clist { #1 }
\tl_remove_all:Nn \l__fontspec_extensions_clist {~}
}
\DeclareFontsExtensions{.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
-
-\DeclareDocumentCommand \IfFontFeatureActiveTF {mmm}
- {
- \__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
- }
\cs_set:Nn \__fontspec_main_IfFontFeatureActiveTF:nnn
{
\__fontspec_if_font_feature:nTF {#1} {#2} {#3}
@@ -1078,7 +1103,7 @@
}
\group_end:
}
-\cs_set_eq:NN \fontspec_select:nn \__fontspec_select_font_family:nn
+\cs_set_eq:NN \fontspec_select:nn \__fontspec_select_font_family:nn %% deprecated, for compatibility only
\cs_new:Nn \__fontspec_sanitise_fontname:Nn
{
\tl_set:Nx #1 {#2}
@@ -2195,13 +2220,13 @@
}
\__fontspec_keys_define_code:nnn {fontspec} {HyphenChar}
{
- \__fontspec_warning:nx {only-xetex-feature} {HyphenChar}
\str_if_eq:nnTF {#1} {None}
{
\tl_put_right:Nn \l__fontspec_postadjust_tl
- { \hyphenchar \font = -1 \relax }
+ { \__fontspec_primitive_font_set_hyphenchar:Nn \font {-1} }
}
{
+ \__fontspec_warning:nx {only-xetex-feature} {HyphenChar}
\tl_if_single:nTF {#1}
{ \tl_set:Nn \l_fontspec_hyphenchar_tl {`#1} }
@@ -2210,7 +2235,7 @@
\__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
{
\tl_put_right:Nn \l__fontspec_postadjust_tl
- { \hyphenchar \font = \l_fontspec_hyphenchar_tl \scan_stop: }
+ { \__fontspec_primitive_font_set_hyphenchar:Nn \font { \l_fontspec_hyphenchar_tl } }
}
{ \__fontspec_error:nx {no-glyph}{#1} }
@@ -3455,13 +3480,6 @@
}
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
-\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
-\cs_set:Npn \zf@fontspec #1 #2
- {
- \__fontspec_select_font_family:nn {#1} {#2}
- \tl_set:Nn \zf@family { \l_fontspec_family_tl }
- \tl_set:Nn \zf@basefont { \l_fontspec_font }
- }
\bool_if:NT \g__fontspec_cfg_bool
{
\InputIfFileExists{fontspec.cfg}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index 6ff78f06dbb..ee1f0dbdf01 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -4,26 +4,27 @@
%%
%% The original source files were:
%%
-%% fontspec.dtx (with options: `fontspec,xetexx')
-%% fontspec-vars.dtx (with options: `fontspec,xetexx')
-%% fontspec-msg.dtx (with options: `fontspec,xetexx')
-%% fontspec-opening.dtx (with options: `fontspec,xetexx')
-%% fontspec-fontload.dtx (with options: `fontspec,xetexx')
-%% fontspec-user.dtx (with options: `fontspec,xetexx')
-%% fontspec-api.dtx (with options: `fontspec,xetexx')
-%% fontspec-internal.dtx (with options: `fontspec,xetexx')
-%% fontspec-opentype.dtx (with options: `fontspec,xetexx')
-%% fontspec-graphite.dtx (with options: `fontspec,xetexx')
-%% fontspec-keyval.dtx (with options: `fontspec,xetexx')
-%% fontspec-feat-opentype.dtx (with options: `fontspec,xetexx')
-%% fontspec-scripts.dtx (with options: `fontspec,xetexx')
-%% fontspec-lang.dtx (with options: `fontspec,xetexx')
-%% fontspec-feat-aat.dtx (with options: `fontspec,xetexx')
-%% fontspec-enc.dtx (with options: `fontspec,xetexx')
-%% fontspec-math.dtx (with options: `fontspec,xetexx')
-%% fontspec-closing.dtx (with options: `fontspec,xetexx')
-%% fontspec-xfss.dtx (with options: `fontspec,xetexx')
-%% fontspec-patches.dtx (with options: `fontspec,xetexx')
+%% fontspec.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-vars.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-msg.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-opening.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-fontload.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-interfaces.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-user.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-api.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-internal.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-opentype.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-graphite.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-keyval.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-feat-opentype.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-scripts.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-lang.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-feat-aat.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-enc.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-math.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-closing.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-xfss.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-patches.dtx (with options: `fontspec,XE,xetexx')
%% ------------------------------------------------
%% The FONTSPEC package for XeLaTeX/LuaLaTeX
%% (C) 2004--2017 Will Robertson and Khaled Hosny
@@ -32,7 +33,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2017/08/14}{2.6d}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
@@ -468,24 +469,116 @@
\prg_return_false:
\fi:
}
+\cs_new:Nn \__fontspec_primitive_font_set_hyphenchar:Nn
+ {
+ \tex_hyphenchar:D #1 = #2 \scan_stop:
+ }
\NewDocumentCommand \fontspec { O{} m O{} }
{
- \__fontspec_main_fontspec:nnn {#1} {#2} {#3}
+ \__fontspec_main_fontspec:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmainfont { O{} m O{} }
+ {
+ \__fontspec_main_setmainfont:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setsansfont { O{} m O{} }
+ {
+ \__fontspec_main_setsansfont:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmonofont { O{} m O{} }
+ {
+ \__fontspec_main_setmonofont:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmathrm { O{} m O{} }
+ {
+ \__fontspec_main_setmathrm:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setboldmathrm { O{} m O{} }
+ {
+ \__fontspec_main_setboldmathrm:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmathsf { O{} m O{} }
+ {
+ \__fontspec_main_setmathsf:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setmathtt { O{} m O{} }
+ {
+ \__fontspec_main_setmathtt:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \setromanfont { O{} m O{} }
+ {
+ \__fontspec_main_setmainfont:nn {#1,#3} {#2}
+ }
+\NewDocumentCommand \newfontfamily { m O{} m O{} }
+ {
+ \__fontspec_main_newfontfamily:nnn {#1} {#2,#4} {#3}
+ }
+\NewDocumentCommand \newfontface { m O{} m O{} }
+ {
+ \__fontspec_main_newfontface:nnn {#1} {#2,#4} {#3}
+ }
+\NewDocumentCommand \defaultfontfeatures { t+ o m }
+ {
+ \__fontspec_main_defaultfontfeatures:nnn {#1} {#2} {#3}
+ }
+\NewDocumentCommand \addfontfeatures {m}
+ {
+ \__fontspec_main_addfontfeatures:n {#1}
+ }
+\NewDocumentCommand \addfontfeature {m}
+ {
+ \__fontspec_main_addfontfeatures:n {#1}
+ }
+\NewDocumentCommand \newfontfeature {mm}
+ {
+ \__fontspec_main_newfontfeature:nn {#1} {#2}
+ }
+\NewDocumentCommand \newAATfeature {mmmm}
+ {
+ \__fontspec_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
+ }
+\NewDocumentCommand \newopentypefeature {mmm}
+ {
+ \__fontspec_main_newopentypefeature:nnn {#1} {#2} {#3}
+ }
+\NewDocumentCommand \newICUfeature {mmm}
+ {
+ \__fontspec_main_newopentypefeature:nnn {#1} {#2} {#3}
+ }
+\NewDocumentCommand \aliasfontfeature {mm}
+ {
+ \__fontspec_main_aliasfontfeature:nn {#1} {#2}
+ }
+\NewDocumentCommand \aliasfontfeatureoption {mmm}
+ {
+ \__fontspec_main_aliasfontfeatureoption:nnn {#1} {#2} {#3}
+ }
+\NewDocumentCommand \newfontscript {mm}
+ {
+ \fontspec_new_script:nn {#1} {#2}
+ }
+\NewDocumentCommand \newfontlanguage {mm}
+ {
+ \fontspec_new_lang:nn {#1} {#2}
+ }
+\NewDocumentCommand \DeclareFontsExtensions {m}
+ {
+ \__fontspec_main_DeclareFontsExtensions:n {#1}
+ }
+\NewDocumentCommand \IfFontFeatureActiveTF {mmm}
+ {
+ \__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
}
-\cs_set:Nn \__fontspec_main_fontspec:nnn
+\cs_set:Nn \__fontspec_main_fontspec:nn
{
- \fontspec_set_family:Nnn \f@family {#1,#3} {#2}
+ \fontspec_set_family:Nnn \f@family {#1} {#2}
\fontencoding { \l__fontspec_nfss_enc_tl }
\selectfont
\ignorespaces
}
-\DeclareDocumentCommand \setmainfont { O{} m O{} }
- {
- \__fontspec_main_setmainfont:nnn {#1} {#2} {#3}
- }
-\cs_set:Nn \__fontspec_main_setmainfont:nnn
+\cs_set:Nn \__fontspec_main_setmainfont:nn
{
- \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1} {#2}
\tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
{
@@ -496,16 +589,13 @@
}
\str_if_eq_x:nnT {\familydefault} {\rmdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__fontspec_setmainfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
-\DeclareDocumentCommand \setsansfont { O{} m O{} }
- {
- \__fontspec_main_setsansfont:nnn {#1} {#2} {#3}
- }
-\cs_set:Nn \__fontspec_main_setsansfont:nnn
+\cs_set:Nn \__fontspec_main_setsansfont:nn
{
- \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1} {#2}
\tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
{
@@ -516,16 +606,13 @@
}
\str_if_eq_x:nnT {\familydefault} {\sfdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__fontspec_setsansfont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
-\DeclareDocumentCommand \setmonofont { O{} m O{} }
- {
- \__fontspec_main_setmonofont:nnn {#1} {#2} {#3}
- }
-\cs_set:Nn \__fontspec_main_setmonofont:nnn
+\cs_set:Nn \__fontspec_main_setmonofont:nn
{
- \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
+ \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1} {#2}
\tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
{
@@ -536,45 +623,37 @@
}
\str_if_eq_x:nnT {\familydefault} {\ttdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
+ \__fontspec_setmonofont_hook:nn {#1} {#2}
\normalfont
\ignorespaces
}
-\DeclareDocumentCommand \setromanfont { O{} m O{} }
+\cs_set:Nn \__fontspec_main_setmathrm:nn
{
- \__fontspec_main_setmainfont:nnn {#1} {#2} {#3}
+ \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2}
+ \__fontspec_setmathrm_hook:nn {#1} {#2}
}
-\DeclareDocumentCommand \setmathrm { O{} m O{} }
+\cs_set:Nn \__fontspec_main_setboldmathrm:nn
{
- \__fontspec_main_setmathrm:nnn {#1} {#2} {#3}
+ \fontspec_set_family:Nnn \g__fontspec_bfmathrm_tl {#1} {#2}
+ \__fontspec_setboldmathrm_hook:nn {#1} {#2}
}
-\cs_set:Nn \__fontspec_main_setmathrm:nnn
- {
- \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2}
- }
-\DeclareDocumentCommand \setboldmathrm { O{} m O{} }
- {
- \__fontspec_main_setboldmathrm:nnn {#1} {#2} {#3}
- }
-\cs_set:Nn \__fontspec_main_setboldmathrm:nnn
- {
- \fontspec_set_family:Nnn \g__fontspec_bfmathrm_tl {#1} {#2}
- }
-\DeclareDocumentCommand \setmathsf { O{} m O{} }
+\cs_set:Nn \__fontspec_main_setmathsf:nn
{
- \__fontspec_main_setmathsf:nnn {#1} {#2} {#3}
+ \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2}
+ \__fontspec_setmathsf_hook:nn {#1} {#2}
}
-\cs_set:Nn \__fontspec_main_setmathsf:nnn
- {
- \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2}
- }
-\DeclareDocumentCommand \setmathtt { O{} m O{} }
+\cs_set:Nn \__fontspec_main_setmathtt:nn
{
- \__fontspec_main_setmathtt:nnn {#1} {#2} {#3}
+ \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2}
+ \__fontspec_setmathtt_hook:nn {#1} {#2}
}
-\cs_set:Nn \__fontspec_main_setmathtt:nnn
- {
- \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2}
- }
+\cs_set_eq:NN \__fontspec_setmainfont_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setsansfont_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setmonofont_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setmathrm_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setmathsf_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setmathtt_hook:nn \use_none:nn
+\cs_set_eq:NN \__fontspec_setboldmathrm_hook:nn \use_none:nn
\@onlypreamble\setmathrm
\@onlypreamble\setboldmathrm
\@onlypreamble\setmathsf
@@ -582,13 +661,9 @@
\tl_set:Nn \g__fontspec_mathrm_tl {\rmdefault}
\tl_set:Nn \g__fontspec_mathsf_tl {\sfdefault}
\tl_set:Nn \g__fontspec_mathtt_tl {\ttdefault}
-\DeclareDocumentCommand \newfontfamily { m O{} m O{} }
- {
- \__fontspec_main_newfontfamily:nnnn {#1} {#2} {#3} {#4}
- }
-\cs_set:Nn \__fontspec_main_newfontfamily:nnnn
+\cs_set:Nn \__fontspec_main_newfontfamily:nnn
{
- \fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2,#4} {#3}
+ \fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2} {#3}
\use:x
{
\exp_not:N \DeclareRobustCommand \exp_not:N #1
@@ -599,15 +674,11 @@
}
}
}
-\DeclareDocumentCommand \newfontface { m O{} m O{} }
- {
- \__fontspec_main_newfontface:nnnn {#1} {#2} {#3} {#4}
- }
-\cs_set:Nn \__fontspec_main_newfontface:nnnn
+\cs_set:Nn \__fontspec_main_newfontface:nnn
{
- \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+ \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
}
-\DeclareDocumentCommand \defaultfontfeatures { t+ o m }
+\cs_set:Nn \__fontspec_main_defaultfontfeatures:nnn
{
\IfNoValueTF {#2}
{ \__fontspec_set_default_features:nn {#1} {#3} }
@@ -641,10 +712,6 @@
}
}
}
-\DeclareDocumentCommand \addfontfeatures {m}
- {
- \__fontspec_main_addfontfeatures:n {#1}
- }
\cs_set:Nn \__fontspec_main_addfontfeatures:n
{
\fontspec_if_fontspec_font:TF
@@ -667,11 +734,6 @@
}
\ignorespaces
}
-\cs_set_eq:NN \addfontfeature \addfontfeatures
-\DeclareDocumentCommand \newfontfeature {mm}
- {
- \__fontspec_main_newfontfeature:nn {#1} {#2}
- }
\cs_set:Nn \__fontspec_main_newfontfeature:nn
{
\keys_define:nn { fontspec }
@@ -682,10 +744,6 @@
}
}
}
-\DeclareDocumentCommand \newAATfeature {mmmm}
- {
- \__fontspec_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
- }
\cs_set:Nn \__fontspec_main_newAATfeature:nnnn
{
\keys_if_exist:nnF { fontspec } {#1}
@@ -696,10 +754,6 @@
\__fontspec_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
}
-\DeclareDocumentCommand \newopentypefeature {mmm}
- {
- \__fontspec_main_newopentypefeature:nnn {#1} {#2} {#3}
- }
\cs_set:Nn \__fontspec_main_newopentypefeature:nnn
{
\keys_if_exist:nnF { fontspec / options } {#1}
@@ -716,14 +770,6 @@
{
\str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2}
}
-\DeclareDocumentCommand \newICUfeature {mmm}
- {
- \__fontspec_main_newopentypefeature:nnn {#1} {#2} {#3}
- }
-\DeclareDocumentCommand \aliasfontfeature {mm}
- {
- \__fontspec_main_aliasfontfeature:nn {#1} {#2}
- }
\cs_set:Nn \__fontspec_main_aliasfontfeature:nn
{
\bool_set_false:N \l__fontspec_alias_bool
@@ -741,10 +787,6 @@
\bool_if:NF \l__fontspec_alias_bool
{ \__fontspec_warning:nx {rename-feature-not-exist} {#1} }
}
-\DeclareDocumentCommand \aliasfontfeatureoption {mmm}
- {
- \__fontspec_main_aliasfontfeatureoption:nnn {#1} {#2} {#3}
- }
\cs_set:Nn \__fontspec_main_aliasfontfeatureoption:nnn
{
\bool_set_false:N \l__fontspec_alias_bool
@@ -774,29 +816,12 @@
\bool_if:NF \l__fontspec_alias_bool
{ \__fontspec_warning:nx {rename-feature-not-exist} {#1/#2} }
}
-\DeclareDocumentCommand \newfontscript {mm}
- {
- \fontspec_new_script:nn {#1} {#2}
- }
-\DeclareDocumentCommand \newfontlanguage {mm}
- {
- \fontspec_new_lang:nn {#1} {#2}
- }
-\DeclareDocumentCommand \DeclareFontsExtensions {m}
- {
- \__fontspec_main_DeclareFontsExtensions:n {#1}
- }
\cs_set:Nn \__fontspec_main_DeclareFontsExtensions:n
{
\clist_set:Nn \l__fontspec_extensions_clist { #1 }
\tl_remove_all:Nn \l__fontspec_extensions_clist {~}
}
\DeclareFontsExtensions{.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
-
-\DeclareDocumentCommand \IfFontFeatureActiveTF {mmm}
- {
- \__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
- }
\cs_set:Nn \__fontspec_main_IfFontFeatureActiveTF:nnn
{
\__fontspec_if_font_feature:nTF {#1} {#2} {#3}
@@ -1075,7 +1100,7 @@
}
\group_end:
}
-\cs_set_eq:NN \fontspec_select:nn \__fontspec_select_font_family:nn
+\cs_set_eq:NN \fontspec_select:nn \__fontspec_select_font_family:nn %% deprecated, for compatibility only
\cs_new:Nn \__fontspec_sanitise_fontname:Nn
{
\tl_set:Nx #1 {#2}
@@ -2319,13 +2344,13 @@
}
\__fontspec_keys_define_code:nnn {fontspec} {HyphenChar}
{
- \__fontspec_warning:nx {only-xetex-feature} {HyphenChar}
\str_if_eq:nnTF {#1} {None}
{
\tl_put_right:Nn \l__fontspec_postadjust_tl
- { \hyphenchar \font = -1 \relax }
+ { \__fontspec_primitive_font_set_hyphenchar:Nn \font {-1} }
}
{
+ \__fontspec_warning:nx {only-xetex-feature} {HyphenChar}
\tl_if_single:nTF {#1}
{ \tl_set:Nn \l_fontspec_hyphenchar_tl {`#1} }
@@ -2334,7 +2359,7 @@
\__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
{
\tl_put_right:Nn \l__fontspec_postadjust_tl
- { \hyphenchar \font = \l_fontspec_hyphenchar_tl \scan_stop: }
+ { \__fontspec_primitive_font_set_hyphenchar:Nn \font { \l_fontspec_hyphenchar_tl } }
}
{ \__fontspec_error:nx {no-glyph}{#1} }
@@ -3734,13 +3759,6 @@
}
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
-\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
-\cs_set:Npn \zf@fontspec #1 #2
- {
- \__fontspec_select_font_family:nn {#1} {#2}
- \tl_set:Nn \zf@family { \l_fontspec_family_tl }
- \tl_set:Nn \zf@basefont { \l_fontspec_font }
- }
\bool_if:NT \g__fontspec_cfg_bool
{
\InputIfFileExists{fontspec.cfg}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index ceac6a80f5d..7c34ab65c5b 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -15,8 +15,8 @@ fontspec = fontspec or {}
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = "2.6d",
- date = "2017/08/14",
+ version = "2.6e",
+ date = "2017/09/27",
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 993f4428f6c..c392f9668be 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -13,7 +13,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec}%
- {2017/08/14}{2.6d}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
\sys_if_engine_luatex:T
{ \RequirePackage{luaotfload}
\directlua{require("fontspec")}