summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx142
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex8
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex46
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex72
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex8
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx38
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx130
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx55
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx9
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx59
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx6
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx53
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx433
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx93
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx12
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx15
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.ins2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.ltx2
34 files changed, 641 insertions, 574 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
index c183656a66a..20ca93e789a 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
@@ -27,9 +27,9 @@
% Test whether the currently selected font has been loaded by fontspec.
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
- {
- \cs_if_exist:cTF {g_@@_fontinfo_ \f@family _prop} \prg_return_true: \prg_return_false:
- }
+ {
+ \cs_if_exist:cTF {g_@@_fontinfo_ \f@family _prop} \prg_return_true: \prg_return_false:
+ }
% \end{macrocode}
% \end{macro}
%
@@ -39,23 +39,23 @@
% feature (|#1|,|#2|).
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_aat_feature:nn {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_atsui_bool
- {
- \@@_make_AAT_feature_string:NnnTF \font {#1} {#2}
- \prg_return_true: \prg_return_false:
- }
- {
- \prg_return_false:
- }
- }
- {
- \prg_return_false:
- }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_atsui_bool
+ {
+ \@@_make_AAT_feature_string:NnnTF \font {#1} {#2}
+ \prg_return_true: \prg_return_false:
+ }
+ {
+ \prg_return_false:
+ }
+ }
+ {
+ \prg_return_false:
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -65,16 +65,16 @@
% Always true for LuaTeX fonts.
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_opentype: {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool \prg_return_true: \prg_return_false:
- }
- {
- \prg_return_false:
- }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool \prg_return_true: \prg_return_false:
+ }
+ {
+ \prg_return_false:
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -85,31 +85,31 @@
% font.
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_feature:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool
- {
- \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {script-num} \l_@@_tmp_tl
- \int_set:Nn \l_@@_script_int {\l_@@_tmp_tl}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {script-num} \l_@@_tmp_tl
+ \int_set:Nn \l_@@_script_int {\l_@@_tmp_tl}
- \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {lang-num} \l_@@_tmp_tl
- \int_set:Nn \l_@@_language_int {\l_@@_tmp_tl}
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {lang-num} \l_@@_tmp_tl
+ \int_set:Nn \l_@@_language_int {\l_@@_tmp_tl}
- \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
- \@@_check_ot_feat:NnTF \font {#1} {\prg_return_true:} {\prg_return_false:}
- }
- {
- \prg_return_false:
- }
- }
- {
- \prg_return_false:
- }
- }
+ \@@_check_ot_feat:NnTF \font {#1} {\prg_return_true:} {\prg_return_false:}
+ }
+ {
+ \prg_return_false:
+ }
+ }
+ {
+ \prg_return_false:
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -268,30 +268,33 @@
% We want to store the actual name of the font family within the \meta{family}
% variable because the actual \LaTeX\ family name is automatically generated
% by fontspec and it's easier to keep it that way.
-%
-% Please use |\fontspec_set_family:Nnn| instead of |\@@_select_font_family:nn|,
-% which may change in the future.
% \begin{macrocode}
\cs_new:Nn \fontspec_set_family:Nnn
- {
- \tl_set:Nn \l_@@_family_label_tl { #1 }
- \@@_select_font_family:nn {#2}{#3}
- \tl_set_eq:NN #1 \l_fontspec_family_tl
- }
+ {
+ \tl_set:Nn \l_@@_family_label_tl {#1}
+ \@@_select_font_family:nn {#2} {#3}
+ \tl_set_eq:NN #1 \l_fontspec_family_tl
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
\cs_generate_variant:Nn \fontspec_set_family:Nnn {c}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\fontspec_set_fontface:NNnn}
+% TODO: the round-about approach of using \cs{fontname}
+% means that settings such as fontdimens will be lost.
+% (Discovered in unicode-math.) Investigate!
% \begin{macrocode}
-\cs_new:Nn \fontspec_set_fontface:NNnn
- {
- \tl_set:Nn \l_@@_family_label_tl { #1 }
- \@@_select_font_family:nn {#3}{#4}
- \font #1 = \fontname \l_fontspec_font \scan_stop:
- \tl_set_eq:NN #2 \l_fontspec_family_tl
- }
+ \cs_new:Nn \fontspec_set_fontface:NNnn
+ {
+ \tl_set:Nn \l_@@_family_label_tl {#1}
+ \@@_select_font_family:nn {#3}{#4}
+ \global \font #1 = \fontname \l_fontspec_font \scan_stop:
+ \tl_set_eq:NN #2 \l_fontspec_family_tl
+ }
% \end{macrocode}
% \end{macro}
%
@@ -308,6 +311,9 @@
{ \group_end: \prg_return_true: }
{ \group_end: \prg_return_false: }
}
+% \end{macrocode}
+%
+% \begin{macrocode}
\cs_set_eq:NN \IfFontExistsTF \fontspec_font_if_exist:nTF
% \end{macrocode}
% \end{macro}
@@ -363,7 +369,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx
index 4d14d475219..0434c9fec2c 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx
@@ -32,7 +32,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
index d3cacc4c6b4..102800b98c2 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
@@ -60,7 +60,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx b/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx
index bc47ad93627..b42b8e1b6a2 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx
@@ -30,7 +30,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex
index eebd8f89670..243282eab42 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex
@@ -184,6 +184,9 @@ This font family can then be selected with standard \LaTeX\ commands
\cs{fontfamily}\marg{family}\cs{selectfont}.
See the standard \pkg{fontspec} user commands for applications of this
function.
+
+Previously this function set the \meta{family} variable locally, but this was inconsistent
+with how the NFSS assigns families. It is now a \textbf{global} operation.
\end{macro}
\begin{macro}{\fontspec_set_fontface:NNnn}
@@ -197,6 +200,9 @@ If a family is loaded (with bold and italic shapes) the primitive font
command will only select the regular face.
This feature is designed for \LaTeX\ programmers who need to
perform subsequent font-related tests on the \meta{primitive font}.
+
+Previously this function set the \meta{family} variable locally, but this was inconsistent
+with how the NFSS assigns families. It is now a \textbf{global} operation.
\end{macro}
@@ -318,7 +324,7 @@ OpenType language tag |#1|.
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex
index ad686e42731..577c162172a 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex
@@ -204,7 +204,7 @@ the process of defining Unicode font range encodings:
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
index f3e36ffbbd2..f7c0c724a7a 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
@@ -143,7 +143,8 @@ features requested.
\feat{BoldItalicFeatures}\texttt=\marg{features} \\
\feat{SlantedFeatures}\texttt=\marg{features} \\
\feat{BoldSlantedFeatures}\texttt=\marg{features} \\
- \feat{SmallCapsFeatures}\texttt=\marg{features}
+ \feat{SmallCapsFeatures}\texttt=\marg{features} \\
+ \feat{UprightFeatures}\texttt=\marg{features}
}
It is entirely possible that separate fonts in a family will require
@@ -504,37 +505,34 @@ detail), which improves legibility. Conversely, at large optical
sizes the serifs and other small details may be more delicately
rendered.
-OpenType fonts with optical scaling will exist in
-several discrete sizes, and these will be selected by \XeTeX\
-and Lua\TeX\
-\emph{automatically} determined by the current font size as in
-\exref{optsize}, in which we've scaled down some large text in order to be
-able to compare the difference for equivalent font sizes.
-
-The
-\feat{OpticalSize} feature may be used to specify a different optical
-size.
-With \feat{OpticalSize} set
-to zero, no optical size font substitution is performed, as shown in
-\exref{optsize0}.
-
-\begin{Xexample}{optsize}{A demonstration of automatic optical size selection.}
+OpenType fonts with optical scaling can exist in
+several discrete sizes (in separate font files).
+When loading fonts by name, \XeTeX\ and Lua\TeX\ engines will attempt to
+\emph{automatically} load the appropriate font as determined by the current font size.
+An example of this behaviour is shown in \exref{optsize}, in which some larger text is
+mechanically scaled down to compare the difference for equivalent font sizes.
+
+The \feat{OpticalSize} feature may be used to specify a different optical size.
+With \feat{OpticalSize} set (\exref{optsize0})
+to zero, no optical size font substitution is performed.
+
+\begin{Lexample}{optsize}{A demonstration of automatic optical size selection.}
\fontspec{Latin Modern Roman}
Automatic optical size \\
\scalebox{0.4}{\Huge
Automatic optical size}
-\end{Xexample}
+\end{Lexample}
-\begin{Xexample}{optsize0}{Optical size substitution is suppressed when set to zero.}
- \fontspec{Latin Modern Roman 5 Regular}[OpticalSize=0]
+\begin{Lexample}{optsize0}{Explicit optical size substitution for the Latin Modern Roman family.}
+ \fontspec{Latin Modern Roman}[OpticalSize=5]
Latin Modern optical sizes \\
- \fontspec{Latin Modern Roman 8 Regular}[OpticalSize=0]
+ \fontspec{Latin Modern Roman}[OpticalSize=8]
Latin Modern optical sizes \\
- \fontspec{Latin Modern Roman 12 Regular}[OpticalSize=0]
+ \fontspec{Latin Modern Roman}[OpticalSize=12]
Latin Modern optical sizes \\
- \fontspec{Latin Modern Roman 17 Regular}[OpticalSize=0]
+ \fontspec{Latin Modern Roman}[OpticalSize=17]
Latin Modern optical sizes
-\end{Xexample}
+\end{Lexample}
The \feat{SizeFeatures} feature (\vref*{sec:sizefeature}) can be
used to specify exactly which optical sizes will be used for ranges
@@ -604,7 +602,7 @@ Also see the OpenType \opt{Uppercase} option of the \feat{Letters} feature (\vre
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
index ea07c78b132..f1be182efd7 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
@@ -7,20 +7,20 @@
\part{General font selection}
+\section{Main commands}
+\label{sec:main-cmd}
+
This section concerns the variety of commands that can be used to select
fonts.
+\bigskip
\cmdbox{%
- \CMD{\string\fontspec}\marg{font name}\oarg{font features}\\
- \CMD{\string\setmainfont}\marg{font name}\oarg{font features}\\
- \CMD{\string\setsansfont}\marg{font name}\oarg{font features}\\
- \CMD{\string\setmonofont}\marg{font name}\oarg{font features}\\
- \CMD{\string\newfontfamily}\meta{cmd}\marg{font name}\oarg{font features}
+ \CMD{\string\setmainfont}\marg{font}\oarg{font features}\\
+ \CMD{\string\setsansfont}{\color[gray]{0.5}\marg{font}\oarg{font features}}\\
+ \CMD{\string\setmonofont}{\color[gray]{0.5}\marg{font}\oarg{font features}}
}
-These are the main font-selecting commands of this package.
-The \cs{fontspec} command selects a font for one-time use only; all
-others should be used to define the standard fonts used in a document, as shown in \exref{fontload}.
+These are the main font-selecting commands of this package which select the standard fonts used in a document, as shown in \exref{fontload}.
Here, the scales of the fonts have been chosen to equalise their
lowercase letter heights. The \feat{Scale} font feature will be discussed
further in \vref{sec:font-ind-features}, including methods for automatic
@@ -28,22 +28,36 @@ scaling.
Note that further options may need to be added to select appropriate bold/italic fonts,
but this shows the main idea.
-\begin{Lexample}{fontload}{Loading the default, sans serif, and monospaced fonts.}
- \setmainfont{texgyrebonum-regular.otf}
- \setsansfont{lmsans10-regular.otf}[Scale=MatchLowercase]
- \setmonofont{Inconsolatazi4-Regular.otf}[Scale=MatchLowercase]
-
- \rmfamily Pack my box with five dozen liquor jugs\par
- \sffamily Pack my box with five dozen liquor jugs\par
- \ttfamily Pack my box with five dozen liquor jugs
-\end{Lexample}
-
Note that while these commands all look and behave largely identically, the default setup for font loading automatically adds the |Ligatures=TeX| feature for the \cs{setmainfont} and \cs{setsansfont} commands.
These defaults (and further customisations possible) are discussed in \vref{sec:defaults}.
-The font features argument accepts comma separated
+\bigskip
+\cmdbox{%
+ \CMD{\string\newfontfamily}\meta{cmd}\marg{font}\oarg{font features}\\
+ \CMD{\string\setfontfamily}{\color[gray]{0.5}\meta{cmd}\marg{font}\oarg{font features}}\\
+ \CMD{\string\renewfontfamily}{\color[gray]{0.5}\meta{cmd}\marg{font}\oarg{font features}}
+}
+
+These commands define new font family commands (like \cs{rmfamily}).
+The |new| command checks if \meta{cmd} has been defined, and issues an error if so.
+The |renew| command checks if \meta{cmd} has been defined, and issues an error if not.
+The |set| command never checks; use at your own risk.
+
+\textbf{NEW:} In previous versions of \pkg{fontspec}, only \cs{newfontfamily} was provided, but it behaved
+like \cs{setfontfamily}. You'll have to update your code slightly if this now causes problems; apologies.
+
+
+\bigskip
+\cmdbox{%
+ \CMD{\string\fontspec}\marg{font}\oarg{font features}
+}
+
+The plain \cs{fontspec} command is not generally recommended for document use. It is an
+ad hoc commands best suited for testing and loading fonts on a one-off basis.
+
+All of the commands listed above accept comma-separated
\meta{font feature}=\meta{option} lists; these are described later:
-\begin{itemize}
+\begin{itemize}[nosep]
\item For general font features, see \vref{sec:font-ind-features}
\item For OpenType fonts, see Part~\vref{sec:opentype-features}
\item For \XeTeX-only general font features, see Part~\vref{sec:xetex-features}
@@ -51,10 +65,19 @@ The font features argument accepts comma separated
\item For features for \AAT\ fonts in \XeTeX, see \vref{sec:aat-features}
\end{itemize}
+\begin{Lexample}{fontload}{Loading the default, sans serif, and monospaced fonts.}
+ \setmainfont{texgyrebonum-regular.otf}
+ \setsansfont{lmsans10-regular.otf}[Scale=MatchLowercase]
+ \setmonofont{Inconsolatazi4-Regular.otf}[Scale=MatchLowercase]
+
+ \rmfamily Pack my box with five dozen liquor jugs\par
+ \sffamily Pack my box with five dozen liquor jugs\par
+ \ttfamily Pack my box with five dozen liquor jugs
+\end{Lexample}
+
\section{Font selection}
-In both \LuaTeX\ and \XeTeX, fonts can be selected either by `font name' or
-by `file name', but there are some differences in how each engine finds and selects fonts --- don't be too surprised if a font invocation in one engine needs correction to work in the other.
+In both \LuaTeX\ and \XeTeX, fonts can be selected (using the \meta{font} argument in \ref{sec:main-cmd}) either by `font name' or by `file name', but there are some differences in how each engine finds and selects fonts --- don't be too surprised if a font invocation in one engine needs correction to work in the other.
\subsection{By font name}
@@ -299,7 +322,8 @@ A legacy \TeX\ font. {\unicodefont A unicode font.}
\feat{~BoldItalicFont} = \meta{font name} \\
\feat{SlantedFont} = \meta{font name} \\
\feat{BoldSlantedFont} = \meta{font name} \\
- \feat{SmallCapsFont} = \meta{font name}
+ \feat{SmallCapsFont} = \meta{font name} \\
+ \feat{UprightFont} = \meta{font name}
}
The automatic bold, italic, and bold italic font selections will not be
@@ -569,7 +593,7 @@ if it were a `naked' control sequence; \eg, `|M. \fontspec{...} N|' and
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex
index 504d3b343b7..401b3d15195 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex
@@ -240,7 +240,7 @@ An example for setting up a font family for use with \cs{strong} is discussed in
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex
index b08bd3f8bf6..c62e84cecc2 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex
@@ -46,7 +46,7 @@ Please refer to the \LuaTeX/\pkg{luaotfload} documentation for more details.
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex
index 2c8baef847c..1e7e6c712d0 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex
@@ -586,7 +586,7 @@ controlled by the \opt{On}/\opt{Off} options.
\begin{Xexample}[firstline=2]{kernup}{Adding extra kerning for uppercase letters. (The difference is usually very small.)}
\large
- \fontspec{Romande ADF Std Bold}
+ \fontspec{RomandeADFStd-DemiBold.otf}
UPPERCASE EXAMPLE \\
\addfontfeature{Kerning=Uppercase}
UPPERCASE EXAMPLE
@@ -856,7 +856,7 @@ Thanks to \name{Jonathan Kew}, \name{Yves Codet} and
\begin{Xexample}[firstline=14,lastline=23]{script-lang}{An example of various Scripts and Languages.}
\def\testfeature#1#2{%^^A
\fontspec{\examplefont}#2 & \fontspec[#1]{\examplefont}#2\\[1ex]}
-\def \examplefont{Code2000}
+\def \examplefont{CODE2000.TTF}
\def \arabictext{العربي}
\def \devanagaritext{हिन्दी}
\def \bengalitext{লেখ}
@@ -875,7 +875,7 @@ Thanks to \name{Jonathan Kew}, \name{Yves Codet} and
\testfeature{Script=Gurmukhi}{\gurmukhitext}
\testfeature{Script=Tamil}{\tamiltext}
\testfeature{Script=Hebrew}{\hebrewtext}
- \def\examplefont{Doulos SIL}
+ \def\examplefont{DoulosSILR.ttf}
\testfeature{Language=Vietnamese}{\vietnamesetext}
\end{tabular}
\end{Xexample}
@@ -1446,7 +1446,7 @@ Thanks to \name{Jonathan Kew}, \name{Yves Codet} and
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex
index 30d99ecc6a0..46963cc0b46 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex
@@ -368,7 +368,7 @@ options: \opt{Off},
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx
index 3a0f4142814..7ba6b562a99 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx
@@ -161,7 +161,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx
index 1a7f5d6b70e..3bb7905cf71 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx
@@ -231,7 +231,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx
index cf0a430b0fa..a91ee8075ff 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx
@@ -547,7 +547,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx
index 346a0b008a8..41981f3814d 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx
@@ -93,7 +93,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
index 73c166f234e..1c5b7711a39 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
@@ -111,7 +111,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx
index b90ac388bdc..10449bf5e3b 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx
@@ -17,6 +17,7 @@
\NewDocumentCommand \fontspec { O{} m O{} }
{
\@@_main_fontspec:nn {#1,#3} {#2}
+ \ignorespaces
}
% \end{macrocode}
%
@@ -24,6 +25,7 @@
\NewDocumentCommand \setmainfont { O{} m O{} }
{
\@@_main_setmainfont:nn {#1,#3} {#2}
+ \ignorespaces
}
% \end{macrocode}
%
@@ -31,6 +33,7 @@
\NewDocumentCommand \setsansfont { O{} m O{} }
{
\@@_main_setsansfont:nn {#1,#3} {#2}
+ \ignorespaces
}
% \end{macrocode}
%
@@ -38,6 +41,7 @@
\NewDocumentCommand \setmonofont { O{} m O{} }
{
\@@_main_setmonofont:nn {#1,#3} {#2}
+ \ignorespaces
}
% \end{macrocode}
%
@@ -83,7 +87,21 @@
% \begin{macrocode}
\NewDocumentCommand \newfontfamily { m O{} m O{} }
{
- \@@_main_newfontfamily:nnn {#1} {#2,#4} {#3}
+ \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \NewDocumentCommand
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \renewfontfamily { m O{} m O{} }
+ {
+ \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \RenewDocumentCommand
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setfontfamily { m O{} m O{} }
+ {
+ \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \DeclareDocumentCommand
}
% \end{macrocode}
%
@@ -94,18 +112,28 @@
}
% \end{macrocode}
%
+% \begin{macro}{\defaultfontfeatures}
+% This macro takes one argument that consists of all of feature
+% options that will be applied by default to all subsequent \cs{fontspec} commands.
% \begin{macrocode}
\NewDocumentCommand \defaultfontfeatures { t+ o m }
{
- \@@_main_defaultfontfeatures:nnn {#1} {#2} {#3}
+ \IfNoValueTF {#2}
+ { \@@_set_default_features:nn {#1} {#3} }
+ { \@@_set_font_default_features:nnn {#1} {#2} {#3} }
+ \ignorespaces
}
% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
\NewDocumentCommand \addfontfeatures {m}
{
\@@_main_addfontfeatures:n {#1}
}
+% \end{macrocode}
+%
+% \begin{macrocode}
\NewDocumentCommand \addfontfeature {m}
{
\@@_main_addfontfeatures:n {#1}
@@ -180,9 +208,9 @@
% \end{macro}
%
% \begin{macrocode}
-\NewDocumentCommand \DeclareFontsExtensions {m}
+\NewDocumentCommand \DeclareFontExtensions {m}
{
- \@@_main_DeclareFontsExtensions:n {#1}
+ \@@_main_DeclareFontExtensions:n {#1}
}
% \end{macrocode}
%
@@ -206,7 +234,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
index 7a78ac73b7c..d9a27a22fe3 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
@@ -57,7 +57,7 @@
\@@_preparse_features:
\@@_load_font:
\@@_set_scriptlang:
- \@@_get_features:Nn \l_@@_rawfeatures_sclist {}
+ \@@_get_features:n {}
\bool_set_false:N \l_@@_firsttime_bool
\@@_save_family_needed:nTF {#2}
@@ -69,6 +69,8 @@
%<debug> \typeout{Font~ family~ already~ defined.}
}
\group_end:
+
+ \tl_set_eq:NN \l_fontspec_family_tl \g_@@_nfss_family_tl
}
% \end{macrocode}
% \end{macro}
@@ -337,11 +339,11 @@
% Do not set the colour if not explicitly spec'd else \verb|\color| (using
% specials) will not work.
% \begin{macrocode}
-\cs_new:Nn \@@_get_features:Nn
+\cs_new:Nn \@@_get_features:n
{
-%<debug> \typeout{:: @@_get_features:Nn \exp_not:N #1 { \exp_not:n {#2} } }
+%<debug> \typeout{:: @@_get_features:Nn { \exp_not:n {#1} } }
\@@_init_fontface:
- \@@_keys_set_known:nxN {fontspec-renderer} {\l_@@_fontfeat_clist,#2}
+ \@@_keys_set_known:nxN {fontspec-renderer} {\l_@@_fontfeat_clist,#1}
\l_@@_keys_leftover_clist
\@@_keys_set_known:nxN {fontspec} {\l_@@_keys_leftover_clist} \l_@@_keys_leftover_clist
%<*XE>
@@ -367,10 +369,8 @@
{ \@@_update_featstr:n { mapping = \l_@@_mapping_tl } }
\str_if_eq_x:nnF { \l_@@_hexcol_tl \l_@@_opacity_tl }
- { \g_@@_hexcol_tl \g_@@_opacity_tl }
+ { \c_@@_hexcol_tl \c_@@_opacity_tl }
{ \@@_update_featstr:n { color = \l_@@_hexcol_tl\l_@@_opacity_tl } }
-
- \tl_set_eq:NN #1 \l_@@_rawfeatures_sclist
}
% \end{macrocode}
% \end{macro}
@@ -386,41 +386,45 @@
% selecting.
%
% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_save_family_needed:n {TF}
- {
+\prg_new_conditional:Nnn \@@_save_family_needed:n { TF }
+ {
%<debug> \typeout{save~ family:~ #1}
%<debug> \typeout{== fontid_tl: "\l_@@_fontid_tl".}
- \tl_if_exist:cF {g_@@_UID_\l_@@_fontid_tl}
+ \tl_if_empty:NTF \l_@@_nfss_fam_tl
{
- \tl_new:c {g_@@_UID_\l_@@_fontid_tl}
+ \prop_get:NVNTF \g_@@_fontid_family_prop \l_@@_fontid_tl \l_@@_tmp_tl
+ {
+ \tl_gset_eq:NN \g_@@_nfss_family_tl \l_@@_tmp_tl
+ \prg_return_false:
+ }
+ {
+ \tl_set:Nx \l_@@_tmp_tl {#1}
+ \tl_remove_all:Nn \l_@@_tmp_tl { ~ }
+ \@@_save_fontid_family:VV \l_@@_fontid_tl \l_@@_tmp_tl
+ \prg_return_true:
+ }
}
-
- \tl_if_exist:NT \l_@@_nfss_fam_tl
{
- \tl_set_eq:cN {g_@@_UID_\l_@@_fontid_tl} \l_@@_nfss_fam_tl
+ \tl_gset_eq:NN \g_@@_nfss_family_tl \l_@@_nfss_fam_tl
+ \cs_undefine:c { g_@@_fontinfo_ \g_@@_nfss_family_tl _prop }
+ \prg_return_true:
}
-
- \tl_if_empty:cT {g_@@_UID_\l_@@_fontid_tl}
- {
- % The font name is fully expanded, in case it's defined in terms of macros, before having its spaces zapped:
- \tl_set:Nx \l_@@_tmp_tl {#1}
- \tl_remove_all:Nn \l_@@_tmp_tl {~}
-
- \cs_if_exist:cTF {g_@@_family_ \l_@@_tmp_tl _int}
- { \int_gincr:c {g_@@_family_ \l_@@_tmp_tl _int} }
- { \int_new:c {g_@@_family_ \l_@@_tmp_tl _int} }
-
- \tl_gset:cx {g_@@_UID_\l_@@_fontid_tl}
- {
- \l_@@_tmp_tl ( \int_use:c {g_@@_family_ \l_@@_tmp_tl _int} )
- }
- }
- \tl_gset:Nv \l_fontspec_family_tl {g_@@_UID_\l_@@_fontid_tl}
- \cs_if_exist:cTF {g_@@_fontinfo_ \l_fontspec_family_tl _prop}
- \prg_return_false: \prg_return_true:
- }
+ }
+\cs_new:Nn \@@_save_fontid_family:nn
+ {
+ \prop_get:NnNTF \g_@@_family_int_prop {#2} \l_@@_tmp_tl
+ {
+ \tl_set:Nx \l_@@_tmp_tl
+ { \int_eval:n { \l_@@_tmp_tl + 1 } }
+ }
+ { \tl_set:Nn \l_@@_tmp_tl { 0 } }
+ \prop_gput:NnV \g_@@_family_int_prop {#2} \l_@@_tmp_tl
+ \tl_gset:Nx \g_@@_nfss_family_tl { #2 ( \l_@@_tmp_tl ) }
+ \prop_gput:NnV \g_@@_fontid_family_prop {#1} \g_@@_nfss_family_tl
+ }
+\cs_generate_variant:Nn \@@_save_fontid_family:nn { VV }
% \end{macrocode}
% \end{macro}
%
@@ -431,7 +435,7 @@
{
\@@_save_fontinfo:n {#2}
\@@_find_autofonts:
- \DeclareFontFamily{\l_@@_nfss_enc_tl}{\l_fontspec_family_tl}{}
+ \DeclareFontFamily{\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{}
\@@_set_faces:
\@@_info:nxx {defining-font} {#1} {#2}
}
@@ -443,18 +447,18 @@
% \begin{macrocode}
\cs_new:Nn \@@_save_fontinfo:n
{
- \prop_new:c {g_@@_fontinfo_ \l_fontspec_family_tl _prop}
- \prop_gput:cnx {g_@@_fontinfo_ \l_fontspec_family_tl _prop} {fontname} { #1 }
- \prop_gput:cnx {g_@@_fontinfo_ \l_fontspec_family_tl _prop} {options} { \l_@@_all_features_clist }
- \prop_gput:cnx {g_@@_fontinfo_ \l_fontspec_family_tl _prop} {fontdef}
+ \prop_new:c {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop}
+ \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {fontname} { #1 }
+ \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {options} { \l_@@_all_features_clist }
+ \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {fontdef}
{
\@@_construct_font_call:nn {\l_fontspec_fontname_tl}
- { \l_@@_pre_feat_sclist \l_@@_rawfeatures_sclist }
+ { \l_@@_pre_feat_sclist \g_@@_rawfeatures_sclist }
}
- \prop_gput:cnV {g_@@_fontinfo_ \l_fontspec_family_tl _prop} {script-num} \l_@@_script_int
- \prop_gput:cnV {g_@@_fontinfo_ \l_fontspec_family_tl _prop} {lang-num} \l_@@_language_int
- \prop_gput:cnV {g_@@_fontinfo_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
- \prop_gput:cnV {g_@@_fontinfo_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
+ \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {script-num} \l_@@_script_int
+ \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {lang-num} \l_@@_language_int
+ \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {script-tag} \l_fontspec_script_tl
+ \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
}
% \end{macrocode}
% \end{macro}
@@ -761,14 +765,14 @@
{
%<debug>\typeout{====~Setup~NFSS~shape:~<\l_@@_size_tl>~\l_fontspec_fontname_tl}
- \@@_get_features:Nn \l_@@_rawfeatures_sclist { #2 , #3 , #4 }
-%<debug>\typeout{====~Gathered~features:~\l_@@_rawfeatures_sclist}
+ \@@_get_features:n { #2 , #3 , #4 }
+%<debug>\typeout{====~Gathered~features:~\g_@@_rawfeatures_sclist}
\tl_put_right:Nx #1
{
<\l_@@_size_tl> \l_@@_scale_tl
\@@_construct_font_call:nn { \l_fontspec_fontname_tl }
- { \l_@@_pre_feat_sclist \l_@@_rawfeatures_sclist }
+ { \l_@@_pre_feat_sclist \g_@@_rawfeatures_sclist }
}
}
% \end{macrocode}
@@ -778,7 +782,7 @@
% \begin{macrocode}
\cs_new:Nn \@@_declare_shapes_normal:nn
{
- \@@_DeclareFontShape:xxxxxx {\l_@@_nfss_enc_tl} {\l_fontspec_family_tl}
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl}
{#1} {#2} {\l_@@_nfss_tl}{\l_@@_postadjust_tl}
}
% \end{macrocode}
@@ -790,7 +794,7 @@
{
\tl_if_empty:NF \l_@@_nfss_sc_tl
{
- \@@_DeclareFontShape:xxxxxx {\l_@@_nfss_enc_tl} {\l_fontspec_family_tl} {#1}
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl} {#1}
{ \@@_combo_sc_shape:n {#2} } {\l_@@_nfss_sc_tl} {\l_@@_postadjust_tl}
}
}
@@ -833,8 +837,8 @@
!(\str_if_eq_x_p:nn {\itdefault} {\sldefault})
}
{
- \@@_DeclareFontShape:xxxxxx {\l_@@_nfss_enc_tl}{\l_fontspec_family_tl}{#1}{\sldefault}
- {<->ssub*\l_fontspec_family_tl/#1/\itdefault}{\l_@@_postadjust_tl}
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{#1}{\sldefault}
+ {<->ssub*\g_@@_nfss_family_tl/#1/\itdefault}{\l_@@_postadjust_tl}
}
}
% \end{macrocode}
@@ -845,7 +849,7 @@
% \begin{macrocode}
\cs_new:Nn \@@_declare_shape_loginfo:nn
{
- \tl_gput_right:Nx \l_fontspec_defined_shapes_tl
+ \tl_gput_right:Nx \g_@@_defined_shapes_tl
{
\exp_not:n { \\ }
-~ \exp_not:N \str_case:nn {#1/#2}
@@ -939,7 +943,7 @@
% \end{macro}
%
% \begin{macro}{\@@_update_featstr:n}
-% \cmd{\l_@@_rawfeatures_sclist} is the string used to define the list of specific
+% \cmd{\g_@@_rawfeatures_sclist} is the string used to define the list of specific
% font features. Each time another font feature is requested, this
% macro is used to add that feature to the list. Font features are
% separated by semicolons.
@@ -951,7 +955,7 @@
{
\tl_gset:Nx \g_@@_single_feat_tl { #1 }
%<debug> \typeout{::::~ Adding~ feature.}
- \tl_gput_right:Nx \l_@@_rawfeatures_sclist {#1;}
+ \tl_gput_right:Nx \g_@@_rawfeatures_sclist {#1;}
}
}
% \end{macrocode}
@@ -965,7 +969,7 @@
\clist_map_inline:nn {#1}
{
%<debug> \typeout{::::~ Removing~ feature~ "##1;"}
- \tl_gremove_all:Nn \l_@@_rawfeatures_sclist {##1;}
+ \tl_gremove_all:Nn \g_@@_rawfeatures_sclist {##1;}
}
}
% \end{macrocode}
@@ -988,9 +992,9 @@
\tl_clear:N \l_@@_optical_size_tl
\tl_clear:N \l_@@_ttc_index_tl
\tl_clear:N \l_fontspec_renderer_tl
- \tl_clear:N \l_fontspec_defined_shapes_tl
- \tl_clear:N \g_@@_curr_series_tl
- \tl_gset_eq:NN \l_@@_nfss_enc_tl \g_fontspec_encoding_tl
+ \tl_gclear:N \g_@@_defined_shapes_tl
+ \tl_gclear:N \g_@@_curr_series_tl
+ \tl_gset_eq:NN \g_@@_nfss_enc_tl \g_fontspec_encoding_tl
%<*LU>
\tl_set:Nn \l_fontspec_mode_tl {node}
@@ -1008,11 +1012,11 @@
% \begin{macrocode}
\cs_new:Nn \@@_init_fontface:
{
- \tl_clear:N \l_@@_rawfeatures_sclist
+ \tl_gclear:N \g_@@_rawfeatures_sclist
\tl_clear:N \l_@@_scale_tl
- \tl_set_eq:NN \l_@@_opacity_tl \g_@@_opacity_tl
- \tl_set_eq:NN \l_@@_hexcol_tl \g_@@_hexcol_tl
- \tl_set_eq:NN \l_@@_postadjust_tl \g_@@_postadjust_tl
+ \tl_set_eq:NN \l_@@_opacity_tl \c_@@_opacity_tl
+ \tl_set_eq:NN \l_@@_hexcol_tl \c_@@_hexcol_tl
+ \tl_set_eq:NN \l_@@_postadjust_tl \c_@@_postadjust_tl
\tl_clear:N \l_@@_wordspace_adjust_tl
\tl_clear:N \l_@@_punctspace_adjust_tl
}
@@ -1074,7 +1078,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
index 1169f2458f0..2c56c00d2d1 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
@@ -13,7 +13,7 @@
%
%
% \begin{macrocode}
-\clist_set:Nn \g_@@_all_keyval_modules_clist
+\clist_gset:Nn \g_@@_all_keyval_modules_clist
{
fontspec, fontspec-opentype, fontspec-aat,
fontspec-preparse, fontspec-preparse-cfg, fontspec-preparse-external, fontspec-preparse-nested,
@@ -24,7 +24,7 @@
% \begin{macrocode}
\cs_new:Nn \@@_keys_define_code:nnn
{
- \keys_define:nn {#1} { #2 .code:n = {#3} }
+ \keys_define:nn {#1} { #2 .code:n = {#3} }
}
% \end{macrocode}
%
@@ -210,7 +210,7 @@
\seq_if_empty:NT \g_@@_bf_series_seq
{
\tl_gset:Nx \g_@@_curr_series_tl {\bfdefault}
- \seq_put_right:Nx \g_@@_bf_series_seq {\bfdefault}
+ \seq_gput_right:Nx \g_@@_bf_series_seq {\bfdefault}
}
\tl_if_eq:oxT \g_@@_curr_series_tl {\bfdefault}
{ \tl_set_eq:NN \l_@@_fontname_bf_tl \l_@@_curr_bfname_tl }
@@ -357,7 +357,7 @@
% \begin{macrocode}
\@@_keys_define_code:nnn {fontspec-preparse} {NFSSEncoding}
{
- \tl_gset:Nx \l_@@_nfss_enc_tl { #1 }
+ \tl_gset:Nx \g_@@_nfss_enc_tl { #1 }
}
% \end{macrocode}
%
@@ -368,9 +368,6 @@
\@@_keys_define_code:nnn {fontspec-preparse} {NFSSFamily}
{
\tl_set:Nx \l_@@_nfss_fam_tl { #1 }
- \cs_undefine:c {g_@@_UID_\l_@@_fontid_tl}
- \tl_if_exist:NT \l_fontspec_family_tl
- { \cs_undefine:c {g_@@_fontinfo_ \l_fontspec_family_tl _prop} }
}
% \end{macrocode}
%
@@ -378,28 +375,24 @@
% This option looks similar in name but has a very different function.
% \begin{macrocode}
\@@_keys_define_code:nnn {fontspec} {FontFace}
- {
- \tl_set:No \l_@@_arg_tl { \use_iii:nnn #1 }
- \tl_set_eq:NN \l_@@_this_feat_tl \l_@@_arg_tl
- \tl_clear:N \l_@@_this_font_tl
- \int_compare:nT { \clist_count:N \l_@@_arg_tl = 1 }
- {
-%<*debug>
- \typeout{FontFace~ parsing:~ one~ clist~ item}
-%</debug>
- \tl_if_in:NnF \l_@@_arg_tl {=}
- {
-%<*debug>
- \typeout{FontFace~ parsing:~ no~ equals~ =>~ font~ name~ only}
-%</debug>
- \tl_set_eq:NN \l_@@_this_font_tl \l_@@_arg_tl
- \tl_clear:N \l_@@_this_feat_tl
- }
- }
+ {
+ \tl_clear:N \l_@@_this_font_tl
+ \clist_set:No \l_@@_arg_clist { \use_iii:nnn #1 }
+ \clist_set_eq:NN \l_@@_this_feat_clist \l_@@_arg_clist
+ \int_compare:nT { \clist_count:N \l_@@_arg_clist = 1 }
+ {
+%<debug>\typeout{FontFace~ parsing:~ one~ clist~ item}
+ \tl_if_in:NnF \l_@@_arg_clist {=}
+ {
+%<debug>\typeout{FontFace~ parsing:~ no~ equals~ =>~ font~ name~ only}
+ \tl_set_eq:NN \l_@@_this_font_tl \l_@@_arg_clist
+ \tl_clear:N \l_@@_this_feat_clist
+ }
+ }
- \@@_add_nfssfont:nnnn
- {\use_i:nnn #1}{\use_ii:nnn #1}{\l_@@_this_font_tl}{\l_@@_this_feat_tl}
- }
+ \@@_add_nfssfont:nnnn
+ {\use_i:nnn #1} {\use_ii:nnn #1} {\l_@@_this_font_tl} {\l_@@_this_feat_clist}
+ }
% \end{macrocode}
%
%
@@ -634,7 +627,7 @@
\cs_set:Npn \fontspec_parse_colour:viii #1#2#3#4#5#6#7#8
{
\tl_set:Nn \l_@@_hexcol_tl {#1#2#3#4#5#6}
- \tl_if_eq:NNF \l_@@_opacity_tl \g_@@_opacity_tl
+ \tl_if_eq:NNF \l_@@_opacity_tl \c_@@_opacity_tl
{
\bool_if:NF \l_@@_firsttime_bool
{ \@@_warning:nx {opa-twice-col} {#7#8} }
@@ -648,7 +641,7 @@
{
\int_set:Nn \l_@@_tmp_int {255}
\@@_int_mult_truncate:Nn \l_@@_tmp_int { #1 }
- \tl_if_eq:NNF \l_@@_opacity_tl \g_@@_opacity_tl
+ \tl_if_eq:NNF \l_@@_opacity_tl \c_@@_opacity_tl
{
\bool_if:NF \l_@@_firsttime_bool
{ \@@_warning:nx {opa-twice} {#1} }
@@ -854,7 +847,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx
index 885150faa59..886fea87b78 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx
@@ -406,7 +406,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
index 0b61fea3096..80d55bc0f44 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
@@ -16,6 +16,7 @@ fontspec.error = err or (function (s) luatexbase.module_error("fontspec", s)
% \end{macrocode}
%
% We need a catcode table for tex.sprint(). See issue \#230.
+% TODO: probably time to get rid of the backwards compatibility here:
% \begin{macrocode}
local latex
if luatexbase.registernumber then
@@ -71,10 +72,10 @@ end
function fontspec.mathfontdimen(fnt, str)
local mathdimens = luaotfload.aux.get_math_dimension(fnt, str)
if mathdimens then
- tex.sprint(mathdimens)
- tex.sprint("sp")
+ tex.sprint(-2,mathdimens)
+ tex.sprint(-2,"sp")
else
- tex.sprint("0pt")
+ tex.sprint(-2,"0pt")
end
end
% \end{macrocode}
@@ -88,7 +89,7 @@ end
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx
index 1a1623a5eba..77eaa1228f9 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx
@@ -24,24 +24,23 @@
%
% \begin{macrocode}
\@ifpackageloaded{euler}
- {
- \bool_set_true:N \g_@@_pkg_euler_loaded_bool
- }
- {
- \bool_set_false:N \g_@@_pkg_euler_loaded_bool
- }
+ { \bool_gset_true:N \g_@@_pkg_euler_loaded_bool }
+ { \bool_gset_false:N \g_@@_pkg_euler_loaded_bool }
+% \end{macrocode}
+%
+% \begin{macrocode}
\cs_new:Nn \fontspec_setup_maths:
{
\@ifpackageloaded{euler}
{
\bool_if:NTF \g_@@_pkg_euler_loaded_bool
- { \bool_set_true:N \g_@@_math_euler_bool }
+ { \bool_gset_true:N \g_@@_math_euler_bool }
{ \@@_error:n {euler-too-late} }
}
{}
- \@ifpackageloaded{lucbmath}{\bool_set_true:N \g_@@_math_lucida_bool}{}
- \@ifpackageloaded{lucidabr}{\bool_set_true:N \g_@@_math_lucida_bool}{}
- \@ifpackageloaded{lucimatx}{\bool_set_true:N \g_@@_math_lucida_bool}{}
+ \@ifpackageloaded{lucbmath}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
+ \@ifpackageloaded{lucidabr}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
+ \@ifpackageloaded{lucimatx}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
% \end{macrocode}
% Knuth's CM fonts fonts are all squashed together, combining letters,
% accents, text symbols and maths symbols all in the one font,
@@ -192,34 +191,34 @@
{
\@ifpackageloaded{anttor}
{
- \ifx\define@antt@mathversions a\bool_set_false:N \g_@@_math_bool\fi
+ \ifx\define@antt@mathversions a\bool_gset_false:N \g_@@_math_bool\fi
}{}
- \@ifpackageloaded{arevmath}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{eulervm}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{mathdesign}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{concmath}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{cmbright}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{mathesf}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{gfsartemisia}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{gfsneohellenic}{\bool_set_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{arevmath} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{eulervm} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{mathdesign} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{concmath} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{cmbright} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{mathesf} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{gfsartemisia} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{gfsneohellenic} {\bool_gset_false:N \g_@@_math_bool}{}
\@ifpackageloaded{iwona}
{
\ifx\define@iwona@mathversions a\bool_set_false:N \g_@@_math_bool\fi
}{}
- \@ifpackageloaded{kpfonts}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{kmath}{\bool_set_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{kpfonts}{\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{kmath} {\bool_gset_false:N \g_@@_math_bool}{}
\@ifpackageloaded{kurier}
{
\ifx\define@kurier@mathversions a\bool_set_false:N \g_@@_math_bool\fi
}{}
- \@ifpackageloaded{fouriernc}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{fourier}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{lmodern}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{mathpazo}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{mathptmx}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{MinionPro}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{unicode-math}{\bool_set_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{breqn}{\bool_set_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{fouriernc} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{fourier} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{lmodern} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{mathpazo} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{mathptmx} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{MinionPro} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{unicode-math} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{breqn} {\bool_gset_false:N \g_@@_math_bool}{}
\bool_if:NT \g_@@_math_bool
{
\@@_info:n {setup-math}
@@ -243,7 +242,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx
index 2cbcd4d6015..8358a874d54 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx
@@ -214,11 +214,11 @@
% \begin{macrocode}
\@@_msg_new:nnn {fontspec} {defining-font}
{
- Font family '\l_fontspec_family_tl' created for font '#2'
+ Font family '\g_@@_nfss_family_tl' created for font '#2'
with options [\l_@@_all_features_clist].\\
\\
This font family consists of the following NFSS series/shapes:\\
- \l_fontspec_defined_shapes_tl
+ \g_@@_defined_shapes_tl
}
\@@_msg_new:nnn {fontspec} {no-font-shape}
{
@@ -274,7 +274,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx
index 636f98cf5b6..323428058bc 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx
@@ -12,23 +12,34 @@
%
% \begin{macrocode}
\DeclareOption{cm-default}
- { \@@_warning:n {cm-default-obsolete} }
-\DeclareOption{math}{\bool_set_true:N \g_@@_math_bool}
-\DeclareOption{no-math}{\bool_set_false:N \g_@@_math_bool}
-\DeclareOption{config}{\bool_set_true:N \g_@@_cfg_bool}
-\DeclareOption{no-config}{\bool_set_false:N \g_@@_cfg_bool}
-\DeclareOption{euenc}{\bool_set_true:N \g_@@_euenc_bool}
-\DeclareOption{tuenc}{\bool_set_false:N \g_@@_euenc_bool}
-\DeclareOption{quiet}
- {
- \msg_redirect_module:nnn { fontspec } { warning } { info }
- \msg_redirect_module:nnn { fontspec } { info } { none }
- }
+ {
+ \@@_warning:n {cm-default-obsolete}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption {math} { \bool_gset_true:N \g_@@_math_bool }
+\DeclareOption {no-math} { \bool_gset_false:N \g_@@_math_bool }
+\DeclareOption {config} { \bool_gset_true:N \g_@@_cfg_bool }
+\DeclareOption {no-config}{ \bool_gset_false:N \g_@@_cfg_bool }
+\DeclareOption {euenc} { \bool_gset_true:N \g_@@_euenc_bool }
+\DeclareOption {tuenc} { \bool_gset_false:N \g_@@_euenc_bool }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption {quiet}
+ {
+ \msg_redirect_module:nnn { fontspec } { warning } { info }
+ \msg_redirect_module:nnn { fontspec } { info } { none }
+ }
\DeclareOption{silent}
- {
- \msg_redirect_module:nnn { fontspec } { warning } { none }
- \msg_redirect_module:nnn { fontspec } { info } { none }
- }
+ {
+ \msg_redirect_module:nnn { fontspec } { warning } { none }
+ \msg_redirect_module:nnn { fontspec } { info } { none }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
\ExecuteOptions{config,math,tuenc}
\ProcessOptions*
% \end{macrocode}
@@ -53,15 +64,15 @@
}
{
\@@_warning:n {tu-missing}
- \bool_set_true:N \g_@@_euenc_bool
+ \bool_gset_true:N \g_@@_euenc_bool
}
}
\bool_if:NTF \g_@@_euenc_bool
{
-%<XE> \tl_set:Nn \g_fontspec_encoding_tl {EU1}
-%<LU> \tl_set:Nn \g_fontspec_encoding_tl {EU2}
+%<XE> \tl_gset:Nn \g_fontspec_encoding_tl {EU1}
+%<LU> \tl_gset:Nn \g_fontspec_encoding_tl {EU2}
}
- { \tl_set:Nn \g_fontspec_encoding_tl { TU } }
+ { \tl_gset:Nn \g_fontspec_encoding_tl { TU } }
% \end{macrocode}
%
% \begin{macrocode}
@@ -172,7 +183,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
index 3e36172d19f..a808789d8e9 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
@@ -426,7 +426,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx
index a569dbac43c..c466d9fd45e 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx
@@ -196,7 +196,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx
index 909bd2b8bb5..480d53e865a 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx
@@ -171,7 +171,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
index c628adbbe19..173de1f9c81 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
@@ -11,19 +11,19 @@
%
%
% \subsection{Font selection}
-% \begin{macro}{\fontspec}
+%
+% \begin{macro}{\@@_main_fontspec:nn}
% This is the main command of the package that
% selects fonts with various features. It takes two arguments: the
% font name and the optional requested features of that
-% font. Then this new font family is selected.
+% font.
% \begin{macrocode}
\cs_new:Nn \@@_main_fontspec:nn
- {
- \fontspec_set_family:Nnn \f@family {#1} {#2}
- \fontencoding { \l_@@_nfss_enc_tl }
- \selectfont
- \ignorespaces
- }
+ {
+ \fontspec_set_family:Nnn \f@family {#1} {#2}
+ \fontencoding { \g_@@_nfss_enc_tl }
+ \selectfont
+ }
% \end{macrocode}
% \end{macro}
%
@@ -36,22 +36,23 @@
% used in the document, the change registers immediately.
% \begin{macrocode}
\cs_new:Nn \@@_main_setmainfont:nn
- {
- \fontspec_set_family:Nnn \g_@@_rmfamily_family {#1} {#2}
- \tl_set_eq:NN \rmdefault \g_@@_rmfamily_family
- \use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
- {
- \exp_not:N \fontencoding { \l_@@_nfss_enc_tl }
- \exp_not:N \fontfamily { \g_@@_rmfamily_family }
- \exp_not:N \selectfont
- }
+ {
+ \fontspec_set_family:Nnn \l_@@_rmfamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \rmdefault \l_@@_rmfamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \rmfamily }
+ {
+ \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l_@@_rmfamily_family_tl }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\rmdefault}
+ { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
+ \@@_setmainfont_hook:nn {#1} {#2}
+ \normalfont
}
- \str_if_eq_x:nnT {\familydefault} {\rmdefault}
- { \tl_set_eq:NN \encodingdefault \l_@@_nfss_enc_tl }
- \@@_setmainfont_hook:nn {#1} {#2}
- \normalfont
- \ignorespaces
- }
% \end{macrocode}
% \end{macro}
%
@@ -59,22 +60,23 @@
% Same as above.
% \begin{macrocode}
\cs_new:Nn \@@_main_setsansfont:nn
- {
- \fontspec_set_family:Nnn \g_@@_sffamily_family {#1} {#2}
- \tl_set_eq:NN \sfdefault \g_@@_sffamily_family
- \use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
- {
- \exp_not:N \fontencoding { \l_@@_nfss_enc_tl }
- \exp_not:N \fontfamily { \g_@@_sffamily_family }
- \exp_not:N \selectfont
- }
+ {
+ \fontspec_set_family:Nnn \l_@@_sffamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \sfdefault \l_@@_sffamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \sffamily }
+ {
+ \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l_@@_sffamily_family_tl }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\sfdefault}
+ { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
+ \@@_setsansfont_hook:nn {#1} {#2}
+ \normalfont
}
- \str_if_eq_x:nnT {\familydefault} {\sfdefault}
- { \tl_set_eq:NN \encodingdefault \l_@@_nfss_enc_tl }
- \@@_setsansfont_hook:nn {#1} {#2}
- \normalfont
- \ignorespaces
- }
% \end{macrocode}
% \end{macro}
%
@@ -82,22 +84,23 @@
% Same as above.
% \begin{macrocode}
\cs_new:Nn \@@_main_setmonofont:nn
- {
- \fontspec_set_family:Nnn \g_@@_ttfamily_family {#1} {#2}
- \tl_set_eq:NN \ttdefault \g_@@_ttfamily_family
- \use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
- {
- \exp_not:N \fontencoding { \l_@@_nfss_enc_tl }
- \exp_not:N \fontfamily { \g_@@_ttfamily_family }
- \exp_not:N \selectfont
- }
+ {
+ \fontspec_set_family:Nnn \l_@@_ttfamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \ttdefault \l_@@_ttfamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \ttfamily }
+ {
+ \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l_@@_ttfamily_family_tl }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\ttdefault}
+ { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
+ \@@_setmonofont_hook:nn {#1} {#2}
+ \normalfont
}
- \str_if_eq_x:nnT {\familydefault} {\ttdefault}
- { \tl_set_eq:NN \encodingdefault \l_@@_nfss_enc_tl }
- \@@_setmonofont_hook:nn {#1} {#2}
- \normalfont
- \ignorespaces
- }
% \end{macrocode}
% \end{macro}
%
@@ -113,8 +116,8 @@
% \begin{macrocode}
\cs_new:Nn \@@_main_setmathrm:nn
{
-%<XE> \fontspec_set_family:Nnn \g_@@_mathrm_tl {#1} {#2}
-%<LU> \fontspec_set_family:Nnn \g_@@_mathrm_tl {Renderer=Basic,#1} {#2}
+%<XE> \fontspec_set_family:Nnn \g_@@_mathrm_tl {#1} {#2}
+%<LU> \fontspec_set_family:Nnn \g_@@_mathrm_tl {Renderer=Basic,#1} {#2}
\@@_setmathrm_hook:nn {#1} {#2}
}
% \end{macrocode}
@@ -124,8 +127,8 @@
% \begin{macrocode}
\cs_new:Nn \@@_main_setboldmathrm:nn
{
-%<XE> \fontspec_set_family:Nnn \g_@@_bfmathrm_tl {#1} {#2}
-%<LU> \fontspec_set_family:Nnn \g_@@_bfmathrm_tl {Renderer=Basic,#1} {#2}
+%<XE> \fontspec_set_family:Nnn \g_@@_bfmathrm_tl {#1} {#2}
+%<LU> \fontspec_set_family:Nnn \g_@@_bfmathrm_tl {Renderer=Basic,#1} {#2}
\@@_setboldmathrm_hook:nn {#1} {#2}
}
% \end{macrocode}
@@ -135,8 +138,8 @@
% \begin{macrocode}
\cs_new:Nn \@@_main_setmathsf:nn
{
-%<XE> \fontspec_set_family:Nnn \g_@@_mathsf_tl {#1} {#2}
-%<LU> \fontspec_set_family:Nnn \g_@@_mathsf_tl {Renderer=Basic,#1} {#2}
+%<XE> \fontspec_set_family:Nnn \g_@@_mathsf_tl {#1} {#2}
+%<LU> \fontspec_set_family:Nnn \g_@@_mathsf_tl {Renderer=Basic,#1} {#2}
\@@_setmathsf_hook:nn {#1} {#2}
}
% \end{macrocode}
@@ -146,8 +149,8 @@
% \begin{macrocode}
\cs_new:Nn \@@_main_setmathtt:nn
{
-%<XE> \fontspec_set_family:Nnn \g_@@_mathtt_tl {#1} {#2}
-%<LU> \fontspec_set_family:Nnn \g_@@_mathtt_tl {Renderer=Basic,#1} {#2}
+%<XE> \fontspec_set_family:Nnn \g_@@_mathtt_tl {#1} {#2}
+%<LU> \fontspec_set_family:Nnn \g_@@_mathtt_tl {Renderer=Basic,#1} {#2}
\@@_setmathtt_hook:nn {#1} {#2}
}
% \end{macrocode}
@@ -175,101 +178,82 @@
% If the commands above are not executed, then \cmd\rmdefault\ (\etc)
% will be used.
% \begin{macrocode}
-\tl_set:Nn \g_@@_mathrm_tl {\rmdefault}
-\tl_set:Nn \g_@@_mathsf_tl {\sfdefault}
-\tl_set:Nn \g_@@_mathtt_tl {\ttdefault}
+\tl_gset:Nn \g_@@_mathrm_tl {\rmdefault}
+\tl_gset:Nn \g_@@_mathsf_tl {\sfdefault}
+\tl_gset:Nn \g_@@_mathtt_tl {\ttdefault}
% \end{macrocode}
%
-% \begin{macro}{\newfontfamily}
-% This macro takes the arguments of \cs{fontspec} with a prepended
-% \meta{instance cmd}. This command is used
-% when a specific font instance needs to be referred to repetitively
-% (\eg, in a section heading) since continuously calling
-% \cs{fontspec_select:nn} is inefficient because it must parse the
-% option arguments every time.
-%
-% \cs{fontspec_select:nn} defines a font family and saves its name in
-% \cs{l_fontspec_family_tl}. This family is then used in a typical NFSS \cmd\fontfamily\
-% declaration, saved in the macro name specified.
+% \begin{macro}{\@@_main_newfontfamily:nnnN}
+% The inner fontspec workings define a font family, which is then used in a typical
+% NFSS \cmd\fontfamily\ declaration, saved in the macro name specified.
+% The fourth argument determines which xparse function to set the macro with (new/renew/etc).
% \begin{macrocode}
-\cs_new:Nn \@@_main_newfontfamily:nnn
- {
- \fontspec_set_family:cnn { g_@@_ \cs_to_str:N #1 _family } {#2} {#3}
- \use:x
- {
- \exp_not:N \DeclareRobustCommand \exp_not:N #1
- {
- \exp_not:N \fontfamily { \use:c {g_@@_ \cs_to_str:N #1 _family} }
- \exp_not:N \fontencoding { \l_@@_nfss_enc_tl }
- \exp_not:N \selectfont
- }
- }
- }
+\cs_new:Nn \@@_main_newfontfamily:nnnN
+ {
+ \fontspec_set_family:cnn { l_@@_ \cs_to_str:N #1 _family_tl } {#2} {#3}
+ \use:x
+ {
+ \exp_not:N #4 \exp_not:N #1 {}
+ {
+ \exp_not:N \fontfamily { \use:c { l_@@_ \cs_to_str:N #1 _family_tl } }
+ \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
+ \exp_not:N \selectfont
+ }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\newfontface}
+% \begin{macro}{\@@_main_newfontface:nnn}
% \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}
\cs_new:Nn \@@_main_newfontface:nnn
- {
- \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
- }
+ {
+ \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
+ }
% \end{macrocode}
% \end{macro}
%
% \subsection{Font feature selection}
%
-% \begin{macro}{\defaultfontfeatures}
-% This macro takes one argument that consists of all of feature
-% options that will be applied by default to all subsequent
-% \cs{fontspec}, et al., commands. It stores its value in
-% \cs{g_fontspec_default_fontopts_tl} (initialised empty), which is
-% concatenated with the individual macro choices in the
-% [...] macro.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_defaultfontfeatures:nnn
- {
- \IfNoValueTF {#2}
- { \@@_set_default_features:nn {#1} {#3} }
- { \@@_set_font_default_features:nnn {#1} {#2} {#3} }
- \ignorespaces
- }
-% \end{macrocode}
-%
+% \begin{macro}{\@@_set_default_features:nn}
% \begin{macrocode}
\cs_new:Nn \@@_set_default_features:nn
{
- \IfBooleanTF {#1} \clist_put_right:Nn \clist_set:Nn
+ \IfBooleanTF {#1} \clist_gput_right:Nn \clist_gset:Nn
\g_@@_default_fontopts_clist {#2}
}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_font_default_features:nnn}
% The optional argument |#2| specifies font identifier(s).
% Branch for either (a)~single token input such as \verb|\rmdefault|, or (b)~otherwise assume its a fontname.
% In that case, strip spaces and file extensions and lower-case to ensure consistency.
% \begin{macrocode}
\cs_new:Nn \@@_set_font_default_features:nnn
- {
- \clist_map_inline:nn {#2}
- {
- \tl_if_single:nTF {##1}
- { \tl_set:No \l_@@_tmp_tl { \cs:w g_@@_ \cs_to_str:N ##1 _family\cs_end: } }
- { \@@_sanitise_fontname:Nn \l_@@_tmp_tl {##1} }
+ {
+%<debug> \typeout{\unexpanded{_set_font_default_features:nnn:{#1}{#2}{#3}}}
+ \clist_map_inline:nn {#2}
+ {
+ \tl_if_single:nTF {##1}
+ { \tl_set:No \l_@@_tmp_tl { \cs:w l_@@_ \cs_to_str:N ##1 _family_tl\cs_end: } }
+ { \@@_sanitise_fontname:Nn \l_@@_tmp_tl {##1} }
- \IfBooleanTF {#1}
- {
- \prop_get:NVNF \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
- { \tl_clear:N \l_@@_tmpb_tl }
- \tl_put_right:Nn \l_@@_tmpb_tl {#3,}
- \prop_gput:NVV \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
- }
- {
- \tl_if_empty:nTF {#3}
- { \prop_gremove:NV \g_@@_fontopts_prop \l_@@_tmp_tl }
- { \prop_put:NVn \g_@@_fontopts_prop \l_@@_tmp_tl {#3,} }
- }
- }
- }
+ \IfBooleanTF {#1}
+ {
+ \prop_get:NVNF \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
+ { \tl_clear:N \l_@@_tmpb_tl }
+ \tl_put_right:Nn \l_@@_tmpb_tl {#3,}
+ \prop_gput:NVV \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
+ }
+ {
+ \tl_if_empty:nTF {#3}
+ { \prop_gremove:NV \g_@@_fontopts_prop \l_@@_tmp_tl }
+ { \prop_gput:NVn \g_@@_fontopts_prop \l_@@_tmp_tl {#3,} }
+ }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -296,29 +280,29 @@
% often typed this instead when adding only a single font feature.
% \begin{macrocode}
\cs_new:Nn \@@_main_addfontfeatures:n
- {
-%<debug> \typeout{^^J::::::::::::::::::::::::::::::::::^^J: addfontfeatures}
- \fontspec_if_fontspec_font:TF
- {
- \group_begin:
- \keys_set_known:nnN {fontspec-addfeatures} {#1} \l_@@_tmp_tl
- \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {options} \l_@@_options_tl
- \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {fontname} \l_@@_fontname_tl
- \bool_set_true:N \l_@@_disable_defaults_bool
-%<debug> \typeout{ \@@_select_font_family:nn { \l_@@_options_tl , #1 } {\l_@@_fontname_tl} }
- \use:x
- {
- \@@_select_font_family:nn
- { \l_@@_options_tl , #1 } {\l_@@_fontname_tl}
- }
- \group_end:
- \fontfamily\l_fontspec_family_tl\selectfont
- }
- {
- \@@_warning:nx {addfontfeatures-ignored} {#1}
- }
- \ignorespaces
- }
+ {
+%<debug> \typeout{^^J::::::::::::::::::::::::::::::::::^^J: addfontfeatures}
+ \fontspec_if_fontspec_font:TF
+ {
+ \group_begin:
+ \keys_set_known:nnN {fontspec-addfeatures} {#1} \l_@@_tmp_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {options} \l_@@_options_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {fontname} \l_@@_fontname_tl
+ \bool_set_true:N \l_@@_disable_defaults_bool
+%<debug> \typeout{ \@@_select_font_family:nn { \l_@@_options_tl , #1 } {\l_@@_fontname_tl} }
+ \use:x
+ {
+ \@@_select_font_family:nn
+ { \l_@@_options_tl , #1 } {\l_@@_fontname_tl}
+ }
+ \group_end:
+ \fontfamily \g_@@_nfss_family_tl \selectfont
+ }
+ {
+ \@@_warning:nx {addfontfeatures-ignored} {#1}
+ }
+ \ignorespaces
+ }
% \end{macrocode}
% \end{macro}
%
@@ -330,15 +314,12 @@
% select the font feature.
% \begin{macrocode}
\cs_new:Nn \@@_main_newfontfeature:nn
- {
- \keys_define:nn { fontspec }
- {
- #1 .code:n =
- {
- \@@_update_featstr:n {#2}
- }
- }
- }
+ {
+ \keys_define:nn { fontspec }
+ {
+ #1 .code:n = { \@@_update_featstr:n {#2} }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -349,15 +330,15 @@
% font it's being used for.
% \begin{macrocode}
\cs_new:Nn \@@_main_newAATfeature:nnnn
- {
- \keys_if_exist:nnF { fontspec } {#1}
- { \@@_define_aat_feature_group:n {#1} }
+ {
+ \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} }
+ \keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
+ { \@@_warning:nxx {feature-option-overwrite} {#1} {#2} }
- \@@_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
- }
+ \@@_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
+ }
% \end{macrocode}
% \end{macro}
%
@@ -367,16 +348,16 @@
% font it's being used for.
% \begin{macrocode}
\cs_new:Nn \@@_main_newopentypefeature:nnn
- {
- \keys_if_exist:nnF { fontspec / options } {#1}
- { \@@_define_opentype_feature_group:n {#1} }
+ {
+ \keys_if_exist:nnF { fontspec / options } {#1}
+ { \@@_define_opentype_feature_group:n {#1} }
- \keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
- { \@@_warning:nxx {feature-option-overwrite} {#1} {#2} }
+ \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}
@@ -394,77 +375,75 @@
% User commands for renaming font features and font feature options.
% \begin{macrocode}
\cs_new:Nn \@@_main_aliasfontfeature:nn
- {
+ {
%<debug> \typeout{::::::::::::::::::::^^J:: aliasfontfeature{#1}{#2}}
- \bool_set_false:N \l_@@_alias_bool
+ \bool_set_false:N \l_@@_alias_bool
- \clist_map_inline:Nn \g_@@_all_keyval_modules_clist
- {
- \keys_if_exist:nnT {##1} {#1}
+ \clist_map_inline:Nn \g_@@_all_keyval_modules_clist
{
+ \keys_if_exist:nnT {##1} {#1}
+ {
%<debug> \typeout{:::: Key~exists~##1~/~#1}
- \bool_set_true:N \l_@@_alias_bool
- \keys_define:nn {##1}
- { #2 .code:n = { \keys_set:nn {##1} { #1 = {####1} } } }
+ \bool_set_true:N \l_@@_alias_bool
+ \keys_define:nn {##1}
+ { #2 .code:n = { \keys_set:nn {##1} { #1 = {####1} } } }
+ }
}
- }
- \bool_if:NF \l_@@_alias_bool
- { \@@_warning:nx {rename-feature-not-exist} {#1} }
- }
+ \bool_if:NF \l_@@_alias_bool
+ { \@@_warning:nx {rename-feature-not-exist} {#1} }
+ }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\aliasfontfeatureoption}
% \begin{macrocode}
\cs_new:Nn \@@_main_aliasfontfeatureoption:nnn
- {
- \bool_set_false:N \l_@@_alias_bool
+ {
+ \bool_set_false:N \l_@@_alias_bool
- \clist_map_inline:Nn \g_@@_all_keyval_modules_clist
- {
- \keys_if_exist:nnT { ##1 / #1 } {#2}
+ \clist_map_inline:Nn \g_@@_all_keyval_modules_clist
{
+ \keys_if_exist:nnT { ##1 / #1 } {#2}
+ {
%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2}
- \bool_set_true:N \l_@@_alias_bool
- \keys_define:nn { ##1 / #1 }
- { #3 .code:n = { \keys_set:nn {##1} { #1 = {#2} } } }
- }
+ \bool_set_true:N \l_@@_alias_bool
+ \keys_define:nn { ##1 / #1 }
+ { #3 .code:n = { \keys_set:nn {##1} { #1 = {#2} } } }
+ }
- \keys_if_exist:nnT { ##1 / #1 } {#2Reset}
- {
+ \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_define:nn { ##1 / #1 }
+ { #3Reset .code:n = { \keys_set:nn {##1} { #1 = {#2Reset} } } }
+ }
- \keys_if_exist:nnT { ##1 / #1 } {#2Off}
- {
+ \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} } } }
- }
- }
+ \keys_define:nn { ##1 / #1 }
+ { #3Off .code:n = { \keys_set:nn {##1} { #1 = {#2Off} } } }
+ }
+ }
- \bool_if:NF \l_@@_alias_bool
- { \@@_warning:nx {rename-feature-not-exist} {#1/#2} }
- }
+ \bool_if:NF \l_@@_alias_bool
+ { \@@_warning:nx {rename-feature-not-exist} {#1/#2} }
+ }
% \end{macrocode}
% \end{macro}
%
%
-% \begin{macro}{\DeclareFontsExtensions}
-% \texttt{dfont} would never be uppercase, right?
+% \begin{macro}{\@@_main_DeclareFontExtensions:n}
% \begin{macrocode}
-\cs_new:Nn \@@_main_DeclareFontsExtensions:n
- {
- \clist_set:Nn \l_@@_extensions_clist { #1 }
- \tl_remove_all:Nn \l_@@_extensions_clist {~}
- }
+\cs_new:Nn \@@_main_DeclareFontExtensions:n
+ {
+ \clist_set:Nn \l_@@_extensions_clist { #1 }
+ }
% \end{macrocode}
-%
+% Defaults:
% \begin{macrocode}
-\DeclareFontsExtensions{.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
+\@@_main_DeclareFontExtensions:n {.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
% \end{macrocode}
% \end{macro}
%
@@ -473,8 +452,8 @@
% \begin{macrocode}
\cs_new:Nn \@@_main_IfFontFeatureActiveTF:nnn
{
-%<debug> \typeout{^^J:::::::::::::::::::::::::::::::::::::::::::::::}
-%<debug> \typeout{:IfFontFeatureActiveTF \exp_not:n{{#1}{#2}{#3}}}
+%<debug> \typeout{^^J:::::::::::::::::::::::::::::::::::::::::::::::}
+%<debug> \typeout{:IfFontFeatureActiveTF \exp_not:n{{#1}{#2}{#3}}}
\@@_if_font_feature:nTF {#1} {#2} {#3}
}
% \end{macrocode}
@@ -490,11 +469,11 @@
\bool_set_true:N \l_@@_never_check_bool
\bool_set_false:N \l_@@_firsttime_bool
\clist_clear:N \l_@@_fontfeat_clist
- \@@_get_features:Nn \l_@@_rawfeatures_sclist {#1}
+ \@@_get_features:n {#1}
\group_end:
-%<debug> \typeout{:::> \exp_not:N\l_@@_rawfeatures_sclist->~{\l_@@_rawfeatures_sclist}}
-%<debug> \typeout{:::> \exp_not:N\g_@@_single_feat_tl->~{\g_@@_single_feat_tl}}
+%<debug> \typeout{:::> \exp_not:N\g_@@_rawfeatures_sclist->~{\g_@@_rawfeatures_sclist}}
+%<debug> \typeout{:::> \exp_not:N\g_@@_single_feat_tl->~{\g_@@_single_feat_tl}}
\tl_if_empty:NTF \g_@@_single_feat_tl { \prg_return_false: }
{
@@ -518,7 +497,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
index f388fb8738c..d694a698a0a 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
@@ -13,7 +13,7 @@
% In time I would like to move these initialisations
%
% \paragraph{Booleans}
-%
+%
% \begin{macro}{\l_@@_firsttime_bool}
% As \cs{keys_set:nn} is run multiple times, some of its
% information storing only occurs once while we decide if the font family
@@ -63,6 +63,8 @@
\bool_new:N \l_@@_defining_encoding_bool
\bool_new:N \l_@@_script_exist_bool
\bool_new:N \g_@@_em_normalise_slant_bool
+\bool_new:N \l_@@_proceed_bool
+\bool_new:N \l_@@_check_feat_bool
% \end{macrocode}
%
% \paragraph{Counters}
@@ -110,16 +112,18 @@
\clist_new:N \l_@@_sizing_leftover_clist
\clist_new:N \l_@@_fontfeat_clist
\clist_new:N \l_@@_fontfeat_curr_clist
+\clist_new:N \l_@@_arg_clist
+\clist_new:N \l_@@_this_feat_clist
% \end{macrocode}
%
% \begin{macrocode}
-\tl_new:N \l_@@_fontfeat_up_clist
-\tl_new:N \l_@@_fontfeat_bf_clist
-\tl_new:N \l_@@_fontfeat_it_clist
-\tl_new:N \l_@@_fontfeat_bfit_clist
-\tl_new:N \l_@@_fontfeat_sl_clist
-\tl_new:N \l_@@_fontfeat_bfsl_clist
-\tl_new:N \l_@@_fontfeat_sc_clist
+\clist_new:N \l_@@_fontfeat_up_clist
+\clist_new:N \l_@@_fontfeat_bf_clist
+\clist_new:N \l_@@_fontfeat_it_clist
+\clist_new:N \l_@@_fontfeat_bfit_clist
+\clist_new:N \l_@@_fontfeat_sl_clist
+\clist_new:N \l_@@_fontfeat_bfsl_clist
+\clist_new:N \l_@@_fontfeat_sc_clist
% \end{macrocode}
%
% \paragraph{Property lists}
@@ -131,6 +135,8 @@
\prop_new:N \g_@@_all_opentype_feature_names_prop
\prop_new:N \g_@@_em_prop
\prop_new:N \g_@@_strong_prop
+\prop_new:N \g_@@_fontid_family_prop
+\prop_new:N \g_@@_family_int_prop
% \end{macrocode}
%
% \paragraph{Token lists}
@@ -139,7 +145,6 @@
\tl_new:N \g_fontspec_encoding_tl
\tl_new:N \l_fontspec_renderer_tl
\tl_new:N \l_fontspec_fontname_tl
-\tl_new:N \l_fontspec_defined_shapes_tl
% \end{macrocode}
%
% \begin{macrocode}
@@ -149,29 +154,34 @@
% \end{macrocode}
%
% \begin{macrocode}
+\tl_new:N \l_fontspec_mode_tl
+\tl_new:N \g_@@_curr_series_tl
+\tl_new:N \g_@@_defined_shapes_tl
+\tl_new:N \g_@@_nfss_enc_tl
+\tl_new:N \g_@@_nfss_family_tl
\tl_new:N \g_@@_single_feat_tl
-\tl_new:N \l_@@_tmp_tl
-\tl_new:N \l_@@_size_tl
-\tl_new:N \l_@@_sizedfont_tl
-\tl_new:N \l_@@_nfss_tl
-\tl_new:N \l_@@_nfss_sc_tl
-\tl_new:N \l_@@_this_font_tl
-\tl_new:N \l_@@_scale_tl
-\tl_new:N \l_@@_opacity_tl
-\tl_new:N \l_@@_hexcol_tl
-\tl_new:N \l_@@_fontid_tl
-\tl_new:N \l_@@_extension_tl
-\tl_new:N \l_@@_ext_filename_tl
-\tl_new:N \l_@@_font_path_tl
\tl_new:N \l_@@_basename_tl
\tl_new:N \l_@@_curr_fontname_tl
-\tl_new:N \l_@@_saved_fontname_tl
+\tl_new:N \l_@@_curr_bfname_tl
+\tl_new:N \l_@@_ext_filename_tl
+\tl_new:N \l_@@_extension_tl
+\tl_new:N \l_@@_font_path_tl
+\tl_new:N \l_@@_fontid_tl
+\tl_new:N \l_@@_fontname_tl
+\tl_new:N \l_@@_hexcol_tl
+\tl_new:N \l_@@_nfss_sc_tl
+\tl_new:N \l_@@_nfss_tl
+\tl_new:N \l_@@_nfss_fam_tl
+\tl_new:N \l_@@_opacity_tl
\tl_new:N \l_@@_optical_size_tl
-\tl_new:N \l_@@_ttc_index_tl
-\tl_new:N \l_@@_nfss_enc_tl
-\tl_new:N \g_@@_curr_series_tl
\tl_new:N \l_@@_options_tl
-\tl_new:N \l_@@_fontname_tl
+\tl_new:N \l_@@_saved_fontname_tl
+\tl_new:N \l_@@_scale_tl
+\tl_new:N \l_@@_size_tl
+\tl_new:N \l_@@_sizedfont_tl
+\tl_new:N \l_@@_this_font_tl
+\tl_new:N \l_@@_tmp_tl
+\tl_new:N \l_@@_ttc_index_tl
% \end{macrocode}
%
% \begin{macrocode}
@@ -181,6 +191,13 @@
\tl_new:N \g_@@_mathtt_tl
% \end{macrocode}
%
+% Defaults:
+% \begin{macrocode}
+\tl_gset:Nn \g_@@_mathrm_tl {\rmdefault}
+\tl_gset:Nn \g_@@_mathsf_tl {\sfdefault}
+\tl_gset:Nn \g_@@_mathtt_tl {\ttdefault}
+% \end{macrocode}
+%
% \begin{macrocode}
\tl_new:N \l_@@_family_label_tl
\tl_new:N \l_@@_fake_slant_tl
@@ -206,30 +223,30 @@
%
% \begin{macrocode}
\tl_new:N \l_@@_mapping_tl
-\tl_new:N \g_@@_hexcol_tl
-\tl_new:N \g_@@_opacity_tl
-\tl_set:Nn \g_@@_hexcol_tl {000000}
-\tl_set:Nn \g_@@_opacity_tl {FF~}
\tl_new:N \l_@@_punctspace_adjust_tl
\tl_new:N \l_@@_wordspace_adjust_tl
\tl_new:N \l_@@_postadjust_tl
-\tl_new:N \g_@@_postadjust_tl
-\tl_set:Nn \g_@@_postadjust_tl { \l_@@_wordspace_adjust_tl \l_@@_punctspace_adjust_tl }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_const:Nn \c_@@_hexcol_tl {000000}
+\tl_const:Nn \c_@@_opacity_tl {FF~}
+\tl_const:Nn \c_@@_postadjust_tl { \l_@@_wordspace_adjust_tl \l_@@_punctspace_adjust_tl }
% \end{macrocode}
%
% \paragraph{Semi-colon-lists}
% Not a real data structure but sensible to name accordingly.
% \begin{macrocode}
-\tl_new:N \l_@@_rawfeatures_sclist
+\tl_new:N \g_@@_rawfeatures_sclist
\tl_new:N \l_@@_pre_feat_sclist
% \end{macrocode}
%
% \paragraph{Font families}
% Again not a real data structure, and also probably poorly named.
% \begin{macrocode}
-\tl_new:N \g_@@_rmfamily_family
-\tl_new:N \g_@@_sffamily_family
-\tl_new:N \g_@@_ttfamily_family
+\tl_new:N \l_@@_rmfamily_family_tl
+\tl_new:N \l_@@_sffamily_family_tl
+\tl_new:N \l_@@_ttfamily_family_tl
% \end{macrocode}
%
%
@@ -247,7 +264,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx
index 7886ae528db..9361eb81e5d 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx
@@ -106,15 +106,15 @@
% \begin{macrocode}
\cs_new_protected:Npn \emfontdeclare #1
{
- \prop_clear:N \g_@@_em_prop
- \int_zero:N \l_@@_emdef_int
- \bool_set_true:N \g_@@_em_normalise_slant_bool
+ \prop_gclear:N \g_@@_em_prop
+ \int_zero:N \l_@@_emdef_int
+ \bool_gset_true:N \g_@@_em_normalise_slant_bool
\tl_if_in:nnT {#1} {\slshape}
{
\tl_if_in:nnT {#1} {\itshape}
{
- \bool_set_false:N \g_@@_em_normalise_slant_bool
+ \bool_gset_false:N \g_@@_em_normalise_slant_bool
}
}
@@ -187,7 +187,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \strongfontdeclare #1
{
- \prop_clear:N \g_@@_strong_prop
+ \prop_gclear:N \g_@@_strong_prop
\int_zero:N \l_@@_strongdef_int
\group_begin:
@@ -274,7 +274,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
index 84abbe7aae2..e3a55b61afb 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -1,4 +1,5 @@
%%^^A%% fontspec.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% Metadata for the package, including files and versioning
% \section{Package declaration}
%
@@ -32,7 +33,7 @@
}
%</dtx>
% \end{macrocode}
-%
+%
% Now exit if we're using plain \TeX; this would usually be the case when
% loading this file with \texttt{fontspec.ins}.
% \begin{macrocode}
@@ -41,7 +42,7 @@
\ifx\tmpa\fmtname\expandafter\endinput\fi
%</dtx>
% \end{macrocode}
-%
+%
% Metadata for documentation; the official title and authors of the package.
% \begin{macrocode}
%<*dtx>
@@ -57,7 +58,7 @@
}
%</dtx>
% \end{macrocode}
-%
+%
% Declare the package version and date for each of the \texttt{.sty} files generated.
% In addition, declare the version and date for this \texttt{.dtx} file.
% \begin{macrocode}
@@ -70,10 +71,10 @@
\ProvidesExplFile{fontspec.dtx}
%</dtx>
%<*fontspec>
- {2017/11/09}{2.6g}{Font selection for XeLaTeX and LuaLaTeX}
+ {2018/07/29}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
%</fontspec>
% \end{macrocode}
-%
+%
% Here the version and date are setup for typesetting the documentation.
% \begin{macrocode}
%<*dtx>
@@ -81,7 +82,7 @@
\date{\filedate \qquad \fileversion}
%</dtx>
% \end{macrocode}
-%
+%
% \subsection{\textsf{Lua} header}
%
% \begin{macrocode}
@@ -104,7 +105,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.ins b/Master/texmf-dist/source/latex/fontspec/fontspec.ins
index 9952c8729db..e3164f1944e 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.ins
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.ins
@@ -48,7 +48,7 @@ the conditions of the LaTeX Project Public License, version 1.3c or higher
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.ltx b/Master/texmf-dist/source/latex/fontspec/fontspec.ltx
index 7214efd4ca6..74472eedf18 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.ltx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.ltx
@@ -28,7 +28,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright