summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/README.md5
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec.pdfbin957133 -> 959394 bytes
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx32
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx200
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx6
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty160
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty160
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.cfg1
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua4
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty2
10 files changed, 474 insertions, 96 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/README.md b/Master/texmf-dist/doc/latex/fontspec/README.md
index f8eb2480e86..611e9f7d7c3 100644
--- a/Master/texmf-dist/doc/latex/fontspec/README.md
+++ b/Master/texmf-dist/doc/latex/fontspec/README.md
@@ -69,6 +69,11 @@ To add features to the font family currently in use:
Change history
--------------
+- v2.6a (2017/03/31)
+
+ * Fix crashing bug with `..Reset` and `ResetAll` keys.
+ * Fix crashing bug with `\newfontface`.
+
- v2.6 (2017/02/12)
* Change the new behaviour of `\emph` (and `\emfontdeclare`) to act only on the NFSS font shape; using the series as well was too fragile.
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
index 5f028e7404b..14a1a53f302 100644
--- a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
index 5e04573ff23..949e95ca1b1 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
@@ -35,17 +35,27 @@
}
}
\cs_new:Nn \@@_define_opentype_feature:nnnnn
- {
- \@@_feat_prop_add:nn {#3} {#1\,=\,#2}
- \keys_define:nn {fontspec-opentype}
- {
- #1/#2 .code:n =
- {
-%<debug> \typeout{::::::::fontspec-opentype~#1/#2~=~#3/#4/#5}
- \@@_make_OT_feature:nnn {#3} {#4} {#5}
- }
- }
- }
+ {
+ \@@_feat_prop_add:nn {#3} {#1\,=\,#2}
+ \tl_if_empty:nTF {#4}
+ {
+ \keys_define:nn {fontspec-opentype}
+ {
+ #1/#2 .code:n =
+ { \@@_remove_clashing_featstr:n {#5} }
+ }
+ }
+ {
+ \keys_define:nn {fontspec-opentype}
+ {
+ #1/#2 .code:n =
+ {
+%<debug> \typeout{::::::::fontspec-opentype~#1/#2~=~#3/#4/#5}
+ \@@_make_OT_feature:nnn {#3} {#4} {#5}
+ }
+ }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
index 89fe42b971e..ed835193426 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
@@ -19,6 +19,13 @@
% font. Then this new font family is selected.
% \begin{macrocode}
\NewDocumentCommand \fontspec { O{} m O{} }
+ {
+ \@@_main_fontspec:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_fontspec:nnn
{
\fontspec_set_family:Nnn \f@family {#1,#3} {#2}
\fontencoding { \l_@@_nfss_enc_tl }
@@ -36,6 +43,13 @@
% used in the document, the change registers immediately.
% \begin{macrocode}
\DeclareDocumentCommand \setmainfont { O{} m O{} }
+ {
+ \@@_main_setmainfont:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_setmainfont:nnn
{
\fontspec_set_family:Nnn \g_@@_rmfamily_family {#1,#3} {#2}
\tl_set_eq:NN \rmdefault \g_@@_rmfamily_family
@@ -57,6 +71,13 @@
% \begin{macro}{\setsansfont}
% \begin{macrocode}
\DeclareDocumentCommand \setsansfont { O{} m O{} }
+ {
+ \@@_main_setsansfont:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_setsansfont:nnn
{
\fontspec_set_family:Nnn \g_@@_sffamily_family {#1,#3} {#2}
\tl_set_eq:NN \sfdefault \g_@@_sffamily_family
@@ -78,6 +99,13 @@
% \begin{macro}{\setmonofont}
% \begin{macrocode}
\DeclareDocumentCommand \setmonofont { O{} m O{} }
+ {
+ \@@_main_setmonofont:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_setmonofont:nnn
{
\fontspec_set_family:Nnn \g_@@_ttfamily_family {#1,#3} {#2}
\tl_set_eq:NN \ttdefault \g_@@_ttfamily_family
@@ -101,7 +129,10 @@
% This is the old name for \cs{setmainfont}, retained \emph{ad infinitum}
% for backwards compatibility. It was deprecated in 2010.
% \begin{macrocode}
-\cs_set_eq:NN \setromanfont \setmainfont
+\DeclareDocumentCommand \setromanfont { O{} m O{} }
+ {
+ \@@_main_setmainfont:nnn {#1} {#2} {#3}
+ }
% \end{macrocode}
% \end{macro}
%
@@ -117,24 +148,61 @@
% fonts should be used in \cmd\boldmath.
% \begin{macrocode}
\DeclareDocumentCommand \setmathrm { O{} m O{} }
+ {
+ \@@_main_setmathrm:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_setmathrm:nnn
{
\fontspec_set_family:Nnn \g_@@_mathrm_tl {#1} {#2}
}
-
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareDocumentCommand \setboldmathrm { O{} m O{} }
+ {
+ \@@_main_setboldmathrm:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_setboldmathrm:nnn
{
\fontspec_set_family:Nnn \g_@@_bfmathrm_tl {#1} {#2}
}
-
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareDocumentCommand \setmathsf { O{} m O{} }
+ {
+ \@@_main_setmathsf:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_setmathsf:nnn
{
\fontspec_set_family:Nnn \g_@@_mathsf_tl {#1} {#2}
}
-
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareDocumentCommand \setmathtt { O{} m O{} }
+ {
+ \@@_main_setmathtt:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_setmathtt:nnn
{
\fontspec_set_family:Nnn \g_@@_mathtt_tl {#1} {#2}
}
+% \end{macrocode}
+%
+% \begin{macrocode}
\@onlypreamble\setmathrm
\@onlypreamble\setboldmathrm
\@onlypreamble\setmathsf
@@ -163,6 +231,13 @@
% declaration, saved in the macro name specified.
% \begin{macrocode}
\DeclareDocumentCommand \newfontfamily { m O{} m O{} }
+ {
+ \@@_main_newfontfamily:nnnn {#1} {#2} {#3} {#4}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_newfontfamily:nnnn
{
\fontspec_set_family:cnn { g_@@_ \cs_to_str:N #1 _family } {#2,#4} {#3}
\use:x
@@ -182,6 +257,13 @@
% \cmd\newfontface\ uses the fact that if the argument to \feat{BoldFont}, etc., is empty (\ie, |BoldFont={}|), then no bold font is searched for.
% \begin{macrocode}
\DeclareDocumentCommand \newfontface { m O{} m O{} }
+ {
+ \@@_main_newfontface:nnnn {#1} {#2} {#3} {#4}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_newfontface:nnnn
{
\newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
}
@@ -200,17 +282,17 @@
%
% \begin{macrocode}
\DeclareDocumentCommand \defaultfontfeatures { t+ o m }
- {
- \IfNoValueTF {#2}
- { \@@_set_default_features:nn {#1} {#3} }
- { \@@_set_font_default_features:nnn {#1} {#2} {#3} }
- \ignorespaces
- }
+ {
+ \IfNoValueTF {#2}
+ { \@@_set_default_features:nn {#1} {#3} }
+ { \@@_set_font_default_features:nnn {#1} {#2} {#3} }
+ \ignorespaces
+ }
\cs_new:Nn \@@_set_default_features:nn
- {
- \IfBooleanTF {#1} \clist_put_right:Nn \clist_set:Nn
- \g_@@_default_fontopts_clist {#2}
- }
+ {
+ \IfBooleanTF {#1} \clist_put_right:Nn \clist_set:Nn
+ \g_@@_default_fontopts_clist {#2}
+ }
% \end{macrocode}
% The optional argument specifies a font identifier.
% Branch for either (a)~single token input such as \verb|\rmdefault|, or (b)~otherwise assume its a fontname.
@@ -264,6 +346,13 @@
% often typed this instead when adding only a single font feature.
% \begin{macrocode}
\DeclareDocumentCommand \addfontfeatures {m}
+ {
+ \@@_main_addfontfeatures:n {#1}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_addfontfeatures:n
{
%<debug> \typeout{^^J::::::::::::::::::::::::::::::::::^^J: addfontfeatures}
\fontspec_if_fontspec_font:TF
@@ -299,6 +388,13 @@
% select the font feature.
% \begin{macrocode}
\DeclareDocumentCommand \newfontfeature {mm}
+ {
+ \@@_main_newfontfeature:nn {#1} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_newfontfeature:nn
{
\keys_define:nn { fontspec }
{
@@ -318,11 +414,20 @@
% font it's being used for.
% \begin{macrocode}
\DeclareDocumentCommand \newAATfeature {mmmm}
+ {
+ \@@_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_newAATfeature:nnnn
{
\keys_if_exist:nnF { fontspec } {#1}
{ \@@_define_aat_feature_group:n {#1} }
+
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \@@_warning:nxx {feature-option-overwrite} {#1} {#2} }
+
\@@_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
}
% \end{macrocode}
@@ -334,6 +439,13 @@
% font it's being used for.
% \begin{macrocode}
\DeclareDocumentCommand \newopentypefeature {mmm}
+ {
+ \@@_main_newopentypefeature:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_newopentypefeature:nnn
{
\keys_if_exist:nnF { fontspec / options } {#1}
{ \@@_define_opentype_feature_group:n {#1} }
@@ -341,19 +453,27 @@
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \@@_warning:nxx {feature-option-overwrite} {#1} {#2} }
- \exp_args:Nnnx \@@_define_opentype_feature:nnnnn {#1}{#2}{ \@@_strip_plus_minus:n {#3} }{#3}{}
+ \exp_args:Nnnx \@@_define_opentype_feature:nnnnn
+ {#1} {#2} { \@@_strip_plus_minus:n {#3} } {#3} {}
}
-
+% \end{macrocode}
+%
+% \begin{macrocode}
\cs_new:Nn \@@_strip_plus_minus:n { \@@_strip_plus_minus_aux:Nq #1 \q_nil }
\cs_new:Npn \@@_strip_plus_minus_aux:Nq #1#2 \q_nil
- { \str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2} }
-
+ {
+ \str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2}
+ }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\newICUfeature}
+% Deprecated.
% \begin{macrocode}
-\cs_set_eq:NN \newICUfeature \newopentypefeature % deprecated
+\DeclareDocumentCommand \newICUfeature {mmm}
+ {
+ \@@_main_newopentypefeature:nnn {#1} {#2} {#3}
+ }
% \end{macrocode}
% \end{macro}
%
@@ -362,6 +482,13 @@
% User commands for renaming font features and font feature options.
% \begin{macrocode}
\DeclareDocumentCommand \aliasfontfeature {mm}
+ {
+ \@@_main_aliasfontfeature:nn {#1} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_aliasfontfeature:nn
{
%<debug> \typeout{::::::::::::::::::::^^J:: aliasfontfeature{#1}{#2}}
\bool_set_false:N \l_@@_alias_bool
@@ -386,6 +513,13 @@
% \begin{macro}{\aliasfontfeatureoption}
% \begin{macrocode}
\DeclareDocumentCommand \aliasfontfeatureoption {mmm}
+ {
+ \@@_main_aliasfontfeatureoption:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_aliasfontfeatureoption:nnn
{
\bool_set_false:N \l_@@_alias_bool
@@ -398,6 +532,20 @@
\keys_define:nn { ##1 / #1 }
{ #3 .code:n = { \keys_set:nn {##1} { #1 = {#2} } } }
}
+
+ \keys_if_exist:nnT { ##1 / #1 } {#2Reset}
+ {
+%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2Reset}
+ \keys_define:nn { ##1 / #1 }
+ { #3Reset .code:n = { \keys_set:nn {##1} { #1 = {#2Reset} } } }
+ }
+
+ \keys_if_exist:nnT { ##1 / #1 } {#2Off}
+ {
+%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2Off}
+ \keys_define:nn { ##1 / #1 }
+ { #3Off .code:n = { \keys_set:nn {##1} { #1 = {#2Off} } } }
+ }
}
\bool_if:NF \l_@@_alias_bool
@@ -433,6 +581,13 @@
% \texttt{dfont} would never be uppercase, right?
% \begin{macrocode}
\DeclareDocumentCommand \DeclareFontsExtensions {m}
+ {
+ \@@_main_DeclareFontsExtensions:n {#1}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_DeclareFontsExtensions:n
{
\clist_set:Nn \l_@@_extensions_clist { #1 }
\tl_remove_all:Nn \l_@@_extensions_clist {~}
@@ -446,6 +601,13 @@
% \begin{macrocode}
\DeclareDocumentCommand \IfFontFeatureActiveTF {mmm}
{
+ \@@_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Nn \@@_main_IfFontFeatureActiveTF:nnn
+ {
%<debug> \typeout{^^J:::::::::::::::::::::::::::::::::::::::::::::::}
%<debug> \typeout{:IfFontFeatureActiveTF \exp_not:n{{#1}{#2}{#3}}}
\@@_if_font_feature:nTF {#1} {#2} {#3}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
index 504b41c337a..e460179754e 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -79,14 +79,14 @@ And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
%<fontspec&xetexx>\ProvidesExplPackage{fontspec-xetex}%
%<fontspec&luatex>\ProvidesExplPackage{fontspec-luatex}%
%<*fontspec>
- {2017/02/12}{2.6}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/03/31}{2.6a}{Font selection for XeLaTeX and LuaLaTeX}
%</fontspec>
%<lua>fontspec = fontspec or {}
%<lua>local fontspec = fontspec
%<lua>fontspec.module = {
%<lua> name = "fontspec",
-%<lua> version = "2.6",
-%<lua> date = "2017/02/12",
+%<lua> version = "2.6a",
+%<lua> date = "2017/03/31",
%<lua> description = "Font selection for XeLaTeX and LuaLaTeX",
%<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index 19f343fc5f4..662376bb378 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -32,7 +32,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-luatex}%
- {2017/02/12}{2.6}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/03/31}{2.6a}{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
@@ -470,6 +470,10 @@
\fi:
}
\NewDocumentCommand \fontspec { O{} m O{} }
+ {
+ \__fontspec_main_fontspec:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_fontspec:nnn
{
\fontspec_set_family:Nnn \f@family {#1,#3} {#2}
\fontencoding { \l__fontspec_nfss_enc_tl }
@@ -477,6 +481,10 @@
\ignorespaces
}
\DeclareDocumentCommand \setmainfont { O{} m O{} }
+ {
+ \__fontspec_main_setmainfont:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setmainfont:nnn
{
\fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
\tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
@@ -493,6 +501,10 @@
\ignorespaces
}
\DeclareDocumentCommand \setsansfont { O{} m O{} }
+ {
+ \__fontspec_main_setsansfont:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setsansfont:nnn
{
\fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
\tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
@@ -509,6 +521,10 @@
\ignorespaces
}
\DeclareDocumentCommand \setmonofont { O{} m O{} }
+ {
+ \__fontspec_main_setmonofont:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setmonofont:nnn
{
\fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
\tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
@@ -524,23 +540,39 @@
\normalfont
\ignorespaces
}
-\cs_set_eq:NN \setromanfont \setmainfont
+\DeclareDocumentCommand \setromanfont { O{} m O{} }
+ {
+ \__fontspec_main_setmainfont:nnn {#1} {#2} {#3}
+ }
\DeclareDocumentCommand \setmathrm { O{} m O{} }
+ {
+ \__fontspec_main_setmathrm:nnn {#1} {#2} {#3}
+ }
+\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{} }
+ {
+ \__fontspec_main_setmathsf:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setmathsf:nnn
{
\fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2}
}
-
\DeclareDocumentCommand \setmathtt { O{} m O{} }
+ {
+ \__fontspec_main_setmathtt:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setmathtt:nnn
{
\fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2}
}
@@ -552,6 +584,10 @@
\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
{
\fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2,#4} {#3}
\use:x
@@ -565,21 +601,25 @@
}
}
\DeclareDocumentCommand \newfontface { m O{} m O{} }
+ {
+ \__fontspec_main_newfontface:nnnn {#1} {#2} {#3} {#4}
+ }
+\cs_set:Nn \__fontspec_main_newfontface:nnnn
{
\newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
}
\DeclareDocumentCommand \defaultfontfeatures { t+ o m }
- {
- \IfNoValueTF {#2}
- { \__fontspec_set_default_features:nn {#1} {#3} }
- { \__fontspec_set_font_default_features:nnn {#1} {#2} {#3} }
- \ignorespaces
- }
+ {
+ \IfNoValueTF {#2}
+ { \__fontspec_set_default_features:nn {#1} {#3} }
+ { \__fontspec_set_font_default_features:nnn {#1} {#2} {#3} }
+ \ignorespaces
+ }
\cs_new:Nn \__fontspec_set_default_features:nn
- {
- \IfBooleanTF {#1} \clist_put_right:Nn \clist_set:Nn
- \g__fontspec_default_fontopts_clist {#2}
- }
+ {
+ \IfBooleanTF {#1} \clist_put_right:Nn \clist_set:Nn
+ \g__fontspec_default_fontopts_clist {#2}
+ }
\cs_new:Nn \__fontspec_set_font_default_features:nnn
{
\clist_map_inline:nn {#2}
@@ -603,6 +643,10 @@
}
}
\DeclareDocumentCommand \addfontfeatures {m}
+ {
+ \__fontspec_main_addfontfeatures:n {#1}
+ }
+\cs_set:Nn \__fontspec_main_addfontfeatures:n
{
\fontspec_if_fontspec_font:TF
{
@@ -626,6 +670,10 @@
}
\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 }
{
@@ -636,14 +684,24 @@
}
}
\DeclareDocumentCommand \newAATfeature {mmmm}
+ {
+ \__fontspec_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
+ }
+\cs_set:Nn \__fontspec_main_newAATfeature:nnnn
{
\keys_if_exist:nnF { fontspec } {#1}
{ \__fontspec_define_aat_feature_group:n {#1} }
+
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \__fontspec_warning:nxx {feature-option-overwrite} {#1} {#2} }
+
\__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}
{ \__fontspec_define_opentype_feature_group:n {#1} }
@@ -651,15 +709,23 @@
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \__fontspec_warning:nxx {feature-option-overwrite} {#1} {#2} }
- \exp_args:Nnnx \__fontspec_define_opentype_feature:nnnnn {#1}{#2}{ \__fontspec_strip_plus_minus:n {#3} }{#3}{}
+ \exp_args:Nnnx \__fontspec_define_opentype_feature:nnnnn
+ {#1} {#2} { \__fontspec_strip_plus_minus:n {#3} } {#3} {}
}
-
\cs_new:Nn \__fontspec_strip_plus_minus:n { \__fontspec_strip_plus_minus_aux:Nq #1 \q_nil }
\cs_new:Npn \__fontspec_strip_plus_minus_aux:Nq #1#2 \q_nil
- { \str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2} }
-
-\cs_set_eq:NN \newICUfeature \newopentypefeature % deprecated
+ {
+ \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
@@ -677,6 +743,10 @@
{ \__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
@@ -688,6 +758,18 @@
\keys_define:nn { ##1 / #1 }
{ #3 .code:n = { \keys_set:nn {##1} { #1 = {#2} } } }
}
+
+ \keys_if_exist:nnT { ##1 / #1 } {#2Reset}
+ {
+ \keys_define:nn { ##1 / #1 }
+ { #3Reset .code:n = { \keys_set:nn {##1} { #1 = {#2Reset} } } }
+ }
+
+ \keys_if_exist:nnT { ##1 / #1 } {#2Off}
+ {
+ \keys_define:nn { ##1 / #1 }
+ { #3Off .code:n = { \keys_set:nn {##1} { #1 = {#2Off} } } }
+ }
}
\bool_if:NF \l__fontspec_alias_bool
@@ -702,6 +784,10 @@
\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 {~}
@@ -710,6 +796,10 @@
\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}
}
\prg_new_conditional:Nnn \__fontspec_if_font_feature:n {TF}
@@ -1524,16 +1614,26 @@
}
}
\cs_new:Nn \__fontspec_define_opentype_feature:nnnnn
- {
- \__fontspec_feat_prop_add:nn {#3} {#1\,=\,#2}
- \keys_define:nn {fontspec-opentype}
- {
- #1/#2 .code:n =
- {
- \__fontspec_make_OT_feature:nnn {#3} {#4} {#5}
- }
- }
- }
+ {
+ \__fontspec_feat_prop_add:nn {#3} {#1\,=\,#2}
+ \tl_if_empty:nTF {#4}
+ {
+ \keys_define:nn {fontspec-opentype}
+ {
+ #1/#2 .code:n =
+ { \__fontspec_remove_clashing_featstr:n {#5} }
+ }
+ }
+ {
+ \keys_define:nn {fontspec-opentype}
+ {
+ #1/#2 .code:n =
+ {
+ \__fontspec_make_OT_feature:nnn {#3} {#4} {#5}
+ }
+ }
+ }
+ }
\cs_new:Nn \__fontspec_feat_off:n {#1Off}
\cs_new:Nn \__fontspec_feat_reset:n {#1Reset}
\cs_new:Nn \__fontspec_define_opentype_onoffreset:nnnnn
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index 5162253dd0b..89a2168a0b8 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -32,7 +32,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2017/02/12}{2.6}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/03/31}{2.6a}{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
@@ -467,6 +467,10 @@
\fi:
}
\NewDocumentCommand \fontspec { O{} m O{} }
+ {
+ \__fontspec_main_fontspec:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_fontspec:nnn
{
\fontspec_set_family:Nnn \f@family {#1,#3} {#2}
\fontencoding { \l__fontspec_nfss_enc_tl }
@@ -474,6 +478,10 @@
\ignorespaces
}
\DeclareDocumentCommand \setmainfont { O{} m O{} }
+ {
+ \__fontspec_main_setmainfont:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setmainfont:nnn
{
\fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
\tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
@@ -490,6 +498,10 @@
\ignorespaces
}
\DeclareDocumentCommand \setsansfont { O{} m O{} }
+ {
+ \__fontspec_main_setsansfont:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setsansfont:nnn
{
\fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
\tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
@@ -506,6 +518,10 @@
\ignorespaces
}
\DeclareDocumentCommand \setmonofont { O{} m O{} }
+ {
+ \__fontspec_main_setmonofont:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setmonofont:nnn
{
\fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
\tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
@@ -521,23 +537,39 @@
\normalfont
\ignorespaces
}
-\cs_set_eq:NN \setromanfont \setmainfont
+\DeclareDocumentCommand \setromanfont { O{} m O{} }
+ {
+ \__fontspec_main_setmainfont:nnn {#1} {#2} {#3}
+ }
\DeclareDocumentCommand \setmathrm { O{} m O{} }
+ {
+ \__fontspec_main_setmathrm:nnn {#1} {#2} {#3}
+ }
+\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{} }
+ {
+ \__fontspec_main_setmathsf:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setmathsf:nnn
{
\fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2}
}
-
\DeclareDocumentCommand \setmathtt { O{} m O{} }
+ {
+ \__fontspec_main_setmathtt:nnn {#1} {#2} {#3}
+ }
+\cs_set:Nn \__fontspec_main_setmathtt:nnn
{
\fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2}
}
@@ -549,6 +581,10 @@
\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
{
\fontspec_set_family:cnn { g__fontspec_ \cs_to_str:N #1 _family } {#2,#4} {#3}
\use:x
@@ -562,21 +598,25 @@
}
}
\DeclareDocumentCommand \newfontface { m O{} m O{} }
+ {
+ \__fontspec_main_newfontface:nnnn {#1} {#2} {#3} {#4}
+ }
+\cs_set:Nn \__fontspec_main_newfontface:nnnn
{
\newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
}
\DeclareDocumentCommand \defaultfontfeatures { t+ o m }
- {
- \IfNoValueTF {#2}
- { \__fontspec_set_default_features:nn {#1} {#3} }
- { \__fontspec_set_font_default_features:nnn {#1} {#2} {#3} }
- \ignorespaces
- }
+ {
+ \IfNoValueTF {#2}
+ { \__fontspec_set_default_features:nn {#1} {#3} }
+ { \__fontspec_set_font_default_features:nnn {#1} {#2} {#3} }
+ \ignorespaces
+ }
\cs_new:Nn \__fontspec_set_default_features:nn
- {
- \IfBooleanTF {#1} \clist_put_right:Nn \clist_set:Nn
- \g__fontspec_default_fontopts_clist {#2}
- }
+ {
+ \IfBooleanTF {#1} \clist_put_right:Nn \clist_set:Nn
+ \g__fontspec_default_fontopts_clist {#2}
+ }
\cs_new:Nn \__fontspec_set_font_default_features:nnn
{
\clist_map_inline:nn {#2}
@@ -600,6 +640,10 @@
}
}
\DeclareDocumentCommand \addfontfeatures {m}
+ {
+ \__fontspec_main_addfontfeatures:n {#1}
+ }
+\cs_set:Nn \__fontspec_main_addfontfeatures:n
{
\fontspec_if_fontspec_font:TF
{
@@ -623,6 +667,10 @@
}
\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 }
{
@@ -633,14 +681,24 @@
}
}
\DeclareDocumentCommand \newAATfeature {mmmm}
+ {
+ \__fontspec_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
+ }
+\cs_set:Nn \__fontspec_main_newAATfeature:nnnn
{
\keys_if_exist:nnF { fontspec } {#1}
{ \__fontspec_define_aat_feature_group:n {#1} }
+
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \__fontspec_warning:nxx {feature-option-overwrite} {#1} {#2} }
+
\__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}
{ \__fontspec_define_opentype_feature_group:n {#1} }
@@ -648,15 +706,23 @@
\keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
{ \__fontspec_warning:nxx {feature-option-overwrite} {#1} {#2} }
- \exp_args:Nnnx \__fontspec_define_opentype_feature:nnnnn {#1}{#2}{ \__fontspec_strip_plus_minus:n {#3} }{#3}{}
+ \exp_args:Nnnx \__fontspec_define_opentype_feature:nnnnn
+ {#1} {#2} { \__fontspec_strip_plus_minus:n {#3} } {#3} {}
}
-
\cs_new:Nn \__fontspec_strip_plus_minus:n { \__fontspec_strip_plus_minus_aux:Nq #1 \q_nil }
\cs_new:Npn \__fontspec_strip_plus_minus_aux:Nq #1#2 \q_nil
- { \str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2} }
-
-\cs_set_eq:NN \newICUfeature \newopentypefeature % deprecated
+ {
+ \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
@@ -674,6 +740,10 @@
{ \__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
@@ -685,6 +755,18 @@
\keys_define:nn { ##1 / #1 }
{ #3 .code:n = { \keys_set:nn {##1} { #1 = {#2} } } }
}
+
+ \keys_if_exist:nnT { ##1 / #1 } {#2Reset}
+ {
+ \keys_define:nn { ##1 / #1 }
+ { #3Reset .code:n = { \keys_set:nn {##1} { #1 = {#2Reset} } } }
+ }
+
+ \keys_if_exist:nnT { ##1 / #1 } {#2Off}
+ {
+ \keys_define:nn { ##1 / #1 }
+ { #3Off .code:n = { \keys_set:nn {##1} { #1 = {#2Off} } } }
+ }
}
\bool_if:NF \l__fontspec_alias_bool
@@ -699,6 +781,10 @@
\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 {~}
@@ -707,6 +793,10 @@
\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}
}
\prg_new_conditional:Nnn \__fontspec_if_font_feature:n {TF}
@@ -1557,16 +1647,26 @@
}
}
\cs_new:Nn \__fontspec_define_opentype_feature:nnnnn
- {
- \__fontspec_feat_prop_add:nn {#3} {#1\,=\,#2}
- \keys_define:nn {fontspec-opentype}
- {
- #1/#2 .code:n =
- {
- \__fontspec_make_OT_feature:nnn {#3} {#4} {#5}
- }
- }
- }
+ {
+ \__fontspec_feat_prop_add:nn {#3} {#1\,=\,#2}
+ \tl_if_empty:nTF {#4}
+ {
+ \keys_define:nn {fontspec-opentype}
+ {
+ #1/#2 .code:n =
+ { \__fontspec_remove_clashing_featstr:n {#5} }
+ }
+ }
+ {
+ \keys_define:nn {fontspec-opentype}
+ {
+ #1/#2 .code:n =
+ {
+ \__fontspec_make_OT_feature:nnn {#3} {#4} {#5}
+ }
+ }
+ }
+ }
\cs_new:Nn \__fontspec_feat_off:n {#1Off}
\cs_new:Nn \__fontspec_feat_reset:n {#1Reset}
\cs_new:Nn \__fontspec_define_opentype_onoffreset:nnnnn
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg b/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
index 3301e3eb594..7cb182e3be7 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
@@ -18,4 +18,5 @@
\defaultfontfeatures
[\ttfamily]
{WordSpace={1,0,0},
+ HyphenChar=None,
PunctuationSpace=WordSpace}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index 771b29a7deb..e78349f6e7c 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.6",
- date = "2017/02/12",
+ version = "2.6a",
+ date = "2017/03/31",
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 7d29a5e6623..9c2f6854a16 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/02/12}{2.6}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/03/31}{2.6a}{Font selection for XeLaTeX and LuaLaTeX}
\sys_if_engine_luatex:T
{ \RequirePackage{luaotfload}
\directlua{require("fontspec")}