summaryrefslogtreecommitdiff
path: root/macros/unicodetex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-04-28 03:00:59 +0000
committerNorbert Preining <norbert@preining.info>2024-04-28 03:00:59 +0000
commit6ed42a56797a9b75307dcebfd82f2d69767e1b97 (patch)
treea3a53cbc357c9bd13040bede870d9b1801293eb4 /macros/unicodetex
parent71f3eefe319b1194e0470ee83dd8723b3288f8d4 (diff)
CTAN sync 202404280300
Diffstat (limited to 'macros/unicodetex')
-rw-r--r--macros/unicodetex/latex/fontspec/CHANGES.md23
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-api.dtx223
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx91
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx76
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx22
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-load.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-math.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx31
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx16
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx10
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx9
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-user.dtx9
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx56
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code.ltx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code.pdfbin672898 -> 707166 bytes
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-api.tex30
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex50
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex55
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex23
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex112
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-style.sty8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex16
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-example.tex2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-lua.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec.dtx16
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec.ins10
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec.ltx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec.pdfbin578717 -> 496846 bytes
38 files changed, 615 insertions, 393 deletions
diff --git a/macros/unicodetex/latex/fontspec/CHANGES.md b/macros/unicodetex/latex/fontspec/CHANGES.md
index dd938d5d51..c5f5f6e684 100644
--- a/macros/unicodetex/latex/fontspec/CHANGES.md
+++ b/macros/unicodetex/latex/fontspec/CHANGES.md
@@ -1,6 +1,29 @@
Change history
==============
+## v2.9b (2024/04/27)
+
+ * Add new `Letters=Uppercase` (LuaLaTeX only) as an interface to `luaotfload`
+ feature which automatically performs case-changing at the font level
+ (i.e., not using macros to process the text tokens). (#461)
+ * Fix long-standing bug when loading fonts which only have extensions specified internally to the font
+ shape (#504). E.g.:
+
+ \setmainfont{pagella}[ UprightFont = texgyrepagella-regular.otf ]
+
+ * If a font is loaded with a specific script (e.g. `Script=CJK`) and it is not
+ available within the font, `fontspec` previously would fall back on a default script.
+ This is now changed to always pass through the requested script so the renderer can
+ make use of that information regardless of whether the font itself supports the script.
+ (#507)
+ * Remove LuaTeX code that resets various `hypenchar` settings seemingly erroneously. (#344)
+ * Rework documentation to remove reference to local and non-free fonts. This allows
+ compilation via Github Actions, which will aid streamlining/automating releases in the future. (#157, #465)
+ * Adjust approach to removing spaces from font names internally. This may have unintended
+ consequences, please write if so. (#484)
+ * Work around clash if a class defines an option of (say) `math=foo`, where `fontspec`
+ is expecting `math=true`. Now, the global option will be ignored. (#501)
+
## v2.9a (2024/02/13)
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-api.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-api.dtx
index e8a8878e66..be63bcc056 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-api.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-api.dtx
@@ -1,14 +1,12 @@
-%%^^A%% fontspec-code-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-api.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
-% \section{Programmer's interface}
-%
% \iffalse
% \begin{macrocode}
%<*fontspec>
% \end{macrocode}
% \fi
%
-%
+% \section{Programmer's interface}
%
% These functions are not used directly by fontspec when defining fonts;
% they are designed to be used by other packages who wish to do font-related
@@ -23,8 +21,143 @@
% currently selected as a fontspec font. (I.e., via \verb|\fontspec| or
% from a \verb|\newfontfamily| macro or from \verb|\setmainfont| and so on.)
%
-% \begin{macro}{\fontspec_if_fontspec_font:TF}
-% Test whether the currently selected font has been loaded by fontspec.
+% \section{Overview}
+%
+% \subsection{Commands}
+%
+% \begin{function}{\fontspec_gset_family:Nnn,\fontspec_set_family:Nnn}
+% \begin{syntax}
+% \verb|\fontspec_set_family:Nnn| \meta{family} \Arg{features} \Arg{font name}
+% \end{syntax}
+% Defines a new NFSS font family from given \meta{features} and \meta{font},
+% and stores the name in the token list variable \meta{family}.
+% See the standard \pkg{fontspec} user commands for applications of this
+% function.
+% \end{function}
+%
+% \begin{function}{\fontspec_gset_fontface:NNnn,\fontspec_set_fontface:NNnn}
+% \begin{syntax}
+% \verb|\fontspec_set_fontface:NNnn| \meta{face} \meta{family} \Arg{features} \Arg{font name}
+% \end{syntax}
+% As for |\fontspec_set_family:Nnn| but with a single font face only.
+% (E.g., no bold, italic shapes, etc.)
+% The control sequence \meta{face} is a primitive \TeX\ font command.
+% \end{function}
+%
+% \subsection{Conditionals}
+%
+% \begin{function}[TF]{\fontspec_font_if_exist:n}
+% \begin{syntax}
+% \verb|\fontspec_font_if_exist:nTF| \Arg{font name} Arg{true code} \Arg{false code}
+% \end{syntax}
+% Does this font exist? The font name can refer to the `logical' name or to a filename with known font extension.
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_fontspec_font:}
+% \begin{syntax}
+% \verb|\fontspec_if_fontspec_font:TF| \Arg{true code} \Arg{false code}
+% \end{syntax}
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_aat_feature:nn}
+% \begin{syntax}
+% \verb|\fontspec_if_aat_feature:nnTF| \Arg{true code} \Arg{false code}
+% \end{syntax}
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_opentype:}
+% \begin{syntax}
+% \verb|\fontspec_if_opentype:TF| \Arg{true code} \Arg{false code}
+% \end{syntax}
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_feature:n}
+% \begin{syntax}
+% \verb|\fontspec_if_feature:nTF| \Arg{feat tag} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Check if the raw OpenType \meta{feature tag} is available in the current font with
+% script and language settings as set up when the font was loaded.
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_feature:nnn}
+% \begin{syntax}
+% \verb|\fontspec_if_feature:nnnTF| \Arg{script tag} \Arg{lang tag} \Arg{feat tag} \Arg{true code} \Arg{false code}\\
+% |\fontspec_if_feature:nTF {latn} {ROM} {pnum} {True} {False}|
+% \end{syntax}
+% Test whether the currently selected font with raw OpenType \meta{script tag} and
+% raw OpenType \meta{language tag} contains the raw OpenType \meta{feature tag}.
+% Returns false if the font is not loaded by fontspec or is not an OpenType
+% font.
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_script:n}
+% \begin{syntax}
+% \verb|\fontspec_if_script:nTF| \Arg{script tag} \Arg{true code} \Arg{false code}\\
+% |\fontspec_if_script:nTF {latn} {True} {False}|
+% \end{syntax}
+% Test whether the currently selected font contains the raw OpenType
+% \meta{script tag}.
+%
+% Returns false if the font is not loaded by fontspec or is not an OpenType
+% font.
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_language:n}
+% \begin{syntax}
+% \verb|\fontspec_if_language:nTF| \Arg{lang tag} \Arg{true code} \Arg{false code}\\
+% |\fontspec_if_language:nTF {ROM} {True} {False}|
+% \end{syntax}
+% Check if the raw OpenType \meta{language tag} is available in the current font with
+% script settings as set up when the font was loaded.
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_language:nn}
+% \begin{syntax}
+% \verb|\fontspec_if_language:nnTF| \Arg{script tag} \Arg{lang tag} \Arg{true code} \Arg{false code}\\
+% |\fontspec_if_language:nnTF {cyrl} {SRB} {True} {False}|
+% \end{syntax}
+% Test whether the currently selected font contains the raw OpenType \meta{language
+% tag} in \meta{script tag}.
+%
+% Returns false if the font is not loaded by fontspec or is not an OpenType font.
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_current_script:n}
+% Test whether the currently loaded font has been loaded with the specified raw
+% OpenType \meta{script tag}.
+% \begin{syntax}
+% \verb|\fontspec_if_current_script:nTF| \Arg{script tag} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_current_language:n}
+% Test whether the currently loaded font has been loaded with the specified raw
+% OpenType \meta{language tag}.
+% \begin{syntax}
+% \verb|\fontspec_if_current_language:nTF| \Arg{lang tag} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_current_feature:n}
+% \begin{syntax}
+% \verb|\fontspec_if_current_feature:nTF| \Arg{feat tag} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Test whether the currently loaded font is using the specified raw
+% OpenType \meta{feature tag}.
+% \end{function}
+%
+% \begin{function}[TF]{\fontspec_if_small_caps:}
+% Test whether the current font has small caps available.
+% \begin{syntax}
+% \verb|\fontspec_if_small_caps:TF| \Arg{true code} \Arg{false code}
+% \end{syntax}
+% \end{function}
+%
+%
+%
+% \section{Implementation}
+%
+% \begin{macro}[TF]{\fontspec_if_fontspec_font:}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
@@ -34,7 +167,7 @@
% \end{macro}
%
%
-% \begin{macro}{\fontspec_if_aat_feature:nnTF}
+% \begin{macro}[TF]{\fontspec_if_aat_feature:nn}
% Conditional to test if the currently selected font contains the \AAT\
% feature (|#1|,|#2|).
% \begin{macrocode}
@@ -60,7 +193,7 @@
% \end{macro}
%
%
-% \begin{macro}{\fontspec_if_opentype:TF}
+% \begin{macro}[TF]{\fontspec_if_opentype:}
% Test whether the currently selected font is an OpenType font.
% Always true for LuaTeX fonts.
% \begin{macrocode}
@@ -78,7 +211,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fontspec_if_feature:nTF}
+% \begin{macro}[TF]{\fontspec_if_feature:n}
% Test whether the currently selected font contains the raw OpenType
% feature |#1|. E.g.: |\fontspec_if_feature:nTF {pnum} {True} {False}|
% Returns false if the font is not loaded by fontspec or is not an OpenType
@@ -113,12 +246,10 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fontspec_if_feature:nnnTF}
-% Test whether the currently selected font with raw OpenType script tag |#1| and
-% raw OpenType language tag |#2| contains the raw OpenType feature tag |#3|.
-% E.g.:\\ | \fontspec_if_feature:nTF {latn} {ROM} {pnum} {True} {False}|
-% Returns false if the font is not loaded by fontspec or is not an OpenType
-% font.
+% \begin{macro}[TF]{\fontspec_if_feature:nnn}
+% \darg{script tag}
+% \darg{language tag}
+% \darg{feature tag}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_feature:nnn {TF,T,F}
{
@@ -136,11 +267,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fontspec_if_script:nTF}
-% Test whether the currently selected font contains the raw OpenType
-% script |#1|. E.g.: |\fontspec_if_script:nTF {latn} {True} {False}|
-% Returns false if the font is not loaded by fontspec or is not an OpenType
-% font.
+% \begin{macro}[TF]{\fontspec_if_script:n}
+% \darg{script tag}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_script:n {TF,T,F}
{
@@ -158,11 +286,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fontspec_if_language:nTF}
-% Test whether the currently selected font contains the raw OpenType language
-% tag |#1|. E.g.: |\fontspec_if_language:nTF {ROM} {True} {False}|.
-% Returns false if the font is not loaded by fontspec or is not an OpenType
-% font.
+% \begin{macro}[TF]{\fontspec_if_language:n}
+% \darg{lang tag}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_language:n {TF,T,F}
{
@@ -184,11 +309,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fontspec_if_language:nnTF}
-% Test whether the currently selected font contains the raw OpenType language
-% tag |#2| in script |#1|. E.g.: |\fontspec_if_language:nnTF {cyrl} {SRB} {True} {False}|.
-% Returns false if the font is not loaded by fontspec or is not an OpenType
-% font.
+% \begin{macro}[TF]{\fontspec_if_language:nn}
+% \darg{script tag}
+% \darg{lang tag}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_language:nn {TF,T,F}
{
@@ -207,9 +330,8 @@
% \end{macro}
%
%
-% \begin{macro}{\fontspec_if_current_script:nTF}
-% Test whether the currently loaded font is using the specified raw
-% OpenType script tag |#1|.
+% \begin{macro}[TF]{\fontspec_if_current_script:n}
+% \darg{script tag}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_current_script:n {TF,T,F}
{
@@ -229,9 +351,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fontspec_if_current_language:nTF}
-% Test whether the currently loaded font is using the specified raw
-% OpenType language tag |#1|.
+% \begin{macro}[TF]{\fontspec_if_current_language:n}
+% \darg{lang tag}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_current_language:n {TF,T,F}
{
@@ -252,22 +373,15 @@
% \end{macro}
%
%
-% \begin{macro}{\fontspec_set_family:Nnn}
+% \begin{macro}{\fontspec_gset_family:Nnn,\fontspec_set_family:Nnn}
% \darg{family}
% \darg{fontspec features}
-% \darg{font name}
-% Defines a new font family from given \meta{features} and \meta{font},
-% and stores the name in the variable \meta{family}.
-% See the standard \pkg{fontspec} user commands for applications of this
-% function.
-%
-% We want to store the actual name of the font family within the \meta{family}
-% variable because the actual \LaTeX\ family name is automatically generated
-% by fontspec and it's easier to keep it that way.
+% \darg{font}
% \begin{macrocode}
\cs_new:Nn \@@_tl_new_if_free:N { \tl_if_exist:NF #1 { \tl_new:N #1 } }
\cs_new:Nn \@@_set_family:NnnN
{
+%<debug>\typeout{::::::~fontspec_set_family:Nnn}
\tl_set:Nn \l_@@_fontface_cs_tl {\l_fontspec_font} % reset
\tl_set:Nn \l_@@_family_label_tl {#1}
\@@_select_font_family:nn {#2} {#3}
@@ -285,7 +399,7 @@
% \end{macro}
%
%
-% \begin{macro}{\fontspec_set_fontface:NNnn}
+% \begin{macro}{\fontspec_gset_fontface:NNnn,\fontspec_set_fontface:NNnn}
% TODO: the round-about approach of using \cs{fontname}
% means that settings such as fontdimens will be lost.
% (Discovered in unicode-math.) Investigate!
@@ -307,7 +421,7 @@
%
%
%
-% \begin{macro}{\fontspec_font_if_exist:n}
+% \begin{macro}[TF]{\fontspec_font_if_exist:n}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_font_if_exist:n {TF,T,F}
{
@@ -325,9 +439,8 @@
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\fontspec_if_current_feature:nTF}
-% Test whether the currently loaded font is using the specified raw
-% OpenType feature tag |#1|.
+% \begin{macro}[TF]{\fontspec_if_current_feature:n}
+% \darg{feat tag}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_current_feature:n {TF,T,F}
{
@@ -340,7 +453,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fontspec_if_small_caps:TF}
+% \begin{macro}[TF]{\fontspec_if_small_caps:}
% \begin{macrocode}
\prg_new_conditional:Nnn \fontspec_if_small_caps: {TF,T,F}
{
@@ -376,10 +489,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx
index 91b5ebb7ee..e03d8a6ff6 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-closing.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
%
% \section{Closing code}
%
@@ -30,10 +30,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx
index 17434643e0..02df7a7f09 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-enc.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{Extended font encodings}
%
@@ -144,10 +144,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx
index fdffc058e5..b7fd11cc69 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-feat-aat.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{AAT feature definitions}
%
@@ -229,10 +229,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx
index c48e40deb0..4ffc5cda4f 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-feat-opentype.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{OpenType feature definitions}
%
@@ -56,13 +56,26 @@
\@@_define_opentype_feature_group:n {Letters}
\@@_define_opentype_feature:nnnnn {Letters} {ResetAll} {} {}
{
- +case,+smcp,+pcap,+c2sc,+c2pc,+unic,+rand,
- -case,-smcp,-pcap,-c2sc,-c2pc,-unic,-rand
+%<LU> +lower,-lower,+upper,-upper,+case,+cpsp,
+ +smcp,+pcap,+c2sc,+c2pc,+unic,+rand,
+ -smcp,-pcap,-c2sc,-c2pc,-unic,-rand
}
% \end{macrocode}
%
% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {Letters} {Uppercase} {case} {case} {}
+%<*LU>
+\keys_define:nn {fontspec-opentype}
+ {
+ Letters / Uppercase .code:n = {
+ \@@_make_OT_feature:nnn {} {+upper} {+lower}
+ \@@_make_OT_feature:nnn {} {+case} {}
+ \@@_make_OT_feature:nnn {} {+cpsp} {}
+ },
+ }
+\@@_define_opentype_feature:nnnnn {Letters} {UppercaseOff} {} {-upper} {+case,+cpsp}
+\@@_define_opentype_feature:nnnnn {Letters} {UppercaseReset} {} {} {+upper,-upper}
+\@@_define_opentype_onoffreset:nnnnn {Letters} {Lowercase} {} {lower} {+upper,+case,+cpsp}
+%</LU>
\@@_define_opentype_onoffreset:nnnnn {Letters} {SmallCaps} {smcp} {smcp} {+pcap,+unic}
\@@_define_opentype_onoffreset:nnnnn {Letters} {PetiteCaps} {pcap} {pcap} {+smcp,+unic}
\@@_define_opentype_onoffreset:nnnnn {Letters} {UppercaseSmallCaps} {c2sc} {c2sc} {+c2pc,+unic}
@@ -457,30 +470,57 @@
\clist_map_break:
}
}
-
+% \end{macrocode}
+% If not found give a warning but load it anyway:
+% \begin{macrocode}
\bool_if:NF \l_@@_scriptlang_exist_bool
{
%<debug>\typeout{Script~not~found!}
- \bool_if:nF { \str_if_eq_p:ee {#1} {CustomDefault} }
- {
- \tl_clear:N \l_@@_script_name_tl
- \@@_warning:nxx {no-script} {\l_fontspec_fontname_tl} {#1}
- }
-
- \bool_if:nF
+ \@@_warning:nxx {no-script} {\l_fontspec_fontname_tl} {#1}
+ \clist_set:Nn \l_tmpa_clist {#2}
+ \clist_get:NN \l_tmpa_clist \l_@@_script_tl
+ \exp_args:Noo \@@_check_script:NnF \l_@@_fontface_cs_tl \l_@@_script_tl
{
- \str_if_eq_p:ee {#1} {Default} ||
- \str_if_eq_p:ee {#1} {Latin} ||
- \str_if_eq_p:ee {#1} {CustomDefault}
+ \tl_set:Nn \l_@@_script_name_tl {#1}
+ \int_set:Nn \l_@@_script_int {\l_@@_strnum_int}
+ \tl_gset:Nx \g_@@_single_feat_tl { script=\l_@@_script_tl }
}
+ }
+ }
+ }
+ }
+\cs_new:Nn \fontspec_default_script:nn
+ {
+ \keys_define:nn {fontspec-opentype} { Script / #1 .code:n =
+ {
+%<debug>\typeout{Trying~[Script=#1:#2]}
+ \bool_set_false:N \l_@@_scriptlang_exist_bool
+ \clist_map_inline:nn {#2}
+ {
+ \exp_args:No \@@_check_script:NnT \l_@@_fontface_cs_tl {####1}
{
- \keys_set:nn {fontspec-opentype} { Script = CustomDefault }
+%<debug>\typeout{Script~tag~found:~####1}
+ \tl_set:Nn \l_@@_script_name_tl {#1}
+ \tl_set:Nn \l_@@_script_tl {####1}
+ \int_set:Nn \l_@@_script_int {\l_@@_strnum_int}
+ \bool_set_true:N \l_@@_scriptlang_exist_bool
+ \tl_gset:Nx \g_@@_single_feat_tl { script=####1 }
+ \clist_map_break:
}
}
+ \bool_if:NF \l_@@_scriptlang_exist_bool
+ {
+%<debug>\typeout{Script~not~found!}
+ \tl_clear:N \l_@@_script_name_tl
+ }
}
}
}
% \end{macrocode}
+% When script is not explicitly requested, use this list:
+% \begin{macrocode}
+\fontspec_default_script:nn {CustomDefault} {latn,DFLT}
+% \end{macrocode}
%
%
% \subsection{Language}
@@ -507,10 +547,21 @@
\clist_map_break:
}
}
+% \end{macrocode}
+% If not found give a warning but load it anyway:
+% \begin{macrocode}
\bool_if:NF \l_@@_scriptlang_exist_bool
{
+%<debug>\typeout{Lang~not~found!}
\@@_warning:nx {language-not-exist} {#1}
- \keys_set:nn {fontspec-opentype} { Language = Default }
+ \clist_set:Nn \l_tmpa_clist {#2}
+ \clist_get:NN \l_tmpa_clist \l_@@_lang_tl
+ \exp_args:Noo \@@_check_script:NnF \l_@@_fontface_cs_tl \l_@@_script_tl
+ {
+ \tl_set:Nn \l_@@_script_name_tl {#1}
+ \int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
+ \tl_gset:Nx \g_@@_single_feat_tl { language=####1 }
+ }
}
}
}
@@ -569,10 +620,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx
index 12dc8472df..4b365150a2 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-fontload.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{expl3 interface for primitive font loading}
%
@@ -122,10 +122,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx
index f794f469e1..1aed91f4bb 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-graphite.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{Graphite/AAT code}
%
@@ -114,10 +114,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx
index 09c855905d..ef521b63fc 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-interfaces.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{User commands}\label{sec:codeuser}
%
@@ -282,10 +282,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx
index b45a7d3c6c..49f019c656 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-internal.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{Internals}
%
@@ -41,6 +41,10 @@
\@@_sanitise_fontname:Nn \l_@@_fontname_up_tl {#2}
\@@_sanitise_fontname:Nn \l_@@_basename_tl {#2}
+%<debug>\typeout{^^J::::::::::::::: l_fontspec_fontname_tl~ =~ \l_fontspec_fontname_tl }
+%<debug>\typeout{::::::::::::::: _fontname_up_tl~ =~ \l_@@_fontname_up_tl }
+%<debug>\typeout{::::::::::::::: l_@@_extension_tl~ =~ \l_@@_extension_tl }
+
\@@_if_detect_external:nT {#2}
{ \keys_set:nn {fontspec-preparse-external} {Path} }
@@ -55,6 +59,11 @@
%<debug>\typeout{fontid: \l_@@_fontid_tl}
\@@_preparse_features:
+
+%<debug>\typeout{^^J::::::::::::::: l_fontspec_fontname_tl~ =~ \l_fontspec_fontname_tl }
+%<debug>\typeout{::::::::::::::: _fontname_up_tl~ =~ \l_@@_fontname_up_tl }
+%<debug>\typeout{::::::::::::::: l_@@_extension_tl~ =~ \l_@@_extension_tl }
+
\@@_load_font:
\@@_set_scriptlang:
\@@_get_features:n {}
@@ -84,19 +93,23 @@
%
% \begin{macro}{\@@_sanitise_fontname:Nn}
% Assigns font name |#2| to token list variable |#1| and strips extension(s) from it in the case of an external font.
-% We strip spaces for luatex for consistency with luaotfload, although I'm not sure this is necessary any more.
-% At one stage this also lowercased the name, but this step has been removed unless someone can remind me why it was necessary.
% \begin{macrocode}
\cs_new:Nn \@@_sanitise_fontname:Nn
{
\tl_set:Nx #1 {#2}
-%<LU> \tl_remove_all:Nn #1 {~}
+ \tl_trim_spaces:N #1
+ \@@_process_ext:N #1
+ }
+
+\cs_new:Nn \@@_process_ext:N
+ {
\clist_map_inline:Nn \l_@@_extensions_clist
{
\tl_if_in:NnT #1 {##1}
{
\tl_remove_once:Nn #1 {##1}
\tl_set:Nn \l_@@_extension_tl {##1}
+ \@@_font_is_file:
\clist_map_break:
}
}
@@ -141,7 +154,9 @@
% \begin{macro}{\@@_load_external_fontoptions:N}
% Load a possible \texttt{.fontspec} font configuration file.
% This file could set font-specific options for the font about to be loaded.
-% The parameter should be a tokenlist containing a sanitised fontname.
+% The parameter should be a token list containing a sanitised fontname.
+% In the past this used a space-stripped version of the name, so we check for the file
+% both with and without spaces to load it.
% \begin{macrocode}
\cs_new:Nn \@@_load_external_fontoptions:N
{
@@ -152,8 +167,15 @@
\tl_remove_all:Nn \l_@@_ext_filename_tl {~}
\prop_if_in:NVF \g_@@_fontopts_prop #1
{
- \exp_args:No \file_if_exist:nT { \l_@@_ext_filename_tl }
- { \file_input:n { \l_@@_ext_filename_tl } }
+ \exp_args:No \file_if_exist:nTF { \l_@@_ext_filename_tl }
+ {
+ \file_input:n { \l_@@_ext_filename_tl }
+ }
+ {
+ \tl_remove_all:Nn \l_@@_ext_filename_tl {~}
+ \exp_args:No \file_if_exist:nT { \l_@@_ext_filename_tl }
+ { \file_input:n { \l_@@_ext_filename_tl } }
+ }
}
}
}
@@ -282,7 +304,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_font_is_file:,\@@_font_is_name:,\@@_font_is_kpse:}
+% \begin{macro}{\@@_font_is_file:,\@@_font_is_name:}
% The \cs{@@_fontname_wrap:n} command takes the font name and either passes it through unchanged or wraps it in the syntax for loading a font `by filename'.
% For Lua\TeX\ there are two kinds kinds of filename based loading supported: Regular filename lookups which include system fonts and lookups restricted to kpse.
% \begin{macrocode}
@@ -296,18 +318,16 @@
% \begin{macrocode}
\cs_new:Nn \@@_font_is_file:
{
- \cs_set:Npn \@@_fontname_wrap:n ##1 { [ \l_@@_font_path_tl ##1 ] }
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*LU>
-\cs_new:Nn \@@_font_is_kpse:
- {
- \cs_set:Npn \@@_fontname_wrap:n ##1 { kpse: ##1 }
+%<debug> \typeout{:: _font_is_file:}
+ \bool_set_true:N \l_@@_external_bool
+ \bool_lazy_and:nnTF { \l_@@_external_kpse_bool } { \tl_if_empty_p:N \l_@@_font_path_tl }
+ {
+ \cs_set:Npn \@@_fontname_wrap:n ##1 { kpse: ##1 }
+ }
+ {
+ \cs_set:Npn \@@_fontname_wrap:n ##1 { [ \l_@@_font_path_tl ##1 ] }
+ }
}
-%</LU>
-%<XE>\cs_new_eq:NN \@@_font_is_kpse: \@@_font_is_file:
% \end{macrocode}
% \end{macro}
%
@@ -353,17 +373,17 @@
\bool_if:NTF \l_@@_ot_bool
{
%<debug> \typeout{::: Setting~ keys~ for~ OpenType~ font~ features:~"\l_@@_keys_leftover_clist"}
- \keys_set:nV {fontspec-opentype} \l_@@_keys_leftover_clist
+ \keys_set_known:nV {fontspec-opentype} \l_@@_keys_leftover_clist
}
{
%<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 }
+ { \keys_set_known:nV {fontspec-aat} \l_@@_keys_leftover_clist }
}
%</XE>
%<*LU>
%<debug> \typeout{::: Setting~ keys~ for~ OpenType~ font~ features:~"\l_@@_keys_leftover_clist"}
- \keys_set:nV {fontspec-opentype} \l_@@_keys_leftover_clist
+ \keys_set_known:nV {fontspec-opentype} \l_@@_keys_leftover_clist
%</LU>
\tl_if_empty:NF \l_@@_mapping_tl
@@ -538,7 +558,7 @@
{
\tl_set:Nx #1 {#2}
\tl_replace_all:Nnx #1 {*} {\l_@@_basename_tl}
-%<LU> \tl_remove_all:Nn #1 {~}
+ \@@_process_ext:N #1
}
% \end{macrocode}
% \end{macro}
@@ -1113,10 +1133,6 @@
\tl_gset_eq:NN \g_@@_nfss_enc_tl \g_fontspec_encoding_tl
%<*LU>
\tl_set:Nn \l_@@_mode_tl {node}
- \int_set:Nn \prehyphenchar { `\- } % fixme
- \int_zero:N \posthyphenchar % fixme
- \int_zero:N \preexhyphenchar % fixme
- \int_zero:N \postexhyphenchar % fixme
%</LU>
}
% \end{macrocode}
@@ -1249,10 +1265,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx
index 57ff738183..c077a1bc1f 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-keyval.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{Font loading (\pkg{keyval}) definitions}
%
@@ -61,15 +61,8 @@
{
\bool_set_true:N \l_@@_nobf_bool
\bool_set_true:N \l_@@_noit_bool
- \bool_set_true:N \l_@@_external_bool
\tl_set:Nn \l_@@_font_path_tl {#1}
- \bool_lazy_and:nnTF { \l_@@_external_kpse_bool } { \tl_if_empty_p:N \l_@@_font_path_tl }
- {
- \@@_font_is_kpse:
- }
- {
- \@@_font_is_file:
- }
+ \@@_font_is_file:
%<*XE>
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
%</XE>
@@ -103,10 +96,7 @@
\@@_keys_define_code:nnn {fontspec-preparse-external} {KpseOnly}
{
\bool_set_true:N \l_@@_external_kpse_bool
- \bool_if:NT \l_@@_external_bool
- {
- \@@_font_is_kpse:
- }
+ \bool_if:NT \l_@@_external_bool \@@_font_is_file:
}
\@@_keys_define_code:nnn {fontspec} {KpseOnly} {}
% \end{macrocode}
@@ -1015,10 +1005,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx
index 1e52fc9d26..fa65a034f8 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-lang.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{Font language definitions}
%
@@ -405,10 +405,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-load.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-load.dtx
index db7f370031..3cd40e4f71 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-load.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-load.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
%
% \section{The \texttt{fontspec.sty} loading file}
%
@@ -58,10 +58,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-math.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-math.dtx
index 01d99c8641..7adc65d92f 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-math.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-math.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-math.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
%
% \section{Selecting maths fonts}
% Here, the fonts used in math mode are redefined to correspond to the
@@ -246,10 +246,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx
index 1785437fa0..16b328fad3 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-msg.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
%
% \section{Error/warning/info messages}
%
@@ -13,7 +13,7 @@
\cs_new:Npn \@@_error:n { \msg_error:nn {fontspec} }
\cs_new:Npn \@@_error:nn { \msg_error:nnn {fontspec} }
\cs_new:Npn \@@_error:nx { \msg_error:nnx {fontspec} }
-\cs_new:Npn \@@_error:nxx { \msg_error:nnxx {fontspec} }
+\cs_new:Npn \@@_error:nxx { \msg_error:nnxx {fontspec} }
\cs_new:Npn \@@_warning:n { \msg_warning:nn {fontspec} }
\cs_new:Npn \@@_warning:nx { \msg_warning:nnx {fontspec} }
\cs_new:Npn \@@_warning:nxx { \msg_warning:nnxx {fontspec} }
@@ -28,9 +28,9 @@
\cs_generate_variant:Nn \msg_new:nnn {nnx}
\cs_generate_variant:Nn \msg_new:nnnn {nnxx}
\cs_new:Nn \@@_msg_new:nn
- { \msg_new:nnx {fontspec} {#1} { \tl_trim_spaces:n {#2} } }
+ { \msg_new:nnx {fontspec} {#1} { ^^J \tl_trim_spaces:n {#2} } }
\cs_new:Nn \@@_msg_new:nnn
- { \msg_new:nnxx {fontspec} {#1} { \tl_trim_spaces:n {#2} } { \tl_trim_spaces:n {#3} } }
+ { \msg_new:nnxx {fontspec} {#1} { ^^J \tl_trim_spaces:n {#2} } { \tl_trim_spaces:n {#3} } }
\char_set_catcode_space:n {32}
% \end{macrocode}
%
@@ -49,7 +49,10 @@
}
\@@_msg_new:nnn {font-not-found}
{
- The font "#1" cannot be found.
+ The font "#1" cannot be found; this may be but usually is not
+ a fontspec bug. Either there is a typo in the font name/file,
+ the font is not installed (correctly), or there is a bug
+ in the underlying font loading engine (XeTeX/luaotfload).
}
{
A font might not be found for many reasons.\\
@@ -163,9 +166,11 @@
}
\@@_msg_new:nn {language-not-exist}
{
- Language '#1' not available
- for font '\l_fontspec_fontname_tl'
+ Language '#1' not explicitly supported
+ within font '\l_fontspec_fontname_tl'
with script '\l_@@_script_name_tl'.
+ Check the typeset output, and if it is okay then ignore this warning.
+ Otherwise a different font should be chosen.
}
\@@_msg_new:nn {only-xetex-feature}
{
@@ -203,7 +208,7 @@
The~"#1"~package~option~is~obsolete.~TU~is~the~default~encoding.
}
%</options>
-%<*fontspec>
+%<*fontspec>
\@@_msg_new:nn {font-index-needs-ttc}
{
The "FontIndex" feature is only supported by TTC (TrueType Collection) fonts.\\
@@ -240,7 +245,9 @@
}
\@@_msg_new:nn {no-script}
{
- Font "#1" does not contain requested Script "#2".
+ Script '#2' not explicitly supported within font '#1'.
+ Check the typeset output, and if it is okay then ignore this warning.
+ Otherwise a different font should be chosen.
}
\@@_msg_new:nn {opa-twice}
{
@@ -278,10 +285,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx
index 103fe2addf..3da1f25d7a 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-opening.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
%
% \section{Opening code}
%
@@ -19,6 +19,7 @@
% \begin{macrocode}
,math .bool_gset:N = \g_@@_math_bool
,math .usage:n = preamble
+ ,math / unknown .code:n = { } % \msg_warning:nnn {fontspec} {math-opt-unknown} {#1}
,no-math .bool_gset_inverse:N = \g_@@_math_bool
,no-math .usage:n = preamble
,config .bool_gset:N = \g_@@_cfg_bool
@@ -45,7 +46,12 @@
\msg_redirect_module:nnn { fontspec } { warning } { warning }
\msg_redirect_module:nnn { fontspec } { info } { info }
}
- }
+ }
+\msg_new:nnn {fontspec} {math-opt-unknown}
+ {
+ The~ global~ option~ 'math=#1'~ is~ not~ recognised.~ It~ will~ be~ ignored.
+ }
+
% \end{macrocode}
%
% \begin{macrocode}
@@ -188,10 +194,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx
index 1ea0a4eccf..5a38be87ff 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-opentype.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{OpenType definitions code}
%
@@ -159,7 +159,7 @@
% font. \cmd\l_@@_script_int\ is used to store
% the number corresponding to the script tag string.
% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_check_script:Nn {TF,T}
+\prg_new_conditional:Nnn \@@_check_script:Nn {TF,T,F}
{
%<debug>\typeout{:: _check_script:Nn~#1~/~#2}
\bool_if:NTF \l_@@_never_check_bool
@@ -480,10 +480,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx
index d56a066e7e..1850f25759 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-scripts.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{Font script definitions}
%
@@ -40,7 +40,6 @@
\newfontscript{Cypro-Minoan}{cpmn}
\newfontscript{Cyrillic}{cyrl}
\newfontscript{Default}{DFLT}
-\newfontscript{CustomDefault}{latn,DFLT}
\newfontscript{Deseret}{dsrt}
\newfontscript{Devanagari}{dev2,deva}
\newfontscript{Dives~Akuru}{diak}
@@ -195,10 +194,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-user.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-user.dtx
index d28eda0c2f..6be00dc140 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-user.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-user.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-user.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
% \section{User command internals}
% \label{sec:codeinternal}
@@ -64,6 +64,7 @@
% \begin{macrocode}
\cs_new:Nn \@@_main_setmainfont:nn
{
+%<debug>\typeout{::~_main_setmainfont:nn}
\ifdefined\DeclareFontSeriesDefault
\DeclareFontSeriesDefault[rm]{bf}{\bfdefault}
\fi
@@ -538,10 +539,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx
index bb6d3b4eee..c2be0378c5 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
%
% \section{Declaration of variables}
%
@@ -334,10 +334,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx
index bac0e57d94..d58424a165 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx
@@ -1,6 +1,33 @@
-%%^^A%% fontspec-code-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-xfss.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
-% \section{Changes to the NFSS}
+% \section{Changes/additions to the NFSS}
+%
+% \begin{function}{\strong, \strongenv}
+% \begin{syntax}
+% "\strong" \marg{text}
+% "\begin{strongenv}" \meta{text} "\end{strongenv}"
+% \end{syntax}
+% Typesets text in the `strong' font. NFSS series equivalent to \cs{emph}. Can be nested.
+% \end{function}
+%
+% \begin{function}{\strongfontdeclare}
+% \begin{syntax}
+% "\strongfontdeclare" \marg{comma-separated font switch declarations}
+% \end{syntax}
+% Define the behaviour of nested \cs{strong} commands.
+% \end{function}
+%
+% \begin{function}{\strongreset}
+% \begin{syntax}
+% "\renewcommand \strongreset" \marg{font switch declarations}
+% \end{syntax}
+% Define the behaviour when a \cs{strong} command is nested deeper than the definitions provided by \cs{strongfontdeclare}.
+% By default this is \meta{empty} --- i.e., bold on top of bold remains bold.
+% In certain circumstances it may be appropriate to reset to a default state.
+% \end{function}
+%
+%
+% \section{Implementation}
%
% \begin{macrocode}
%<*fontspec>
@@ -111,18 +138,21 @@
% \end{macro}
%
% \begin{macro}{\strong}
-% \begin{macro}{\strongreset}
% \begin{macrocode}
\DeclareTextFontCommand{\strong}{\strongenv}
-\cs_set:Npn \strongreset {}
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\strongreset}
+% \begin{macrocode}
+\cs_set:Npn \strongreset {}
+% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\reset@font}
+% \begin{macro}[int]{\reset@font}
% Ensure nesting resets when necessary:
% \begin{macrocode}
-\cs_set:Npn \reset@font
+\cs_set_protected:Npn \reset@font
{
\normalfont
\int_zero:N \l_@@_strong_int
@@ -130,14 +160,10 @@
% \end{macrocode}
% \end{macro}
%
-% Programmer's interface for setting nesting levels:
-% \begin{macrocode}
-\cs_new:Nn \fontspec_set_strong_level:n { \int_set:Nn \l_@@_strong_int {#1} }
-% \end{macrocode}
+% \subsection{Defaults}
%
-% Defaults:
% \begin{macrocode}
-\strongfontdeclare{ \bfseries }
+\strongfontdeclare{\bfseries}
% \end{macrocode}
%
% \begin{macrocode}
@@ -149,10 +175,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code.ltx b/macros/unicodetex/latex/fontspec/fontspec-code.ltx
index 1ec8fe6cd7..64d963af8e 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code.ltx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code.ltx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-code.ltx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code.ltx -- part of FONTSPEC <latex3.github.io/fontspec>
\ifdefined \XeTeXOTcountscripts \else \makeatletter
\@latex@error{^^J*** The fontspec documentation can only be typeset with `xelatex` ***\@gobble}\@ehc
@@ -28,10 +28,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code.pdf b/macros/unicodetex/latex/fontspec/fontspec-code.pdf
index c11119f627..464fc94ebe 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code.pdf
+++ b/macros/unicodetex/latex/fontspec/fontspec-code.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-api.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-api.tex
index bdcb1935b3..5f3ff21d54 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-api.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-api.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-doc-api.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-doc-api.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass[a4paper]{l3doc}
\usepackage{fontspec-doc-style}
@@ -22,13 +22,11 @@ know.
New \AAT\ features may be created with this command:\par
{\centering\cmd\newAATfeature\marg{feature}\marg{option}\marg{feature code}\marg{selector code}\par}\noindent
Use the \XeTeX\ file \path{AAT-info.tex} to obtain the code numbers.
-See \exref{newAATfeat}.
-
-\begin{Xexample}{newAATfeat}{Assigning new \AAT\ features.}
+\begin{Verbatim}
\newAATfeature{Alternate}{HoeflerSwash}{17}{1}
\fontspec{Hoefler Text Italic}[Alternate=HoeflerSwash]
This is XeTeX by Jonathan Kew.
-\end{Xexample}
+\end{Verbatim}
\DescribeMacro{\newopentypefeature}
@@ -38,7 +36,7 @@ The synonym \cs{newICUfeature} is deprecated.
Here's what it would look like in practise:
\begin{Verbatim}
-\newopentypefeature{Style}{NoLocalForms}{-locl}
+ \newopentypefeature{Style}{NoLocalForms}{-locl}
\end{Verbatim}
\DescribeMacro{\newfontfeature}
@@ -132,9 +130,13 @@ it may be aliased to another with the
such as shown in \exref{alias}.
\begin{Xexample}{alias}{Renaming font features.}
- \aliasfontfeature{ItalicFeatures}{IF}
- \fontspec{Hoefler Text}[IF = {Alternate=1}]
- Roman Letters \itshape And Swash
+ \aliasfontfeature{ItalicFont}{IF}
+ \aliasfontfeature{ItalicFeatures}{IFF}
+ \setmainfont{ EBGaramond-Regular.otf }[
+ IF = EBGaramond-Italic.otf ,
+ IFF = {Style=Swash} ,
+ ]
+ Roman Letters \itshape And Swash
\end{Xexample}
Spaces in feature (and option names, see below) \emph{are} allowed. (You may have
@@ -180,8 +182,8 @@ implemented. But you get the idea.
\DescribeMacro{\l_fontspec_font}
In some cases, it is useful to know what the \LaTeX\ font family
of a specific \pkg{fontspec} font is. After a \cmd\fontspec-like
-command, this is stored inside the \cmd\l_fontspec_family_tl\ macro.
-Otherwise, \LaTeX's own \cmd\f@family\ macro can be useful here,
+command, this is stored inside the \cmd{\l_fontspec_family_tl}\ macro.
+Otherwise, \LaTeX's own \cmd{\f@family} macro can be useful here,
too.
The raw \TeX\ font that is defined from the `base' font in the family is stored in \cmd{\l_fontspec_font}.
@@ -337,10 +339,10 @@ OpenType language tag |#1|.
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex
index 60da8dbb3a..76cf35fb83 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-doc-enc.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-doc-enc.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass[a4paper]{l3doc}
\usepackage{fontspec-doc-style}
@@ -202,10 +202,10 @@ the process of defining Unicode font range encodings:
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex
index b95931c52e..076a3c3140 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-doc-featset.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-doc-featset.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass[a4paper]{l3doc}
\usepackage{fontspec-doc-style}
@@ -100,8 +100,8 @@ tabular material to use monospaced numbers, as shown in \exref{aff}.
If you attempt to \emph{change} an already-selected feature, \pkg{fontspec} will try to de-activate any features that clash with the new ones.
\Eg, the following two invocations are mutually exclusive:
\begin{Verbatim}
-\addfontfeature{Numbers=OldStyle}...
-\addfontfeature{Numbers=Lining}...
+\addfontfeatures{Numbers=OldStyle}...
+\addfontfeatures{Numbers=Lining}...
123
\end{Verbatim}
Since |Numbers=Lining| comes last, it takes precedence and deactivates the call |Numbers=OldStyle|.
@@ -109,7 +109,7 @@ Since |Numbers=Lining| comes last, it takes precedence and deactivates the call
If you wish to apply the change to only one of the fonts of a family (say, italics only)
you can write
\begin{Verbatim}
-\addfontfeature{ItalicFeatures={Numbers=Lowercase}}
+\addfontfeatures{ItalicFeatures={Numbers=Lowercase}}
\end{Verbatim}
@@ -157,8 +157,8 @@ features requested.
}
It is entirely possible that separate fonts in a family will require
-separate options; \eg, Hoefler Text Italic contains various swash
-feature options that are completely unavailable in the upright shapes.
+separate options; \eg, certain italic fonts contains various swash
+feature options that are usually unavailable in the upright (`roman') shapes.
The font features defined at the top level of the optional \cmd\fontspec\
argument are applied to \emph{all} shapes of the family.
@@ -240,7 +240,7 @@ Support for TrueType Collections has only been tested in \XeTeX, but should also
\null\quad... \\
\char`\}}
-The \feat{SizeFeature} feature is a little more complicated
+The \feat{SizeFeatures} feature is a little more complicated
than the previous features discussed. It allows different fonts
and different font features to be selected for a given font
family as the point size varies.
@@ -347,9 +347,9 @@ of writing the colours in hexadecimal.
\begin{Verbatim}
\usepackage{xcolor}
...
- \fontspec[Color=red]{Verdana} ...
+ \fontspec[Color=red]{Montserrat-Medium.otf} ...
\definecolor{Foo}{rgb}{0.3,0.4,0.5}
- \fontspec[Color=Foo]{Verdana} ...
+ \fontspec[Color=Foo]{Montserrat-Medium.otf} ...
\end{Verbatim}
You may also use named colours defined with the color commands of the L3
@@ -359,20 +359,20 @@ programming layer:
\color_set:nnn{Foo}{rgb}{0.3,0.4,0.5}
\ExplSyntaxOff
...
- \fontspec[Color=Foo]{Verdana} ...
+ \fontspec[Color=Foo]{Montserrat-Medium.otf} ...
\end{Verbatim}
-Color expressions (\verb+red!50!blue+) are not supported. The \pkg{color}
+Color expressions (like \verb+red!50!blue+) are not supported. The \pkg{color}
package is \emph{not} supported neither.
The code will at first test for color names of the L3 layer, then for xcolor
-names and at last try to use the argument as a hexadecimal value.
+names, and at last try to use the argument as a hexadecimal value.
You may specify the transparency with a named colour using the \feat{Opacity}
-feature which takes an decimal from zero to one corresponding to transparent
+feature, which takes an decimal from zero to one corresponding to transparent
to opaque respectively:
\begin{Verbatim}
- \fontspec[Color=red,Opacity=0.7]{Verdana} ...
+ \fontspec[Color=red,Opacity=0.7]{Montserrat-Medium.otf} ...
\end{Verbatim}
It is still possible to specify a colour in six-char hexadecimal form
while defining opacity in this way, if you like.
@@ -613,14 +613,14 @@ of font size. For example, something like:
In rare situations users may want to mechanically distort the shapes of the glyphs in the current font such as shown in \exref{fake}. Please don't overuse these features; they are \emph{not} a good alternative to having the real shapes.
\begin{Xexample}{fake}{Articifial font transformations.}
- \fontspec{Quattrocento-Regular.otf} \emph{ABCxyz} \quad
- \fontspec{Quattrocento-Regular.otf}[FakeSlant=0.2] ABCxyz
+ \fontspec{Quattrocento-Regular.ttf} \emph{ABCxyz} \quad
+ \fontspec{Quattrocento-Regular.ttf}[FakeSlant=0.2] ABCxyz
- \fontspec{Quattrocento-Regular.otf} ABCxyz \quad
- \fontspec{Quattrocento-Regular.otf}[FakeStretch=1.2] ABCxyz
+ \fontspec{Quattrocento-Regular.ttf} ABCxyz \quad
+ \fontspec{Quattrocento-Regular.ttf}[FakeStretch=1.2] ABCxyz
- \fontspec{Quattrocento-Regular.otf} \textbf{ABCxyz} \quad
- \fontspec{Quattrocento-Regular.otf}[FakeBold=1.5] ABCxyz
+ \fontspec{Quattrocento-Regular.ttf} \textbf{ABCxyz} \quad
+ \fontspec{Quattrocento-Regular.ttf}[FakeBold=1.5] ABCxyz
\end{Xexample}
If values are omitted, their defaults are as shown above.
@@ -644,10 +644,10 @@ shown in \exref{tracking}.
The letter spacing parameter is a normalised additive factor (not a scaling factor); it is defined as a percentage of the font size. That is, for a 10\,pt font, a letter spacing parameter of `|1.0|' will add 0.1\,pt between each letter.
\begin{Xexample}{tracking}{The \feat{LetterSpace} feature.}
- \fontspec{Didot}
+ \setmainfont{Ysabeau-Light.otf}
\addfontfeature{LetterSpace=0.0}
USE TRACKING FOR DISPLAY CAPS TEXT \\
- \addfontfeature{LetterSpace=2.0}
+ \addfontfeature{LetterSpace=3.0}
USE TRACKING FOR DISPLAY CAPS TEXT
\end{Xexample}
@@ -743,10 +743,10 @@ To select such an instance, the \feat{Instance} feature can be used:
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex
index aecd47e176..2f9e37d907 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-doc-fontsel.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-doc-fontsel.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass[a4paper]{l3doc}
\usepackage{fontspec-doc-style}
@@ -129,7 +129,7 @@ wish to have them all installed in your system's font directories.
In this case, it is more convenient to load them from a different location on your disk.
This technique is also necessary in \XeTeX\ when loading OpenType fonts that are present within your \TeX\ distribution, such as \path{/usr/local/texlive/2013/texmf-dist/fonts/opentype/public}.
Fonts in such locations are visible to \XeTeX\ but cannot be loaded by font name, only file name; \LuaTeX\ does not have this restriction.
-(If you for some reason want to restrict the fonts to the ones provided by your \TeX\ distribution even though you are using \LuaTeX\ you can use the \texttt{KpseOnly} option)
+(If you for some reason want to restrict the fonts to the ones provided by your \TeX\ distribution even though you are using \LuaTeX\ you can use the \DescribeOption{KpseOnly}\texttt{KpseOnly} option)
When selecting fonts by file name, any font that can be found in the default
search paths may be used directly (including in the current directory)
@@ -231,7 +231,7 @@ To continue the example above, here we colour the different faces:
\defaultfontfeatures[CharisSILR]{Color=blue}
\defaultfontfeatures[CharisSILB]{Color=red}
\end{Verbatim}
-Such configuration lines could be stored either inline inside \texttt{My Charis.fontspec}
+Such configuration lines could be stored either inline inside \texttt{MyCharis.fontspec}
or within their own \texttt{.fontspec} files; in this way, \pkg{fontspec} is designed to
handle `nested' configuration options.
@@ -336,14 +336,13 @@ A legacy \TeX\ font. {\unicodefont A unicode font.}
Sometimes only a specific font face is desired, without accompanying italic or bold variants
being automatically selected.
-This is common when selecting a fancy italic font, say, that has swash features unavailable
-in the upright forms. \cmd\newfontface\ is used for this purpose, shown
-in \exref{nfface}, which is repeated in \vref{sec:contextuals}.
+This is common when selecting a font for a very particular context within the document.
+For instance, say that a particular swash font is desired that isn't part of the document
+font setup. \cmd\newfontface\ could be used for this purpose, shown in \exref{nfface}.
\begin{Xexample}{nfface}{Defining a single font face.}
- \newfontface\fancy{Hoefler Text Italic}%
- [Contextuals={WordInitial,WordFinal}]
- \fancy where is all the vegemite
+ \newfontface\qedfont{EBGaramond-Regular.otf}[Style=Swash]
+ \qedfont QED
% \emph, \textbf, etc., all don't work
\end{Xexample}
@@ -366,21 +365,21 @@ in \exref{nfface}, which is repeated in \vref{sec:contextuals}.
The automatic bold, italic, and bold italic font selections will not be
adequate for the needs of every font: while some fonts mayn't even
have bold or italic shapes, in which case a skilled (or lucky)
-designer may be able to chose well-matching accompanying shapes from
+designer may be able to choose well-matching accompanying shapes from
a different font altogether, others can have a range of bold and
-italic fonts to chose among. The \feat{BoldFont} and
+italic fonts to choose among. The \feat{BoldFont} and
\feat{ItalicFont} features are provided for these situations. If only
one of these is used, the bold italic font is requested as the
default from the \emph{new} font. See \exref{bff}.
-\begin{Xexample}{bff}{Explicit selection of the bold font.}
- \fontspec{Helvetica Neue UltraLight}%
- [BoldFont={Helvetica Neue}]
- Helvetica Neue UltraLight \\
- {\itshape Helvetica Neue UltraLight Italic} \\
- {\bfseries Helvetica Neue } \\
- {\bfseries\itshape Helvetica Neue Italic} \\
-\end{Xexample}
+\begin{Lexample}{bff}{Explicit selection of the bold font.}
+ \setmainfont{Ysabeau-Hairline.otf}%
+ [BoldFont={Ysabeau-Thin.otf}]
+ Hairline \\
+ {\itshape Hairline Italic} \\
+ {\bfseries Thin } \\
+ {\bfseries\itshape Thin Italic} \\
+\end{Lexample}
If a bold italic shape is not defined, or you want to specify
\emph{both} custom bold and italic shapes, the \feat{BoldItalicFont}
@@ -429,7 +428,7 @@ Without these, however, the \LaTeX\ font switches for slanted (\cs{textsl}, \cs{
Swash font shapes in a family is supported by \LaTeX's commands \cs{textsw} and \cs{swshape}. These commands assume that swash shapes are in a sense `parallel' to italic shapes --- for instance, writing both \cs{swshape} and \cs{itshape} would not result in an italic swash shape (you would get whichever was declared last).
The \pkg{fontspec} package adopts this approach, while recognising that OpenType fonts in theory could have any crazy combination of shapes such as `italic swash small caps'.
-Attempting to support arbitrarily complex situations makes setup (and the code) more difficult with let's say infrequent benefit --- \pkg{fontspec}'s alternate feature selection mechanisms (such as verb|\addfontfeature{Style=Swash}|) can be used in such situations.
+Attempting to support arbitrarily complex situations makes setup (and the code) more difficult with let's say infrequent benefit --- \pkg{fontspec}'s alternate feature selection mechanisms (such as |\addfontfeature{Style=Swash}|) can be used in such situations.
Therefore, setup is quite simple:
\begin{Verbatim}
@@ -512,14 +511,14 @@ Conversely, a font face defined in terms of a non-standard font shape will not.
There are some standards for choosing shape and series codes; the \LaTeXe\ font selection guide\footnote{\texttt{texdoc fntguide}} has a comprehensive listing.
-The \feat{FontFace} command also interacts properly with the \feat{SizeFeatures} command as follows: (nonsense set of font selection choices)
+The \feat{FontFace} command also interacts properly with the \feat{SizeFeatures} command as follows:
\begin{Verbatim}
FontFace = {c}{n}{
- Font = Times ,
+ Font = lmsans10-oblique.otf ,
SizeFeatures = {
- { Size = -10 , Font = Georgia } ,
- { Size = 10-15} , % default "Font = Times"
- { Size = 15- , Font = Cochin } ,
+ { Size = -10 , Font = lmsans8-oblique.otf } ,
+ { Size = 10-15 } ,
+ { Size = 15- , Font = lmsans17-oblique.otf } ,
},
},
\end{Verbatim}
@@ -640,10 +639,10 @@ if it were a `naked' control sequence; \eg, `|M. \fontspec{...} N|' and
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex
index 07345d19d7..850b00b3e2 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-doc-intro.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-doc-intro.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass[a4paper]{l3doc}
\usepackage{fontspec-doc-style}
@@ -77,7 +77,10 @@ For basic use, no package options are required:
Package options will be introduced below; some preliminary details are discussed first.
Package options are setup with the in-built \LaTeX{} keyval options handler. This means
that the package can be loaded more than once with different options without triggering
-an option clash error. The \texttt{config} and \texttt{no-config} option must be used in
+an option clash error.
+\DescribeOption{config}
+\DescribeOption{no-config}
+The \texttt{config} and \texttt{no-config} option must be used in
the first loading and are ignored later.
\subsection{Font encodings}
@@ -86,6 +89,8 @@ The package switches the \textsc{nfss} font encoding to \texttt{TU}.
\texttt{TU} is a new Unicode font encoding, intended for both \XeTeX\ and \LuaTeX\ engines, and automatically contains support for symbols covered by \LaTeX's traditional \texttt{T1} and \texttt{TS1} font encodings (for example, |\%|, |\textbullet|, |\"u|, and so on).
Some additional features are provided by \pkg{fontspec} to customise some encoding details; see Part~\vref{part:enc} for further details.
+\DescribeOption{euenc}
+\DescribeOption{tuenc}
Pre-2017 behaviour is now obsolete. The \texttt{euenc} and \texttt{tuenc} package options are
ignored. Package authors and users who have referred explicitly to the encoding names \texttt{EU1} or \texttt{EU2} should update their code or documents.
(See internal variable names described in \vref{sec:api} for how to do this properly.)
@@ -95,7 +100,7 @@ ignored. Package authors and users who have referred explicitly to the encoding
By default, \pkg{fontspec} adjusts \LaTeX's default maths setup in order to maintain the correct Computer Modern symbols when the roman font changes.
However, it will attempt to avoid doing this if another maths font package is loaded (such as \pkg{mathpazo} or the \pkg{unicode-math} package).
-If you find that \pkg{fontspec} is incorrectly changing the maths font when it shouldn't be, apply the |no-math| package option to manually suppress its behaviour here.
+If you find that \pkg{fontspec} is incorrectly changing the maths font when it shouldn't be, apply the \DescribeOption{no-math} |no-math| package option to manually suppress its behaviour here.
\subsection{Configuration}
@@ -110,6 +115,7 @@ A |fontspec.cfg| file is distributed with \pkg{fontspec} with a small number of
To customise \pkg{fontspec} to your liking, use the standard |.cfg| file as a starting point or write your own from scratch, then either place it in the same folder as the main document for isolated cases, or in a location
that \XeTeX\ or \LuaTeX\ searches by default; \eg\ in Mac\TeX: \path{~/Library/texmf/tex/latex/}.
+\DescribeOption{no-config}
The package option |no-config| will suppress the loading of the |fontspec.cfg| file under all circumstances. Both options must be used the first time \pkg{fontspec} is loaded and are ignored in later calls.
@@ -117,13 +123,14 @@ The package option |no-config| will suppress the loading of the |fontspec.cfg| f
\label{sec:quiet-warnings}
This package can give some warnings that can be harmless if you know what
-you're doing. Use the |quiet| package option to write these warnings to the
+you're doing. Use the \DescribeOption{quiet} |quiet| package option to write these warnings to the
transcript (\texttt{.log}) file instead.
+\DescribeOption{silent}
Use the |silent| package option to completely suppress these warnings if you
don't even want the |.log| file cluttered up.
-Both options can also be used with \cs{Setkeys} in the document. Use the |verbose| option to get activate the warnings again.
+Both options can also be used with \cs{Setkeys} in the document. Use the \DescribeOption{verbose} |verbose| option to get activate the warnings again.
\section{Interaction with \LaTeXe\ and other packages}
@@ -184,10 +191,10 @@ An example for setting up a font family for use with \cs{strong} is discussed in
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex
index b08a89230e..314515a1f4 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-doc-luatex.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-doc-luatex.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass[a4paper]{l3doc}
\usepackage{fontspec-doc-style}
@@ -79,10 +79,10 @@ Please refer to the \LuaTeX/\pkg{luaotfload} documentation for more details.
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex
index 10bc9f0284..03deac27cb 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-doc-opentype.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-doc-opentype.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass[a4paper]{l3doc}
@@ -213,7 +213,6 @@ Thanks to \name{Jonathan Kew}, \name{Yves Codet} and
\begin{Xexample}[firstline=14,lastline=23]{script-lang}{An example of various Scripts and Languages.}
\def\testfeature#1#2{%^^A
\fontspec{\examplefont}#2 & \fontspec[#1]{\examplefont}#2\\[1ex]}
-\def \examplefont{CODE2000.TTF}
\def \arabictext{العربي}
\def \devanagaritext{हिन्दी}
\def \bengalitext{লেখ}
@@ -224,6 +223,7 @@ Thanks to \name{Jonathan Kew}, \name{Yves Codet} and
\def \hebrewtext{רִדְתָּֽהּ}
\def \vietnamesetext{cấp số mỗi}
\begin{tabular}{r@{\quad}l}
+ \gdef\examplefont{CODE2000.TTF}
\testfeature{Script=Arabic}{\arabictext}
\testfeature{Script=Devanagari}{\devanagaritext}
\testfeature{Script=Bengali}{\bengalitext}
@@ -985,8 +985,8 @@ Coverage will vary by font; see \exref{ot-frac}.
Some (Asian fonts predominantly) also provide for the \opt{Alternate} option.
\begin{Lexample}{ot-frac}{The \feat{Fractions} feature.}
-\setsansfont{Lato}[Fractions=On]
-\setmonofont{IBM Plex Mono}[Fractions=On]
+\setsansfont{IBMPlexSans-Regular.otf}[Fractions=On]
+\setmonofont{IBMPlexMono-Regular.otf}[Fractions=On]
\sffamily 1/2 47/11 1/1000 \par
\ttfamily 1/2 47/11
@@ -1036,6 +1036,15 @@ will look. OpenType fonts may contain the following options:
\opt{SmallCaps}, \opt{PetiteCaps},
\opt{UppercaseSmallCaps}, \opt{UppercasePetiteCaps}, and
\opt{Unicase}.
+Additionally \opt{Uppercase} and \opt{Lowercase} are supported for all fonts
+in \LuaTeX.
+In contrast to earlier version, the \opt{Uppercase} and \opt{Lowercase} options
+turn the text into uppercase or lowercase and do not require the text to already
+have the right casing. The old behavior of \opt{Uppercase} is available with
+\verb|Style=Uppercase|. When the \opt{Uppercase} option is selected,
+\verb|Style=Uppercase| and \verb|Kerning=Uppercase| are automatically applied if
+supported by the font.
+
\begin{features}{Letters}
\otf*{SmallCaps}{smcp}
@@ -1043,6 +1052,8 @@ will look. OpenType fonts may contain the following options:
\otf*{UppercaseSmallCaps}{c2sc}
\otf*{UppercasePetiteCaps}{c2pc}
\otf*{Unicase}{unic}
+\otf*{Uppercase}{}
+\otf*{Lowercase}{}
\cmidrule{2-4}
\otf{ResetAll}{}
\end{features}
@@ -1058,9 +1069,11 @@ This difference is shown in \exref{caps}.
`Unicase' is a weird hybrid of upper and lower case letters.
\begin{Lexample}{caps}{Small caps from lowercase or uppercase letters.}
- \fontspec{texgyreadventor-regular.otf}[Letters=SmallCaps]
+ \fontspec{Coelac.otf}[Letters=SmallCaps]
+ THIS SENTENCE no verb \\
+ \fontspec{Coelac.otf}[Letters=UppercaseSmallCaps]
THIS SENTENCE no verb \\
- \fontspec{texgyreadventor-regular.otf}[Letters=UppercaseSmallCaps]
+ \fontspec{Coelac.otf}[Letters=PetiteCaps]
THIS SENTENCE no verb
\end{Lexample}
@@ -1196,7 +1209,7 @@ particular substitutions are organised with which feature largely up to the font
\begin{Xexample}[firstline=2]{style-alt}{Example of the \opt{Alternate} option of the \feat{Style} feature.}
\Large
- \fontspec{Quattrocento-Regular.otf}
+ \fontspec{Quattrocento-Regular.ttf}
M Q W \\
\addfontfeature{Style=Alternate}
M Q W
@@ -1208,7 +1221,7 @@ in \exref{style-uppercase}; note the raised position of the hyphen
to better match the surrounding letters.
It will (probably) not actually map letters to uppercase.
\note{If you want automatic uppercase letters, look to \LaTeX's
- \cmd\MakeUppercase\ command.}
+ \cmd\MakeUppercase\ command or, when using \LuaTeX, to the \feat{Letters} feature.}
This option used to be selected under the \feat{Letters} feature, but moved here
as it generally does not actually affect the letters themselves.
The \feat{Kerning} feature also contains an \opt{Uppercase} option,
@@ -1224,29 +1237,15 @@ which adds a small amount of spacing in between letters (see \vref{sec:kerning})
In other features, larger breadths of changes can be seen, covering
the style of an entire alphabet.
-See \exref{style-itrub}; here, the \opt{Italic} option affects the Latin text
-and the \opt{Ruby} option the Japanese.
-
-\begin{Xexample}[firstline=2]{style-itrub}{Example of the \opt{Italic} and \opt{Ruby} options of the \feat{Style} feature.}
+For instance, in some Japanese fonts features such as |Style=Italic| or |Style=Ruby|
+respectively change the style of all Latin characters to italic or all Hiragana characters to a darker optical shape:
+\begin{Verbatim}[firstline=2]
\Large \def\kana{ようこそ ワカヨタレソ}
\fontspec{Hiragino Mincho Pro}
Latin \kana \\
\addfontfeature{Style={Italic, Ruby}}
Latin \kana
-\end{Xexample}
-
-Note the difference here between the default and the horizontal style kana
-in \exref{style-hvkana}: the horizontal style is slightly wider.
-
-\begin{Xexample}[firstline=2]{style-hvkana}{Example of the \opt{HorizontalKana} and \opt{VerticalKana} options of the \feat{Style} feature.}
- \Large \def\kana{ようこそ ワカヨタレソ}
- \fontspec{Hiragino Mincho Pro}
- \kana \\
- {\addfontfeature{Style=HorizontalKana}
- \kana } \\
- {\addfontfeature{Style=VerticalKana}
- \kana }
-\end{Xexample}
+\end{Verbatim}
\subsubsection{Stylistic Set variations --- \texttt{ssNN}}
@@ -1340,16 +1339,15 @@ and Japanese typesetting.
Some fonts are equipped with an extensive range of
numbers and numerals in different forms. These are accessed with the
-\feat{Annotation} feature (OpenType feature |nalt|), selected numerically as shown in
-\exref{ot-annot}. Note that the indexing starts from zero.
-
-\begin{Xexample}{ot-annot}{Annotation forms for OpenType fonts.}
+\feat{Annotation} feature (OpenType feature |nalt|), selected numerically.
+Note that the indexing starts from zero.
+\begin{Verbatim}
\fontspec{Hiragino Maru Gothic Pro}
1 2 3 4 5 6 7 8 9
\def\x#1{\\{\addfontfeature{Annotation=#1}
1 2 3 4 5 6 7 8 9 }}
\x0\x1\x2\x3\x4\x5\x6\x7\x7\x8\x9
-\end{Xexample}
+\end{Verbatim}
\subsubsection{Character width}\label{sec:CharacterWidth}
@@ -1378,34 +1376,20 @@ latter case, there are also half-width forms for squeezing more kana
glyphs (which are less complex than the kanji they are amongst) into
a given block of space. The same features are given to roman letters
in Japanese fonts, for typesetting foreign words in the same style
-as the surrounding text.
+as the surrounding text. Example omitted until I find an open source
+font which supports these features.
+%\begin{Verbatim}
+% \def\texta{ようこそ}\def\textb{ワカヨタレソ}
+% \def\test{\makebox[2cm][l]{\texta}%
+% \makebox[2.5cm][l]{\textb}%
+% \makebox[2.5cm][l]{abcdef}}
+% \fontspec{Hiragino Mincho Pro}
+% {\addfontfeature{CharacterWidth=Proportional}\test}\\
+% {\addfontfeature{CharacterWidth=Full}\test}\\
+% {\addfontfeature{CharacterWidth=Half}\test}
+%\end{Verbatim}
-\begin{Xexample}[firstline=2]{charwdprop}{Proportional or fixed width forms.}
- \def\texta{ようこそ}\def\textb{ワカヨタレソ}
- \def\test{\makebox[2cm][l]{\texta}%
- \makebox[2.5cm][l]{\textb}%
- \makebox[2.5cm][l]{abcdef}}
- \fontspec{Hiragino Mincho Pro}
- {\addfontfeature{CharacterWidth=Proportional}\test}\\
- {\addfontfeature{CharacterWidth=Full}\test}\\
- {\addfontfeature{CharacterWidth=Half}\test}
-\end{Xexample}
-The same situation occurs with numbers, which are provided in
-increasingly illegible compressed forms seen in \exref{charwd}.
-
-\begin{Xexample}[firstline=2]{charwd}{Numbers can be compressed significantly.}
- \centering
- \fontspec[Renderer=AAT]{Hiragino Mincho Pro}
- {\addfontfeature{CharacterWidth=Full}
- ---12321---}\\
- {\addfontfeature{CharacterWidth=Half}
- ---1234554321---}\\
- {\addfontfeature{CharacterWidth=Third}
- ---123456787654321---}\\
- {\addfontfeature{CharacterWidth=Quarter}
- ---12345678900987654321---}
-\end{Xexample}
\subsubsection{CJK shape}
@@ -1429,14 +1413,12 @@ fonts support the following \feat{CJKShape} options:
\opt{JIS1990}, and \opt{Expert}. OpenType also supports the \opt{NLC} option.
\begin{Xexample}[firstline=2]{ot-cjk-shape}{Different standards for CJK ideograph presentation.}
- \LARGE\def\text{ 唖噛躯 妍并訝}
- \fontspec{Hiragino Mincho Pro}
+ \LARGE\def\text{\noindent 唖噛躯 妍并訝}
+ \fontspec{NotoSansJP-Regular.ttf}
{\addfontfeature{CJKShape=Traditional}
\text } \\
{\addfontfeature{CJKShape=NLC}
- \text } \\
- {\addfontfeature{CJKShape=Expert}
- \text }
+ \text }
\end{Xexample}
@@ -1465,10 +1447,10 @@ however; please get in touch if there are improvements that could be made.
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-style.sty b/macros/unicodetex/latex/fontspec/fontspec-doc-style.sty
index 751e7a150d..5bf5877bb7 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-style.sty
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-style.sty
@@ -5,8 +5,10 @@
\input{fontspec.dtx}
\ExplSyntaxOff
-\usepackage{fontspec,booktabs,caption,xcolor,flafter,fancyvrb,hologo,graphicx,
- url,varioref,varwidth,microtype,tocloft,framed,xparse,docmute}
+\usepackage{fontspec,booktabs,caption,
+xcolor,flafter,fancyvrb,hologo,
+graphicx,url,varioref,varwidth,
+microtype,framed,tocloft,xparse,docmute}
\let\FancyVerbSpace\verbvisiblespace
@@ -32,7 +34,7 @@
\newcommand\XeLaTeX{\hologo{XeLaTeX}}
\newcommand\LuaLaTeX{\hologo{LuaLaTeX}}
-% ToC formatting:
+% tocloft formatting:
\setlength\cftsubsecnumwidth{1.4\cftsubsecnumwidth}
%\def\@cfttocstart{\small\begin{multicols}{2}}
%\def\@cfttocfinish{\end{multicols}}
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex
index 0033156971..6940f0c32b 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-doc-xetex.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-doc-xetex.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass[a4paper]{l3doc}
\usepackage{fontspec-doc-style}
@@ -61,17 +61,15 @@ select the \opt{OpenType} renderer.}
\subsection{Vertical typesetting}
\XeTeX\ provides for vertical typesetting simply with the ability to rotate
-the individual glyphs as a font is used for typesetting, as shown in
-\exref{vert}.
-
-\begin{Xexample}[firstline=2]{vert}{Vertical typesetting.}
+the individual glyphs as a font is used for typesetting:
+\begin{Verbatim}
\def\verttext{共産主義者は}
\fontspec{Hiragino Mincho Pro}
\verttext
\fontspec{Hiragino Mincho Pro}[Renderer=AAT,Vertical=RotatedGlyphs]
\rotatebox{-90}{\verttext}% requires the graphicx package
-\end{Xexample}
+\end{Verbatim}
No actual provision is made for typesetting top-to-bottom
languages; for an example of how to do this, see the vertical Chinese
@@ -259,10 +257,10 @@ options: \opt{Off},
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-example.tex b/macros/unicodetex/latex/fontspec/fontspec-example.tex
index bf2831b134..2da077d1d9 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-example.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-example.tex
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-example.tex -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-example.tex -- part of FONTSPEC <latex3.github.io/fontspec>
\documentclass{article}
diff --git a/macros/unicodetex/latex/fontspec/fontspec-lua.dtx b/macros/unicodetex/latex/fontspec/fontspec-lua.dtx
index 09e123a053..a49ea3fd4f 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-lua.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-lua.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec-lua.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-lua.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
%
% \section{Lua module}
%
@@ -87,10 +87,10 @@ end
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec.dtx b/macros/unicodetex/latex/fontspec/fontspec.dtx
index f73bb4edcb..f6a4a73d93 100644
--- a/macros/unicodetex/latex/fontspec/fontspec.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec.dtx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec.dtx -- part of FONTSPEC <latex3.github.io/fontspec>
%%^^A%% Metadata for the package, including files and versioning
% \section{Package declaration}
@@ -53,7 +53,7 @@
\textsc{Will Robertson}\\
With contributions by Khaled Hosny,\\
Philipp Gesang, Joseph Wright, and others.\\
- \url{http://wspr.io/fontspec/}
+ \url{http://latex3.github.io/fontspec/}
}
%</dtx>
% \end{macrocode}
@@ -70,7 +70,7 @@
\ProvidesExplFile{fontspec.dtx}
%</dtx>
%<*fontspec>
- {2024/02/13}{2.9a}{Font selection for XeLaTeX and LuaLaTeX}
+ {2024/04/27}{2.9b}{Font selection for XeLaTeX and LuaLaTeX}
%</fontspec>
% \end{macrocode}
%
@@ -89,8 +89,8 @@
%<lua>local fontspec = fontspec
%<lua>fontspec.module = {
%<lua> name = "fontspec",
-%<lua> version = "2.9a",
-%<lua> date = "2024/02/13",
+%<lua> version = "2.9b",
+%<lua> date = "2024/04/27",
%<lua> description = "Font selection for XeLaTeX and LuaLaTeX",
%<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
@@ -102,10 +102,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec.ins b/macros/unicodetex/latex/fontspec/fontspec.ins
index 00b43f9ee2..4793ff3d00 100644
--- a/macros/unicodetex/latex/fontspec/fontspec.ins
+++ b/macros/unicodetex/latex/fontspec/fontspec.ins
@@ -1,4 +1,4 @@
-%%^^A%% fontspec.ins -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec.ins -- part of FONTSPEC <latex3.github.io/fontspec>
\input fontspec.dtx\relax
\input l3docstrip.tex\relax
@@ -8,7 +8,7 @@
\let\MetaPrefix\relax
\preamble
------------------------------------------------
-The FONTSPEC package <wspr.io/fontspec>
+The FONTSPEC package <latex3.github.io/fontspec>
------------------------------------------------
Copyright 2004-2017 Will Robertson, LPPL "maintainer"
Copyright 2009-2013 Khaled Hosny
@@ -49,10 +49,10 @@ the conditions of the LaTeX Project Public License, version 1.3c or higher
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec.ltx b/macros/unicodetex/latex/fontspec/fontspec.ltx
index d6d2a2d642..edb6786c92 100644
--- a/macros/unicodetex/latex/fontspec/fontspec.ltx
+++ b/macros/unicodetex/latex/fontspec/fontspec.ltx
@@ -1,4 +1,4 @@
-%%^^A%% fontspec.ltx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec.ltx -- part of FONTSPEC <latex3.github.io/fontspec>
\ifdefined \XeTeXOTcountscripts \else \makeatletter
\@latex@error{^^J*** The fontspec documentation can only be typeset with `xelatex` ***\@gobble}\@ehc
@@ -26,10 +26,10 @@
% /©
% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
+% The FONTSPEC package <latex3.github.io/fontspec>
% ------------------------------------------------
-% Copyright 2022-2023 The LaTeX project
-% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
+% Copyright 2022-2024 The LaTeX project, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec.pdf b/macros/unicodetex/latex/fontspec/fontspec.pdf
index 6fb58328d1..70a93b184b 100644
--- a/macros/unicodetex/latex/fontspec/fontspec.pdf
+++ b/macros/unicodetex/latex/fontspec/fontspec.pdf
Binary files differ