summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-05 22:03:43 +0000
committerKarl Berry <karl@freefriends.org>2017-11-05 22:03:43 +0000
commitfadf897731beed45903c8aa6dd643dafd0e33da5 (patch)
tree4893f081b85951f4336152d0ee039ce167342aea
parent96df06aed2adaad19e3e14d6665b2ffc507a2b9c (diff)
fontspec (5nov17)
git-svn-id: svn://tug.org/texlive/trunk@45697 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/CHANGES.md9
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec-code.ltx44
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdfbin0 -> 589280 bytes
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex2
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec.ltx47
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec.pdfbin911152 -> 686287 bytes
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx86
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx17
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx47
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx44
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex22
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex26
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex20
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex18
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex21
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex19
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex33
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-style.sty48
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex68
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc.tex40
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx35
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-example.tex48
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx17
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx26
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx16
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx36
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx18
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx90
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx37
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx17
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx16
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx17
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx17
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx77
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx97
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx18
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx17
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx22
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx163
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx18
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx133
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.ins53
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.ltx47
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty405
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty414
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.cfg1
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua33
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty32
48 files changed, 1770 insertions, 761 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/CHANGES.md b/Master/texmf-dist/doc/latex/fontspec/CHANGES.md
index 3d63ff45475..8870ac5b9b1 100644
--- a/Master/texmf-dist/doc/latex/fontspec/CHANGES.md
+++ b/Master/texmf-dist/doc/latex/fontspec/CHANGES.md
@@ -2,6 +2,15 @@
Change history
==============
+- v2.6f (2017-11-05)
+
+ * Fix loading of Graphite fonts and add a little documentation (a better interface is needed, though)
+ * Correct and simplify some internal code that fixes a bug in the way some fonts are displayed in `\tracingoutput` mode.
+ * This also fixes an obscure bug using the API in which a query for a selected font feature
+ would test against the upright font in the current family regardless of the face/shape actually in use.
+ * This package now complies with the `expl3` option `check-declarations`.
+
+
- v2.6e (2017/09/22)
* Re-enable use of `HyphenChar=None` in LuaLaTeX. (Hyphenation and font choice are
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec-code.ltx b/Master/texmf-dist/doc/latex/fontspec/fontspec-code.ltx
new file mode 100644
index 00000000000..5b1e400de1b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec-code.ltx
@@ -0,0 +1,44 @@
+%%^^A%% fontspec-code.ltx -- part of FONTSPEC <wspr.io/fontspec>
+
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\begin{document}
+
+\GetFileInfo{fontspec.dtx}
+\title{The \textsf{fontspec} package\\Font selection for \XeLaTeX\ and \LuaLaTeX}
+\author{
+ \textsc{Will Robertson} and \textsc{Khaled Hosny}\\
+ \url{http://wspr.io/fontspec/}
+}
+\date{\filedate \qquad \fileversion}
+
+\maketitle
+\tableofcontents
+\newpage
+
+\def\DTX#1{\DocInput{#1}}
+\FONTSPECDTX
+
+\clearpage
+\PrintChanges
+
+\clearpage
+\setcounter{IndexColumns}{2}
+\PrintIndex
+
+\end{document}
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf
new file mode 100644
index 00000000000..529af944e11
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex b/Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex
index 9138c3a6f74..bf2831b134b 100644
--- a/Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec-example.tex
@@ -1,4 +1,4 @@
-
+%%^^A%% fontspec-example.tex -- part of FONTSPEC <wspr.io/fontspec>
\documentclass{article}
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.ltx b/Master/texmf-dist/doc/latex/fontspec/fontspec.ltx
new file mode 100644
index 00000000000..c1eeeecdc9b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec.ltx
@@ -0,0 +1,47 @@
+%%^^A%% fontspec.ltx -- part of FONTSPEC <wspr.io/fontspec>
+
+\ifdefined \XeTeXOTcountscripts \else \makeatletter
+ \@latex@error{^^J*** The fontspec documentation can only be typeset with `xelatex` ***\@gobble}\@ehc
+\fi
+
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\begin{document}
+
+\GetFileInfo{fontspec.dtx}
+\title{The \textsf{fontspec} package\\Font selection for \XeLaTeX\ and \LuaLaTeX}
+\author{
+ \textsc{Will Robertson} and \textsc{Khaled Hosny}\\
+ \url{http://wspr.io/fontspec/}
+}
+\date{\filedate \qquad \fileversion}
+
+\maketitle
+\tableofcontents
+\newpage
+
+\include{fontspec-doc-intro}
+\include{fontspec-doc-fontsel}
+\include{fontspec-doc-featset}
+\include{fontspec-doc-opentype}
+\include{fontspec-doc-enc}
+\include{fontspec-doc-luatex}
+\include{fontspec-doc-xetex}
+\include{fontspec-doc-api}
+
+\end{document}
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
index dbaa1f5660c..d9cbbffc32f 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-api.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
index d28517a09c9..13a92d193ad 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
% \section{Programmer's interface}
%
@@ -27,7 +28,7 @@
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
- \cs_if_exist:cTF {g_@@_ \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}
@@ -41,11 +42,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_atsui_bool
{
- \@@_make_AAT_feature_string:nnTF {#1}{#2}
+ \@@_make_AAT_feature_string:NnnTF \font {#1} {#2}
\prg_return_true: \prg_return_false:
}
{
@@ -68,9 +68,7 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
- \@@_set_font_type:
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool \prg_return_true: \prg_return_false:
}
{
@@ -90,21 +88,19 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
- \@@_set_font_type:
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool
{
- \prop_get:cnN {g_@@_ \f@family _prop} {script-num} \l_@@_tmp_tl
+ \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_@@_ \f@family _prop} {lang-num} \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_@@_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \prop_get:cnN {g_@@_ \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:nTF {#1} {\prg_return_true:} {\prg_return_false:}
+ \@@_check_ot_feat:NnTF \font {#1} {\prg_return_true:} {\prg_return_false:}
}
{
\prg_return_false:
@@ -128,14 +124,12 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
- \@@_set_font_type:
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool
{
\@@_iv_str_to_num:Nn \l_@@_script_int {#1}
\@@_iv_str_to_num:Nn \l_@@_language_int {#2}
- \@@_check_ot_feat:nTF {#3} \prg_return_true: \prg_return_false:
+ \@@_check_ot_feat:NnTF \font {#3} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -154,12 +148,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
- \@@_set_font_type:
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool
{
- \@@_check_script:nTF {#1} \prg_return_true: \prg_return_false:
+ \@@_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -178,16 +170,14 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
- \@@_set_font_type:
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool
{
- \prop_get:cnN {g_@@_ \f@family _prop} {script-num} \l_@@_tmp_tl
- \int_set:Nn \l_@@_script_int {\l_@@_tmp_tl}
- \prop_get:cnN {g_@@_ \f@family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {script-num} \l_@@_tmpf_tl
+ \int_set:Nn \l_@@_script_int {\l_@@_tmpf_tl}
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \@@_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
+ \@@_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -206,14 +196,12 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
- \@@_set_font_type:
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool
{
\tl_set:Nn \l_fontspec_script_tl {#1}
\@@_iv_str_to_num:Nn \l_@@_script_int {#1}
- \@@_check_lang:nTF {#2} \prg_return_true: \prg_return_false:
+ \@@_check_lang:NnTF \font {#2} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -231,12 +219,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
- \@@_set_font_type:
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool
{
- \prop_get:cnN {g_@@_ \f@family _prop} {script-tag} \l_@@_tmp_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {script-tag} \l_@@_tmp_tl
\str_if_eq:nVTF {#1} \l_@@_tmp_tl
{\prg_return_true:} {\prg_return_false:}
}
@@ -255,12 +241,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g_@@_ \f@family _prop} {fontdef} \l_@@_fontdef_tl
- \@@_primitive_font_set:Nnn \l_fontspec_font {\l_@@_fontdef_tl} {\f@size pt}
- \@@_set_font_type:
+ \@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool
{
- \prop_get:cnN {g_@@_ \f@family _prop} {lang-tag} \l_@@_tmp_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f@family _prop} {lang-tag} \l_@@_tmp_tl
\str_if_eq:nVTF {#1} \l_@@_tmp_tl
{\prg_return_true:} {\prg_return_false:}
}
@@ -305,7 +289,7 @@
{
\tl_set:Nn \l_@@_family_label_tl { #1 }
\@@_select_font_family:nn {#3}{#4}
- \tl_set_eq:NN #1 \l_fontspec_font
+ \font #1 = \fontname \l_fontspec_font \scan_stop:
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
% \end{macrocode}
@@ -371,3 +355,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx
index 73ec2cfe255..a3225473b40 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
%
% \section{Closing code}
%
@@ -23,3 +24,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
new file mode 100644
index 00000000000..910d407c02e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
@@ -0,0 +1,47 @@
+%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%
+% \section{Loading}
+%
+% The \textsf{expl3} module is \texttt{fontspec}.
+% \begin{macrocode}
+%<@@=fontspec>
+% \end{macrocode}
+%
+% Check engine and load specific modules.
+% For Lua\TeX, load \pkg{luaotfload}.
+% \begin{macrocode}
+%<*load>
+\sys_if_engine_luatex:T
+ { \RequirePackage{luaotfload}
+ \directlua{require("fontspec")}
+ \RequirePackageWithOptions{fontspec-luatex} \endinput }
+\sys_if_engine_xetex:T
+ { \RequirePackageWithOptions{fontspec-xetex} \endinput }
+% \end{macrocode}
+% If not one of the above, error:
+% \begin{macrocode}
+\msg_new:nnn {fontspec} {cannot-use-pdftex}
+ {
+ The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX.\\\\
+ You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~ "xelatex"~ or~ "lualatex" instead~ of~ plain~ "latex"~ or~ "pdflatex".
+ }
+\msg_fatal:nn {fontspec} {cannot-use-pdftex}
+\endinput
+%</load>
+% \end{macrocode}
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx b/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx
new file mode 100644
index 00000000000..5b1e400de1b
--- /dev/null
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx
@@ -0,0 +1,44 @@
+%%^^A%% fontspec-code.ltx -- part of FONTSPEC <wspr.io/fontspec>
+
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\begin{document}
+
+\GetFileInfo{fontspec.dtx}
+\title{The \textsf{fontspec} package\\Font selection for \XeLaTeX\ and \LuaLaTeX}
+\author{
+ \textsc{Will Robertson} and \textsc{Khaled Hosny}\\
+ \url{http://wspr.io/fontspec/}
+}
+\date{\filedate \qquad \fileversion}
+
+\maketitle
+\tableofcontents
+\newpage
+
+\def\DTX#1{\DocInput{#1}}
+\FONTSPECDTX
+
+\clearpage
+\PrintChanges
+
+\clearpage
+\setcounter{IndexColumns}{2}
+\PrintIndex
+
+\end{document}
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
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 3adc06adb23..ffbe56d67a9 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex
@@ -1,5 +1,9 @@
+%%^^A%% fontspec-doc-api.tex -- part of FONTSPEC <wspr.io/fontspec>
-
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\showexamplesfalse
+\begin{document}
\part{Customisation and programming interface}
@@ -307,5 +311,19 @@ Test whether the currently loaded font is using the specified raw
OpenType language tag |#1|.
\end{macro}
-
+\end{document}
+
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
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 53e9e20d790..7df38578403 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex
@@ -1,6 +1,8 @@
-\documentclass[a4paper]{ltxdoc}
-\usepackage{fontspec-doc-style}
+%%^^A%% fontspec-doc-enc.tex -- part of FONTSPEC <wspr.io/fontspec>
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\showexamplesfalse
\begin{document}
\part{Commands for accents and symbols (`encodings')}
@@ -181,7 +183,7 @@ The \LaTeXe\ kernel provides the following font encoding commands suitable for U
\cs{UndeclareTextCommand}\marg{command}\marg{encoding}
\end{quote}
See |fntguide.pdf| for full documentation of these.
-As shown above, the following shorthands a provided by \pkg{fontspec} to simplify
+As shown above, the following shorthands are provided by \pkg{fontspec} to simplify
the process of defining Unicode font range encodings:
\begin{quote}\obeylines
\cs{EncodingCommand}\marg{command}\oarg{num}\oarg{default}\marg{code}
@@ -190,9 +192,23 @@ the process of defining Unicode font range encodings:
\cs{EncodingComposite}\marg{command}\marg{letter}\marg{slot}
\cs{EncodingCompositeCommand}\marg{command}\marg{letter}\marg{code}
\cs{UndeclareSymbol}\marg{command}
+ \cs{UndeclareAccent}\marg{command}
+ \cs{UndeclareCommand}\marg{command}
\cs{UndeclareComposite}\marg{command}\marg{letter}
\end{quote}
-Despite its name, |\UndeclareSymbol| can be used for commands defined by all three of |\EncodingCommand|,
-|\EncodingAccent|, and |\EncodingSymbol|.
\end{document}
+
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
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 17d4a9da151..f37f982ca93 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
@@ -1,3 +1,9 @@
+%%^^A%% fontspec-doc-featset.tex -- part of FONTSPEC <wspr.io/fontspec>
+
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\showexamplesfalse
+\begin{document}
\part{Selecting font features}
\label{sec:selectingfeature}
@@ -592,3 +598,17 @@ This functionality is not generally used for lowercase text in modern typesettin
In particular, small amounts of letter spacing can be very useful, when setting small caps or all caps titles.
Also see the OpenType \opt{Uppercase} option of the \feat{Letters} feature (\vref*{sec:letters}).
+\end{document}
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
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 0ee9e8a60e9..7f374337a05 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
@@ -1,4 +1,9 @@
+%%^^A%% fontspec-doc-fontsel.tex -- part of FONTSPEC <wspr.io/fontspec>
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\showexamplesfalse
+\begin{document}
\part{General font selection}
@@ -558,4 +563,17 @@ I hope this doesn't cause any problems.
if it were a `naked' control sequence; \eg, `|M. \fontspec{...} N|' and
`|M. \fontspec{...}N|' are the same.
+\end{document}
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
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 61636f44ac0..6bc3fc8bd12 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex
@@ -1,3 +1,9 @@
+%%^^A%% fontspec-doc-intro.tex -- part of FONTSPEC <wspr.io/fontspec>
+
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\showexamplesfalse
+\begin{document}
\part{Getting started}
@@ -227,3 +233,18 @@ By default this is a no-op and the font will simply remain the same.
Use \cs{renewcommand}\cs{strongreset}|{\mdseries}| to start again from the beginning if desired.
An example for setting up a font family for use with \cs{strong} is discussed in \vref{sec:strong-example}.
+
+\end{document}
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
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 87b95db3687..140e4d9af20 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex
@@ -1,4 +1,9 @@
+%%^^A%% fontspec-doc-luatex.tex -- part of FONTSPEC <wspr.io/fontspec>
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\showexamplesfalse
+\begin{document}
\part{\LuaTeX-only font features}
\label{sec:luatex-features}
@@ -35,6 +40,18 @@ Please refer to the \LuaTeX/\pkg{luaotfload} documentation for more details.
\hrule
\end{figure}
+\end{document}
-
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
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 3869ce73430..76af34f2185 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex
@@ -1,5 +1,11 @@
+%%^^A%% fontspec-doc-opentype.tex -- part of FONTSPEC <wspr.io/fontspec>
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\showexamplesfalse
+\begin{document}
+
\part{OpenType}
\label{sec:opentype-features}
@@ -52,11 +58,11 @@ Make a copy of this file and place it somewhere convenient.
Then open it in your regular \TeX\ editor and change the font name to the font you'd like to query; after running through plain \XeTeX, the output \textsc{pdf} will look something like this:
\begin{framed}
-\def\myfontname{[Asana-Math.otf]}
-%
-%%% OpenType-info.tex %%%
-\font\testfont="\myfontname/ICU" at 12pt
+%%% From OpenType-info.tex %%%
+\DeleteShortVerb\"
+\def\myfontname{[Asana-Math.otf]}
+\font\testfont="\myfontname/OT" at 10pt\relax
\rightskip=0pt plus 1fil
@@ -129,8 +135,8 @@ Then open it in your regular \TeX\ editor and change the font name to the font y
\repeat
\end{framed}
-\noindent I intentionally picked a font that by design needs few font features; `regular' text fonts such as Latin Modern Roman contain many more, and I didn't want to clutter up the document too much.
-You'll then need to cross-check the OpenType feature tags with the `logical' names used by \pkg{fontspec}.
+\noindent I intentionally picked a font above that by design contains few font features; `regular' text fonts such as Latin Modern Roman contain many more, and I didn't want to clutter up the document too much.
+After finding the scripts, languages, and features contained within the font, you'll then need to cross-check the OpenType tags with the `logical' names used by \pkg{fontspec}.
\paragraph{otfinfo}
Alternatively, and more simply, you can use the command line tool |otfinfo|, which is distributed with \TeX{}Live.
@@ -1434,4 +1440,17 @@ Thanks to \name{Jonathan Kew}, \name{Yves Codet} and
\end{minipage}
\end{table}
-
+\end{document}
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-style.sty b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-style.sty
index 115d52a3b18..f5030a2bc90 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-style.sty
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-style.sty
@@ -1,11 +1,15 @@
+
+
\ProvidesPackage{fontspec-doc-style}
+\input{fontspec.dtx}
+\ExplSyntaxOff
+
\usepackage{fontspec,booktabs,calc,caption,color,enumitem,flafter,fancyvrb,hologo,graphicx,
ifthen,url,varioref,varwidth,microtype,tocloft,framed,xparse,docmute}
%% Various labelling commands:
\newcommand*\name[1]{{#1}}
-\newcommand*\pkg[1]{\textsf{#1}}
\newcommand*\opt[1]{\texttt{#1}}
\newcommand*\feat[1]{\texttt{#1}}
@@ -18,14 +22,12 @@
\newcommand\note[1]{\unskip\footnote{#1}}
-\def\MacOSX{Mac~OS~X}
+\def\MacOSX{macOS}
\def\AAT{\textsc{aat}}
\def\ATSUI{\textsc{atsui}}
\newcommand\NFSS{\textsc{nfss}}
-\newcommand\XeTeX{\hologo{XeTeX}}
\newcommand\XeLaTeX{\hologo{XeLaTeX}}
-\newcommand\LuaTeX{\hologo{LuaTeX}}
\newcommand\LuaLaTeX{\hologo{LuaLaTeX}}
% ToC formatting:
@@ -75,20 +77,6 @@
\linespread{1.05} % Pagella needs more space between lines
\frenchspacing % Remove ugly extra space after punctuation
-\usepackage[
- bookmarks=true,
- colorlinks=true,
- linkcolor=niceblue,
- urlcolor=niceblue,
- citecolor=niceblue,
- pdftitle={The fontspec package},
- pdfsubject={Advanced font selection for XeLaTeX/LuaLaTeX},
- pdfauthor={Will Robertson},
- pdfkeywords={xetex, xelatex, luatex, lualatex, unicode, opentype, aat}
- ]{hyperref}
-
-
-
%% ToC
\def\@dotsep{1000}
\setcounter{tocdepth}{2}
@@ -123,6 +111,9 @@
%% EXAMPLES
+\newif\ifshowexamples
+\showexamplestrue
+
\newsavebox\X
\newsavebox\Y
@@ -147,9 +138,11 @@
\def\prefix{#4}
\refstepcounter{example}%
\label{ex:\filename}%
- \IfFileExists{zzz-\theexample-\prefix-\filename.tex}{}{%
- \immediate\write18{rm -f zzz-\theexample-* ;}%
- }%
+ \ifshowexamples
+ \IfFileExists{zzz-\theexample-\prefix-\filename.tex}{}{%
+ \immediate\write18{rm -f zzz-\theexample-* ;}%
+ }%
+ \fi
\VerbatimEnvironment
\begin{VerbatimOut}{zzz-\theexample-\prefix-\filename.tex}}
% text in the environment
@@ -182,12 +175,14 @@
\csname prog@\prefix\endcsname "\unexpanded\expandafter{\XXcmd}";
printf '\@percentchar s' '\unexpanded\expandafter{\XXcmd}' > zzz-\theexample-\prefix-\filename-test.tex;
}%
- \immediate\write18{\unexpanded\expandafter{\1}}%
+ \ifshowexamples
+ \immediate\write18{\unexpanded\expandafter{\1}}%
+ \fi
}%
\savebox\Y{%
\IfFileExists{zzz-\theexample-\prefix-\filename.pdf}
{\includegraphics{zzz-\theexample-\prefix-\filename.pdf}}
- {\color{red}\itshape ---Graphic not generated---}%
+ {\color{red}\itshape ---Example graphic not generated---}%
}
% TYPESETTING
\rule[0.5\baselineskip]{\columnwidth}{1pt}%
@@ -286,3 +281,10 @@
\catcode `\_= 11
\renewcommand\partname{Part}
+
+
+% /©
+%
+% (COPYRIGHT GOES HERE)
+%
+% ©/
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 62bae7e44d1..e0ae035e4e0 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex
@@ -1,4 +1,9 @@
+%%^^A%% fontspec-doc-xetex.tex -- part of FONTSPEC <wspr.io/fontspec>
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\showexamplesfalse
+\begin{document}
\part{Fonts and features with \XeTeX}
\label{sec:xetex-features}
@@ -11,7 +16,7 @@ selected by \pkg{fontspec}.
\subsection{Mapping}
\label{sec:mapping}
-\feat{Mapping} enables a \XeTeX\ text-mapping scheme, shown in \exref{mapping}.
+The \feat{Mapping} feature enables a \XeTeX\ text-mapping scheme, with an example shown in \exref{mapping}.
\begin{Xexample}{mapping}{\XeTeX's \feat{Mapping} feature.}
\fontspec{Cochin}[Mapping=tex-text]
@@ -25,22 +30,22 @@ The use of the latter syntax is recommended for better compatibility with
\LuaTeX\ documents.
-\subsection{Different font technologies: \AAT\ and OpenType}\label{sec:renderer}
+\subsection{Different font technologies: \AAT, OpenType, and Graphite}\label{sec:renderer}
-\XeTeX\ supports two rendering technologies for typesetting, selected with
+\XeTeX\ supports three rendering technologies for typesetting, selected with
the \feat{Renderer} font feature. The first, \opt{AAT}, is
-that provided (only) by \MacOSX\ itself. The second, \opt{OpenType},
-is an open source OpenType interpreter.
-\note{v2.4: This was called `\texttt{ICU}' in previous versions of \XeTeX\ and \pkg{fontspec}.
-Backwards compatibility is preserved.}
-It provides greater support for
-OpenType features, notably contextual arrangement, over \opt{AAT}.
-
-In general, this feature will not need to be explicitly called: for OpenType
+that provided only by \MacOSX.
+The second, \opt{OpenType}, is an open source OpenType interpreter.
+It provides greater support for OpenType features, notably contextual arrangement, over \opt{AAT}.
+The third is \opt{Graphite}, which is an alternative to OpenType with particular features for less-common languages and the capability for more powerful font options.
+Features for \opt{OpenType} have already been discussed in \vref{sec:opentype-features};
+\opt{Graphite} and \opt{AAT} features are discussed later in \vref{sec:graphite-features} and \vref{sec:aat-features}.
+
+Unless you have a particular need, the \feat{Renderer} feature is rarely explicitly required: for OpenType
fonts, the \opt{OpenType} renderer is used automatically, and for \AAT\ fonts,
\opt{AAT} is chosen by default. Some fonts, however, will contain font tables
-for \emph{both} rendering technologies, such as the Hiragino Japanese fonts
-distributed with \MacOSX, and in these cases the choice may be required.
+for multiple rendering technologies, such as the Hiragino Japanese fonts
+distributed with \MacOSX, and in these cases one over the other may be preferred.
Among some other font features only available through a specific renderer,
\opt{OpenType} provides for the \feat{Script} and \feat{Language} features, which allow
@@ -72,6 +77,29 @@ explicitly.
\end{Verbatim}
+\section{The Graphite renderer}
+\label{sec:graphite-features}
+
+Since the Graphite renderer is designed for less common scripts and languages, usually with
+specific or unique requirements, Graphite features are not standard across fonts.
+
+Currently \pkg{fontspec} does not support a convenient interface to select Graphite font
+features and all selection must be done via `raw' font feature selection.
+
+Here's an example:
+\begin{Verbatim}
+ \fontspec{Charis SIL}[
+ Renderer=Graphite,
+ RawFeature={Uppercase Eng alternates=Large eng on baseline}]
+ Ŋ
+\end{Verbatim}
+
+Here's another:
+\begin{Verbatim}
+\fontspec{AwamiNastaliq-Regular.ttf}[Renderer=Graphite] ^^^^06b5
+\addfontfeature{RawFeature={Lam with V=V over bowl}} ^^^^06b5
+\end{Verbatim}
+
\section{\MacOSX's \AAT\ fonts}
@@ -334,3 +362,17 @@ options: \opt{Off},
\opt{Parenthesis}, \opt{Period}, \opt{RomanNumerals}, \opt{Diamond},
\opt{BlackSquare}, \opt{BlackRoundSquare}, and \opt{DoubleCircle}.
+\end{document}
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc.tex
deleted file mode 100644
index 537510a8b91..00000000000
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc.tex
+++ /dev/null
@@ -1,40 +0,0 @@
-
-\ifdefined \XeTeXOTcountscripts \else \makeatletter
- \@latex@error{^^J*** The fontspec documentation can only be typeset with XeTeX at present! ***\@gobble}\@ehc
-\fi
-
-\documentclass[a4paper]{ltxdoc}
-\usepackage{fontspec-doc-style}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-%\OnlyDescription
-\begin{document}
-
-\GetFileInfo{fontspec.dtx}
-
-\title{The \textsf{fontspec} package\\Font selection for \XeLaTeX\ and \LuaLaTeX}
-\author{
- \textsc{Will Robertson} and \textsc{Khaled Hosny}\\
- \url{http://wspr.io/fontspec/}
-}
-\date{\filedate \qquad \fileversion}
-
-\maketitle
-\tableofcontents
-\newpage
-
-\include{fontspec-doc-intro}
-\include{fontspec-doc-fontsel}
-\include{fontspec-doc-featset}
-\include{fontspec-doc-opentype}
-\include{fontspec-doc-enc}
-\include{fontspec-doc-luatex}
-\include{fontspec-doc-xetex}
-\include{fontspec-doc-api}
-
-\providecommand\ENDDOCUMENT{\end{document}}
-\ENDDOCUMENT
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx
index c744c241651..7484e077638 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
% \section{Extended font encodings}
%
@@ -108,6 +109,9 @@
% \end{macro}
%
% \begin{macro}{\UndeclareSymbol}
+% \begin{macro}{\UndeclareAccent}
+% \begin{macro}{\UndeclareCommand}
+% Synonyms for each other but all included for completeness.
% \begin{macrocode}
\DeclareDocumentCommand \UndeclareSymbol {m}
{
@@ -115,9 +119,22 @@
{ \@@_error:nn {only-inside-encdef} \UndeclareSymbol }
\UndeclareTextCommand {#1} {\UnicodeEncodingName}
}
-
+\DeclareDocumentCommand \UndeclareAccent {m}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \UndeclareAccent }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+\DeclareDocumentCommand \UndeclareCommand {m}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \UndeclareCommand }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\UndeclareComposite}
% \begin{macrocode}
@@ -136,3 +153,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-example.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-example.tex
new file mode 100644
index 00000000000..bf2831b134b
--- /dev/null
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-example.tex
@@ -0,0 +1,48 @@
+%%^^A%% fontspec-example.tex -- part of FONTSPEC <wspr.io/fontspec>
+
+\documentclass{article}
+
+\usepackage{fontspec}
+
+\setmainfont{TeX Gyre Pagella}
+\setsansfont{TeX Gyre Heros}[Scale=MatchLowercase]
+\setmonofont{Inconsolata}[Scale=MatchLowercase]
+
+\begin{document}
+\pagestyle{empty}
+
+\section*{The basics of the \textsf{fontspec} package}
+
+The \textsf{fontspec} package enables automatic font selection
+for \LaTeX{} documents typeset with Xe\TeX{} or Lua\TeX.
+The basic command is
+
+{\centering \verb|\fontspec{font display name}[font features]|.\par}
+
+The default, sans serif, and typewriter fonts may be set with the
+commands \verb|\setmainfont|, \verb|\setsansfont| and \verb|\setmonofont|,
+respectively, as shown in the preamble. They take the
+same syntax as the \verb|\fontspec| package. All expected font
+shapes are available:
+
+\begin{center}
+ {\itshape Italics and \scshape small caps\dots}\\
+ {\sffamily\bfseries Bold sans serif and \itshape bold italic sans serif\dots}
+\end{center}
+
+Text fonts in maths mode are also changed (e.g., notice the cosine function in
+`$\cos(n\pi)=\pm 1$') but only if the roman and sans serif fonts are set in
+the preamble; \verb|\setmainfont| will not affect these maths mode fonts when
+called mid-document.
+Maths symbols themselves are not affected.
+
+Notice the font features used to load the default fonts in the preamble.
+\verb|Ligatures=TeX| is automatically enabled for the roman and sans font,
+allowing regular \TeX{} ligatures like \verb|``---''| for ``---''.
+\verb|Scale=MatchLowercase| automatically scales the fonts to
+the same x-height.
+
+Please see the complete \textsf{fontspec} documentation for further
+information.
+
+\end{document}
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 eeabacc0742..b0d846ef48d 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
% \subsection{AAT feature definitions}
%
@@ -222,3 +223,19 @@
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
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 168f1f36d9e..b351d06c295 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
% \subsection{OpenType feature definitions}
%
@@ -414,7 +415,7 @@
\bool_set_false:N \l_@@_script_exist_bool
\clist_map_inline:nn {#2}
{
- \@@_check_script:nTF {####1}
+ \@@_check_script:NnTF \l_fontspec_font {####1}
{
\tl_set:Nn \l_fontspec_script_tl {####1}
\int_set:Nn \l_@@_script_int {\l_@@_strnum_int}
@@ -431,7 +432,7 @@
\@@_warning:nx {script-not-exist} {#1}
}
{
- \@@_check_script:nTF {latn}
+ \@@_check_script:NnTF \l_fontspec_font {latn}
{
\@@_warning:nx {script-not-exist-latn} {#1}
\tl_set:Nn \l_fontspec_script_tl {latn}
@@ -454,7 +455,7 @@
\cs_new:Nn \fontspec_new_lang:nn
{
\keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
- \@@_check_lang:nTF {#2}
+ \@@_check_lang:NnTF \l_fontspec_font {#2}
{
\tl_set:Nn \l_fontspec_lang_tl {#2}
\int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
@@ -485,14 +486,14 @@
{
Language / Turkish .code:n =
{
- \@@_check_lang:nTF {TRK}
+ \@@_check_lang:NnTF \l_fontspec_font {TRK}
{
\int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
\tl_set:Nn \l_fontspec_lang_tl {TRK}
\tl_gset:Nn \g_@@_single_feat_tl { language=TRK }
}
{
- \@@_check_lang:nTF {TUR}
+ \@@_check_lang:NnTF \l_fontspec_font {TUR}
{
\int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
\tl_set:Nn \l_fontspec_lang_tl {TUR}
@@ -539,3 +540,18 @@
% \end{macrocode}
% \fi
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx
index f25ee8fbbb6..69760d20512 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
% \section{expl3 interface for primitive font loading}
%
@@ -85,3 +86,18 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
index 8015020ad32..565db2faec4 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
@@ -1,3 +1,5 @@
+%%^^A%% fontspec-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
% \section{Graphite/AAT code}
%
% \iffalse
@@ -34,7 +36,7 @@
\tl_if_empty:nTF {#1}
{ \@@_warning:n {aat-feature-not-exist} }
{
- \@@_make_AAT_feature_string:nnTF {#1}{#2}
+ \@@_make_AAT_feature_string:NnnTF \l_fontspec_font {#1}{#2}
{
\@@_update_featstr:n {\l_fontspec_feature_string_tl}
}
@@ -44,7 +46,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_make_AAT_feature_string:nnTF}
+% \begin{macro}{\@@_make_AAT_feature_string:NnnTF}
% This macro takes the numerical codes for a font feature and
% creates a specified macro containing the string required in the
% font definition to turn that feature on or off. Used primarily in
@@ -62,25 +64,25 @@
%
% Finally, save out the complete feature string in \cmd\l_fontspec_feature_string_tl.
% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_make_AAT_feature_string:nn {TF,T,F}
+\prg_new_conditional:Nnn \@@_make_AAT_feature_string:Nnn {TF,T,F}
{
- \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename \l_fontspec_font #1 }
+ \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename #1 #2 }
\tl_if_empty:NTF \l_tmpa_tl
{ \prg_return_false: }
{
- \int_compare:nTF { \XeTeXisexclusivefeature\l_fontspec_font #1 > 0 }
+ \int_compare:nTF { \XeTeXisexclusivefeature #1 #2 > 0 }
{
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
+ \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
}
{
- \int_if_even:nTF {#2}
+ \int_if_even:nTF {#3}
{
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
+ \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
}
{
\tl_set:Nx \l_tmpb_tl
{
- \XeTeXselectorname\l_fontspec_font #1\space \numexpr#2-1\relax
+ \XeTeXselectorname #1 #2\space \numexpr#3-1\relax
}
\tl_if_empty:NF \l_tmpb_tl { \tl_put_left:Nn \l_tmpb_tl {!} }
}
@@ -101,3 +103,19 @@
%</fontspec&xetexx>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx
index f9c536f5300..25eb3fb1a53 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx
@@ -1,3 +1,5 @@
+%%^^A%% fontspec-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
% \section{User commands}\label{sec:codeuser}
%
% This section contains the definitions of the commands detailed in
@@ -196,3 +198,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
index 0bc6e64d130..a56503dced1 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
@@ -1,3 +1,5 @@
+%%^^A%% fontspec-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
% \section{Internals}
%
% \iffalse
@@ -230,7 +232,7 @@
\@@_primitive_font_set:Nnn \l_fontspec_font
{ \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } {\f@size pt}
\@@_primitive_font_if_null:NT \l_fontspec_font { \@@_error:nx {font-not-found} {\l_@@_fontname_up_tl} }
- \@@_set_font_type:
+ \@@_set_font_type:N \l_fontspec_font
%<debug>\typeout{Set~ base~ font~ properly: \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} }
\@@_primitive_font_gset:Nnn \l_fontspec_font
{ \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } {\f@size pt}
@@ -298,7 +300,7 @@
{
\tl_if_empty:NTF \l_@@_script_name_tl
{
- \@@_check_script:nTF {latn}
+ \@@_check_script:NnTF \l_fontspec_font {latn}
{
\tl_set:Nn \l_@@_script_name_tl {Latin}
\tl_if_empty:NT \l_@@_lang_name_tl
@@ -351,8 +353,8 @@
% \EROROR
}
{
-%<debug> \typeout{::: Setting~ keys~ for~ AAT~ font~ features:~"\l_@@_keys_leftover_clist"}
- \bool_if:NT \l_@@_atsui_bool
+%<debug> \typeout{::: Setting~ keys~ for~ AAT/Graphite~ font~ features:~"\l_@@_keys_leftover_clist"}
+ \bool_if:nT { \l_@@_atsui_bool || \l_@@_graphite_bool }
{ \keys_set:nV {fontspec-aat} \l_@@_keys_leftover_clist }
}
%</xetexx>
@@ -390,11 +392,17 @@
%<debug> \typeout{save~ family:~ #1}
%<debug> \typeout{== fontid_tl: "\l_@@_fontid_tl".}
- \cs_if_exist:NT \l_@@_nfss_fam_tl
- {
- \cs_set_eq:cN {g_@@_UID_\l_@@_fontid_tl} \l_@@_nfss_fam_tl
- }
- \cs_if_exist:cF {g_@@_UID_\l_@@_fontid_tl}
+ \tl_if_exist:cF {g_@@_UID_\l_@@_fontid_tl}
+ {
+ \tl_new:c {g_@@_UID_\l_@@_fontid_tl}
+ }
+
+ \tl_if_exist:NT \l_@@_nfss_fam_tl
+ {
+ \tl_set_eq:cN {g_@@_UID_\l_@@_fontid_tl} \l_@@_nfss_fam_tl
+ }
+
+ \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}
@@ -410,7 +418,7 @@
}
}
\tl_gset:Nv \l_fontspec_family_tl {g_@@_UID_\l_@@_fontid_tl}
- \cs_if_exist:cTF {g_@@_ \l_fontspec_family_tl _prop}
+ \cs_if_exist:cTF {g_@@_fontinfo_ \l_fontspec_family_tl _prop}
\prg_return_false: \prg_return_true:
}
% \end{macrocode}
@@ -435,18 +443,18 @@
% \begin{macrocode}
\cs_new:Nn \@@_save_fontinfo:n
{
- \prop_new:c {g_@@_ \l_fontspec_family_tl _prop}
- \prop_gput:cnx {g_@@_ \l_fontspec_family_tl _prop} {fontname} { #1 }
- \prop_gput:cnx {g_@@_ \l_fontspec_family_tl _prop} {options} { \l_@@_all_features_clist }
- \prop_gput:cnx {g_@@_ \l_fontspec_family_tl _prop} {fontdef}
+ \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}
{
\@@_construct_font_call:nn {\l_fontspec_fontname_tl}
{ \l_@@_pre_feat_sclist \l_@@_rawfeatures_sclist }
}
- \prop_gput:cnV {g_@@_ \l_fontspec_family_tl _prop} {script-num} \l_@@_script_int
- \prop_gput:cnV {g_@@_ \l_fontspec_family_tl _prop} {lang-num} \l_@@_language_int
- \prop_gput:cnV {g_@@_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
- \prop_gput:cnV {g_@@_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
+ \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
}
% \end{macrocode}
% \end{macro}
@@ -549,7 +557,7 @@
%
% \subsubsection{Fonts}
%
-% \begin{macro}{\@@_set_font_type:}
+% \begin{macro}{\@@_set_font_type:N}
% Now check if the font is to be rendered with \ATSUI\ or Harfbuzz. This will either
% be automatic (based on the font type), or specified by the user via a font feature.
%
@@ -558,7 +566,7 @@
% font or an OpenType font or a font with feature axes (either \AAT\ or
% Multiple Master), respectively.
% \begin{macrocode}
-\cs_new:Nn \@@_set_font_type:
+\cs_new:Nn \@@_set_font_type:N
{
%<debug> \typeout{:: @@_set_font_type:}
%<*xetexx>
@@ -567,32 +575,30 @@
\bool_set_false:N \l_@@_ot_bool
\bool_set_false:N \l_@@_mm_bool
\bool_set_false:N \l_@@_graphite_bool
- \ifcase\XeTeXfonttype\l_fontspec_font
+ \ifcase\XeTeXfonttype #1
\bool_set_true:N \l_@@_tfm_bool
\or
\bool_set_true:N \l_@@_atsui_bool
- \ifnum\XeTeXcountvariations\l_fontspec_font > \c_zero
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
+ \ifnum\XeTeXcountvariations #1 > \c_zero
\bool_set_true:N \l_@@_mm_bool
\fi
\or
\bool_set_true:N \l_@@_ot_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
+ \or
+ \bool_set_true:N \l_@@_graphite_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/GR} }
\fi
+%</xetexx>
% \end{macrocode}
% If automatic, the \cmd{\l_fontspec_renderer_tl} token list will still be
% empty (other suffices that could be added will be later in the feature
% processing), and if it is indeed still empty, assign it a value so that the
% other weights of the font are specifically loaded with the same renderer.
+%
+% LuaTeX only supports one:
% \begin{macrocode}
- \tl_if_empty:NT \l_fontspec_renderer_tl
- {
- \bool_if:NTF \l_@@_atsui_bool
- { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
- {
- \bool_if:NT \l_@@_ot_bool
- { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
- }
- }
-%</xetexx>
%<*luatex>
\bool_set_true:N \l_@@_ot_bool
%</luatex>
@@ -916,7 +922,7 @@
%<luatex>\cs_set:Nn \@@_make_smallcaps:TF
%<xetexx>\cs_set:Nn \@@_make_ot_smallcaps:TF
{
- \@@_check_ot_feat:nTF {smcp} {#1} {#2}
+ \@@_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
}
%<*xetexx>
\cs_set:Nn \@@_make_smallcaps:TF
@@ -925,7 +931,7 @@
{ \@@_make_ot_smallcaps:TF {#1} {#2} }
{
\bool_if:NT \l_@@_atsui_bool
- { \@@_make_AAT_feature_string:nnTF {3}{3} {#1} {#2} }
+ { \@@_make_AAT_feature_string:NnnTF \l_fontspec_font {3}{3} {#1} {#2} }
}
}
%</xetexx>
@@ -1060,3 +1066,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
index 13ed395a784..900f8fd7840 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
% \section{Font loading (\pkg{keyval}) definitions}
%
@@ -105,8 +106,10 @@
{
\int_compare:nTF {\l_keys_choice_int <= 4} {
%<*xetexx>
- \tl_set:Nv \l_fontspec_renderer_tl
- { g_fontspec_renderer_tag_ \l_keys_choice_tl }
+ \tl_set:Nx \l_fontspec_renderer_tl
+ {
+ \int_case:nn \l_keys_choice_int { 1 {/AAT} 2 {/OT} 3 {/OT} 4 {/GR} }
+ }
\tl_gset:Nx \g_@@_single_feat_tl { \l_fontspec_renderer_tl }
%</xetexx>
%<*luatex>
@@ -118,19 +121,15 @@
\@@_warning:nx {only-luatex-feature} {Renderer=Full/Basic}
%</xetexx>
%<*luatex>
- \tl_set:Nv \l_fontspec_mode_tl
- { g_fontspec_mode_tag_ \l_keys_choice_tl }
+ \tl_set:Nx \l_fontspec_mode_tl
+ {
+ \int_case:nn \l_keys_choice_int { 5 {node} 6 {base} }
+ }
\tl_gset:Nx \g_@@_single_feat_tl { mode=\l_fontspec_mode_tl }
%</luatex>
}
}
}
-\tl_set:cn {g_fontspec_renderer_tag_AAT} {/AAT}
-\tl_set:cn {g_fontspec_renderer_tag_ICU} {/OT}
-\tl_set:cn {g_fontspec_renderer_tag_OpenType} {/OT}
-\tl_set:cn {g_fontspec_renderer_tag_Graphite} {/GR}
-\tl_set:cn {g_fontspec_mode_tag_Full} {node}
-\tl_set:cn {g_fontspec_mode_tag_Basic} {base}
% \end{macrocode}
%
% \paragraph{OpenType script/language}
@@ -371,7 +370,7 @@
\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_@@_ \l_fontspec_family_tl _prop} }
+ { \cs_undefine:c {g_@@_fontinfo_ \l_fontspec_family_tl _prop} }
}
% \end{macrocode}
%
@@ -847,3 +846,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx
index b924a7312e3..2511a9c3cd4 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
% \subsection{Font language definitions}
%
@@ -397,3 +398,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
index 269d18a4d6e..162c0a4a0d5 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
@@ -1,3 +1,5 @@
+%%^^A%% fontspec-lua.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%
% \section{Lua module}
%
% \begin{macrocode}
@@ -80,3 +82,17 @@ end
% \begin{macrocode}
%</lua>
% \end{macrocode}
+
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx
index 59b10b417e1..bdc1c2e18d2 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
%
% \section{Selecting maths fonts}
% Here, the fonts used in math mode are redefined to correspond to the
@@ -234,3 +235,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx
index 69cde28a7e0..77ef3def228 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
%
% \section{Error/warning/info messages}
%
@@ -265,3 +266,19 @@
% \begin{macrocode}
%</fontspec>
% \end{macrocode}
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx
index 202b16e1b19..b8e642a6215 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
%
% \section{Opening code}
%
@@ -98,8 +99,84 @@
}
% \end{macrocode}
%
+%
+% \subsection{Generic functions}
+%
+% \begin{macro}{\FontspecSetCheckBoolTrue}
+% \begin{macro}{\FontspecSetCheckBoolFalse}
+% These strange set functions are to simplify returning code from LuaTeX:
+% \begin{macrocode}
+\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l_@@_check_bool }
+\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l_@@_check_bool }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_keys_set_known:nnN}
+% \begin{macrocode}
+\cs_new:Nn \@@_keys_set_known:nnN
+ {
+%<debug> \typeout{:::: Keys~set:~{#1}~{#2} }
+ \keys_set_known:nnN {#1} {#2} #3
+%<debug> \typeout{:::: Leftover:~{#3} }
+ }
+\cs_generate_variant:Nn \@@_keys_set_known:nnN {nx}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_int_mult_truncate:Nn}
+% Missing in expl3, IMO.
+% \begin{macrocode}
+\cs_new:Nn \@@_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{\pkg{expl3} variants}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \int_set:Nn {Nv}
+\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_generate_variant:Nn \prop_put:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
+\cs_generate_variant:Nn \prop_get:NnNT {NxN}
+\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
+\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+% \end{macrocode}
+%
+%
+%
+%
% \iffalse
% \begin{macrocode}
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
index 949e95ca1b1..f825ed249d7 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
@@ -1,3 +1,5 @@
+%%^^A%% fontspec-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
% \section{OpenType definitions code}
%
% \iffalse
@@ -114,7 +116,7 @@
\tl_if_empty:nT {#1} { \bool_set_false:N \l_@@_check_feat_bool }
\bool_if:NT \l_@@_check_feat_bool
{
- \@@_check_ot_feat:nF {#1}
+ \@@_check_ot_feat:NnF \l_fontspec_font {#1}
{
\@@_warning:nx {icu-feature-not-exist-in-font} {#1}
\bool_set_false:N \l_@@_proceed_bool
@@ -140,24 +142,24 @@
% \end{macro}
%
%
-% \begin{macro}{\@@_check_script:nTF}
+% \begin{macro}{\@@_check_script:NnTF}
% This macro takes an OpenType script tag and checks if it exists in the current
% font. The output boolean is \cmd\@tempswatrue. \cmd\l_@@_script_int\ is used to store
% the number corresponding to the script tag string.
% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_check_script:n {TF}
+\prg_new_conditional:Nnn \@@_check_script:Nn {TF}
{
\bool_if:NTF \l_@@_never_check_bool
{ \prg_return_true: }
%<*xetexx>
{
- \@@_iv_str_to_num:Nn \l_@@_strnum_int {#1}
- \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts \l_fontspec_font }
+ \@@_iv_str_to_num:Nn \l_@@_strnum_int {#2}
+ \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts #1 }
\int_zero:N \l_tmpa_int
\bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum \XeTeXOTscripttag\l_fontspec_font \l_tmpa_int = \l_@@_strnum_int
+ \ifnum \XeTeXOTscripttag #1 \l_tmpa_int = \l_@@_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -168,36 +170,39 @@
}
%</xetexx>
%<*luatex>
- {
- \directlua{fontspec.check_ot_script("l_fontspec_font", "#1")}
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
+ {
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l_@@_tmp_tl {\curr@fontshape/\f@size} }
+ { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
+ \directlua{fontspec.check_ot_script("\l_@@_tmp_tl", "#2")}
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
%</luatex>
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_check_lang:nTF}
+% \begin{macro}{\@@_check_lang:NnTF}
% This macro takes an OpenType language tag and checks if it exists in the current
% font/script. The output boolean is \cmd\@tempswatrue. \cmd\l_@@_language_int\ is used to store
% the number corresponding to the language tag string.
% The script used is whatever's held in \cmd\l_@@_script_int. By default, that's the
% number corresponding to `|latn|'.
% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_check_lang:n {TF}
+\prg_new_conditional:Nnn \@@_check_lang:Nn {TF}
{
\bool_if:NTF \l_@@_never_check_bool
{ \prg_return_true: }
%<*xetexx>
{
- \@@_iv_str_to_num:Nn \l_@@_strnum_int {#1}
+ \@@_iv_str_to_num:Nn \l_@@_strnum_int {#2}
\int_set:Nn \l_tmpb_int
- { \XeTeXOTcountlanguages \l_fontspec_font \l_@@_script_int }
+ { \XeTeXOTcountlanguages #1 \l_@@_script_int }
\int_zero:N \l_tmpa_int
\bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum\XeTeXOTlanguagetag\l_fontspec_font\l_@@_script_int \l_tmpa_int =\l_@@_strnum_int
+ \ifnum\XeTeXOTlanguagetag #1 \l_@@_script_int \l_tmpa_int = \l_@@_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -208,19 +213,22 @@
}
%</xetexx>
%<*luatex>
- {
- \directlua
- {
- fontspec.check_ot_lang( "l_fontspec_font", "#1", "\l_fontspec_script_tl" )
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
+ {
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l_@@_tmp_tl {\curr@fontshape/\f@size} }
+ { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
+ \directlua
+ {
+ fontspec.check_ot_lang( "\l_@@_tmp_tl", "#2", "\l_fontspec_script_tl" )
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
%</luatex>
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_check_ot_feat:nTF}
+% \begin{macro}{\@@_check_ot_feat:NnTF}
% This macro takes an OpenType feature tag and checks if it exists in the current
% font/script/language.
% \cmd\l_@@_strnum_int\ is used to store the number corresponding to the feature tag string.
@@ -228,7 +236,7 @@
% number corresponding to `|latn|'. The language used is \cmd\l_@@_language_int,
% by default |0|, the `default language'.
% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_check_ot_feat:n {TF,F}
+\prg_new_conditional:Nnn \@@_check_ot_feat:Nn {TF,F}
{
\bool_if:NTF \l_@@_never_check_bool
{ \prg_return_true: }
@@ -237,16 +245,16 @@
%<debug>\typeout{::~ fontspec_check_ot_feat:n~ {#1}}
\int_set:Nn \l_tmpb_int
{
- \XeTeXOTcountfeatures \l_fontspec_font
+ \XeTeXOTcountfeatures #1
\l_@@_script_int
\l_@@_language_int
}
- \@@_iv_str_to_num:Nn \l_@@_strnum_int {#1}
+ \@@_iv_str_to_num:Nn \l_@@_strnum_int {#2}
\int_zero:N \l_tmpa_int
\bool_set_false:N \l_@@_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum\XeTeXOTfeaturetag\l_fontspec_font\l_@@_script_int\l_@@_language_int
+ \ifnum\XeTeXOTfeaturetag #1 \l_@@_script_int \l_@@_language_int
\l_tmpa_int =\l_@@_strnum_int
\bool_set_true:N \l_@@_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
@@ -258,17 +266,20 @@
}
%</xetexx>
%<*luatex>
- {
+ {
%<debug>\typeout{::~ fontspec_check_ot_feat:n~ {#1}}
- \directlua
- {
- fontspec.check_ot_feat(
- "l_fontspec_font", "#1",
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l_@@_tmp_tl {\curr@fontshape/\f@size} }
+ { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
+ \directlua
+ {
+ fontspec.check_ot_feat(
+ "\l_@@_tmp_tl", "#2",
"\l_fontspec_lang_tl", "\l_fontspec_script_tl"
)
- }
- \bool_if:NTF \l_@@_check_bool \prg_return_true: \prg_return_false:
- }
+ }
+ \bool_if:NTF \l_@@_check_bool \prg_return_true: \prg_return_false:
+ }
%</luatex>
}
% \end{macrocode}
@@ -407,3 +418,19 @@
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx
index ca1ac793c29..2b75aeb81d0 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx
@@ -1,3 +1,5 @@
+%%^^A%% fontspec-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
% \section{Patching code}
%
% \begin{macrocode}
@@ -186,3 +188,19 @@
% \begin{macrocode}
%</fontspec>
% \end{macrocode}
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx
index 890fd5d2334..ab4bb8e6bee 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx
@@ -1,3 +1,4 @@
+%%^^A%% fontspec-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
% \subsection{Font script definitions}
%
@@ -162,3 +163,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
index 8ab76d375ed..931df1632e0 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
@@ -1,3 +1,5 @@
+%%^^A%% fontspec-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
% \section{User command internals}
% \label{sec:codeinternal}
%
@@ -297,8 +299,8 @@
{
\group_begin:
\keys_set_known:nnN {fontspec-addfeatures} {#1} \l_@@_tmp_tl
- \prop_get:cnN {g_@@_ \f@family _prop} {options} \l_@@_options_tl
- \prop_get:cnN {g_@@_ \f@family _prop} {fontname} \l_@@_fontname_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
@@ -505,3 +507,19 @@
%</fontspec&(xetexx|luatex)>
% \end{macrocode}
% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
index 0c8957d6253..902b9f470c5 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
@@ -1,5 +1,6 @@
+%%^^A%% fontspec-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
%
-% \section{Declaration of variables and functions}
+% \section{Declaration of variables}
%
% \begin{macrocode}
%<*fontspec>
@@ -18,12 +19,7 @@
\bool_new:N \l_@@_nobf_bool
\bool_new:N \l_@@_noit_bool
\bool_new:N \l_@@_nosc_bool
-% \end{macrocode}
-% These strange set functions are to simplify returning code from LuaTeX:
-% \begin{macrocode}
\bool_new:N \l_@@_check_bool
-\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l_@@_check_bool }
-\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l_@@_check_bool }
% \end{macrocode}
%
% \begin{macrocode}
@@ -49,6 +45,7 @@
% \end{macrocode}
%
% \begin{macrocode}
+\bool_new:N \l_@@_tmpa_bool
\bool_new:N \l_@@_disable_defaults_bool
\bool_new:N \l_@@_alias_bool
\bool_new:N \l_@@_external_bool
@@ -88,7 +85,27 @@
% \begin{macrocode}
\clist_new:N \g_@@_default_fontopts_clist
\clist_new:N \g_@@_all_keyval_modules_clist
+\clist_new:N \l_@@_sizefeat_clist
\clist_set:Nn \l_@@_sizefeat_clist {Size={-}}
+\clist_new:N \l_@@_extensions_clist
+\clist_new:N \l_@@_fontopts_clist
+\clist_new:N \l_@@_family_fontopts_clist
+\clist_new:N \l_@@_all_features_clist
+\clist_new:N \l_@@_leftover_clist
+\clist_new:N \l_@@_keys_leftover_clist
+\clist_new:N \l_@@_sizing_leftover_clist
+\clist_new:N \l_@@_fontfeat_clist
+\clist_new:N \l_@@_fontfeat_curr_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
% \end{macrocode}
%
% \paragraph{Property lists}
@@ -99,11 +116,63 @@
\prop_new:N \g_@@_OT_features_prop
\prop_new:N \g_@@_all_opentype_feature_names_prop
\prop_new:N \g_@@_em_prop
+\prop_new:N \g_@@_strong_prop
% \end{macrocode}
%
% \paragraph{Token lists}
%
% \begin{macrocode}
+\tl_new:N \l_fontspec_family_tl
+\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}
+\tl_new:N \UTFencname
+\tl_new:N \cyrillicencoding
+\tl_new:N \latinencoding
+% \end{macrocode}
+%
+% \begin{macrocode}
+\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_@@_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
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_rawfeatures_sclist
+\tl_new:N \l_@@_pre_feat_sclist
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \g_@@_rmfamily_family
+\tl_new:N \g_@@_sffamily_family
+\tl_new:N \g_@@_ttfamily_family
+% \end{macrocode}
+%
+% \begin{macrocode}
\tl_new:N \g_@@_mathrm_tl
\tl_new:N \g_@@_bfmathrm_tl
\tl_new:N \g_@@_mathsf_tl
@@ -127,16 +196,6 @@
% \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
-% \end{macrocode}
-%
-% \begin{macrocode}
\tl_new:N \l_@@_script_name_tl
\tl_new:N \l_fontspec_script_tl
\tl_new:N \l_@@_lang_name_tl
@@ -149,66 +208,32 @@
\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}
%
%
%
-% \subsection{Generic functions}
-%
-% \begin{macro}{\@@_keys_set_known:nnN}
-% \begin{macrocode}
-\cs_new:Nn \@@_keys_set_known:nnN
- {
-%<debug> \typeout{:::: Keys~set:~{#1}~{#2} }
- \keys_set_known:nnN {#1} {#2} #3
-%<debug> \typeout{:::: Leftover:~{#3} }
- }
-\cs_generate_variant:Nn \@@_keys_set_known:nnN {nx}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_head_ii:n}
-% Expands to the first two \meta{items} of |#1|.
-% \begin{macrocode}
-\cs_set:Npn \@@_head_ii:n #1 { \@@_head_ii:w #1 *** \q_stop}
-\cs_set:Npn \@@_head_ii:w #1#2#3 \q_stop { #1#2 }
-\cs_generate_variant:Nn \@@_head_ii:n {o}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_int_mult_truncate:Nn}
-% Missing in expl3, IMO.
-% \begin{macrocode}
-\cs_new:Nn \@@_int_mult_truncate:Nn
- {
- \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{expl3 variants}
-%
-% \begin{macrocode}
-\cs_generate_variant:Nn \int_set:Nn {Nv}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
-\cs_generate_variant:Nn \prop_put:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
-\cs_generate_variant:Nn \prop_get:NnNT {NxN}
-\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
-\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {f}
-\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
-\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
-% \end{macrocode}
%
% \begin{macrocode}
%</fontspec>
% \end{macrocode}
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx
index a75d0a54495..55e0c40716a 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx
@@ -1,3 +1,5 @@
+%%^^A%% fontspec-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
% \section{Changes to the NFSS}
%
% \begin{macrocode}
@@ -264,3 +266,19 @@
% \begin{macrocode}
%</fontspec>
% \end{macrocode}
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
index 4b271817da0..add007bb14b 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -1,42 +1,10 @@
-% \iffalse
-%<*internal>
-\begingroup
-\input l3docstrip.tex\relax
-\keepsilent
-\usedir{tex/latex/fontspec}
-\let\MetaPrefix\relax
-\preamble
-------------------------------------------------
-The FONTSPEC package for XeLaTeX/LuaLaTeX
-(C) 2004--2017 Will Robertson and Khaled Hosny
-License information appended.
-------------------------------------------------
-\endpreamble
-\postamble
-------------------------------------------------
-Copyright 2004--2017 Will Robertson <will.robertson@latex-project.org>
-Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
-
-Distributable under the LaTeX Project Public License, version 1.3c or higher.
-The latest version of this license is at: http://www.latex-project.org/lppl.txt
-
-This work is "maintained" by Will Robertson.
-It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
-And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
-------------------------------------------------
-\endpostamble
-\askforoverwritefalse
-\def\MetaPrefix{-- }
-\generate{\file{fontspec.lua}{\from{fontspec.dtx}{lua}\from{fontspec-lua.dtx}{lua}}}
-\let\MetaPrefix\DoubleperCent
-\ifx\FontspecDebug\undefined\def\FSDEBUG{}\else\def\FSDEBUG{,debug}\fi
-
-\generate{\file{fontspec.sty}{
- \from{fontspec.dtx}{fontspec,load\FSDEBUG}
-}}
+%%^^A%% fontspec.dtx -- part of FONTSPEC <wspr.io/fontspec>
+% \iffalse
+%<*dtx>
\gdef\FONTSPECDTX{
\DTX{fontspec.dtx}
+ \DTX{fontspec-code-load.dtx}
\DTX{fontspec-vars.dtx}
\DTX{fontspec-msg.dtx}
\DTX{fontspec-opening.dtx}
@@ -58,87 +26,46 @@ And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
\DTX{fontspec-xfss.dtx}
\DTX{fontspec-patches.dtx}
}
-
-\def\DTX#1{\from{#1}{fontspec,XE,xetexx\FSDEBUG}}
-\generate{\file{fontspec-xetex.sty}{\FONTSPECDTX}}
-
-\def\DTX#1{\from{#1}{fontspec,LU,luatex\FSDEBUG}}
-\generate{\file{fontspec-luatex.sty}{\FONTSPECDTX}}
-
-\def\tmpa{plain}
-\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
-\endgroup
-%</internal>
-%<*fontspec>
-\RequirePackage{expl3}
-\RequirePackage{xparse}
-%</fontspec>
+%</dtx>
%<*driver>
-\ProvidesExplFile{fontspec.dtx}
+\def\tmpa{plain}
+\ifx\tmpa\fmtname\expandafter\endinput\fi
%</driver>
-%<fontspec&!xetexx&!luatex>\ProvidesExplPackage{fontspec}%
+%<fontspec>\RequirePackage{xparse}
+%<fontspec&load>\ProvidesExplPackage{fontspec}%
%<fontspec&xetexx>\ProvidesExplPackage{fontspec-xetex}%
%<fontspec&luatex>\ProvidesExplPackage{fontspec-luatex}%
+%<*driver>
+\RequirePackage{xparse}
+\ProvidesExplFile{fontspec.dtx}
+%</driver>
%<*fontspec>
- {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/11/05}{2.6f}{Font selection for XeLaTeX and LuaLaTeX}
%</fontspec>
%<lua>fontspec = fontspec or {}
%<lua>local fontspec = fontspec
%<lua>fontspec.module = {
%<lua> name = "fontspec",
-%<lua> version = "2.6e",
-%<lua> date = "2017/09/27",
+%<lua> version = "2.6f",
+%<lua> date = "2017/11/05",
%<lua> description = "Font selection for XeLaTeX and LuaLaTeX",
%<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua> license = "LPPL"
%<lua>}
-%
-%<*driver>
-\ExplSyntaxOff
-\providecommand\ENDDOCUMENT{}
-\input{fontspec-doc.tex}
-\StopEventually{}
-\part{Implementation}
-\def\DTX#1{\DocInput{#1}}
-\FONTSPECDTX
-\clearpage
-\PrintChanges
-\clearpage
-\setcounter{IndexColumns}{2}
-\PrintIndex
-\Finale
-\end{document}
-%</driver>
% \fi
-%
-% \section{Loading}
-%
-% The \textsf{expl3} module is \texttt{fontspec}.
-% \begin{macrocode}
-%<@@=fontspec>
-% \end{macrocode}
-%
-% Check engine and load specific modules.
-% For Lua\TeX, load \pkg{luaotfload}.
-% \begin{macrocode}
-%<*load>
-\sys_if_engine_luatex:T
- { \RequirePackage{luaotfload}
- \directlua{require("fontspec")}
- \RequirePackageWithOptions{fontspec-luatex} \endinput }
-\sys_if_engine_xetex:T
- { \RequirePackageWithOptions{fontspec-xetex} \endinput }
-% \end{macrocode}
-% If not one of the above, error:
-% \begin{macrocode}
-\msg_new:nnn {fontspec} {cannot-use-pdftex}
- {
- The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX.\\\\
- You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~ "xelatex"~ or~ "lualatex" instead~ of~ plain~ "latex"~ or~ "pdflatex".
- }
-\msg_fatal:nn {fontspec} {cannot-use-pdftex}
-\endinput
-%</load>
-% \end{macrocode}
+
\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.ins b/Master/texmf-dist/source/latex/fontspec/fontspec.ins
new file mode 100644
index 00000000000..ded3b28730c
--- /dev/null
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.ins
@@ -0,0 +1,53 @@
+%%^^A%% fontspec.ins -- part of FONTSPEC <wspr.io/fontspec>
+
+\input fontspec.dtx\relax
+\input l3docstrip.tex\relax
+
+\keepsilent
+\usedir{tex/latex/fontspec}
+\let\MetaPrefix\relax
+\preamble
+------------------------------------------------
+The FONTSPEC package <wspr.io/fontspec>
+------------------------------------------------
+Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+Copyright 2009-2013 Khaled Hosny
+------------------------------------------------
+This package is free software and may be redistributed and/or modified under
+the conditions of the LaTeX Project Public License, version 1.3c or higher
+(your choice): <http://www.latex-project.org/lppl/>.
+------------------------------------------------
+\endpreamble
+\nopostamble
+\askforoverwritefalse
+\def\MetaPrefix{-- }
+\generate{\file{fontspec.lua}{\from{fontspec.dtx}{lua}\from{fontspec-lua.dtx}{lua}}}
+\let\MetaPrefix\DoubleperCent
+\ifx\FontspecDebug\undefined\def\FSDEBUG{}\else\def\FSDEBUG{,debug}\fi
+
+\generate{\file{fontspec.sty}{
+ \from{fontspec.dtx}{fontspec,load\FSDEBUG}
+ \from{fontspec-code-load.dtx}{fontspec,load\FSDEBUG}
+}}
+
+\def\DTX#1{\from{#1}{fontspec,XE,xetexx\FSDEBUG}}
+\generate{\file{fontspec-xetex.sty}{\FONTSPECDTX}}
+
+\def\DTX#1{\from{#1}{fontspec,LU,luatex\FSDEBUG}}
+\generate{\file{fontspec-luatex.sty}{\FONTSPECDTX}}
+
+\endbatchfile
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.ltx b/Master/texmf-dist/source/latex/fontspec/fontspec.ltx
new file mode 100644
index 00000000000..c1eeeecdc9b
--- /dev/null
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.ltx
@@ -0,0 +1,47 @@
+%%^^A%% fontspec.ltx -- part of FONTSPEC <wspr.io/fontspec>
+
+\ifdefined \XeTeXOTcountscripts \else \makeatletter
+ \@latex@error{^^J*** The fontspec documentation can only be typeset with `xelatex` ***\@gobble}\@ehc
+\fi
+
+\documentclass[a4paper]{l3doc}
+\usepackage{fontspec-doc-style}
+\begin{document}
+
+\GetFileInfo{fontspec.dtx}
+\title{The \textsf{fontspec} package\\Font selection for \XeLaTeX\ and \LuaLaTeX}
+\author{
+ \textsc{Will Robertson} and \textsc{Khaled Hosny}\\
+ \url{http://wspr.io/fontspec/}
+}
+\date{\filedate \qquad \fileversion}
+
+\maketitle
+\tableofcontents
+\newpage
+
+\include{fontspec-doc-intro}
+\include{fontspec-doc-fontsel}
+\include{fontspec-doc-featset}
+\include{fontspec-doc-opentype}
+\include{fontspec-doc-enc}
+\include{fontspec-doc-luatex}
+\include{fontspec-doc-xetex}
+\include{fontspec-doc-api}
+
+\end{document}
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2013 Khaled Hosny
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index ae6bb9c4b7d..6e2c8103c2b 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -5,6 +5,7 @@
%% The original source files were:
%%
%% fontspec.dtx (with options: `fontspec,LU,luatex')
+%% fontspec-code-load.dtx (with options: `fontspec,LU,luatex')
%% fontspec-vars.dtx (with options: `fontspec,LU,luatex')
%% fontspec-msg.dtx (with options: `fontspec,LU,luatex')
%% fontspec-opening.dtx (with options: `fontspec,LU,luatex')
@@ -26,21 +27,28 @@
%% fontspec-xfss.dtx (with options: `fontspec,LU,luatex')
%% fontspec-patches.dtx (with options: `fontspec,LU,luatex')
%% ------------------------------------------------
-%% The FONTSPEC package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2017 Will Robertson and Khaled Hosny
-%% License information appended.
+%% The FONTSPEC package <wspr.io/fontspec>
%% ------------------------------------------------
-\RequirePackage{expl3}
+%% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+%% Copyright 2009-2013 Khaled Hosny
+%% ------------------------------------------------
+%% This package is free software and may be redistributed and/or modified under
+%% the conditions of the LaTeX Project Public License, version 1.3c or higher
+%% (your choice): <http://www.latex-project.org/lppl/>.
+%% ------------------------------------------------
+%%^^A%% fontspec.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-luatex}%
- {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/11/05}{2.6f}{Font selection for XeLaTeX and LuaLaTeX}
+
+%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
\bool_new:N \l__fontspec_nosc_bool
\bool_new:N \l__fontspec_check_bool
-\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l__fontspec_check_bool }
-\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l__fontspec_check_bool }
\bool_new:N \l__fontspec_tfm_bool
\bool_new:N \l__fontspec_atsui_bool
\bool_new:N \l__fontspec_ot_bool
@@ -54,6 +62,7 @@
\bool_new:N \g__fontspec_cfg_bool
\bool_new:N \g__fontspec_math_bool
\bool_new:N \g__fontspec_euenc_bool
+\bool_new:N \l__fontspec_tmpa_bool
\bool_new:N \l__fontspec_disable_defaults_bool
\bool_new:N \l__fontspec_alias_bool
\bool_new:N \l__fontspec_external_bool
@@ -77,13 +86,67 @@
\seq_new:N \g__fontspec_bf_series_seq
\clist_new:N \g__fontspec_default_fontopts_clist
\clist_new:N \g__fontspec_all_keyval_modules_clist
+\clist_new:N \l__fontspec_sizefeat_clist
\clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}}
+\clist_new:N \l__fontspec_extensions_clist
+\clist_new:N \l__fontspec_fontopts_clist
+\clist_new:N \l__fontspec_family_fontopts_clist
+\clist_new:N \l__fontspec_all_features_clist
+\clist_new:N \l__fontspec_leftover_clist
+\clist_new:N \l__fontspec_keys_leftover_clist
+\clist_new:N \l__fontspec_sizing_leftover_clist
+\clist_new:N \l__fontspec_fontfeat_clist
+\clist_new:N \l__fontspec_fontfeat_curr_clist
+\tl_new:N \l__fontspec_fontfeat_up_clist
+\tl_new:N \l__fontspec_fontfeat_bf_clist
+\tl_new:N \l__fontspec_fontfeat_it_clist
+\tl_new:N \l__fontspec_fontfeat_bfit_clist
+\tl_new:N \l__fontspec_fontfeat_sl_clist
+\tl_new:N \l__fontspec_fontfeat_bfsl_clist
+\tl_new:N \l__fontspec_fontfeat_sc_clist
\prop_new:N \g__fontspec_fontopts_prop
\prop_new:N \l__fontspec_nfss_prop
\prop_new:N \l__fontspec_nfssfont_prop
\prop_new:N \g__fontspec_OT_features_prop
\prop_new:N \g__fontspec_all_opentype_feature_names_prop
\prop_new:N \g__fontspec_em_prop
+\prop_new:N \g__fontspec_strong_prop
+\tl_new:N \l_fontspec_family_tl
+\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
+\tl_new:N \UTFencname
+\tl_new:N \cyrillicencoding
+\tl_new:N \latinencoding
+\tl_new:N \g__fontspec_single_feat_tl
+\tl_new:N \l__fontspec_tmp_tl
+\tl_new:N \l__fontspec_size_tl
+\tl_new:N \l__fontspec_sizedfont_tl
+\tl_new:N \l__fontspec_nfss_tl
+\tl_new:N \l__fontspec_nfss_sc_tl
+\tl_new:N \l__fontspec_this_font_tl
+\tl_new:N \l__fontspec_scale_tl
+\tl_new:N \l__fontspec_opacity_tl
+\tl_new:N \l__fontspec_hexcol_tl
+\tl_new:N \l__fontspec_fontid_tl
+\tl_new:N \l__fontspec_extension_tl
+\tl_new:N \l__fontspec_ext_filename_tl
+\tl_new:N \l__fontspec_font_path_tl
+\tl_new:N \l__fontspec_basename_tl
+\tl_new:N \l__fontspec_curr_fontname_tl
+\tl_new:N \l__fontspec_saved_fontname_tl
+\tl_new:N \l__fontspec_optical_size_tl
+\tl_new:N \l__fontspec_ttc_index_tl
+\tl_new:N \l__fontspec_nfss_enc_tl
+\tl_new:N \g__fontspec_curr_series_tl
+\tl_new:N \l__fontspec_options_tl
+\tl_new:N \l__fontspec_fontname_tl
+\tl_new:N \l__fontspec_rawfeatures_sclist
+\tl_new:N \l__fontspec_pre_feat_sclist
+\tl_new:N \g__fontspec_rmfamily_family
+\tl_new:N \g__fontspec_sffamily_family
+\tl_new:N \g__fontspec_ttfamily_family
\tl_new:N \g__fontspec_mathrm_tl
\tl_new:N \g__fontspec_bfmathrm_tl
\tl_new:N \g__fontspec_mathsf_tl
@@ -98,13 +161,6 @@
\tl_new:N \l__fontspec_fontname_sl_tl
\tl_new:N \l__fontspec_fontname_bfsl_tl
\tl_new:N \l__fontspec_fontname_sc_tl
-\tl_new:N \l__fontspec_fontfeat_up_clist
-\tl_new:N \l__fontspec_fontfeat_bf_clist
-\tl_new:N \l__fontspec_fontfeat_it_clist
-\tl_new:N \l__fontspec_fontfeat_bfit_clist
-\tl_new:N \l__fontspec_fontfeat_sl_clist
-\tl_new:N \l__fontspec_fontfeat_bfsl_clist
-\tl_new:N \l__fontspec_fontfeat_sc_clist
\tl_new:N \l__fontspec_script_name_tl
\tl_new:N \l_fontspec_script_tl
\tl_new:N \l__fontspec_lang_name_tl
@@ -114,35 +170,13 @@
\tl_new:N \g__fontspec_opacity_tl
\tl_set:Nn \g__fontspec_hexcol_tl {000000}
\tl_set:Nn \g__fontspec_opacity_tl {FF~}
+\tl_new:N \l__fontspec_punctspace_adjust_tl
+\tl_new:N \l__fontspec_wordspace_adjust_tl
+\tl_new:N \l__fontspec_postadjust_tl
+\tl_new:N \g__fontspec_postadjust_tl
\tl_set:Nn \g__fontspec_postadjust_tl { \l__fontspec_wordspace_adjust_tl \l__fontspec_punctspace_adjust_tl }
-\cs_new:Nn \__fontspec_keys_set_known:nnN
- {
- \keys_set_known:nnN {#1} {#2} #3
- }
-\cs_generate_variant:Nn \__fontspec_keys_set_known:nnN {nx}
-\cs_set:Npn \__fontspec_head_ii:n #1 { \__fontspec_head_ii:w #1 *** \q_stop}
-\cs_set:Npn \__fontspec_head_ii:w #1#2#3 \q_stop { #1#2 }
-\cs_generate_variant:Nn \__fontspec_head_ii:n {o}
-\cs_new:Nn \__fontspec_int_mult_truncate:Nn
- {
- \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
- }
-\cs_generate_variant:Nn \int_set:Nn {Nv}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
-\cs_generate_variant:Nn \prop_put:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
-\cs_generate_variant:Nn \prop_get:NnNT {NxN}
-\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
-\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {f}
-\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
-\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+%%^^A%% fontspec-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
\cs_new:Npn \__fontspec_error:nn { \msg_error:nnn {fontspec} }
\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
@@ -373,6 +407,8 @@
* an eight-digit hex colour RRGGBBTT with opacity
}
\char_set_catcode_ignore:n {32}
+
+%%^^A%% fontspec-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
\DeclareOption{cm-default}
{ \__fontspec_warning:n {cm-default-obsolete} }
\DeclareOption{math}{\bool_set_true:N \g__fontspec_math_bool}
@@ -434,6 +470,34 @@
\RequirePackage{xunicode}
\cs_set_eq:NN \XeTeXpicfile \fontspec_tmp:
}
+\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l__fontspec_check_bool }
+\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l__fontspec_check_bool }
+\cs_new:Nn \__fontspec_keys_set_known:nnN
+ {
+ \keys_set_known:nnN {#1} {#2} #3
+ }
+\cs_generate_variant:Nn \__fontspec_keys_set_known:nnN {nx}
+\cs_new:Nn \__fontspec_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
+ }
+\cs_generate_variant:Nn \int_set:Nn {Nv}
+\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_generate_variant:Nn \prop_put:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
+\cs_generate_variant:Nn \prop_get:NnNT {NxN}
+\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
+\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+
+%%^^A%% fontspec-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
{
@@ -476,6 +540,9 @@
{
\tex_hyphenchar:D #1 = #2 \scan_stop:
}
+
+%%^^A%% fontspec-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\NewDocumentCommand \fontspec { O{} m O{} }
{
\__fontspec_main_fontspec:nn {#1,#3} {#2}
@@ -572,6 +639,9 @@
{
\__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
}
+
+%%^^A%% fontspec-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_set:Nn \__fontspec_main_fontspec:nn
{
\fontspec_set_family:Nnn \f@family {#1} {#2}
@@ -721,8 +791,8 @@
{
\group_begin:
\keys_set_known:nnN {fontspec-addfeatures} {#1} \l__fontspec_tmp_tl
- \prop_get:cnN {g__fontspec_ \f@family _prop} {options} \l__fontspec_options_tl
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontname} \l__fontspec_fontname_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {options} \l__fontspec_options_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {fontname} \l__fontspec_fontname_tl
\bool_set_true:N \l__fontspec_disable_defaults_bool
\use:x
{
@@ -850,19 +920,20 @@
}
}
+%%^^A%% fontspec-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
- \cs_if_exist:cTF {g__fontspec_ \f@family _prop} \prg_return_true: \prg_return_false:
+ \cs_if_exist:cTF {g__fontspec_fontinfo_ \f@family _prop} \prg_return_true: \prg_return_false:
}
\prg_new_conditional:Nnn \fontspec_if_aat_feature:nn {TF,T,F}
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_atsui_bool
{
- \__fontspec_make_AAT_feature_string:nnTF {#1}{#2}
+ \__fontspec_make_AAT_feature_string:NnnTF \font {#1} {#2}
\prg_return_true: \prg_return_false:
}
{
@@ -877,9 +948,7 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool \prg_return_true: \prg_return_false:
}
{
@@ -890,21 +959,19 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
\int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-num} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-num} \l__fontspec_tmp_tl
\int_set:Nn \l__fontspec_language_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
- \__fontspec_check_ot_feat:nTF {#1} {\prg_return_true:} {\prg_return_false:}
+ \__fontspec_check_ot_feat:NnTF \font {#1} {\prg_return_true:} {\prg_return_false:}
}
{
\prg_return_false:
@@ -918,14 +985,12 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
\__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
\__fontspec_iv_str_to_num:Nn \l__fontspec_language_int {#2}
- \__fontspec_check_ot_feat:nTF {#3} \prg_return_true: \prg_return_false:
+ \__fontspec_check_ot_feat:NnTF \font {#3} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -935,12 +1000,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \__fontspec_check_script:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -950,16 +1013,14 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-num} \l__fontspec_tmpf_tl
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmpf_tl}
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \__fontspec_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -969,14 +1030,12 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
\tl_set:Nn \l_fontspec_script_tl {#1}
\__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
- \__fontspec_check_lang:nTF {#2} \prg_return_true: \prg_return_false:
+ \__fontspec_check_lang:NnTF \font {#2} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -986,12 +1045,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l__fontspec_tmp_tl
\str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
{\prg_return_true:} {\prg_return_false:}
}
@@ -1003,12 +1060,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-tag} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-tag} \l__fontspec_tmp_tl
\str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
{\prg_return_true:} {\prg_return_false:}
}
@@ -1027,7 +1082,7 @@
{
\tl_set:Nn \l__fontspec_family_label_tl { #1 }
\__fontspec_select_font_family:nn {#3}{#4}
- \tl_set_eq:NN #1 \l_fontspec_font
+ \font #1 = \fontname \l_fontspec_font \scan_stop:
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
\prg_new_conditional:Nnn \fontspec_font_if_exist:n {TF,T,F}
@@ -1067,6 +1122,9 @@
}
{ \prg_return_false: }
}
+
+%%^^A%% fontspec-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_new_protected:Nn \__fontspec_select_font_family:nn
{
\group_begin:
@@ -1193,7 +1251,7 @@
\__fontspec_primitive_font_set:Nnn \l_fontspec_font
{ \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \l_fontspec_font
\__fontspec_primitive_font_gset:Nnn \l_fontspec_font
{ \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
@@ -1228,7 +1286,7 @@
{
\tl_if_empty:NTF \l__fontspec_script_name_tl
{
- \__fontspec_check_script:nTF {latn}
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
{
\tl_set:Nn \l__fontspec_script_name_tl {Latin}
\tl_if_empty:NT \l__fontspec_lang_name_tl
@@ -1273,11 +1331,17 @@
{
- \cs_if_exist:NT \l__fontspec_nfss_fam_tl
- {
- \cs_set_eq:cN {g__fontspec_UID_\l__fontspec_fontid_tl} \l__fontspec_nfss_fam_tl
- }
- \cs_if_exist:cF {g__fontspec_UID_\l__fontspec_fontid_tl}
+ \tl_if_exist:cF {g__fontspec_UID_\l__fontspec_fontid_tl}
+ {
+ \tl_new:c {g__fontspec_UID_\l__fontspec_fontid_tl}
+ }
+
+ \tl_if_exist:NT \l__fontspec_nfss_fam_tl
+ {
+ \tl_set_eq:cN {g__fontspec_UID_\l__fontspec_fontid_tl} \l__fontspec_nfss_fam_tl
+ }
+
+ \tl_if_empty:cT {g__fontspec_UID_\l__fontspec_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__fontspec_tmp_tl {#1}
@@ -1293,7 +1357,7 @@
}
}
\tl_gset:Nv \l_fontspec_family_tl {g__fontspec_UID_\l__fontspec_fontid_tl}
- \cs_if_exist:cTF {g__fontspec_ \l_fontspec_family_tl _prop}
+ \cs_if_exist:cTF {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop}
\prg_return_false: \prg_return_true:
}
\cs_new:Nn \__fontspec_save_family:nn
@@ -1306,18 +1370,18 @@
}
\cs_new:Nn \__fontspec_save_fontinfo:n
{
- \prop_new:c {g__fontspec_ \l_fontspec_family_tl _prop}
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontname} { #1 }
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {options} { \l__fontspec_all_features_clist }
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontdef}
+ \prop_new:c {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop}
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {fontname} { #1 }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {options} { \l__fontspec_all_features_clist }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {fontdef}
{
\__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
{ \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist }
}
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-num} \l__fontspec_script_int
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-num} \l__fontspec_language_int
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {script-num} \l__fontspec_script_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {lang-num} \l__fontspec_language_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
}
\cs_new:Nn \__fontspec_find_autofonts:
{
@@ -1376,7 +1440,7 @@
{ {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
}
}
-\cs_new:Nn \__fontspec_set_font_type:
+\cs_new:Nn \__fontspec_set_font_type:N
{
\bool_set_true:N \l__fontspec_ot_bool
}
@@ -1570,7 +1634,7 @@
}
\cs_set:Nn \__fontspec_make_smallcaps:TF
{
- \__fontspec_check_ot_feat:nTF {smcp} {#1} {#2}
+ \__fontspec_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
}
\cs_new:Nn \__fontspec_update_featstr:n
{
@@ -1637,6 +1701,9 @@
}
}
\cs_generate_variant:Nn \__fontspec_iv_str_to_num:Nn {No}
+
+%%^^A%% fontspec-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_new:Nn \__fontspec_define_opentype_feature_group:n
{
\keys_define:nn {fontspec-opentype} { #1 .multichoice: }
@@ -1694,7 +1761,7 @@
\tl_if_empty:nT {#1} { \bool_set_false:N \l__fontspec_check_feat_bool }
\bool_if:NT \l__fontspec_check_feat_bool
{
- \__fontspec_check_ot_feat:nF {#1}
+ \__fontspec_check_ot_feat:NnF \l_fontspec_font {#1}
{
\__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1}
\bool_set_false:N \l__fontspec_proceed_bool
@@ -1713,41 +1780,50 @@
\cs_new:Nn \__fontspec_swap_plus_minus:n { \__fontspec_swap_plus_minus_aux:Nq #1 \q_nil }
\cs_new:Npn \__fontspec_swap_plus_minus_aux:Nq #1#2 \q_nil
{ \str_case:nn {#1} { {+} {-#2} {-} {+#2} } }
-\prg_new_conditional:Nnn \__fontspec_check_script:n {TF}
+\prg_new_conditional:Nnn \__fontspec_check_script:Nn {TF}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \directlua{fontspec.check_ot_script("l_fontspec_font", "#1")}
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
+ {
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l__fontspec_tmp_tl {\curr@fontshape/\f@size} }
+ { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
+ \directlua{fontspec.check_ot_script("\l__fontspec_tmp_tl", "#2")}
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
}
-\prg_new_conditional:Nnn \__fontspec_check_lang:n {TF}
+\prg_new_conditional:Nnn \__fontspec_check_lang:Nn {TF}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \directlua
- {
- fontspec.check_ot_lang( "l_fontspec_font", "#1", "\l_fontspec_script_tl" )
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
+ {
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l__fontspec_tmp_tl {\curr@fontshape/\f@size} }
+ { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
+ \directlua
+ {
+ fontspec.check_ot_lang( "\l__fontspec_tmp_tl", "#2", "\l_fontspec_script_tl" )
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
}
-\prg_new_conditional:Nnn \__fontspec_check_ot_feat:n {TF,F}
+\prg_new_conditional:Nnn \__fontspec_check_ot_feat:Nn {TF,F}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \directlua
- {
- fontspec.check_ot_feat(
- "l_fontspec_font", "#1",
+ {
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l__fontspec_tmp_tl {\curr@fontshape/\f@size} }
+ { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
+ \directlua
+ {
+ fontspec.check_ot_feat(
+ "\l__fontspec_tmp_tl", "#2",
"\l_fontspec_lang_tl", "\l_fontspec_script_tl"
)
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {aalt}{Access~All~Alternates}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvf}{Above-base~Forms}
@@ -1872,6 +1948,10 @@
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {zero}{Slashed~Zero}
+%%^^A%% fontspec-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+
+%%^^A%% fontspec-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
\clist_set:Nn \g__fontspec_all_keyval_modules_clist
{
@@ -1925,18 +2005,14 @@
\__fontspec_warning:nx {only-xetex-feature} {Renderer=AAT/OpenType/Graphite}
}
{
- \tl_set:Nv \l_fontspec_mode_tl
- { g_fontspec_mode_tag_ \l_keys_choice_tl }
+ \tl_set:Nx \l_fontspec_mode_tl
+ {
+ \int_case:nn \l_keys_choice_int { 5 {node} 6 {base} }
+ }
\tl_gset:Nx \g__fontspec_single_feat_tl { mode=\l_fontspec_mode_tl }
}
}
}
-\tl_set:cn {g_fontspec_renderer_tag_AAT} {/AAT}
-\tl_set:cn {g_fontspec_renderer_tag_ICU} {/OT}
-\tl_set:cn {g_fontspec_renderer_tag_OpenType} {/OT}
-\tl_set:cn {g_fontspec_renderer_tag_Graphite} {/GR}
-\tl_set:cn {g_fontspec_mode_tag_Full} {node}
-\tl_set:cn {g_fontspec_mode_tag_Basic} {base}
\__fontspec_keys_define_code:nnn {fontspec-preparse} {Script}
{
\tl_set:Nn \l__fontspec_script_name_tl {#1}
@@ -2098,7 +2174,7 @@
\tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
\cs_undefine:c {g__fontspec_UID_\l__fontspec_fontid_tl}
\tl_if_exist:NT \l_fontspec_family_tl
- { \cs_undefine:c {g__fontspec_ \l_fontspec_family_tl _prop} }
+ { \cs_undefine:c {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} }
}
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
@@ -2382,6 +2458,8 @@
\__fontspec_update_featstr:n {#1}
}
+%%^^A%% fontspec-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\__fontspec_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
\__fontspec_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
\__fontspec_feat_prop_add:nn {ornm} { Ornament\,=\,$N$ }
@@ -2642,7 +2720,7 @@
\bool_set_false:N \l__fontspec_script_exist_bool
\clist_map_inline:nn {#2}
{
- \__fontspec_check_script:nTF {####1}
+ \__fontspec_check_script:NnTF \l_fontspec_font {####1}
{
\tl_set:Nn \l_fontspec_script_tl {####1}
\int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
@@ -2659,7 +2737,7 @@
\__fontspec_warning:nx {script-not-exist} {#1}
}
{
- \__fontspec_check_script:nTF {latn}
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
{
\__fontspec_warning:nx {script-not-exist-latn} {#1}
\tl_set:Nn \l_fontspec_script_tl {latn}
@@ -2676,7 +2754,7 @@
\cs_new:Nn \fontspec_new_lang:nn
{
\keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
- \__fontspec_check_lang:nTF {#2}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {#2}
{
\tl_set:Nn \l_fontspec_lang_tl {#2}
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
@@ -2698,14 +2776,14 @@
{
Language / Turkish .code:n =
{
- \__fontspec_check_lang:nTF {TRK}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TRK}
{
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
\tl_set:Nn \l_fontspec_lang_tl {TRK}
\tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
}
{
- \__fontspec_check_lang:nTF {TUR}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TUR}
{
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
\tl_set:Nn \l_fontspec_lang_tl {TUR}
@@ -2740,6 +2818,8 @@
\__fontspec_ot_compat:nn {Diacritics} {AboveBase}
\__fontspec_ot_compat:nn {Diacritics} {BelowBase}
+%%^^A%% fontspec-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\newfontscript{Adlam}{adlm}
\newfontscript{Ahom}{ahom}
\newfontscript{Anatolian~Hieroglyphs}{hluw}
@@ -2885,6 +2965,8 @@
\newfontscript{N'ko}{nko~}
\newfontscript{Oriya}{ory2,orya}
+%%^^A%% fontspec-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\newfontlanguage{Abaza}{ABA}
\newfontlanguage{Abkhazian}{ABK}
\newfontlanguage{Adyghe}{ADY}
@@ -3268,6 +3350,10 @@
\newfontlanguage{Zande}{ZND}
\newfontlanguage{Zulu}{ZUL}
+%%^^A%% fontspec-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+
+%%^^A%% fontspec-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
\providecommand\UnicodeFontName[2]{"#1:#2"}
@@ -3337,7 +3423,18 @@
{ \__fontspec_error:nn {only-inside-encdef} \UndeclareSymbol }
\UndeclareTextCommand {#1} {\UnicodeEncodingName}
}
-
+\DeclareDocumentCommand \UndeclareAccent {m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareAccent }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+\DeclareDocumentCommand \UndeclareCommand {m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareCommand }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
\DeclareDocumentCommand \UndeclareComposite {mm}
{
\bool_if:NF \l__fontspec_defining_encoding_bool
@@ -3345,6 +3442,8 @@
\cs_undefine:c
{ \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
}
+
+%%^^A%% fontspec-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
\@ifpackageloaded{euler}
{
\bool_set_true:N \g__fontspec_pkg_euler_loaded_bool
@@ -3480,12 +3579,17 @@
}
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
+
+%%^^A%% fontspec-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_if:NT \g__fontspec_cfg_bool
{
\InputIfFileExists{fontspec.cfg}
{}
{\typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.}}
}
+
+%%^^A%% fontspec-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\providecommand*\itscdefault{\itdefault\scdefault}
\providecommand*\slscdefault{\sldefault\scdefault}
\DeclareRobustCommand{\sishape}
@@ -3643,6 +3747,9 @@
\cs_new:Nn \fontspec_set_strong_level:n { \int_set:Nn \l__fontspec_strong_int {#1} }
\strongfontdeclare{ \bfseries }
\emfontdeclare{ \emshape, \eminnershape }
+
+%%^^A%% fontspec-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\DeclareRobustCommand{\-}
{
\discretionary
@@ -3743,16 +3850,4 @@
{
{ \addfontfeature{Numbers=Lining} #1 }
}
-%% ------------------------------------------------
-%% Copyright 2004--2017 Will Robertson <will.robertson@latex-project.org>
-%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
-%%
-%% Distributable under the LaTeX Project Public License, version 1.3c or higher.
-%% The latest version of this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" by Will Robertson.
-%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
-%% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
-%% ------------------------------------------------
-%%
-%% End of file `fontspec-luatex.sty'.
+
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index ee1f0dbdf01..39c0e81ba85 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -5,6 +5,7 @@
%% The original source files were:
%%
%% fontspec.dtx (with options: `fontspec,XE,xetexx')
+%% fontspec-code-load.dtx (with options: `fontspec,XE,xetexx')
%% fontspec-vars.dtx (with options: `fontspec,XE,xetexx')
%% fontspec-msg.dtx (with options: `fontspec,XE,xetexx')
%% fontspec-opening.dtx (with options: `fontspec,XE,xetexx')
@@ -26,21 +27,28 @@
%% fontspec-xfss.dtx (with options: `fontspec,XE,xetexx')
%% fontspec-patches.dtx (with options: `fontspec,XE,xetexx')
%% ------------------------------------------------
-%% The FONTSPEC package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2017 Will Robertson and Khaled Hosny
-%% License information appended.
+%% The FONTSPEC package <wspr.io/fontspec>
%% ------------------------------------------------
-\RequirePackage{expl3}
+%% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+%% Copyright 2009-2013 Khaled Hosny
+%% ------------------------------------------------
+%% This package is free software and may be redistributed and/or modified under
+%% the conditions of the LaTeX Project Public License, version 1.3c or higher
+%% (your choice): <http://www.latex-project.org/lppl/>.
+%% ------------------------------------------------
+%%^^A%% fontspec.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/11/05}{2.6f}{Font selection for XeLaTeX and LuaLaTeX}
+
+%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
\bool_new:N \l__fontspec_nosc_bool
\bool_new:N \l__fontspec_check_bool
-\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l__fontspec_check_bool }
-\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l__fontspec_check_bool }
\bool_new:N \l__fontspec_tfm_bool
\bool_new:N \l__fontspec_atsui_bool
\bool_new:N \l__fontspec_ot_bool
@@ -54,6 +62,7 @@
\bool_new:N \g__fontspec_cfg_bool
\bool_new:N \g__fontspec_math_bool
\bool_new:N \g__fontspec_euenc_bool
+\bool_new:N \l__fontspec_tmpa_bool
\bool_new:N \l__fontspec_disable_defaults_bool
\bool_new:N \l__fontspec_alias_bool
\bool_new:N \l__fontspec_external_bool
@@ -77,13 +86,67 @@
\seq_new:N \g__fontspec_bf_series_seq
\clist_new:N \g__fontspec_default_fontopts_clist
\clist_new:N \g__fontspec_all_keyval_modules_clist
+\clist_new:N \l__fontspec_sizefeat_clist
\clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}}
+\clist_new:N \l__fontspec_extensions_clist
+\clist_new:N \l__fontspec_fontopts_clist
+\clist_new:N \l__fontspec_family_fontopts_clist
+\clist_new:N \l__fontspec_all_features_clist
+\clist_new:N \l__fontspec_leftover_clist
+\clist_new:N \l__fontspec_keys_leftover_clist
+\clist_new:N \l__fontspec_sizing_leftover_clist
+\clist_new:N \l__fontspec_fontfeat_clist
+\clist_new:N \l__fontspec_fontfeat_curr_clist
+\tl_new:N \l__fontspec_fontfeat_up_clist
+\tl_new:N \l__fontspec_fontfeat_bf_clist
+\tl_new:N \l__fontspec_fontfeat_it_clist
+\tl_new:N \l__fontspec_fontfeat_bfit_clist
+\tl_new:N \l__fontspec_fontfeat_sl_clist
+\tl_new:N \l__fontspec_fontfeat_bfsl_clist
+\tl_new:N \l__fontspec_fontfeat_sc_clist
\prop_new:N \g__fontspec_fontopts_prop
\prop_new:N \l__fontspec_nfss_prop
\prop_new:N \l__fontspec_nfssfont_prop
\prop_new:N \g__fontspec_OT_features_prop
\prop_new:N \g__fontspec_all_opentype_feature_names_prop
\prop_new:N \g__fontspec_em_prop
+\prop_new:N \g__fontspec_strong_prop
+\tl_new:N \l_fontspec_family_tl
+\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
+\tl_new:N \UTFencname
+\tl_new:N \cyrillicencoding
+\tl_new:N \latinencoding
+\tl_new:N \g__fontspec_single_feat_tl
+\tl_new:N \l__fontspec_tmp_tl
+\tl_new:N \l__fontspec_size_tl
+\tl_new:N \l__fontspec_sizedfont_tl
+\tl_new:N \l__fontspec_nfss_tl
+\tl_new:N \l__fontspec_nfss_sc_tl
+\tl_new:N \l__fontspec_this_font_tl
+\tl_new:N \l__fontspec_scale_tl
+\tl_new:N \l__fontspec_opacity_tl
+\tl_new:N \l__fontspec_hexcol_tl
+\tl_new:N \l__fontspec_fontid_tl
+\tl_new:N \l__fontspec_extension_tl
+\tl_new:N \l__fontspec_ext_filename_tl
+\tl_new:N \l__fontspec_font_path_tl
+\tl_new:N \l__fontspec_basename_tl
+\tl_new:N \l__fontspec_curr_fontname_tl
+\tl_new:N \l__fontspec_saved_fontname_tl
+\tl_new:N \l__fontspec_optical_size_tl
+\tl_new:N \l__fontspec_ttc_index_tl
+\tl_new:N \l__fontspec_nfss_enc_tl
+\tl_new:N \g__fontspec_curr_series_tl
+\tl_new:N \l__fontspec_options_tl
+\tl_new:N \l__fontspec_fontname_tl
+\tl_new:N \l__fontspec_rawfeatures_sclist
+\tl_new:N \l__fontspec_pre_feat_sclist
+\tl_new:N \g__fontspec_rmfamily_family
+\tl_new:N \g__fontspec_sffamily_family
+\tl_new:N \g__fontspec_ttfamily_family
\tl_new:N \g__fontspec_mathrm_tl
\tl_new:N \g__fontspec_bfmathrm_tl
\tl_new:N \g__fontspec_mathsf_tl
@@ -98,13 +161,6 @@
\tl_new:N \l__fontspec_fontname_sl_tl
\tl_new:N \l__fontspec_fontname_bfsl_tl
\tl_new:N \l__fontspec_fontname_sc_tl
-\tl_new:N \l__fontspec_fontfeat_up_clist
-\tl_new:N \l__fontspec_fontfeat_bf_clist
-\tl_new:N \l__fontspec_fontfeat_it_clist
-\tl_new:N \l__fontspec_fontfeat_bfit_clist
-\tl_new:N \l__fontspec_fontfeat_sl_clist
-\tl_new:N \l__fontspec_fontfeat_bfsl_clist
-\tl_new:N \l__fontspec_fontfeat_sc_clist
\tl_new:N \l__fontspec_script_name_tl
\tl_new:N \l_fontspec_script_tl
\tl_new:N \l__fontspec_lang_name_tl
@@ -114,35 +170,13 @@
\tl_new:N \g__fontspec_opacity_tl
\tl_set:Nn \g__fontspec_hexcol_tl {000000}
\tl_set:Nn \g__fontspec_opacity_tl {FF~}
+\tl_new:N \l__fontspec_punctspace_adjust_tl
+\tl_new:N \l__fontspec_wordspace_adjust_tl
+\tl_new:N \l__fontspec_postadjust_tl
+\tl_new:N \g__fontspec_postadjust_tl
\tl_set:Nn \g__fontspec_postadjust_tl { \l__fontspec_wordspace_adjust_tl \l__fontspec_punctspace_adjust_tl }
-\cs_new:Nn \__fontspec_keys_set_known:nnN
- {
- \keys_set_known:nnN {#1} {#2} #3
- }
-\cs_generate_variant:Nn \__fontspec_keys_set_known:nnN {nx}
-\cs_set:Npn \__fontspec_head_ii:n #1 { \__fontspec_head_ii:w #1 *** \q_stop}
-\cs_set:Npn \__fontspec_head_ii:w #1#2#3 \q_stop { #1#2 }
-\cs_generate_variant:Nn \__fontspec_head_ii:n {o}
-\cs_new:Nn \__fontspec_int_mult_truncate:Nn
- {
- \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
- }
-\cs_generate_variant:Nn \int_set:Nn {Nv}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
-\cs_generate_variant:Nn \prop_put:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
-\cs_generate_variant:Nn \prop_get:NnNT {NxN}
-\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
-\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {f}
-\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
-\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+%%^^A%% fontspec-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
\cs_new:Npn \__fontspec_error:nn { \msg_error:nnn {fontspec} }
\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
@@ -373,6 +407,8 @@
* an eight-digit hex colour RRGGBBTT with opacity
}
\char_set_catcode_ignore:n {32}
+
+%%^^A%% fontspec-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
\DeclareOption{cm-default}
{ \__fontspec_warning:n {cm-default-obsolete} }
\DeclareOption{math}{\bool_set_true:N \g__fontspec_math_bool}
@@ -431,6 +467,34 @@
{
\RequirePackage{xunicode}
}
+\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l__fontspec_check_bool }
+\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l__fontspec_check_bool }
+\cs_new:Nn \__fontspec_keys_set_known:nnN
+ {
+ \keys_set_known:nnN {#1} {#2} #3
+ }
+\cs_generate_variant:Nn \__fontspec_keys_set_known:nnN {nx}
+\cs_new:Nn \__fontspec_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
+ }
+\cs_generate_variant:Nn \int_set:Nn {Nv}
+\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_generate_variant:Nn \prop_put:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
+\cs_generate_variant:Nn \prop_get:NnNT {NxN}
+\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
+\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+
+%%^^A%% fontspec-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
{
@@ -473,6 +537,9 @@
{
\tex_hyphenchar:D #1 = #2 \scan_stop:
}
+
+%%^^A%% fontspec-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\NewDocumentCommand \fontspec { O{} m O{} }
{
\__fontspec_main_fontspec:nn {#1,#3} {#2}
@@ -569,6 +636,9 @@
{
\__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
}
+
+%%^^A%% fontspec-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_set:Nn \__fontspec_main_fontspec:nn
{
\fontspec_set_family:Nnn \f@family {#1} {#2}
@@ -718,8 +788,8 @@
{
\group_begin:
\keys_set_known:nnN {fontspec-addfeatures} {#1} \l__fontspec_tmp_tl
- \prop_get:cnN {g__fontspec_ \f@family _prop} {options} \l__fontspec_options_tl
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontname} \l__fontspec_fontname_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {options} \l__fontspec_options_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {fontname} \l__fontspec_fontname_tl
\bool_set_true:N \l__fontspec_disable_defaults_bool
\use:x
{
@@ -847,19 +917,20 @@
}
}
+%%^^A%% fontspec-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
- \cs_if_exist:cTF {g__fontspec_ \f@family _prop} \prg_return_true: \prg_return_false:
+ \cs_if_exist:cTF {g__fontspec_fontinfo_ \f@family _prop} \prg_return_true: \prg_return_false:
}
\prg_new_conditional:Nnn \fontspec_if_aat_feature:nn {TF,T,F}
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_atsui_bool
{
- \__fontspec_make_AAT_feature_string:nnTF {#1}{#2}
+ \__fontspec_make_AAT_feature_string:NnnTF \font {#1} {#2}
\prg_return_true: \prg_return_false:
}
{
@@ -874,9 +945,7 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool \prg_return_true: \prg_return_false:
}
{
@@ -887,21 +956,19 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
\int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-num} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-num} \l__fontspec_tmp_tl
\int_set:Nn \l__fontspec_language_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
- \__fontspec_check_ot_feat:nTF {#1} {\prg_return_true:} {\prg_return_false:}
+ \__fontspec_check_ot_feat:NnTF \font {#1} {\prg_return_true:} {\prg_return_false:}
}
{
\prg_return_false:
@@ -915,14 +982,12 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
\__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
\__fontspec_iv_str_to_num:Nn \l__fontspec_language_int {#2}
- \__fontspec_check_ot_feat:nTF {#3} \prg_return_true: \prg_return_false:
+ \__fontspec_check_ot_feat:NnTF \font {#3} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -932,12 +997,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \__fontspec_check_script:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -947,16 +1010,14 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-num} \l__fontspec_tmpf_tl
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmpf_tl}
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l_fontspec_script_tl
- \__fontspec_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
+ \__fontspec_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -966,14 +1027,12 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
\tl_set:Nn \l_fontspec_script_tl {#1}
\__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
- \__fontspec_check_lang:nTF {#2} \prg_return_true: \prg_return_false:
+ \__fontspec_check_lang:NnTF \font {#2} \prg_return_true: \prg_return_false:
}
{ \prg_return_false: }
}
@@ -983,12 +1042,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {script-tag} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {script-tag} \l__fontspec_tmp_tl
\str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
{\prg_return_true:} {\prg_return_false:}
}
@@ -1000,12 +1057,10 @@
{
\fontspec_if_fontspec_font:TF
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {fontdef} \l__fontspec_fontdef_tl
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font {\l__fontspec_fontdef_tl} {\f@size pt}
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \font
\bool_if:NTF \l__fontspec_ot_bool
{
- \prop_get:cnN {g__fontspec_ \f@family _prop} {lang-tag} \l__fontspec_tmp_tl
+ \prop_get:cnN {g__fontspec_fontinfo_ \f@family _prop} {lang-tag} \l__fontspec_tmp_tl
\str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
{\prg_return_true:} {\prg_return_false:}
}
@@ -1024,7 +1079,7 @@
{
\tl_set:Nn \l__fontspec_family_label_tl { #1 }
\__fontspec_select_font_family:nn {#3}{#4}
- \tl_set_eq:NN #1 \l_fontspec_font
+ \font #1 = \fontname \l_fontspec_font \scan_stop:
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
\prg_new_conditional:Nnn \fontspec_font_if_exist:n {TF,T,F}
@@ -1064,6 +1119,9 @@
}
{ \prg_return_false: }
}
+
+%%^^A%% fontspec-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_new_protected:Nn \__fontspec_select_font_family:nn
{
\group_begin:
@@ -1189,7 +1247,7 @@
\__fontspec_primitive_font_set:Nnn \l_fontspec_font
{ \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
- \__fontspec_set_font_type:
+ \__fontspec_set_font_type:N \l_fontspec_font
\__fontspec_primitive_font_gset:Nnn \l_fontspec_font
{ \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f@size pt}
\l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
@@ -1224,7 +1282,7 @@
{
\tl_if_empty:NTF \l__fontspec_script_name_tl
{
- \__fontspec_check_script:nTF {latn}
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
{
\tl_set:Nn \l__fontspec_script_name_tl {Latin}
\tl_if_empty:NT \l__fontspec_lang_name_tl
@@ -1261,7 +1319,7 @@
% \EROROR
}
{
- \bool_if:NT \l__fontspec_atsui_bool
+ \bool_if:nT { \l__fontspec_atsui_bool || \l__fontspec_graphite_bool }
{ \keys_set:nV {fontspec-aat} \l__fontspec_keys_leftover_clist }
}
@@ -1278,11 +1336,17 @@
{
- \cs_if_exist:NT \l__fontspec_nfss_fam_tl
- {
- \cs_set_eq:cN {g__fontspec_UID_\l__fontspec_fontid_tl} \l__fontspec_nfss_fam_tl
- }
- \cs_if_exist:cF {g__fontspec_UID_\l__fontspec_fontid_tl}
+ \tl_if_exist:cF {g__fontspec_UID_\l__fontspec_fontid_tl}
+ {
+ \tl_new:c {g__fontspec_UID_\l__fontspec_fontid_tl}
+ }
+
+ \tl_if_exist:NT \l__fontspec_nfss_fam_tl
+ {
+ \tl_set_eq:cN {g__fontspec_UID_\l__fontspec_fontid_tl} \l__fontspec_nfss_fam_tl
+ }
+
+ \tl_if_empty:cT {g__fontspec_UID_\l__fontspec_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__fontspec_tmp_tl {#1}
@@ -1298,7 +1362,7 @@
}
}
\tl_gset:Nv \l_fontspec_family_tl {g__fontspec_UID_\l__fontspec_fontid_tl}
- \cs_if_exist:cTF {g__fontspec_ \l_fontspec_family_tl _prop}
+ \cs_if_exist:cTF {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop}
\prg_return_false: \prg_return_true:
}
\cs_new:Nn \__fontspec_save_family:nn
@@ -1311,18 +1375,18 @@
}
\cs_new:Nn \__fontspec_save_fontinfo:n
{
- \prop_new:c {g__fontspec_ \l_fontspec_family_tl _prop}
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontname} { #1 }
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {options} { \l__fontspec_all_features_clist }
- \prop_gput:cnx {g__fontspec_ \l_fontspec_family_tl _prop} {fontdef}
+ \prop_new:c {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop}
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {fontname} { #1 }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {options} { \l__fontspec_all_features_clist }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {fontdef}
{
\__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
{ \l__fontspec_pre_feat_sclist \l__fontspec_rawfeatures_sclist }
}
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-num} \l__fontspec_script_int
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-num} \l__fontspec_language_int
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
- \prop_gput:cnV {g__fontspec_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {script-num} \l__fontspec_script_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {lang-num} \l__fontspec_language_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {script-tag} \l_fontspec_script_tl
+ \prop_gput:cnV {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
}
\cs_new:Nn \__fontspec_find_autofonts:
{
@@ -1380,32 +1444,28 @@
{ {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
}
}
-\cs_new:Nn \__fontspec_set_font_type:
+\cs_new:Nn \__fontspec_set_font_type:N
{
\bool_set_false:N \l__fontspec_tfm_bool
\bool_set_false:N \l__fontspec_atsui_bool
\bool_set_false:N \l__fontspec_ot_bool
\bool_set_false:N \l__fontspec_mm_bool
\bool_set_false:N \l__fontspec_graphite_bool
- \ifcase\XeTeXfonttype\l_fontspec_font
+ \ifcase\XeTeXfonttype #1
\bool_set_true:N \l__fontspec_tfm_bool
\or
\bool_set_true:N \l__fontspec_atsui_bool
- \ifnum\XeTeXcountvariations\l_fontspec_font > \c_zero
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
+ \ifnum\XeTeXcountvariations #1 > \c_zero
\bool_set_true:N \l__fontspec_mm_bool
\fi
\or
\bool_set_true:N \l__fontspec_ot_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
+ \or
+ \bool_set_true:N \l__fontspec_graphite_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/GR} }
\fi
- \tl_if_empty:NT \l_fontspec_renderer_tl
- {
- \bool_if:NTF \l__fontspec_atsui_bool
- { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
- {
- \bool_if:NT \l__fontspec_ot_bool
- { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
- }
- }
}
\cs_new:Nn \__fontspec_set_autofont:Nnn
{
@@ -1599,7 +1659,7 @@
}
\cs_set:Nn \__fontspec_make_ot_smallcaps:TF
{
- \__fontspec_check_ot_feat:nTF {smcp} {#1} {#2}
+ \__fontspec_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
}
\cs_set:Nn \__fontspec_make_smallcaps:TF
{
@@ -1607,7 +1667,7 @@
{ \__fontspec_make_ot_smallcaps:TF {#1} {#2} }
{
\bool_if:NT \l__fontspec_atsui_bool
- { \__fontspec_make_AAT_feature_string:nnTF {3}{3} {#1} {#2} }
+ { \__fontspec_make_AAT_feature_string:NnnTF \l_fontspec_font {3}{3} {#1} {#2} }
}
}
\cs_new:Nn \__fontspec_update_featstr:n
@@ -1670,6 +1730,9 @@
}
}
\cs_generate_variant:Nn \__fontspec_iv_str_to_num:Nn {No}
+
+%%^^A%% fontspec-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_new:Nn \__fontspec_define_opentype_feature_group:n
{
\keys_define:nn {fontspec-opentype} { #1 .multichoice: }
@@ -1727,7 +1790,7 @@
\tl_if_empty:nT {#1} { \bool_set_false:N \l__fontspec_check_feat_bool }
\bool_if:NT \l__fontspec_check_feat_bool
{
- \__fontspec_check_ot_feat:nF {#1}
+ \__fontspec_check_ot_feat:NnF \l_fontspec_font {#1}
{
\__fontspec_warning:nx {icu-feature-not-exist-in-font} {#1}
\bool_set_false:N \l__fontspec_proceed_bool
@@ -1746,18 +1809,18 @@
\cs_new:Nn \__fontspec_swap_plus_minus:n { \__fontspec_swap_plus_minus_aux:Nq #1 \q_nil }
\cs_new:Npn \__fontspec_swap_plus_minus_aux:Nq #1#2 \q_nil
{ \str_case:nn {#1} { {+} {-#2} {-} {+#2} } }
-\prg_new_conditional:Nnn \__fontspec_check_script:n {TF}
+\prg_new_conditional:Nnn \__fontspec_check_script:Nn {TF}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
{
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
- \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts \l_fontspec_font }
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
+ \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts #1 }
\int_zero:N \l_tmpa_int
\bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum \XeTeXOTscripttag\l_fontspec_font \l_tmpa_int = \l__fontspec_strnum_int
+ \ifnum \XeTeXOTscripttag #1 \l_tmpa_int = \l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -1767,19 +1830,19 @@
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
}
-\prg_new_conditional:Nnn \__fontspec_check_lang:n {TF}
+\prg_new_conditional:Nnn \__fontspec_check_lang:Nn {TF}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
{
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
\int_set:Nn \l_tmpb_int
- { \XeTeXOTcountlanguages \l_fontspec_font \l__fontspec_script_int }
+ { \XeTeXOTcountlanguages #1 \l__fontspec_script_int }
\int_zero:N \l_tmpa_int
\bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum\XeTeXOTlanguagetag\l_fontspec_font\l__fontspec_script_int \l_tmpa_int =\l__fontspec_strnum_int
+ \ifnum\XeTeXOTlanguagetag #1 \l__fontspec_script_int \l_tmpa_int = \l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
\else
@@ -1789,23 +1852,23 @@
\bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
}
-\prg_new_conditional:Nnn \__fontspec_check_ot_feat:n {TF,F}
+\prg_new_conditional:Nnn \__fontspec_check_ot_feat:Nn {TF,F}
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
{
\int_set:Nn \l_tmpb_int
{
- \XeTeXOTcountfeatures \l_fontspec_font
+ \XeTeXOTcountfeatures #1
\l__fontspec_script_int
\l__fontspec_language_int
}
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#1}
+ \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
\int_zero:N \l_tmpa_int
\bool_set_false:N \l__fontspec_check_bool
\bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
{
- \ifnum\XeTeXOTfeaturetag\l_fontspec_font\l__fontspec_script_int\l__fontspec_language_int
+ \ifnum\XeTeXOTfeaturetag #1 \l__fontspec_script_int \l__fontspec_language_int
\l_tmpa_int =\l__fontspec_strnum_int
\bool_set_true:N \l__fontspec_check_bool
\int_set:Nn \l_tmpa_int {\l_tmpb_int}
@@ -1939,6 +2002,8 @@
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {zero}{Slashed~Zero}
+%%^^A%% fontspec-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\cs_new:Nn \__fontspec_define_aat_feature_group:n
{ \keys_define:nn {fontspec-aat} { #1 .multichoice: } }
@@ -1955,32 +2020,32 @@
\tl_if_empty:nTF {#1}
{ \__fontspec_warning:n {aat-feature-not-exist} }
{
- \__fontspec_make_AAT_feature_string:nnTF {#1}{#2}
+ \__fontspec_make_AAT_feature_string:NnnTF \l_fontspec_font {#1}{#2}
{
\__fontspec_update_featstr:n {\l_fontspec_feature_string_tl}
}
{ \__fontspec_warning:nx {aat-feature-not-exist-in-font} {#1,#2} }
}
}
-\prg_new_conditional:Nnn \__fontspec_make_AAT_feature_string:nn {TF,T,F}
+\prg_new_conditional:Nnn \__fontspec_make_AAT_feature_string:Nnn {TF,T,F}
{
- \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename \l_fontspec_font #1 }
+ \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename #1 #2 }
\tl_if_empty:NTF \l_tmpa_tl
{ \prg_return_false: }
{
- \int_compare:nTF { \XeTeXisexclusivefeature\l_fontspec_font #1 > 0 }
+ \int_compare:nTF { \XeTeXisexclusivefeature #1 #2 > 0 }
{
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
+ \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
}
{
- \int_if_even:nTF {#2}
+ \int_if_even:nTF {#3}
{
- \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname\l_fontspec_font #1\space #2}
+ \tl_set:Nx \l_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
}
{
\tl_set:Nx \l_tmpb_tl
{
- \XeTeXselectorname\l_fontspec_font #1\space \numexpr#2-1\relax
+ \XeTeXselectorname #1 #2\space \numexpr#3-1\relax
}
\tl_if_empty:NF \l_tmpb_tl { \tl_put_left:Nn \l_tmpb_tl {!} }
}
@@ -1994,6 +2059,8 @@
}
}
+%%^^A%% fontspec-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\clist_set:Nn \g__fontspec_all_keyval_modules_clist
{
fontspec, fontspec-opentype, fontspec-aat,
@@ -2044,8 +2111,10 @@
{AAT,ICU,OpenType,Graphite,Full,Basic}
{
\int_compare:nTF {\l_keys_choice_int <= 4} {
- \tl_set:Nv \l_fontspec_renderer_tl
- { g_fontspec_renderer_tag_ \l_keys_choice_tl }
+ \tl_set:Nx \l_fontspec_renderer_tl
+ {
+ \int_case:nn \l_keys_choice_int { 1 {/AAT} 2 {/OT} 3 {/OT} 4 {/GR} }
+ }
\tl_gset:Nx \g__fontspec_single_feat_tl { \l_fontspec_renderer_tl }
}
{
@@ -2053,12 +2122,6 @@
}
}
}
-\tl_set:cn {g_fontspec_renderer_tag_AAT} {/AAT}
-\tl_set:cn {g_fontspec_renderer_tag_ICU} {/OT}
-\tl_set:cn {g_fontspec_renderer_tag_OpenType} {/OT}
-\tl_set:cn {g_fontspec_renderer_tag_Graphite} {/GR}
-\tl_set:cn {g_fontspec_mode_tag_Full} {node}
-\tl_set:cn {g_fontspec_mode_tag_Basic} {base}
\__fontspec_keys_define_code:nnn {fontspec-preparse} {Script}
{
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
@@ -2222,7 +2285,7 @@
\tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
\cs_undefine:c {g__fontspec_UID_\l__fontspec_fontid_tl}
\tl_if_exist:NT \l_fontspec_family_tl
- { \cs_undefine:c {g__fontspec_ \l_fontspec_family_tl _prop} }
+ { \cs_undefine:c {g__fontspec_fontinfo_ \l_fontspec_family_tl _prop} }
}
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
@@ -2522,6 +2585,8 @@
\__fontspec_update_featstr:n {#1}
}
+%%^^A%% fontspec-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\__fontspec_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
\__fontspec_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
\__fontspec_feat_prop_add:nn {ornm} { Ornament\,=\,$N$ }
@@ -2783,7 +2848,7 @@
\bool_set_false:N \l__fontspec_script_exist_bool
\clist_map_inline:nn {#2}
{
- \__fontspec_check_script:nTF {####1}
+ \__fontspec_check_script:NnTF \l_fontspec_font {####1}
{
\tl_set:Nn \l_fontspec_script_tl {####1}
\int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
@@ -2800,7 +2865,7 @@
\__fontspec_warning:nx {script-not-exist} {#1}
}
{
- \__fontspec_check_script:nTF {latn}
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
{
\__fontspec_warning:nx {script-not-exist-latn} {#1}
\tl_set:Nn \l_fontspec_script_tl {latn}
@@ -2817,7 +2882,7 @@
\cs_new:Nn \fontspec_new_lang:nn
{
\keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
- \__fontspec_check_lang:nTF {#2}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {#2}
{
\tl_set:Nn \l_fontspec_lang_tl {#2}
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
@@ -2839,14 +2904,14 @@
{
Language / Turkish .code:n =
{
- \__fontspec_check_lang:nTF {TRK}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TRK}
{
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
\tl_set:Nn \l_fontspec_lang_tl {TRK}
\tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
}
{
- \__fontspec_check_lang:nTF {TUR}
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TUR}
{
\int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
\tl_set:Nn \l_fontspec_lang_tl {TUR}
@@ -2881,6 +2946,8 @@
\__fontspec_ot_compat:nn {Diacritics} {AboveBase}
\__fontspec_ot_compat:nn {Diacritics} {BelowBase}
+%%^^A%% fontspec-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\newfontscript{Adlam}{adlm}
\newfontscript{Ahom}{ahom}
\newfontscript{Anatolian~Hieroglyphs}{hluw}
@@ -3026,6 +3093,8 @@
\newfontscript{N'ko}{nko~}
\newfontscript{Oriya}{ory2,orya}
+%%^^A%% fontspec-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\newfontlanguage{Abaza}{ABA}
\newfontlanguage{Abkhazian}{ABK}
\newfontlanguage{Adyghe}{ADY}
@@ -3409,6 +3478,8 @@
\newfontlanguage{Zande}{ZND}
\newfontlanguage{Zulu}{ZUL}
+%%^^A%% fontspec-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\__fontspec_define_aat_feature_group:n {Ligatures}
\__fontspec_define_aat_feature:nnnn {Ligatures} {Required} {1} {0}
@@ -3548,6 +3619,8 @@
\__fontspec_define_aat_feature:nnnn {Annotation} {BlackRoundSquare} {24} {10}
\__fontspec_define_aat_feature:nnnn {Annotation} {DoubleCircle} {24} {11}
+%%^^A%% fontspec-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
\providecommand\UnicodeFontName[2]{"#1:#2"}
\providecommand\UnicodeFontTeXLigatures{mapping=tex-text;}
@@ -3616,7 +3689,18 @@
{ \__fontspec_error:nn {only-inside-encdef} \UndeclareSymbol }
\UndeclareTextCommand {#1} {\UnicodeEncodingName}
}
-
+\DeclareDocumentCommand \UndeclareAccent {m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareAccent }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+\DeclareDocumentCommand \UndeclareCommand {m}
+ {
+ \bool_if:NF \l__fontspec_defining_encoding_bool
+ { \__fontspec_error:nn {only-inside-encdef} \UndeclareCommand }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
\DeclareDocumentCommand \UndeclareComposite {mm}
{
\bool_if:NF \l__fontspec_defining_encoding_bool
@@ -3624,6 +3708,8 @@
\cs_undefine:c
{ \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
}
+
+%%^^A%% fontspec-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
\@ifpackageloaded{euler}
{
\bool_set_true:N \g__fontspec_pkg_euler_loaded_bool
@@ -3759,12 +3845,17 @@
}
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
+
+%%^^A%% fontspec-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_if:NT \g__fontspec_cfg_bool
{
\InputIfFileExists{fontspec.cfg}
{}
{\typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.}}
}
+
+%%^^A%% fontspec-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\providecommand*\itscdefault{\itdefault\scdefault}
\providecommand*\slscdefault{\sldefault\scdefault}
\DeclareRobustCommand{\sishape}
@@ -3922,6 +4013,9 @@
\cs_new:Nn \fontspec_set_strong_level:n { \int_set:Nn \l__fontspec_strong_int {#1} }
\strongfontdeclare{ \bfseries }
\emfontdeclare{ \emshape, \eminnershape }
+
+%%^^A%% fontspec-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\DeclareRobustCommand{\-}
{
\discretionary
@@ -4022,16 +4116,4 @@
{
{ \addfontfeature{Numbers=Lining} #1 }
}
-%% ------------------------------------------------
-%% Copyright 2004--2017 Will Robertson <will.robertson@latex-project.org>
-%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
-%%
-%% Distributable under the LaTeX Project Public License, version 1.3c or higher.
-%% The latest version of this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" by Will Robertson.
-%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
-%% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
-%% ------------------------------------------------
-%%
-%% End of file `fontspec-xetex.sty'.
+
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg b/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
index 7cb182e3be7..b755cd8835f 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.cfg
@@ -1,4 +1,5 @@
+
%%% FONTSPEC.CFG %%%
%
% This configuration file sets up TeX Ligatures by default for all fonts loaded
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index 7c34ab65c5b..5b7d7fc5ad3 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -7,21 +7,30 @@
-- fontspec.dtx (with options: `lua')
-- fontspec-lua.dtx (with options: `lua')
-- ------------------------------------------------
--- The FONTSPEC package for XeLaTeX/LuaLaTeX
--- (C) 2004--2017 Will Robertson and Khaled Hosny
--- License information appended.
+-- The FONTSPEC package <wspr.io/fontspec>
-- ------------------------------------------------
+-- Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+-- Copyright 2009-2013 Khaled Hosny
+-- ------------------------------------------------
+-- This package is free software and may be redistributed and/or modified under
+-- the conditions of the LaTeX Project Public License, version 1.3c or higher
+-- (your choice): <http://www.latex-project.org/lppl/>.
+-- ------------------------------------------------
+-- ^^A%% fontspec.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
fontspec = fontspec or {}
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = "2.6e",
- date = "2017/09/27",
+ version = "2.6f",
+ date = "2017/11/05",
description = "Font selection for XeLaTeX and LuaLaTeX",
author = "Khaled Hosny, Philipp Gesang, Will Robertson",
copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
license = "LPPL"
}
+
+-- ^^A%% fontspec-lua.dtx -- part of FONTSPEC <wspr.io/fontspec>
local err, warn, info, log = luatexbase.provides_module(fontspec.module)
fontspec.log = log or (function (s) luatexbase.module_info("fontspec", s) end)
fontspec.warning = warn or (function (s) luatexbase.module_warning("fontspec", s) end)
@@ -70,16 +79,4 @@ function fontspec.mathfontdimen(fnt, str)
tex.sprint("0pt")
end
end
--- ------------------------------------------------
--- Copyright 2004--2017 Will Robertson <will.robertson@latex-project.org>
--- Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
---
--- Distributable under the LaTeX Project Public License, version 1.3c or higher.
--- The latest version of this license is at: http://www.latex-project.org/lppl.txt
---
--- This work is "maintained" by Will Robertson.
--- It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
--- And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
--- ------------------------------------------------
---
--- End of file `fontspec.lua'.
+
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
index c392f9668be..d9e3a39a20f 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -5,15 +5,24 @@
%% The original source files were:
%%
%% fontspec.dtx (with options: `fontspec,load')
+%% fontspec-code-load.dtx (with options: `fontspec,load')
%% ------------------------------------------------
-%% The FONTSPEC package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2017 Will Robertson and Khaled Hosny
-%% License information appended.
+%% The FONTSPEC package <wspr.io/fontspec>
%% ------------------------------------------------
-\RequirePackage{expl3}
+%% Copyright 2004-2017 Will Robertson, LPPL "maintainer"
+%% Copyright 2009-2013 Khaled Hosny
+%% ------------------------------------------------
+%% This package is free software and may be redistributed and/or modified under
+%% the conditions of the LaTeX Project Public License, version 1.3c or higher
+%% (your choice): <http://www.latex-project.org/lppl/>.
+%% ------------------------------------------------
+%%^^A%% fontspec.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec}%
- {2017/09/22}{2.6e}{Font selection for XeLaTeX and LuaLaTeX}
+ {2017/11/05}{2.6f}{Font selection for XeLaTeX and LuaLaTeX}
+
+%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
\sys_if_engine_luatex:T
{ \RequirePackage{luaotfload}
\directlua{require("fontspec")}
@@ -26,16 +35,3 @@
You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~ "xelatex"~ or~ "lualatex" instead~ of~ plain~ "latex"~ or~ "pdflatex".
}
\msg_fatal:nn {fontspec} {cannot-use-pdftex}
-%% ------------------------------------------------
-%% Copyright 2004--2017 Will Robertson <will.robertson@latex-project.org>
-%% Copyright 2009--2013 Khaled Hosny <khaledhosny@eglug.org>
-%%
-%% Distributable under the LaTeX Project Public License, version 1.3c or higher.
-%% The latest version of this license is at: http://www.latex-project.org/lppl.txt
-%%
-%% This work is "maintained" by Will Robertson.
-%% It consists of the files: fontspec*.dtx, fontspec.cfg, fontspec*.tex.
-%% And the derived files: fontspec*.sty,fontspec.lua, fontspec.pdf.
-%% ------------------------------------------------
-%%
-%% End of file `fontspec.sty'.