texlive[49650] Master/texmf-dist: fontspec (9jan19)
commits+karl at tug.org
commits+karl at tug.org
Wed Jan 9 23:44:11 CET 2019
Revision: 49650
http://tug.org/svn/texlive?view=revision&revision=49650
Author: karl
Date: 2019-01-09 23:44:11 +0100 (Wed, 09 Jan 2019)
Log Message:
-----------
fontspec (9jan19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/fontspec/CHANGES.md
trunk/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf
trunk/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec.ins
trunk/Master/texmf-dist/source/latex/fontspec/fontspec.ltx
trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
Added Paths:
-----------
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-closing.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-enc.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-aat.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-lang.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-math.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx
Removed Paths:
-------------
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx
Modified: trunk/Master/texmf-dist/doc/latex/fontspec/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontspec/CHANGES.md 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/doc/latex/fontspec/CHANGES.md 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,8 +1,14 @@
Change history
==============
-## v2.6i (2018/07/30)
+## v2.6j (2019/01/10)
+ * Re-sync with `expl3` for deprecated commands.
+ * Added support for `\hbar` if anyone is relying on `fontspec` to emulate legacy maths.
+
+
+## v2.6i (2018/08/02)
+
* Emergency bug-fix -- a one-char typo broke loading of bold fonts!
* Some minor updates to the docs regarding “family names” of fonts.
* Using `\defaultfontfeatures` to specify a font face by a custom name can now use
Modified: trunk/Master/texmf-dist/doc/latex/fontspec/fontspec-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,381 +0,0 @@
-%%^^A%% fontspec-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Programmer's interface}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-%
-%
-% 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
-% things on top of fontspec itself.
-%
-% Because I haven't fully explored how these functions will behave in
-% practise, I am not giving them user-level names. As it becomes more clear
-% which of these should be accessible by document writers, I'll open them up
-% a little more.
-%
-% All functions are defined assuming that the font to be queried is
-% 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.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
- {
- \cs_if_exist:cTF {g_@@_fontinfo_ \f at family _prop} \prg_return_true: \prg_return_false:
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\fontspec_if_aat_feature:nnTF}
-% Conditional to test if the currently selected font contains the \AAT\
-% feature (|#1|,|#2|).
-% \begin{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_aat_feature:nn {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_atsui_bool
- {
- \@@_make_AAT_feature_string:NnnTF \font {#1} {#2}
- \prg_return_true: \prg_return_false:
- }
- {
- \prg_return_false:
- }
- }
- {
- \prg_return_false:
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\fontspec_if_opentype:TF}
-% Test whether the currently selected font is an OpenType font.
-% Always true for LuaTeX fonts.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_opentype: {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool \prg_return_true: \prg_return_false:
- }
- {
- \prg_return_false:
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fontspec_if_feature:nTF}
-% 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
-% font.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_feature:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool
- {
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-num} \l_@@_tmp_tl
- \int_set:Nn \l_@@_script_int {\l_@@_tmp_tl}
-
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {lang-num} \l_@@_tmp_tl
- \int_set:Nn \l_@@_language_int {\l_@@_tmp_tl}
-
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-tag} \l_fontspec_script_tl
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {lang-tag} \l_fontspec_lang_tl
-
- \@@_check_ot_feat:NnTF \font {#1} {\prg_return_true:} {\prg_return_false:}
- }
- {
- \prg_return_false:
- }
- }
- {
- \prg_return_false:
- }
- }
-% \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{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_feature:nnn {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool
- {
- \@@_iv_str_to_num:Nn \l_@@_script_int {#1}
- \@@_iv_str_to_num:Nn \l_@@_language_int {#2}
- \@@_check_ot_feat:NnTF \font {#3} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
-% \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{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_script:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool
- {
- \@@_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
-% \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{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_language:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool
- {
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-num} \l_@@_tmp_tl
- \int_set:Nn \l_@@_script_int {\l_@@_tmp_tl}
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-tag} \l_fontspec_script_tl
-
- \@@_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
-% \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{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_language:nn {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool
- {
- \tl_set:Nn \l_fontspec_script_tl {#1}
- \@@_iv_str_to_num:Nn \l_@@_script_int {#1}
- \@@_check_lang:NnTF \font {#2} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
-% \end{macrocode}
-% \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{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_current_script:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool
- {
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-tag} \l_@@_tmp_tl
- \str_if_eq:nVTF {#1} \l_@@_tmp_tl
- {\prg_return_true:} {\prg_return_false:}
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
-% \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{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_current_language:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \@@_set_font_type:N \font
- \bool_if:NTF \l_@@_ot_bool
- {
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {lang-tag} \l_@@_tmp_tl
- \str_if_eq:nVTF {#1} \l_@@_tmp_tl
- {\prg_return_true:} {\prg_return_false:}
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\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.
-% \begin{macrocode}
-\cs_new:Nn \fontspec_set_family:Nnn
- {
- \tl_set:Nn \l_@@_family_label_tl {#1}
- \@@_select_font_family:nn {#2} {#3}
- \tl_set_eq:NN #1 \l_fontspec_family_tl
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_generate_variant:Nn \fontspec_set_family:Nnn {c}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\fontspec_set_fontface:NNnn}
-% TODO: the round-about approach of using \cs{fontname}
-% means that settings such as fontdimens will be lost.
-% (Discovered in unicode-math.) Investigate!
-% \begin{macrocode}
- \cs_new:Nn \fontspec_set_fontface:NNnn
- {
- \tl_set:Nn \l_@@_family_label_tl {#1}
- \@@_select_font_family:nn {#3}{#4}
- \global \font #1 = \fontname \l_fontspec_font \scan_stop:
- \tl_set_eq:NN #2 \l_fontspec_family_tl
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\fontspec_font_if_exist:n}
-% \begin{macrocode}
-\prg_new_conditional:Nnn \fontspec_font_if_exist:n {TF,T,F}
- {
- \group_begin:
- \@@_init:
- \@@_if_detect_external:nT {#1} { \@@_font_is_file: }
- \@@_primitive_font_if_exist:nTF { \@@_construct_font_call:nn {#1} {} }
- { \group_end: \prg_return_true: }
- { \group_end: \prg_return_false: }
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_set_eq:NN \IfFontExistsTF \fontspec_font_if_exist:nTF
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}{\fontspec_if_current_feature:nTF}
-% Test whether the currently loaded font is using the specified raw
-% OpenType feature tag |#1|.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_current_feature:n {TF,T,F}
- {
- \exp_args:Nxx \tl_if_in:nnTF
- { \fontname\font } { \tl_to_str:n {#1} }
- { \prg_return_true: } { \prg_return_false: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fontspec_if_small_caps:TF}
-% \begin{macrocode}
-\prg_new_conditional:Nnn \fontspec_if_small_caps: {TF,T,F}
- {
- \@@_if_merge_shape:nTF {sc}
- {
- \tl_set_eq:Nc \l_@@_smcp_shape_tl { \@@_shape_merge:nn {\f at shape} {sc} }
- }
- {
- \tl_set:Nn \l_@@_smcp_shape_tl {sc}
- }
-
- \cs_if_exist:cTF { \f at encoding/\f at family/\f at series/\l_@@_smcp_shape_tl }
- {
- \tl_if_eq:ccTF
- { \f at encoding/\f at family/\f at series/\l_@@_smcp_shape_tl }
- { \f at encoding/\f at family/\f at series/\updefault }
- { \prg_return_false: }
- { \prg_return_true: }
- }
- { \prg_return_false: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-closing.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,44 +0,0 @@
-%%^^A%% fontspec-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%
-% \section{Closing code}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% \subsection{Finishing up}
-% Now we just want to set up loading the \texttt{.cfg} file, if it exists.
-% \begin{macrocode}
-\bool_if:NT \g_@@_cfg_bool
- {
- \InputIfFileExists{fontspec.cfg}
- {}
- {\typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.}}
- }
-% \end{macrocode}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,378 @@
+%%^^A%% fontspec-code-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Programmer's interface}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+%
+%
+% 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
+% things on top of fontspec itself.
+%
+% Because I haven't fully explored how these functions will behave in
+% practise, I am not giving them user-level names. As it becomes more clear
+% which of these should be accessible by document writers, I'll open them up
+% a little more.
+%
+% All functions are defined assuming that the font to be queried is
+% 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.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
+ {
+ \cs_if_exist:cTF {g_@@_fontinfo_ \f at family _prop} \prg_return_true: \prg_return_false:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fontspec_if_aat_feature:nnTF}
+% Conditional to test if the currently selected font contains the \AAT\
+% feature (|#1|,|#2|).
+% \begin{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_aat_feature:nn {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_atsui_bool
+ {
+ \@@_make_AAT_feature_string:NnnTF \font {#1} {#2}
+ \prg_return_true: \prg_return_false:
+ }
+ {
+ \prg_return_false:
+ }
+ }
+ {
+ \prg_return_false:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fontspec_if_opentype:TF}
+% Test whether the currently selected font is an OpenType font.
+% Always true for LuaTeX fonts.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_opentype: {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool \prg_return_true: \prg_return_false:
+ }
+ {
+ \prg_return_false:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fontspec_if_feature:nTF}
+% 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
+% font.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_feature:n {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-num} \l_@@_tmp_tl
+ \int_set:Nn \l_@@_script_int {\l_@@_tmp_tl}
+
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {lang-num} \l_@@_tmp_tl
+ \int_set:Nn \l_@@_language_int {\l_@@_tmp_tl}
+
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-tag} \l_fontspec_script_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {lang-tag} \l_fontspec_lang_tl
+
+ \@@_check_ot_feat:NnTF \font {#1} {\prg_return_true:} {\prg_return_false:}
+ }
+ {
+ \prg_return_false:
+ }
+ }
+ {
+ \prg_return_false:
+ }
+ }
+% \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{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_feature:nnn {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \@@_check_ot_feat:NnnnTF \font {#3} {#2} {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+% \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{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_script:n {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \@@_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+% \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{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_language:n {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-num} \l_@@_tmp_tl
+ \int_set:Nn \l_@@_script_int {\l_@@_tmp_tl}
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-tag} \l_fontspec_script_tl
+
+ \@@_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+% \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{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_language:nn {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \@@_check_lang:NnnTF \font {#2} {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+% \end{macrocode}
+% \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{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_current_script:n {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-tag} \l_@@_tmp_tl
+ \str_if_eq:nVTF {#1} \l_@@_tmp_tl
+ {\prg_return_true:} {\prg_return_false:}
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+% \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{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_current_language:n {TF,T,F}
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \@@_set_font_type:N \font
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {lang-tag} \l_@@_tmp_tl
+ \str_if_eq:nVTF {#1} \l_@@_tmp_tl
+ {\prg_return_true:} {\prg_return_false:}
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\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.
+% \begin{macrocode}
+\cs_new:Nn \fontspec_set_family:Nnn
+ {
+ \tl_set:Nn \l_@@_family_label_tl {#1}
+ \@@_select_font_family:nn {#2} {#3}
+ \tl_clear_new:N #1
+ \tl_set_eq:NN #1 \l_fontspec_family_tl
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \fontspec_set_family:Nnn {c}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fontspec_set_fontface:NNnn}
+% TODO: the round-about approach of using \cs{fontname}
+% means that settings such as fontdimens will be lost.
+% (Discovered in unicode-math.) Investigate!
+% \begin{macrocode}
+ \cs_new:Nn \fontspec_set_fontface:NNnn
+ {
+ \tl_set:Nn \l_@@_family_label_tl {#1}
+ \@@_select_font_family:nn {#3}{#4}
+ \global \font #1 = \fontname \l_fontspec_font \scan_stop:
+ \tl_set_eq:NN #2 \l_fontspec_family_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\fontspec_font_if_exist:n}
+% \begin{macrocode}
+\prg_new_conditional:Nnn \fontspec_font_if_exist:n {TF,T,F}
+ {
+ \group_begin:
+ \@@_init:
+ \@@_if_detect_external:nT {#1} { \@@_font_is_file: }
+ \@@_primitive_font_if_exist:nTF { \@@_construct_font_call:nn {#1} {} }
+ { \group_end: \prg_return_true: }
+ { \group_end: \prg_return_false: }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_eq:NN \IfFontExistsTF \fontspec_font_if_exist:nTF
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\fontspec_if_current_feature:nTF}
+% Test whether the currently loaded font is using the specified raw
+% OpenType feature tag |#1|.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_current_feature:n {TF,T,F}
+ {
+ \exp_args:Nxx \tl_if_in:nnTF
+ { \fontname\font } { \tl_to_str:n {#1} }
+ { \prg_return_true: } { \prg_return_false: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fontspec_if_small_caps:TF}
+% \begin{macrocode}
+\prg_new_conditional:Nnn \fontspec_if_small_caps: {TF,T,F}
+ {
+ \@@_if_merge_shape:nTF {sc}
+ {
+ \tl_set_eq:Nc \l_@@_smcp_shape_tl { \@@_shape_merge:nn {\f at shape} {sc} }
+ }
+ {
+ \tl_set:Nn \l_@@_smcp_shape_tl {sc}
+ }
+
+ \cs_if_exist:cTF { \f at encoding/\f at family/\f at series/\l_@@_smcp_shape_tl }
+ {
+ \tl_if_eq:ccTF
+ { \f at encoding/\f at family/\f at series/\l_@@_smcp_shape_tl }
+ { \f at encoding/\f at family/\f at series/\updefault }
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
+ { \prg_return_false: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-closing.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-closing.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-closing.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,44 @@
+%%^^A%% fontspec-code-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%
+% \section{Closing code}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% \subsection{Finishing up}
+% Now we just want to set up loading the \texttt{.cfg} file, if it exists.
+% \begin{macrocode}
+\bool_if:NT \g_@@_cfg_bool
+ {
+ \InputIfFileExists{fontspec.cfg}
+ {}
+ { \typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.} }
+ }
+% \end{macrocode}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-closing.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-enc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-enc.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-enc.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,173 @@
+%%^^A%% fontspec-code-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Extended font encodings}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% To be removed after the 2017 release of LaTeX2e:
+% \begin{macrocode}
+\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
+\providecommand\UnicodeFontName[2]{"#1:#2"}
+%<XE>\providecommand\UnicodeFontTeXLigatures{mapping=tex-text;}
+%<LU>\providecommand\UnicodeFontTeXLigatures{+tlig;}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\providecommand\add at unicode@accent[2]{#2\char#1\relax}
+\providecommand\DeclareUnicodeAccent[3]{%
+ \DeclareTextCommand{#1}{#2}{\add at unicode@accent{#3}}%
+}
+% \end{macrocode}
+%
+% \begin{macro}{\EncodingCommand}
+% \begin{macrocode}
+\DeclareDocumentCommand \EncodingCommand {mO{}m}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \EncodingCommand }
+ \DeclareTextCommand{#1}{\UnicodeEncodingName}[#2]{#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\EncodingAccent}
+% \begin{macrocode}
+\DeclareDocumentCommand \EncodingAccent {mm}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \EncodingAccent }
+ \DeclareTextCommand{#1}{\UnicodeEncodingName}{\add at unicode@accent{#2}}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\EncodingSymbol}
+% \begin{macrocode}
+\DeclareDocumentCommand \EncodingSymbol {mm}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \EncodingSymbol }
+ \DeclareTextSymbol{#1}{\UnicodeEncodingName}{#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\EncodingComposite}
+% \begin{macrocode}
+\DeclareDocumentCommand \EncodingComposite {mmm}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \EncodingComposite }
+ \DeclareTextComposite{#1}{\UnicodeEncodingName}{#2}{#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\EncodingCompositeCommand}
+% \begin{macrocode}
+\DeclareDocumentCommand \EncodingCompositeCommand {mmm}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \EncodingCompositeCommand }
+ \DeclareTextCompositeCommand{#1}{\UnicodeEncodingName}{#2}{#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareUnicodeEncoding}
+% \begin{macrocode}
+\DeclareDocumentCommand \DeclareUnicodeEncoding {mm}
+ {
+ \DeclareFontEncoding{#1}{}{}
+ \DeclareErrorFont{#1}{lmr}{m}{n}{10}
+ \DeclareFontSubstitution{#1}{lmr}{m}{n}
+ \DeclareFontFamily{#1}{lmr}{}
+
+ \DeclareFontShape{#1}{lmr}{m}{n}
+ {<->\UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{m}{it}
+ {<->\UnicodeFontFile{lmroman10-italic}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{m}{sc}
+ {<->\UnicodeFontFile{lmromancaps10-regular}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{bx}{n}
+ {<->\UnicodeFontFile{lmroman10-bold}{\UnicodeFontTeXLigatures}}{}
+ \DeclareFontShape{#1}{lmr}{bx}{it}
+ {<->\UnicodeFontFile{lmroman10-bolditalic}{\UnicodeFontTeXLigatures}}{}
+
+ \tl_set_eq:NN \l_@@_prev_unicode_name_tl \UnicodeEncodingName
+ \tl_set:Nn \UnicodeEncodingName {#1}
+ \bool_set_true:N \l_@@_defining_encoding_bool
+ #2
+ \bool_set_false:N \l_@@_defining_encoding_bool
+ \tl_set_eq:NN \UnicodeEncodingName \l_@@_prev_unicode_name_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\UndeclareSymbol}
+% \begin{macro}{\UndeclareAccent}
+% \begin{macro}{\UndeclareCommand}
+% Synonyms for each other but all included for completeness.
+% \begin{macrocode}
+\DeclareDocumentCommand \UndeclareSymbol {m}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \UndeclareSymbol }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+\DeclareDocumentCommand \UndeclareAccent {m}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \UndeclareAccent }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+\DeclareDocumentCommand \UndeclareCommand {m}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \UndeclareCommand }
+ \UndeclareTextCommand {#1} {\UnicodeEncodingName}
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\UndeclareComposite}
+% \begin{macrocode}
+\DeclareDocumentCommand \UndeclareComposite {mm}
+ {
+ \bool_if:NF \l_@@_defining_encoding_bool
+ { \@@_error:nn {only-inside-encdef} \UndeclareComposite }
+ \cs_undefine:c
+ { \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-enc.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-aat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-aat.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-aat.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,242 @@
+%%^^A%% fontspec-code-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{AAT feature definitions}
+%
+% These are only defined for \XeTeX.
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec&XE>
+% \end{macrocode}
+% \fi
+
+% \subsection{Ligatures}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Ligatures}
+\@@_define_aat_feature:nnnn {Ligatures} {Required} {1} {0}
+\@@_define_aat_feature:nnnn {Ligatures} {NoRequired} {1} {1}
+\@@_define_aat_feature:nnnn {Ligatures} {Common} {1} {2}
+\@@_define_aat_feature:nnnn {Ligatures} {NoCommon} {1} {3}
+\@@_define_aat_feature:nnnn {Ligatures} {Rare} {1} {4}
+\@@_define_aat_feature:nnnn {Ligatures} {NoRare} {1} {5}
+\@@_define_aat_feature:nnnn {Ligatures} {Discretionary} {1} {4}
+\@@_define_aat_feature:nnnn {Ligatures} {NoDiscretionary} {1} {5}
+\@@_define_aat_feature:nnnn {Ligatures} {Logos} {1} {6}
+\@@_define_aat_feature:nnnn {Ligatures} {NoLogos} {1} {7}
+\@@_define_aat_feature:nnnn {Ligatures} {Rebus} {1} {8}
+\@@_define_aat_feature:nnnn {Ligatures} {NoRebus} {1} {9}
+\@@_define_aat_feature:nnnn {Ligatures} {Diphthong} {1} {10}
+\@@_define_aat_feature:nnnn {Ligatures} {NoDiphthong} {1} {11}
+\@@_define_aat_feature:nnnn {Ligatures} {Squared} {1} {12}
+\@@_define_aat_feature:nnnn {Ligatures} {NoSquared} {1} {13}
+\@@_define_aat_feature:nnnn {Ligatures} {AbbrevSquared} {1} {14}
+\@@_define_aat_feature:nnnn {Ligatures} {NoAbbrevSquared} {1} {15}
+\@@_define_aat_feature:nnnn {Ligatures} {Icelandic} {1} {32}
+\@@_define_aat_feature:nnnn {Ligatures} {NoIcelandic} {1} {33}
+% \end{macrocode}
+% Emulate CM extra ligatures.
+% \begin{macrocode}
+\keys_define:nn {fontspec-aat}
+ {
+ Ligatures / TeX .code:n =
+ {
+ \tl_set:Nn \l_@@_mapping_tl { tex-text }
+ }
+ }
+% \end{macrocode}
+%
+% \subsection{Letters}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Letters}
+\@@_define_aat_feature:nnnn {Letters} {Normal} {3} {0}
+\@@_define_aat_feature:nnnn {Letters} {Uppercase} {3} {1}
+\@@_define_aat_feature:nnnn {Letters} {Lowercase} {3} {2}
+\@@_define_aat_feature:nnnn {Letters} {SmallCaps} {3} {3}
+\@@_define_aat_feature:nnnn {Letters} {InitialCaps} {3} {4}
+% \end{macrocode}
+%
+% \subsection{Numbers}
+%
+% These were originally separated into \feat{NumberCase} and
+% \feat{NumberSpacing} following \AAT, but it makes more sense to
+% combine them.
+%
+% Both naming conventions are offered to select the number case.
+%
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Numbers}
+\@@_define_aat_feature:nnnn {Numbers} {Monospaced} {6} {0}
+\@@_define_aat_feature:nnnn {Numbers} {Proportional} {6} {1}
+\@@_define_aat_feature:nnnn {Numbers} {Lowercase} {21} {0}
+\@@_define_aat_feature:nnnn {Numbers} {OldStyle} {21} {0}
+\@@_define_aat_feature:nnnn {Numbers} {Uppercase} {21} {1}
+\@@_define_aat_feature:nnnn {Numbers} {Lining} {21} {1}
+\@@_define_aat_feature:nnnn {Numbers} {SlashedZero} {14} {5}
+\@@_define_aat_feature:nnnn {Numbers} {NoSlashedZero} {14} {4}
+% \end{macrocode}
+%
+% \subsection{Contextuals}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Contextuals}
+\@@_define_aat_feature:nnnn {Contextuals} {WordInitial} {8} {0}
+\@@_define_aat_feature:nnnn {Contextuals} {NoWordInitial} {8} {1}
+\@@_define_aat_feature:nnnn {Contextuals} {WordFinal} {8} {2}
+\@@_define_aat_feature:nnnn {Contextuals} {NoWordFinal} {8} {3}
+\@@_define_aat_feature:nnnn {Contextuals} {LineInitial} {8} {4}
+\@@_define_aat_feature:nnnn {Contextuals} {NoLineInitial} {8} {5}
+\@@_define_aat_feature:nnnn {Contextuals} {LineFinal} {8} {6}
+\@@_define_aat_feature:nnnn {Contextuals} {NoLineFinal} {8} {7}
+\@@_define_aat_feature:nnnn {Contextuals} {Inner} {8} {8}
+\@@_define_aat_feature:nnnn {Contextuals} {NoInner} {8} {9}
+% \end{macrocode}
+%
+% \subsection{Diacritics}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Diacritics}
+\@@_define_aat_feature:nnnn {Diacritics} {Show} {9} {0}
+\@@_define_aat_feature:nnnn {Diacritics} {Hide} {9} {1}
+\@@_define_aat_feature:nnnn {Diacritics} {Decompose} {9} {2}
+% \end{macrocode}
+%
+%
+% \subsection{Vertical position}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {VerticalPosition}
+\@@_define_aat_feature:nnnn {VerticalPosition} {Normal} {10} {0}
+\@@_define_aat_feature:nnnn {VerticalPosition} {Superior} {10} {1}
+\@@_define_aat_feature:nnnn {VerticalPosition} {Inferior} {10} {2}
+\@@_define_aat_feature:nnnn {VerticalPosition} {Ordinal} {10} {3}
+% \end{macrocode}
+%
+% \subsection{Fractions}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Fractions}
+\@@_define_aat_feature:nnnn {Fractions} {On} {11} {1}
+\@@_define_aat_feature:nnnn {Fractions} {Off} {11} {0}
+\@@_define_aat_feature:nnnn {Fractions} {Diagonal} {11} {2}
+% \end{macrocode}
+%
+% \subsection{Alternate}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n { Alternate }
+\keys_define:nn {fontspec-aat}
+ {
+ Alternate .default:n = {0} ,
+ Alternate / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \@@_make_AAT_feature:nn {17}{##1}
+ }
+ }
+ }
+% \end{macrocode}
+%
+%
+% \subsection{Variant / StylisticSet}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Variant}
+\keys_define:nn {fontspec-aat}
+ {
+ Variant .default:n = {0} ,
+ Variant / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ { \@@_make_AAT_feature:nn {18}{##1} }
+ }
+ }
+\aliasfontfeature{Variant}{StylisticSet}
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Vertical}
+\keys_define:nn {fontspec-aat}
+ {
+ Vertical .choice: ,
+ Vertical / RotatedGlyphs .code:n =
+ {
+ \__fontspec_update_featstr:n {vertical}
+ }
+ }
+% \end{macrocode}
+%
+%
+% \subsection{Style}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Style}
+\@@_define_aat_feature:nnnn {Style} {Italic} {32} {2}
+\@@_define_aat_feature:nnnn {Style} {Ruby} {28} {2}
+\@@_define_aat_feature:nnnn {Style} {Display} {19} {1}
+\@@_define_aat_feature:nnnn {Style} {Engraved} {19} {2}
+\@@_define_aat_feature:nnnn {Style} {TitlingCaps} {19} {4}
+\@@_define_aat_feature:nnnn {Style} {TallCaps} {19} {5}
+% \end{macrocode}
+%
+% \subsection{CJK shape}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {CJKShape}
+\@@_define_aat_feature:nnnn {CJKShape} {Traditional} {20} {0}
+\@@_define_aat_feature:nnnn {CJKShape} {Simplified} {20} {1}
+\@@_define_aat_feature:nnnn {CJKShape} {JIS1978} {20} {2}
+\@@_define_aat_feature:nnnn {CJKShape} {JIS1983} {20} {3}
+\@@_define_aat_feature:nnnn {CJKShape} {JIS1990} {20} {4}
+\@@_define_aat_feature:nnnn {CJKShape} {Expert} {20} {10}
+\@@_define_aat_feature:nnnn {CJKShape} {NLC} {20} {13}
+% \end{macrocode}
+%
+% \subsection{Character width}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {CharacterWidth}
+\@@_define_aat_feature:nnnn {CharacterWidth} {Proportional} {22} {0}
+\@@_define_aat_feature:nnnn {CharacterWidth} {Full} {22} {1}
+\@@_define_aat_feature:nnnn {CharacterWidth} {Half} {22} {2}
+\@@_define_aat_feature:nnnn {CharacterWidth} {Third} {22} {3}
+\@@_define_aat_feature:nnnn {CharacterWidth} {Quarter} {22} {4}
+\@@_define_aat_feature:nnnn {CharacterWidth} {AlternateProportional} {22} {5}
+\@@_define_aat_feature:nnnn {CharacterWidth} {AlternateHalf} {22} {6}
+\@@_define_aat_feature:nnnn {CharacterWidth} {Default} {22} {7}
+% \end{macrocode}
+%
+% \subsection{Annotation}
+% \begin{macrocode}
+\@@_define_aat_feature_group:n {Annotation}
+\@@_define_aat_feature:nnnn {Annotation} {Off} {24} {0}
+\@@_define_aat_feature:nnnn {Annotation} {Box} {24} {1}
+\@@_define_aat_feature:nnnn {Annotation} {RoundedBox} {24} {2}
+\@@_define_aat_feature:nnnn {Annotation} {Circle} {24} {3}
+\@@_define_aat_feature:nnnn {Annotation} {BlackCircle} {24} {4}
+\@@_define_aat_feature:nnnn {Annotation} {Parenthesis} {24} {5}
+\@@_define_aat_feature:nnnn {Annotation} {Period} {24} {6}
+\@@_define_aat_feature:nnnn {Annotation} {RomanNumerals} {24} {7}
+\@@_define_aat_feature:nnnn {Annotation} {Diamond} {24} {8}
+\@@_define_aat_feature:nnnn {Annotation} {BlackSquare} {24} {9}
+\@@_define_aat_feature:nnnn {Annotation} {BlackRoundSquare} {24} {10}
+\@@_define_aat_feature:nnnn {Annotation} {DoubleCircle} {24} {11}
+% \end{macrocode}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec&XE>
+% \end{macrocode}
+% \fi
+
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-aat.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,572 @@
+%%^^A%% fontspec-code-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{OpenType feature definitions}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+%
+% \begin{macrocode}
+\@@_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
+\@@_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
+\@@_feat_prop_add:nn {ornm} { Ornament\,=\,$N$ }
+\@@_feat_prop_add:nn {cvNN} { CharacterVariant\,=\,$N$:$M$ }
+\@@_feat_prop_add:nn {ssNN} { StylisticSet\,=\,$N$ }
+% \end{macrocode}
+%
+% \section{Regular key=val / tag definitions}
+%
+% \subsection{Ligatures}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Ligatures}
+\@@_define_opentype_feature:nnnnn {Ligatures} {ResetAll} {} {}
+ {
+ +dlig,-dlig,+rlig,-rlig,+liga,-liga,+dlig,-dlig,+clig,-clig,+hlig,-hlig,
+%<XE> mapping = tex-text
+%<LU> +tlig,-tlig
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Required} {rlig} {rlig} {}
+\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Common} {liga} {liga} {}
+\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Rare} {dlig} {dlig} {}
+\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Discretionary} {dlig} {dlig} {}
+\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Contextual} {clig} {clig} {}
+\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Historic} {hlig} {hlig} {}
+% \end{macrocode}
+% Emulate CM extra ligatures.
+% \begin{macrocode}
+%<*XE>
+\keys_define:nn {fontspec-opentype}
+ {
+ Ligatures / TeX .code:n = { \tl_set:Nn \l_@@_mapping_tl {tex-text} },
+ Ligatures / TeXReset .code:n = { \tl_clear:N \l_@@_mapping_tl },
+ }
+%</XE>
+%<LU>\@@_define_opentype_onreset:nnnnn {Ligatures} {TeX} {} { +tlig } {}
+% \end{macrocode}
+%
+% \subsection{Letters}
+% \begin{macrocode}
+\@@_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
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {Letters} {Uppercase} {case} {case} {+smcp,+pcap,+c2sc,+c2pc,+unic,+rand}
+\@@_define_opentype_onoffreset:nnnnn {Letters} {SmallCaps} {smcp} {smcp} {+pcap,+unic,+rand}
+\@@_define_opentype_onoffreset:nnnnn {Letters} {PetiteCaps} {pcap} {pcap} {+smcp,+unic,+rand}
+\@@_define_opentype_onoffreset:nnnnn {Letters} {UppercaseSmallCaps} {c2sc} {c2sc} {+c2pc,+unic,+rand}
+\@@_define_opentype_onoffreset:nnnnn {Letters} {UppercasePetiteCaps} {c2pc} {c2pc} {+c2sc,+unic,+rand}
+\@@_define_opentype_onoffreset:nnnnn {Letters} {Unicase} {unic} {unic} {+rand}
+\@@_define_opentype_onoffreset:nnnnn {Letters} {Random} {rand} {rand} {+unic}
+% \end{macrocode}
+%
+% \subsection{Numbers}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Numbers}
+\@@_define_opentype_feature:nnnnn {Numbers} {ResetAll} {} {}
+ {
+ +tnum,-tnum,
+ +pnum,-pnum,
+ +onum,-onum,
+ +lnum,-lnum,
+ +zero,-zero,
+ +anum,-anum,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {Numbers} {Monospaced} {tnum} {tnum} {+pnum,-pnum}
+\@@_define_opentype_onoffreset:nnnnn {Numbers} {Proportional} {pnum} {pnum} {+tnum,-tnum}
+\@@_define_opentype_onoffreset:nnnnn {Numbers} {Lowercase} {onum} {onum} {+lnum,-lnum}
+\@@_define_opentype_onoffreset:nnnnn {Numbers} {Uppercase} {lnum} {lnum} {+onum,-onum}
+\@@_define_opentype_onoffreset:nnnnn {Numbers} {SlashedZero} {zero} {zero} {}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\aliasfontfeatureoption {Numbers} {Monospaced} {Tabular}
+\aliasfontfeatureoption {Numbers} {Lowercase} {OldStyle}
+\aliasfontfeatureoption {Numbers} {Uppercase} {Lining}
+% \end{macrocode}
+%
+% |luaotload| provides a custom |anum| feature for replacing Latin
+% (AKA Arabic) numbers with Arabic (AKA Indic-Arabic). The same feature
+% maps to Farsi (Persian) numbers if font language is Farsi.
+% \begin{macrocode}
+%<LU> \@@_define_opentype_onoffreset:nnnnn {Numbers} {Arabic} {anum} {anum} {}
+% \end{macrocode}
+%
+% \subsection{Vertical position}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {VerticalPosition}
+\@@_define_opentype_feature:nnnnn {VerticalPosition} {ResetAll} {} {}
+ {
+ +sups,-sups,
+ +subs,-subs,
+ +ordn,-ordn,
+ +numr,-numr,
+ +dnom,-dnom,
+ +sinf,-sinf,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Superior} {sups} {sups} {+subs,+ordn,+numr,+dnom,+sinf}
+\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Inferior} {subs} {subs} {+sups,+ordn,+numr,+dnom,+sinf}
+\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Ordinal} {ordn} {ordn} {+sups,+subs,+numr,+dnom,+sinf}
+\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Numerator} {numr} {numr} {+sups,+subs,+ordn,+dnom,+sinf}
+\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Denominator} {dnom} {dnom} {+sups,+subs,+ordn,+numr,+sinf}
+\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {ScientificInferior} {sinf} {sinf} {+sups,+subs,+ordn,+numr,+dnom}
+% \end{macrocode}
+%
+% \subsection{Contextuals}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Contextuals}
+\@@_define_opentype_feature:nnnnn {Contextuals} {ResetAll} {} {}
+ {
+ +cswh,-cswh,
+ +calt,-calt,
+ +init,-init,
+ +fina,-fina,
+ +falt,-falt,
+ +medi,-medi,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {Contextuals} {Swash} {cswh} {cswh} {}
+\@@_define_opentype_onoffreset:nnnnn {Contextuals} {Alternate} {calt} {calt} {}
+\@@_define_opentype_onoffreset:nnnnn {Contextuals} {WordInitial} {init} {init} {}
+\@@_define_opentype_onoffreset:nnnnn {Contextuals} {WordFinal} {fina} {fina} {}
+\@@_define_opentype_onoffreset:nnnnn {Contextuals} {LineFinal} {falt} {falt} {}
+\@@_define_opentype_onoffreset:nnnnn {Contextuals} {Inner} {medi} {medi} {}
+% \end{macrocode}
+%
+% \subsection{Diacritics}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Diacritics}
+\@@_define_opentype_feature:nnnnn {Diacritics} {ResetAll} {} {}
+ {
+ +mark,-mark,
+ +mkmk,-mkmk,
+ +abvm,-abvm,
+ +blwm,-blwm,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {Diacritics} {MarkToBase} {mark} {mark} {}
+\@@_define_opentype_onoffreset:nnnnn {Diacritics} {MarkToMark} {mkmk} {mkmk} {}
+\@@_define_opentype_onoffreset:nnnnn {Diacritics} {AboveBase} {abvm} {abvm} {}
+\@@_define_opentype_onoffreset:nnnnn {Diacritics} {BelowBase} {blwm} {blwm} {}
+% \end{macrocode}
+%
+% \subsection{Kerning}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Kerning}
+\@@_define_opentype_feature:nnnnn {Kerning} {ResetAll} {} {}
+ {
+ +cpsp,-cpsp,
+ +kern,-kern,
+ }
+\@@_define_opentype_onoffreset:nnnnn {Kerning} {Uppercase} {cpsp} {cpsp} {}
+\@@_define_opentype_feature:nnnnn {Kerning} {On} {kern} {+kern} {-kern}
+\@@_define_opentype_feature:nnnnn {Kerning} {Off} {kern} {-kern} {+kern}
+\@@_define_opentype_feature:nnnnn {Kerning} {Reset} {} {} {+kern,-kern}
+% \end{macrocode}
+%
+% \subsection{Fractions}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Fractions}
+\@@_define_opentype_feature:nnnnn {Fractions} {ResetAll} {} {}
+ {
+ +frac,-frac,
+ +afrc,-afrc,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_feature:nnnnn {Fractions} {On} {frac} {+frac} {}
+\@@_define_opentype_feature:nnnnn {Fractions} {Off} {frac} {-frac} {}
+\@@_define_opentype_feature:nnnnn {Fractions} {Reset} {} {} {+frac,-frac}
+\@@_define_opentype_onoffreset:nnnnn {Fractions} {Alternate} {afrc} {afrc} {-frac}
+% \end{macrocode}
+%
+
+% \subsection{Style}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Style}
+\@@_define_opentype_feature:nnnnn {Style} {ResetAll} {} {}
+ {
+ +salt,-salt,
+ +ital,-ital,
+ +ruby,-ruby,
+ +swsh,-swsh,
+ +hist,-hist,
+ +titl,-titl,
+ +hkna,-hkna,
+ +vkna,-vkna,
+ +ssty=0,-ssty=0,
+ +ssty=1,-ssty=1,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {Style} {Alternate} {salt} {salt} {}
+\@@_define_opentype_onoffreset:nnnnn {Style} {Italic} {ital} {ital} {}
+\@@_define_opentype_onoffreset:nnnnn {Style} {Ruby} {ruby} {ruby} {}
+\@@_define_opentype_onoffreset:nnnnn {Style} {Swash} {swsh} {swsh} {}
+\@@_define_opentype_onoffreset:nnnnn {Style} {Cursive} {swsh} {curs} {}
+\@@_define_opentype_onoffreset:nnnnn {Style} {Historic} {hist} {hist} {}
+\@@_define_opentype_onoffreset:nnnnn {Style} {TitlingCaps} {titl} {titl} {}
+\@@_define_opentype_onoffreset:nnnnn {Style} {HorizontalKana} {hkna} {hkna} {+vkna,+pkna}
+\@@_define_opentype_onoffreset:nnnnn {Style} {VerticalKana} {vkna} {vkna} {+hkna,+pkna}
+\@@_define_opentype_onoffreset:nnnnn {Style} {ProportionalKana} {pkna} {pkna} {+vkna,+hkna}
+\@@_define_opentype_feature:nnnnn {Style} {MathScript} {ssty} {+ssty=0} {+ssty=1}
+\@@_define_opentype_feature:nnnnn {Style} {MathScriptScript} {ssty} {+ssty=1} {+ssty=0}
+% \end{macrocode}
+%
+% \subsection{CJK shape}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {CJKShape}
+\@@_define_opentype_feature:nnnnn {CJKShape} {ResetAll} {} {}
+ {
+ +trad,-trad,
+ +smpl,-smpl,
+ +jp78,-jp78,
+ +jp83,-jp83,
+ +jp90,-jp90,
+ +jp04,-jp04,
+ +expt,-expt,
+ +nlck,-nlck,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {CJKShape} {Traditional} {trad} {trad} {+smpl,+jp78,+jp83,+jp90,+jp04,+expt,+nlck}
+\@@_define_opentype_onoffreset:nnnnn {CJKShape} {Simplified} {smpl} {smpl} {+trad,+jp78,+jp83,+jp90,+jp04,+expt,+nlck}
+\@@_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1978} {jp78} {jp78} {+trad,+smpl,+jp83,+jp90,+jp04,+expt,+nlck}
+\@@_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1983} {jp83} {jp83} {+trad,+smpl,+jp78,+jp90,+jp04,+expt,+nlck}
+\@@_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1990} {jp90} {jp90} {+trad,+smpl,+jp78,+jp83,+jp04,+expt,+nlck}
+\@@_define_opentype_onoffreset:nnnnn {CJKShape} {JIS2004} {jp04} {jp04} {+trad,+smpl,+jp78,+jp83,+jp90,+expt,+nlck}
+\@@_define_opentype_onoffreset:nnnnn {CJKShape} {Expert} {expt} {expt} {+trad,+smpl,+jp78,+jp83,+jp90,+jp04,+nlck}
+\@@_define_opentype_onoffreset:nnnnn {CJKShape} {NLC} {nlck} {nlck} {+trad,+smpl,+jp78,+jp83,+jp90,+jp04,+expt}
+% \end{macrocode}
+%
+% \subsection{Character width}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {CharacterWidth}
+\@@_define_opentype_feature:nnnnn {CharacterWidth} {ResetAll} {} {}
+ {
+ +pwid,-pwid,
+ +fwid,-fwid,
+ +hwid,-hwid,
+ +twid,-twid,
+ +qwid,-qwid,
+ +palt,-palt,
+ +halt,-halt,
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Proportional} {pwid} {pwid} {+fwid,+hwid,+twid,+qwid,+palt,+halt}
+\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Full} {fwid} {fwid} {+pwid,+hwid,+twid,+qwid,+palt,+halt}
+\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Half} {hwid} {hwid} {+pwid,+fwid,+twid,+qwid,+palt,+halt}
+\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Third} {twid} {twid} {+pwid,+fwid,+hwid,+qwid,+palt,+halt}
+\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Quarter} {qwid} {qwid} {+pwid,+fwid,+hwid,+twid,+palt,+halt}
+\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {AlternateProportional} {palt} {palt} {+pwid,+fwid,+hwid,+twid,+qwid,+halt}
+\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {AlternateHalf} {halt} {halt} {+pwid,+fwid,+hwid,+twid,+qwid,+palt}
+% \end{macrocode}
+%
+% \subsection{Vertical}
+% According to spec |vkrn| must also activate |vpal| if available but for simplicity we don't do that here (yet?).
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Vertical}
+\@@_define_opentype_onoffreset:nnnnn {Vertical} {RotatedGlyphs} {vrt2} {vrt2} {+vrtr,+vert}
+\@@_define_opentype_onoffreset:nnnnn {Vertical} {AlternatesForRotation} {vrtr} {vrtr} {+vrt2}
+\@@_define_opentype_onoffreset:nnnnn {Vertical} {Alternates} {vert} {vert} {+vrt2}
+\@@_define_opentype_onoffreset:nnnnn {Vertical} {KanaAlternates} {vkna} {vkna} {+hkna}
+\@@_define_opentype_onoffreset:nnnnn {Vertical} {Kerning} {vkrn} {vkrn} {}
+\@@_define_opentype_onoffreset:nnnnn {Vertical} {AlternateMetrics} {valt} {valt} {+vhal,+vpal,+kern}
+\@@_define_opentype_onoffreset:nnnnn {Vertical} {HalfMetrics} {vhal} {vhal} {+valt,+vpal,+kern}
+\@@_define_opentype_onoffreset:nnnnn {Vertical} {ProportionalMetrics} {vpal} {vpal} {+valt,+vhal}
+% \end{macrocode}
+%
+%
+%
+%
+% \section{OpenType features that need numbering}
+%
+% \subsection{Alternate}
+%
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Alternate}
+\keys_define:nn {fontspec-opentype}
+ {
+ Alternate .default:n = {0} ,
+ Alternate / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ { \@@_make_OT_feature:nnn {salt}{ +salt = ##1 }{} }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*LU>
+\keys_define:nn {fontspec-opentype}
+ {
+ Alternate / Random .code:n =
+ { \@@_make_OT_feature:nnn {salt}{ +salt = random }{} } ,
+ }
+%</LU>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\aliasfontfeature{Alternate}{StylisticAlternates}
+% \end{macrocode}
+%
+%
+% \subsection{Variant / StylisticSet}
+%
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Variant}
+\keys_define:nn {fontspec-opentype}
+ {
+ Variant .default:n = {0} ,
+ Variant / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \@@_make_OT_feature:xxx { ss \two at digits {##1} } { +ss \two at digits {##1} } {}
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\aliasfontfeature{Variant}{StylisticSet}
+% \end{macrocode}
+%
+% \subsection{CharacterVariant}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {CharacterVariant}
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \fontspec_parse_cv:w
+ ##1 \c_colon_str ##2 \c_colon_str ##3 \exp_not:N \q_nil
+ {
+ \@@_make_OT_feature:xxx
+ { cv \exp_not:N \two at digits {##1} }
+ { +cv \exp_not:N \two at digits {##1} = ##2 } {}
+ }
+ \keys_define:nn {fontspec-opentype}
+ {
+ CharacterVariant / unknown .code:n =
+ {
+ \clist_map_inline:nn {##1}
+ {
+ \exp_not:N \fontspec_parse_cv:w
+ ####1 \c_colon_str 0 \c_colon_str \exp_not:N \q_nil
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% Possibilities: \verb|a:0:\q_nil| or \verb|a:b:0:\q_nil|.
+%
+%
+% \subsection{Annotation}
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Annotation}
+\keys_define:nn {fontspec-opentype}
+ {
+ Annotation .default:n = {0} ,
+ Annotation / unknown .code:n =
+ {
+ \@@_make_OT_feature:nnn {nalt} {+nalt=#1} {}
+ }
+ }
+% \end{macrocode}
+%
+% \subsection{Ornament}
+%
+% \begin{macrocode}
+\@@_define_opentype_feature_group:n {Ornament}
+\keys_define:nn {fontspec-opentype}
+ {
+ Ornament .default:n = {0} ,
+ Ornament / unknown .code:n =
+ {
+ \@@_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
+ }
+ }
+% \end{macrocode}
+%
+%
+% \section{Script and Language}
+%
+%
+% \subsection{Script}
+%
+% \begin{macrocode}
+\keys_define:nn { fontspec-opentype } { Script .choice: }
+\cs_new:Nn \fontspec_new_script:nn
+ {
+ \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
+ \bool_set_false:N \l_@@_script_exist_bool
+ \clist_map_inline:nn {#2}
+ {
+ \@@_check_script:NnTF \l_fontspec_font {####1}
+ {
+ \tl_set:Nn \l_fontspec_script_tl {####1}
+ \int_set:Nn \l_@@_script_int {\l_@@_strnum_int}
+ \bool_set_true:N \l_@@_script_exist_bool
+ \tl_gset:Nx \g_@@_single_feat_tl { script=####1 }
+ \clist_map_break:
+ }
+ { }
+ }
+ \bool_if:NF \l_@@_script_exist_bool
+ {
+ \str_if_eq:nnTF {#1} {Latin}
+ {
+ \@@_warning:nx {script-not-exist} {#1}
+ }
+ {
+ \@@_check_script:NnTF \l_fontspec_font {latn}
+ {
+ \@@_warning:nx {script-not-exist-latn} {#1}
+ \tl_set:Nn \l_fontspec_script_tl {latn}
+ \int_set:Nn \l_@@_script_int {\l_@@_strnum_int}
+ }
+ {
+ \@@_warning:nx {script-not-exist} {#1}
+ }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%
+%
+% \subsection{Language}
+%
+% \begin{macrocode}
+\keys_define:nn { fontspec-opentype } { Language .choice: }
+\cs_new:Nn \fontspec_new_lang:nn
+ {
+ \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
+ \@@_check_lang:NnTF \l_fontspec_font {#2}
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {#2}
+ \int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
+ \tl_gset:Nx \g_@@_single_feat_tl { language=#2 }
+ }
+ {
+ \@@_warning:nx {language-not-exist} {#1}
+ \keys_set:nn { fontspec-opentype } { Language = Default }
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \paragraph{Default}
+%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-opentype}{ Language / Default }
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {DFLT}
+ \int_zero:N \l_@@_language_int
+ \tl_gset:Nn \g_@@_single_feat_tl { language=DFLT }
+ }
+% \end{macrocode}
+%
+% \paragraph{Turkish} Turns out that many fonts use `TUR' as their Turkish language tag rather than the specified `TRK'. So we check for both:
+% \begin{macrocode}
+\keys_define:nn {fontspec-opentype}
+ {
+ Language / Turkish .code:n =
+ {
+ \@@_check_lang:NnTF \l_fontspec_font {TRK}
+ {
+ \int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TRK}
+ \tl_gset:Nn \g_@@_single_feat_tl { language=TRK }
+ }
+ {
+ \@@_check_lang:NnTF \l_fontspec_font {TUR}
+ {
+ \int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TUR}
+ \tl_gset:Nn \g_@@_single_feat_tl { language=TUR }
+ }
+ {
+ \@@_warning:nx {language-not-exist} {Turkish}
+ \keys_set:nn {fontspec-opentype} {Language=Default}
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% TODO: generalise the above
+%
+%
+% \section{Backwards compatibility}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_ot_compat:nn
+ {
+ \aliasfontfeatureoption {#1} {#2Off} {No#2}
+ }
+\@@_ot_compat:nn {Ligatures} {Rare}
+\@@_ot_compat:nn {Ligatures} {Required}
+\@@_ot_compat:nn {Ligatures} {Common}
+\@@_ot_compat:nn {Ligatures} {Discretionary}
+\@@_ot_compat:nn {Ligatures} {Contextual}
+\@@_ot_compat:nn {Ligatures} {Historic}
+\@@_ot_compat:nn {Numbers} {SlashedZero}
+\@@_ot_compat:nn {Contextuals} {Swash}
+\@@_ot_compat:nn {Contextuals} {Alternate}
+\@@_ot_compat:nn {Contextuals} {WordInitial}
+\@@_ot_compat:nn {Contextuals} {WordFinal}
+\@@_ot_compat:nn {Contextuals} {LineFinal}
+\@@_ot_compat:nn {Contextuals} {Inner}
+\@@_ot_compat:nn {Diacritics} {MarkToBase}
+\@@_ot_compat:nn {Diacritics} {MarkToMark}
+\@@_ot_compat:nn {Diacritics} {AboveBase}
+\@@_ot_compat:nn {Diacritics} {BelowBase}
+% \end{macrocode}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,105 @@
+%%^^A%% fontspec-code-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{expl3 interface for primitive font loading}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% \begin{macro}{\@@_primitive_font_set:Nnn,\@@_primitive_font_gset:Nnn}
+% \begin{macrocode}
+\cs_set:Npn \@@_primitive_font_set:Nnn #1#2#3
+ {
+ \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+% \end{macrocode}
+% \begin{macrocode}
+\cs_set:Npn \@@_primitive_font_gset:Nnn #1#2#3
+ {
+ \global \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_font_suppress_not_found_error:}
+% \begin{macrocode}
+\cs_set:Npn \@@_font_suppress_not_found_error:
+ {
+ \int_set:Nn \suppressfontnotfounderror {1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[pTF]{\@@_primitive_font_if_null:N}
+% \begin{macrocode}
+\prg_set_conditional:Nnn \@@_primitive_font_if_null:N {p,TF,T,F}
+ {
+ \ifx #1 \nullfont
+ \prg_return_true:
+ \else
+ \prg_return_false:
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[TF]{\@@_primitive_font_if_exist:n}
+% \begin{macrocode}
+\prg_set_conditional:Nnn \@@_primitive_font_if_exist:n {TF,T,F}
+ {
+ \group_begin:
+ \@@_font_suppress_not_found_error:
+ \@@_primitive_font_set:Nnn \l_@@_primitive_font {#1} {10pt}
+ \@@_primitive_font_if_null:NTF \l_@@_primitive_font
+ { \group_end: \prg_return_false: }
+ { \group_end: \prg_return_true: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_primitive_font_glyph_if_exist:NnTF}
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_primitive_font_glyph_if_exist:Nn {p,TF,T,F}
+ {
+ \tex_iffontchar:D #1 #2 \scan_stop:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_primitive_font_set_hyphenchar:Nn}
+% \begin{macrocode}
+\cs_new:Nn \@@_primitive_font_set_hyphenchar:Nn
+ {
+ \tex_hyphenchar:D #1 = #2 \scan_stop:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,128 @@
+%%^^A%% fontspec-code-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Graphite/AAT code}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec&XE>
+% \end{macrocode}
+% \fi
+%
+
+
+% \begin{macro}{\@@_define_aat_feature_group:n}
+% \begin{macrocode}
+\cs_new:Nn \@@_define_aat_feature_group:n
+ {
+ \keys_define:nn {fontspec-aat} { #1 .multichoice: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_define_aat_feature:nnnn}
+% \begin{macrocode}
+\cs_new:Nn \@@_define_aat_feature:nnnn
+ {
+ \keys_define:nn {fontspec-aat}
+ {
+ #1/#2 .code:n = { \@@_make_AAT_feature:nn {#3}{#4} }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@@_make_AAT_feature:nn}
+% \begin{macrocode}
+\cs_new:Nn \@@_make_AAT_feature:nn
+ {
+ \tl_if_empty:nTF {#1}
+ { \@@_warning:n {aat-feature-not-exist} }
+ {
+ \@@_make_AAT_feature_string:NnnTF \l_fontspec_font {#1}{#2}
+ {
+ \@@_update_featstr:n {\l_fontspec_feature_string_tl}
+ }
+ {
+ \@@_warning:nx {aat-feature-not-exist-in-font} {#1,#2}
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_make_AAT_feature_string:NnnTF}
+% This macro takes the numerical codes for a font feature and
+% creates a specified macro containing the string required in the
+% font definition to turn that feature on or off. Used primarily in
+% [...], but also used to check if small caps
+% exists in the requested font (see page~\pageref{mac:makesmallcaps}).
+%
+% For exclusive selectors, it's easy; just grab the string:
+% For \emph{non}-exclusive selectors, it's a little more complex.
+% If the selector is even, it corresponds to switching the feature on.
+% If the selector is \emph{odd}, it corresponds to switching the feature off.
+% But \XeTeX\ doesn't return a selector string for this number, since the
+% feature is defined for the `switching on' value. So we need to check the
+% selector of the previous number, and then prefix the feature string with |!|
+% to denote the switch.
+%
+% Finally, save out the complete feature string in \cmd\l_fontspec_feature_string_tl.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_make_AAT_feature_string:Nnn {TF,T,F}
+ {
+ \tl_set:Nx \l_@@_tmpa_tl { \XeTeXfeaturename #1 #2 }
+ \tl_if_empty:NTF \l_@@_tmpa_tl
+ { \prg_return_false: }
+ {
+ \int_compare:nTF { \XeTeXisexclusivefeature #1 #2 > 0 }
+ {
+ \tl_set:Nx \l_@@_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
+ }
+ {
+ \int_if_even:nTF {#3}
+ {
+ \tl_set:Nx \l_@@_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
+ }
+ {
+ \tl_set:Nx \l_@@_tmpb_tl
+ {
+ \XeTeXselectorname #1 #2\space \numexpr#3-1\relax
+ }
+ \tl_if_empty:NF \l_@@_tmpb_tl { \tl_put_left:Nn \l_@@_tmpb_tl {!} }
+ }
+ }
+
+ \tl_if_empty:NTF \l_@@_tmpb_tl
+ { \prg_return_false: }
+ {
+ \tl_set:Nx \l_fontspec_feature_string_tl { \l_@@_tmpa_tl = \l_@@_tmpb_tl }
+ \prg_return_true:
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec&XE>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,246 @@
+%%^^A%% fontspec-code-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{User commands}\label{sec:codeuser}
+%
+% This section contains the definitions of the commands detailed in
+% the user documentation. Only the `top level' definitions of the
+% commands are contained herein; they all use or define macros which
+% are defined or used later on in \vref{sec:codeinternal}.
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% \begin{macrocode}
+\NewDocumentCommand \fontspec { O{} m O{} }
+ {
+ \@@_main_fontspec:nn {#1,#3} {#2}
+ \ignorespaces
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setmainfont { O{} m O{} }
+ {
+ \@@_main_setmainfont:nn {#1,#3} {#2}
+ \ignorespaces
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setsansfont { O{} m O{} }
+ {
+ \@@_main_setsansfont:nn {#1,#3} {#2}
+ \ignorespaces
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setmonofont { O{} m O{} }
+ {
+ \@@_main_setmonofont:nn {#1,#3} {#2}
+ \ignorespaces
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setmathrm { O{} m O{} }
+ {
+ \@@_main_setmathrm:nn {#1,#3} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setboldmathrm { O{} m O{} }
+ {
+ \@@_main_setboldmathrm:nn {#1,#3} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setmathsf { O{} m O{} }
+ {
+ \@@_main_setmathsf:nn {#1,#3} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setmathtt { O{} m O{} }
+ {
+ \@@_main_setmathtt:nn {#1,#3} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\setromanfont}
+% This is the old name for \cs{setmainfont}, retained \emph{ad infinitum}
+% for backwards compatibility. It was deprecated in 2010.
+% \begin{macrocode}
+\NewDocumentCommand \setromanfont { O{} m O{} }
+ {
+ \@@_main_setmainfont:nn {#1,#3} {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\NewDocumentCommand \newfontfamily { m O{} m O{} }
+ {
+ \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \NewDocumentCommand
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \renewfontfamily { m O{} m O{} }
+ {
+ \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \RenewDocumentCommand
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \setfontfamily { m O{} m O{} }
+ {
+ \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \DeclareDocumentCommand
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \newfontface { m O{} m O{} }
+ {
+ \@@_main_newfontface:nnn {#1} {#2,#4} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\defaultfontfeatures}
+% This macro takes one argument that consists of all of feature
+% options that will be applied by default to all subsequent \cs{fontspec} commands.
+% \begin{macrocode}
+\NewDocumentCommand \defaultfontfeatures { t+ o m }
+ {
+ \IfNoValueTF {#2}
+ { \@@_set_default_features:nn {#1} {#3} }
+ { \@@_set_font_default_features:nnn {#1} {#2} {#3} }
+ \ignorespaces
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\NewDocumentCommand \addfontfeatures {m}
+ {
+ \@@_main_addfontfeatures:n {#1}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \addfontfeature {m}
+ {
+ \@@_main_addfontfeatures:n {#1}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \newfontfeature {mm}
+ {
+ \@@_main_newfontfeature:nn {#1} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \newAATfeature {mmmm}
+ {
+ \@@_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \newopentypefeature {mmm}
+ {
+ \@@_main_newopentypefeature:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\newICUfeature}
+% Deprecated.
+% \begin{macrocode}
+\NewDocumentCommand \newICUfeature {mmm}
+ {
+ \@@_main_newopentypefeature:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\NewDocumentCommand \aliasfontfeature {mm}
+ {
+ \@@_main_aliasfontfeature:nn {#1} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \aliasfontfeatureoption {mmm}
+ {
+ \@@_main_aliasfontfeatureoption:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\newfontscript}
+% Mostly used internally, but also possibly useful for users, to define new OpenType
+% `scripts', mapping logical names to OpenType script tags.
+% \begin{macrocode}
+\NewDocumentCommand \newfontscript {mm}
+ {
+ \fontspec_new_script:nn {#1} {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newfontlanguage}
+% Mostly used internally, but also possibly useful for users, to define new OpenType
+% `languages', mapping logical names to OpenType language tags.
+% \begin{macrocode}
+\NewDocumentCommand \newfontlanguage {mm}
+ {
+ \fontspec_new_lang:nn {#1} {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\NewDocumentCommand \DeclareFontExtensions {m}
+ {
+ \@@_main_DeclareFontExtensions:n {#1}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\NewDocumentCommand \IfFontFeatureActiveTF {mmm}
+ {
+ \@@_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,1190 @@
+%%^^A%% fontspec-code-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Internals}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% \subsection{The main function for setting fonts}
+%
+% \begin{macro}{\@@_select_font_family:nn}
+% This is the command that defines font families for use, the underlying
+% procedure of all \cmd\fontspec-like commands. Given a
+% list of font features (|#1|) for a requested font (|#2|),
+% it will define an NFSS
+% family for that font and put the family name (globally) into \cs{l_fontspec_family_tl}.
+% The \TeX\ `\cs{font}' command is (globally) stored in \cs{l_fontspec_font}.
+%
+% This macro does its processing inside a group to attempt to restrict the scope of its internal processing.
+% This works to some degree to insulate the internal commands from having to be manually cleared.
+%
+% Some often-used variables to know about:
+% \begin{itemize}
+% \item \cmd{\l_fontspec_fontname_tl} is used as the generic name of the font being defined.
+% \item \cmd{\l_@@_fontid_tl} is the unique identifier of the font with all its features.
+% \item \cmd{\l_@@_fontname_up_tl} is the font specifically to be used as the upright font.
+% \item \cmd{\l_@@_basename_tl} is the (immutable) original argument used for |*|-replacing.
+% \item \cmd{\l_fontspec_font} is the plain \TeX{} font of the upright font requested.
+% \end{itemize}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_select_font_family:nn
+ {
+%<debug>\typeout{^^J^^J::::::::::::::::::::::::::::::^^J:: fontspec_select:nn~ {#1}~ {#2} }
+ \group_begin:
+ \@@_font_suppress_not_found_error:
+ \@@_init:
+
+ \@@_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
+ \@@_sanitise_fontname:Nn \l_@@_fontname_up_tl {#2}
+ \@@_sanitise_fontname:Nn \l_@@_basename_tl {#2}
+
+ \@@_if_detect_external:nT {#2}
+ { \keys_set:nn {fontspec-preparse-external} {Path} }
+
+ \keys_set_known:nn {fontspec-preparse-cfg} {#1}
+
+ \@@_init_ttc:n {#2}
+ \@@_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
+
+ \@@_extract_all_features:n {#1}
+ \tl_set:Nx \l_@@_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l_@@_all_features_clist }
+
+%<debug>\typeout{fontid: \l_@@_fontid_tl}
+
+ \@@_preparse_features:
+ \@@_load_font:
+ \@@_set_scriptlang:
+ \@@_get_features:n {}
+ \bool_set_false:N \l_@@_firsttime_bool
+
+ \@@_save_family_needed:nTF {#2}
+ {
+ \@@_save_family:nn {#1} {#2}
+%<debug>\@@_warning:nxx {defining-font} {#1} {#2}
+ }
+ {
+%<debug>\typeout{Font~ family~ already~ defined.}
+ }
+ \group_end:
+
+ \tl_set_eq:NN \l_fontspec_family_tl \g_@@_nfss_family_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fontspec_select:nn}
+% This old name has been used by 3rd party packages so for compatibility:
+% \begin{macrocode}
+\cs_set_eq:NN \fontspec_select:nn \@@_select_font_family:nn %% deprecated, for compatibility only
+% \end{macrocode}
+% \end{macro}
+%
+% \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 {~}
+ \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}
+ \clist_map_break:
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_if_detect_external:nT}
+% Check if either the fontname ends with a known font extension.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_if_detect_external:n {T}
+ {
+%<debug> \typeout{:: @@_if_detect_external:n { \exp_not:n {#1} } }
+ \clist_map_inline:Nn \l_@@_extensions_clist
+ {
+ \bool_set_false:N \l_@@_tmpa_bool
+ \exp_args:Nx % <- this should be handled earlier
+ \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
+ { \bool_set_true:N \l_@@_tmpa_bool \clist_map_break: }
+ }
+ \bool_if:NTF \l_@@_tmpa_bool \prg_return_true: \prg_return_false:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_init_ttc:n}
+% For TTC fonts we assume they will be loading the italic/bold fonts from the same file,
+% so prepopulate the fontnames to avoid needing to do it manually.
+% \begin{macrocode}
+\cs_new:Nn \@@_init_ttc:n
+ {
+ \str_if_eq:eeT { \str_lower_case:f {\l_@@_extension_tl} } {.ttc}
+ {
+ \@@_sanitise_fontname:Nn \l_@@_fontname_it_tl {#1}
+ \@@_sanitise_fontname:Nn \l_@@_fontname_bf_tl {#1}
+ \@@_sanitise_fontname:Nn \l_@@_fontname_bfit_tl {#1}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_external_fontoptions:Nn}
+% Load a possible \texttt{.fontspec} font configuration file.
+% This file could set font-specific options for the font about to be loaded.
+% \begin{macrocode}
+\cs_new:Nn \@@_load_external_fontoptions:Nn
+ {
+ \bool_if:NT \l_@@_fontcfg_bool
+ {
+%<debug> \typeout{:: @@_load_external_fontoptions:Nn \exp_not:N #1 {#2} }
+ \@@_sanitise_fontname:Nn #1 {#2}
+ \tl_set:Nx \l_@@_ext_filename_tl {#1.fontspec}
+ \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 } }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_extract_all_features:}
+% \begin{macrocode}
+\cs_new:Nn \@@_extract_all_features:n
+ {
+%<debug> \typeout{:: @@_extract_all_features:n { \unexpanded {#1} } }
+ \bool_if:NTF \l_@@_disable_defaults_bool
+ {
+ \clist_set:Nx \l_@@_all_features_clist {#1}
+ }
+ {
+ \prop_get:NVNF \g_@@_fontopts_prop \l_fontspec_fontname_tl \l_@@_fontopts_clist
+ { \clist_clear:N \l_@@_fontopts_clist }
+
+ \prop_get:NVNF \g_@@_fontopts_prop \l_@@_family_label_tl \l_@@_family_fontopts_clist
+ { \clist_clear:N \l_@@_family_fontopts_clist }
+ \tl_clear:N \l_@@_family_label_tl
+
+ \clist_set:Nx \l_@@_all_features_clist
+ {
+ \g_@@_default_fontopts_clist,
+ \l_@@_family_fontopts_clist,
+ \l_@@_fontopts_clist,
+ #1
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_preparse_features:}
+% \darg{feature options}
+% \darg{font name}
+% Perform the (multi-step) feature parsing process.
+%
+% Convert the requested features to font definition
+% strings. First the features are parsed for information about font
+% loading (whether it's a named font or external font, etc.), and then
+% information is extracted for the names of the other shape fonts.
+% \begin{macrocode}
+\cs_new:Nn \@@_preparse_features:
+ {
+%<debug> \typeout{:: @@_preparse_features:}
+% \end{macrocode}
+% Detect if external fonts are to be used, possibly automatically, and
+% parse fontspec features for bold/italic fonts and their features.
+% \begin{macrocode}
+
+ \@@_keys_set_known:nxN {fontspec-preparse-external}
+ { \l_@@_all_features_clist }
+ \l_@@_keys_leftover_clist
+
+% \end{macrocode}
+% When \cmd{\l_fontspec_fontname_tl} is augmented with a prefix or whatever to create
+% the name of the upright font (\cmd{\l_@@_fontname_up_tl}), this latter is the new `general
+% font name' to use.
+% \begin{macrocode}
+ \tl_set_eq:NN \l_fontspec_fontname_tl \l_@@_fontname_up_tl
+ \@@_keys_set_known:nxN {fontspec-renderer} {\l_@@_keys_leftover_clist}
+ \l_@@_keys_leftover_clist
+ \@@_keys_set_known:nxN {fontspec-preparse} {\l_@@_keys_leftover_clist}
+ \l_@@_fontfeat_clist
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_font:}
+% \begin{macrocode}
+\cs_new:Nn \@@_load_font:
+ {
+%<debug>\typeout{:: @@_load_font}
+%<debug>\typeout{Set~ base~ font~ for~ preliminary~ analysis: \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} }
+ \@@_primitive_font_set:Nnn \l_fontspec_font
+ { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } {\f at size pt}
+ \@@_primitive_font_if_null:NT \l_fontspec_font { \@@_error:nx {font-not-found} {\l_@@_fontname_up_tl} }
+ \@@_set_font_type:N \l_fontspec_font
+%<debug>\typeout{Set~ base~ font~ properly: \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} }
+ \@@_primitive_font_gset:Nnn \l_fontspec_font
+ { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } {\f at size pt}
+ \l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_construct_font_call:nn}
+% Constructs the complete font invocation.
+% \darg{Base name}
+% \darg{Extension}
+% \darg{TTC Index}
+% \darg{Renderer}
+% \darg{Optical size}
+% \darg{Font features}
+% We check if \meta{Font features} are empty and if so don't add in the separator colon.
+% \begin{macrocode}
+\cs_new:Nn \@@_construct_font_call:nnnnnn
+ {
+%<XE> " \@@_fontname_wrap:n { #1 #2 #3 }
+%<LU> " \@@_fontname_wrap:n { #1 #2 } #3
+ #4 #5
+ \str_if_eq:eeF {#6}{} {:#6} "
+ }
+% \end{macrocode}
+% In practice, we don't use the six-argument version, since most arguments are constructed on-the-fly:
+% \begin{macrocode}
+\cs_new:Nn \@@_construct_font_call:nn
+ {
+ \@@_construct_font_call:nnnnnn
+ {#1}
+ \l_@@_extension_tl
+ \l_@@_ttc_index_tl
+ \l_fontspec_renderer_tl
+ \l_@@_optical_size_tl
+ {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \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'.
+% \XeTeX's syntax is followed since \pkg{luaotfload} provides compatibility.
+% \begin{macrocode}
+\cs_new:Nn \@@_font_is_name:
+ {
+ \cs_set_eq:NN \@@_fontname_wrap:n \use:n
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_font_is_file:
+ {
+ \cs_set:Npn \@@_fontname_wrap:n ##1 { [ \l_@@_font_path_tl ##1 ] }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_scriptlang:}
+% Only necessary for OpenType fonts.
+% First check if the font supports scripts, then apply defaults if
+% none are explicitly requested. Similarly with the language settings.
+% \begin{macrocode}
+\cs_new:Nn \@@_set_scriptlang:
+ {
+%<debug> \typeout{:: _set_scriptlang:}
+ \bool_if:NT \l_@@_firsttime_bool
+ {
+ \tl_if_empty:NTF \l_@@_script_name_tl
+ {
+ \@@_check_script:NnTF \l_fontspec_font {latn}
+ {
+ \tl_set:Nn \l_@@_script_name_tl {Latin}
+ \tl_if_empty:NT \l_@@_lang_name_tl
+ {
+ \tl_set:Nn \l_@@_lang_name_tl {Default}
+ }
+ \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl}
+%<debug> \typeout{:::: Script=\l_@@_script_name_tl, Language=\l_@@_lang_name_tl}
+ }
+ {
+%<debug> \typeout{:::: NADA}
+ \@@_info:n {no-scripts}
+ \bool_set_true:N \l_@@_never_check_bool
+ }
+ }
+ {
+ \tl_if_empty:NT \l_@@_lang_name_tl
+ {
+ \tl_set:Nn \l_@@_lang_name_tl {Default}
+ }
+ \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl}
+%<debug> \typeout{:::: Script=\l_@@_script_name_tl, Language=\l_@@_lang_name_tl}
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_get_features:Nn}
+% This macro is a wrapper for |\keys_set:nn| which expands and adds a
+% default specification to the original passed options. It begins by
+% initialising the commands used to hold font-feature specific
+% strings.
+% Its argument is any additional features to prepend to the default.
+%
+% Do not set the colour if not explicitly spec'd else \verb|\color| (using
+% specials) will not work.
+% \begin{macrocode}
+\cs_new:Nn \@@_get_features:n
+ {
+%<debug> \typeout{:: @@_get_features:Nn { \exp_not:n {#1} } }
+ \@@_init_fontface:
+ \@@_keys_set_known:nxN {fontspec-renderer} {\l_@@_fontfeat_clist,#1}
+ \l_@@_keys_leftover_clist
+ \@@_keys_set_known:nxN {fontspec} {\l_@@_keys_leftover_clist} \l_@@_keys_leftover_clist
+%<*XE>
+ \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
+ }
+ {
+%<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 }
+ }
+%</XE>
+%<*LU>
+%<debug> \typeout{::: Setting~ keys~ for~ OpenType~ font~ features:~"\l_@@_keys_leftover_clist"}
+ \keys_set:nV {fontspec-opentype} \l_@@_keys_leftover_clist
+%</LU>
+
+ \tl_if_empty:NF \l_@@_mapping_tl
+ { \@@_update_featstr:n { mapping = \l_@@_mapping_tl } }
+
+ \str_if_eq:eeF { \l_@@_hexcol_tl \l_@@_opacity_tl }
+ { \c_@@_hexcol_tl \c_@@_opacity_tl }
+ { \@@_update_featstr:n { color = \l_@@_hexcol_tl\l_@@_opacity_tl } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_save_family_needed:nTF}
+% Check if the family is unique and, if so, save its information.
+% (\cs{addfontfeature} and other macros use this data.)
+% Then the font family and its shapes are defined in the NFSS.
+%
+% Now we have a unique (in fact, too unique!) string that contains
+% the family name and every option in abbreviated form. This is used
+% with a counter to create a simple NFSS family name for the font we're
+% selecting.
+%
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_save_family_needed:n { TF }
+ {
+
+%<debug> \typeout{save~ family:~ #1}
+%<debug> \typeout{== fontid_tl: "\l_@@_fontid_tl".}
+
+ \tl_if_empty:NTF \l_@@_nfss_fam_tl
+ {
+ \prop_get:NVNTF \g_@@_fontid_family_prop \l_@@_fontid_tl \l_@@_tmp_tl
+ {
+ \tl_gset_eq:NN \g_@@_nfss_family_tl \l_@@_tmp_tl
+ \prg_return_false:
+ }
+ {
+ \tl_set:Nx \l_@@_tmp_tl {#1}
+ \tl_remove_all:Nn \l_@@_tmp_tl { ~ }
+ \@@_save_fontid_family:VV \l_@@_fontid_tl \l_@@_tmp_tl
+ \prg_return_true:
+ }
+ }
+ {
+ \tl_gset_eq:NN \g_@@_nfss_family_tl \l_@@_nfss_fam_tl
+ \cs_undefine:c { g_@@_fontinfo_ \g_@@_nfss_family_tl _prop }
+ \prg_return_true:
+ }
+ }
+% \end{macrocode}
+% \begin{macrocode}
+\cs_new:Nn \@@_save_fontid_family:nn
+ {
+ \prop_get:NnNTF \g_@@_family_int_prop {#2} \l_@@_tmp_tl
+ {
+ \tl_set:Nx \l_@@_tmp_tl
+ { \int_eval:n { \l_@@_tmp_tl + 1 } }
+ }
+ { \tl_set:Nn \l_@@_tmp_tl { 0 } }
+ \prop_gput:NnV \g_@@_family_int_prop {#2} \l_@@_tmp_tl
+ \tl_gset:Nx \g_@@_nfss_family_tl { #2 ( \l_@@_tmp_tl ) }
+ \prop_gput:NnV \g_@@_fontid_family_prop {#1} \g_@@_nfss_family_tl
+ }
+\cs_generate_variant:Nn \@@_save_fontid_family:nn { VV }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_save_family:nn}
+% Saves the relevant font information for future processing.
+% \begin{macrocode}
+\cs_new:Nn \@@_save_family:nn
+ {
+ \@@_save_fontinfo:n {#2}
+ \@@_find_autofonts:
+ \DeclareFontFamily{\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{}
+ \@@_set_faces:
+ \@@_info:nxx {defining-font} {#1} {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_save_fontinfo:n}
+% Saves the relevant font information for future processing.
+% \begin{macrocode}
+\cs_new:Nn \@@_save_fontinfo:n
+ {
+ \prop_new:c {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop}
+ \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {fontname} { #1 }
+ \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {options} { \l_@@_all_features_clist }
+ \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {fontdef}
+ {
+ \@@_construct_font_call:nn {\l_fontspec_fontname_tl}
+ { \l_@@_pre_feat_sclist \g_@@_rawfeatures_sclist }
+ }
+ \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {script-num} \l_@@_script_int
+ \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {lang-num} \l_@@_language_int
+ \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {script-tag} \l_fontspec_script_tl
+ \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Setting font shapes in a family}
+%
+% All NFSS specifications take their default values, so if any of them
+% are redefined, the shapes will be selected to fit in with the
+% current state. For example, if \cmd\bfdefault\ is redefined to |b|, all
+% bold shapes defined by this package will also be assigned to |b|.
+%
+% The combination shapes are searched first because they use information that may be redefined in the single cases.
+% E.g., if no bold font is specified then |set_autofont| will attempt to set it.
+% This has subtle/small ramifications on the logic of choosing the bold italic font.
+%
+% \begin{macro}{\@@_find_autofonts:}
+% \begin{macrocode}
+\cs_new:Nn \@@_find_autofonts:
+ {
+ \bool_if:nF {\l_@@_noit_bool || \l_@@_nobf_bool}
+ {
+ \@@_set_autofont:Nnn \l_@@_fontname_bfit_tl {\l_@@_fontname_it_tl} {/B}
+ \@@_set_autofont:Nnn \l_@@_fontname_bfit_tl {\l_@@_fontname_bf_tl} {/I}
+ \@@_set_autofont:Nnn \l_@@_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
+ }
+
+ \bool_if:NF \l_@@_nobf_bool
+ {
+ \@@_set_autofont:Nnn \l_@@_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
+ }
+
+ \bool_if:NF \l_@@_noit_bool
+ {
+ \@@_set_autofont:Nnn \l_@@_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
+ }
+
+ \@@_set_autofont:Nnn \l_@@_fontname_bfsl_tl {\l_@@_fontname_sl_tl} {/B}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_faces:}
+% \begin{macrocode}
+\cs_new:Nn \@@_set_faces:
+ {
+ \@@_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l_@@_fontfeat_up_clist
+ \@@_add_nfssfont:nnnn \bfdefault \updefault \l_@@_fontname_bf_tl \l_@@_fontfeat_bf_clist
+ \@@_add_nfssfont:nnnn \mddefault \itdefault \l_@@_fontname_it_tl \l_@@_fontfeat_it_clist
+ \@@_add_nfssfont:nnnn \mddefault \sldefault \l_@@_fontname_sl_tl \l_@@_fontfeat_sl_clist
+ \@@_add_nfssfont:nnnn \bfdefault \itdefault \l_@@_fontname_bfit_tl \l_@@_fontfeat_bfit_clist
+ \@@_add_nfssfont:nnnn \bfdefault \sldefault \l_@@_fontname_bfsl_tl \l_@@_fontfeat_bfsl_clist
+
+ \prop_map_inline:Nn \l_@@_nfssfont_prop { \@@_set_faces_aux:nnnnn ##2 }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_set_faces_aux:nnnnn
+ {
+ \fontspec_complete_fontname:Nn \l_@@_curr_fontname_tl {#3}
+ \@@_make_font_shapes:Nnnnn \l_@@_curr_fontname_tl {#1} {#2} {#4} {#5}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fontspec_complete_fontname:Nn}
+% This macro defines |#1| as the input with any |*| tokens of its input
+% replaced by the font name. This lets us define supplementary fonts in full
+% (``\texttt{Baskerville Semibold}'') or in abbreviation (``\texttt{* Semibold}'').
+% \begin{macrocode}
+\cs_new:Nn \fontspec_complete_fontname:Nn
+ {
+ \tl_set:Nx #1 {#2}
+ \tl_replace_all:Nnx #1 {*} {\l_@@_basename_tl}
+%<LU> \tl_remove_all:Nn #1 {~}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_add_nfssfont:nnnn}
+% \darg{series}
+% \darg{shape}
+% \darg{fontname}
+% \darg{fontspec features}
+% \begin{macrocode}
+\cs_new:Nn \@@_add_nfssfont:nnnn
+ {
+ \tl_set:Nx \l_@@_this_font_tl {#3}
+
+ \tl_if_empty:xTF {#4}
+ { \clist_set:Nn \l_@@_sizefeat_clist {Size={-}} }
+ { \@@_keys_set_known:nxN {fontspec-preparse-nested} {#4} \l_@@_tmp_tl }
+
+ \tl_if_empty:NF \l_@@_this_font_tl
+ {
+ \prop_put:Nxx \l_@@_nfssfont_prop {#1/#2}
+ { {#1}{#2}{\l_@@_this_font_tl}{#4}{\l_@@_sizefeat_clist} }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Fonts}
+%
+% \begin{macro}{\@@_set_font_type:N}
+% Now check if the font is to be rendered with \ATSUI\ or Harfbuzz. This will either
+% be automatic (based on the font type), or specified by the user via a font feature.
+%
+% This macro sets booleans
+% accordingly depending if the font in \cmd\l_fontspec_font\ is an \AAT\
+% font or an OpenType font or a font with feature axes (either \AAT\ or
+% Multiple Master), respectively.
+% \begin{macrocode}
+\cs_new:Nn \@@_set_font_type:N
+ {
+%<debug> \typeout{:: @@_set_font_type:}
+%<*XE>
+ \bool_set_false:N \l_@@_tfm_bool
+ \bool_set_false:N \l_@@_atsui_bool
+ \bool_set_false:N \l_@@_ot_bool
+ \bool_set_false:N \l_@@_mm_bool
+ \bool_set_false:N \l_@@_graphite_bool
+ \ifcase\XeTeXfonttype #1
+%<debug> \typeout{:::: TFM}
+ \bool_set_true:N \l_@@_tfm_bool
+ \or
+%<debug> \typeout{:::: AAT}
+ \bool_set_true:N \l_@@_atsui_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
+ \ifnum\XeTeXcountvariations #1 > 0\relax
+%<debug> \typeout{:::: MM}
+ \bool_set_true:N \l_@@_mm_bool
+ \fi
+ \or
+%<debug> \typeout{:::: OpenType}
+ \bool_set_true:N \l_@@_ot_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
+ \or
+%<debug> \typeout{:::: Graphite}
+ \bool_set_true:N \l_@@_graphite_bool
+ \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/GR} }
+ \fi
+%</XE>
+% \end{macrocode}
+% If automatic, the \cmd{\l_fontspec_renderer_tl} token list will still be
+% empty (other suffices that could be added will be later in the feature
+% processing), and if it is indeed still empty, assign it a value so that the
+% other weights of the font are specifically loaded with the same renderer.
+%
+% LuaTeX only supports one:
+% \begin{macrocode}
+%<*LU>
+ \bool_set_true:N \l_@@_ot_bool
+%</LU>
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_autofont:Nnn}
+% \darg{Font name tl}
+% \darg{Base font name}
+% \darg{Font name modifier}
+%
+% This function looks for font with \meta{name} and \meta{modifier} |#2#3|, and if found (i.e., different to font with name |#2|) stores it in tl |#1|. A modifier is something like |/B| to look for a bold font, for example.
+%
+% We can't match external fonts in this way (in \XeTeX\ anyway; todo: test with LuaTeX).
+% If \meta{font name tl} is not empty, then it's already been specified by the user so abort.
+% If \meta{Base font name} is not given, we also abort for obvious reasons.
+%
+% If \meta{font name tl} is empty, then proceed.
+% If not found, \meta{font name tl} remains empty.
+% Otherwise, we have a match.
+% \begin{macrocode}
+\cs_new:Nn \@@_set_autofont:Nnn
+ {
+ \bool_if:NF \l_@@_external_bool
+ {
+ \tl_if_empty:xF {#2}
+ {
+ \tl_if_empty:NT #1
+ {
+ \@@_if_autofont:nnTF {#2} {#3}
+ { \tl_set:Nx #1 {#2#3} }
+ { \@@_info:nx {no-font-shape} {#2#3} }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_if_autofont:nn {T,TF}
+ {
+ \@@_primitive_font_set:Nnn \l_tmpa_font { \@@_construct_font_call:nn {#1} {} } {\f at size pt}
+ \@@_primitive_font_set:Nnn \l_tmpb_font { \@@_construct_font_call:nn {#1#2} {} } {\f at size pt}
+ \str_if_eq:eeTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_make_font_shapes:Nnnnn}
+% \darg{Font name}
+% \darg{Font series}
+% \darg{Font shape}
+% \darg{Font features}
+% \darg{Size features}
+% This macro eventually uses \cs{DeclareFontShape} to define the font shape in
+% question.
+% \begin{macrocode}
+\cs_new:Nn \@@_make_font_shapes:Nnnnn
+ {
+ \group_begin:
+ \@@_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l_@@_leftover_clist
+ \@@_load_fontname:n {#1}
+ \@@_declare_shape:nnxx {#2} {#3} { \l_@@_fontopts_clist, \l_@@_leftover_clist } {#5}
+ \group_end:
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_load_fontname:n
+ {
+%<debug> \typeout{:: @@_load_fontname:n {#1} }
+ \@@_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#1}
+ \prop_get:NVNF \g_@@_fontopts_prop \l_fontspec_fontname_tl \l_@@_fontopts_clist
+ { \clist_clear:N \l_@@_fontopts_clist }
+ \keys_set_groups:nnV {fontspec/fontname} {getfontname} \l_@@_fontopts_clist
+ \@@_primitive_font_set:Nnn \l_fontspec_font { \@@_construct_font_call:nn {\l_fontspec_fontname_tl} {} } {\f at size pt}
+ \@@_primitive_font_if_null:NT \l_fontspec_font { \@@_error:nx {font-not-found} {#1} }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\keys_define:nn {fontspec/fontname}
+ {
+ Font .tl_set:N = \l_fontspec_fontname_tl ,
+ Font .groups:n = {getfontname} ,
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_declare_shape:nnnn}
+% \darg{Font series}
+% \darg{Font shape}
+% \darg{Font features}
+% \darg{Size features}
+% Wrapper for \cmd\DeclareFontShape.
+% And finally the actual font shape declaration using \cmd\l_@@_nfss_tl\ defined above.
+% \cmd\l_@@_postadjust_tl\ is defined in various places to deal with things like the hyphenation
+% character and interword spacing.
+%
+% The main part is to loop through \feat{SizeFeatures} arguments, which are of the form
+% {\par\centering |SizeFeatures={{<one>},{<two>},{<three>}}|.\par}
+% \begin{macrocode}
+\cs_new:Nn \@@_declare_shape:nnnn
+ {
+%<debug>\typeout{=~ declare_shape:~{\l_fontspec_fontname_tl}~{#1}~{#2}}
+ \tl_clear:N \l_@@_nfss_tl
+ \tl_clear:N \l_@@_nfss_sc_tl
+ \tl_set_eq:NN \l_@@_saved_fontname_tl \l_fontspec_fontname_tl
+
+ \exp_args:Nx \clist_map_inline:nn {#4} { \@@_setup_single_size:nn {#3} {##1} }
+
+ \@@_declare_shapes_normal:nn {#1} {#2}
+ \@@_declare_shapes_smcaps:nn {#1} {#2}
+ \@@_declare_shape_slanted:nn {#1} {#2}
+ \@@_declare_shape_loginfo:nn {#1} {#2}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \@@_declare_shape:nnnn {nnxx}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_setup_single_size:nn}
+% \begin{macrocode}
+\cs_new:Nn \@@_setup_single_size:nn
+ {
+ \tl_clear:N \l_@@_size_tl
+ \tl_set_eq:NN \l_@@_sizedfont_tl \l_@@_saved_fontname_tl % in case not spec'ed
+
+ \keys_set_known:nxN {fontspec-sizing} { \exp_after:wN \use:n #2 }
+ \l_@@_sizing_leftover_clist
+ \tl_if_empty:NT \l_@@_size_tl { \@@_error:n {no-size-info} }
+%<debug>\typeout{==~ size:~\l_@@_size_tl}
+
+ % "normal"
+ \@@_load_fontname:n {\l_@@_sizedfont_tl}
+ \@@_setup_nfss:Nnnn \l_@@_nfss_tl {#1} {\l_@@_sizing_leftover_clist} {}
+%<debug> \typeout{===~ sized~ font:~ \l_@@_sizedfont_tl}
+
+ % small caps
+ \clist_set_eq:NN \l_@@_fontfeat_curr_clist \l_@@_fontfeat_sc_clist
+
+ \bool_if:NF \l_@@_nosc_bool
+ {
+ \tl_if_empty:NTF \l_@@_fontname_sc_tl
+ {
+ \@@_make_smallcaps:TF
+ {
+%<debug>\typeout{====~Small~ caps~ found.}
+ \clist_put_left:Nn \l_@@_fontfeat_curr_clist {Letters=SmallCaps}
+ }
+ {
+%<debug>\typeout{====~Small~ caps~ not~ found.}
+ \bool_set_true:N \l_@@_nosc_bool
+ }
+ }
+ { \@@_load_fontname:n {\l_@@_fontname_sc_tl} }% local for each size
+ }
+
+ \bool_if:NF \l_@@_nosc_bool
+ {
+ \@@_setup_nfss:Nnnn \l_@@_nfss_sc_tl
+ {#1} {\l_@@_sizing_leftover_clist} {\l_@@_fontfeat_curr_clist}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_setup_nfss:Nnnn}
+% \begin{macrocode}
+\cs_new:Nn \@@_setup_nfss:Nnnn
+ {
+%<debug>\typeout{====~Setup~NFSS~shape:~<\l_@@_size_tl>~\l_fontspec_fontname_tl}
+
+ \@@_get_features:n { #2 , #3 , #4 }
+%<debug>\typeout{====~Gathered~features:~\g_@@_rawfeatures_sclist}
+
+ \tl_put_right:Nx #1
+ {
+ <\l_@@_size_tl> \l_@@_scale_tl
+ \@@_construct_font_call:nn { \l_fontspec_fontname_tl }
+ { \l_@@_pre_feat_sclist \g_@@_rawfeatures_sclist }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_declare_shapes_normal:nn}
+% \begin{macrocode}
+\cs_new:Nn \@@_declare_shapes_normal:nn
+ {
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl}
+ {#1} {#2} {\l_@@_nfss_tl}{\l_@@_postadjust_tl}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_declare_shapes_smcaps:nn}
+% \begin{macrocode}
+\cs_new:Nn \@@_declare_shapes_smcaps:nn
+ {
+ \tl_if_empty:NF \l_@@_nfss_sc_tl
+ {
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl} {#1}
+ { \@@_combo_sc_shape:n {#2} } {\l_@@_nfss_sc_tl} {\l_@@_postadjust_tl}
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_combo_sc_shape:n
+ {
+ \tl_if_exist:cTF { \@@_shape_merge:nn {#1} {\scdefault} }
+ { \tl_use:c { \@@_shape_merge:nn {#1} {\scdefault} } }
+ { \scdefault }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_DeclareFontShape:nnnnnn}
+% \begin{macrocode}
+\cs_new:Nn \@@_DeclareFontShape:nnnnnn
+ {
+%<debug>\typeout{DeclareFontShape:~{#1}{#2}{#3}{#4}...}
+ \group_begin:
+ \normalsize
+ \cs_undefine:c {#1/#2/#3/#4/\f at size}
+ \group_end:
+ \DeclareFontShape{#1}{#2}{#3}{#4}{#5}{#6}
+ }
+\cs_generate_variant:Nn \@@_DeclareFontShape:nnnnnn {xxxxxx}
+% \end{macrocode}
+%
+% \begin{macro}{\@@_declare_shape_slanted:nn}
+% This extra stuff for the slanted shape substitution is a little bit awkward.
+% We define the slanted shape to be a synonym for it when (a)~we're defining an italic font, but also (b)~when the default slanted shape isn't `it'.
+% (Presumably this turned up once in a test and I realised it caused problems. I doubt this would happen much.)
+%
+% We should test when a slanted font has been specified and not run this code if so, but the \verb|\@@_set_slanted:| code will overwrite this anyway if necessary.
+% \begin{macrocode}
+\cs_new:Nn \@@_declare_shape_slanted:nn
+ {
+ \bool_if:nT
+ {
+ \str_if_eq_p:ee {#2} {\itdefault} &&
+ !(\str_if_eq_p:ee {\itdefault} {\sldefault})
+ }
+ {
+ \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{#1}{\sldefault}
+ {<->ssub*\g_@@_nfss_family_tl/#1/\itdefault}{\l_@@_postadjust_tl}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_declare_shape_loginfo:nn}
+% Lastly some informative messaging.
+% \begin{macrocode}
+\cs_new:Nn \@@_declare_shape_loginfo:nn
+ {
+ \tl_gput_right:Nx \g_@@_defined_shapes_tl
+ {
+ \exp_not:n { \\ }
+ -~ \exp_not:N \str_case:nn {#1/#2}
+ {
+ {\mddefault/\updefault} {'normal'~}
+ {\bfdefault/\updefault} {'bold'~}
+ {\mddefault/\itdefault} {'italic'~}
+ {\mddefault/\sldefault} {'slanted'~}
+ {\bfdefault/\itdefault} {'bold~ italic'~}
+ {\bfdefault/\sldefault} {'bold~ slanted'~}
+ } (#1/#2)~
+ with~ NFSS~ spec.:~
+ \l_@@_nfss_tl
+ \exp_not:n { \\ }
+ -~ \exp_not:N \str_case:nn { #1 / \@@_combo_sc_shape:n {#2} }
+ {
+ {\mddefault/\scdefault} {'small~ caps'~}
+ {\bfdefault/\scdefault} {'bold~ small~ caps'~}
+ {\mddefault/\itscdefault} {'italic~ small~ caps'~}
+ {\bfdefault/\itscdefault} {'bold~ italic~ small~ caps'~}
+ {\mddefault/\slscdefault} {'slanted~ small~ caps'~}
+ {\bfdefault/\slscdefault} {'bold~ slanted~ small~ caps'~}
+ }~( #1 / \@@_combo_sc_shape:n {#2} )~
+ with~ NFSS~ spec.:~
+ \l_@@_nfss_sc_tl
+ \tl_if_empty:fF {\l_@@_postadjust_tl}
+ {
+ \exp_not:N \\ and~ font~ adjustment~ code:
+ \exp_not:N \\ \l_@@_postadjust_tl
+ }
+ }
+ }
+% \end{macrocode}
+% Maybe |\str_if_eq:eeF| would be better?
+% \end{macro}
+%
+%
+% \subsubsection{Features}
+%
+% \begin{macro}{\l_@@_pre_feat_sclist}
+% These are the features always applied to a font selection before other
+% features.
+% \begin{macrocode}
+\tl_set:Nn \l_@@_pre_feat_sclist
+%<*XE>
+ {
+ \bool_if:NT \l_@@_ot_bool
+ {
+ \tl_if_empty:NF \l_fontspec_script_tl
+ {
+ script = \l_fontspec_script_tl ;
+ language = \l_fontspec_lang_tl ;
+ }
+ }
+ }
+%</XE>
+%<*LU>
+ {
+ mode = \l_fontspec_mode_tl ;
+ \tl_if_empty:NF \l_fontspec_script_tl
+ {
+ script = \l_fontspec_script_tl ;
+ language = \l_fontspec_lang_tl ;
+ }
+ }
+%</LU>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_make_ot_smallcaps:TF}
+% \label{mac:makesmallcaps}
+% This macro checks if the font contains small caps.
+% \begin{macrocode}
+%<LU>\cs_new:Nn \@@_make_smallcaps:TF
+%<XE>\cs_new:Nn \@@_make_ot_smallcaps:TF
+ {
+ \@@_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
+ }
+%<*XE>
+\cs_new:Nn \@@_make_smallcaps:TF
+ {
+ \bool_if:NTF \l_@@_ot_bool
+ { \@@_make_ot_smallcaps:TF {#1} {#2} }
+ {
+ \bool_if:NT \l_@@_atsui_bool
+ { \@@_make_AAT_feature_string:NnnTF \l_fontspec_font {3}{3} {#1} {#2} }
+ }
+ }
+%</XE>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_update_featstr:n}
+% \cmd{\g_@@_rawfeatures_sclist} is the string used to define the list of specific
+% font features. Each time another font feature is requested, this
+% macro is used to add that feature to the list. Font features are
+% separated by semicolons.
+% \begin{macrocode}
+\cs_new:Nn \@@_update_featstr:n
+ {
+%<debug> \typeout{:::: @@_update_featstr:n {#1}}
+ \bool_if:NF \l_@@_firsttime_bool
+ {
+ \tl_gset:Nx \g_@@_single_feat_tl { #1 }
+%<debug> \typeout{::::~ Adding~ feature.}
+ \tl_gput_right:Nx \g_@@_rawfeatures_sclist {#1;}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_remove_clashing_featstr:n}
+% \begin{macrocode}
+\cs_new:Nn \@@_remove_clashing_featstr:n
+ {
+%<debug> \typeout{:::: @@_remove_clashing_featstr:n {#1}}
+ \clist_map_inline:nn {#1}
+ {
+%<debug> \typeout{::::~ Removing~ feature~ "##1;"}
+ \tl_gremove_all:Nn \g_@@_rawfeatures_sclist {##1;}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Initialisation}
+%
+% \begin{macro}{\@@_init:}
+% Initialisations that need to occur once per fontspec font invocation.
+% (Some of these may be redundant.
+% Check whether they're assigned to globally or not.)
+% \begin{macrocode}
+\cs_set:Npn \@@_init:
+ {
+%<debug> \typeout{:: @@_init:}
+ \bool_set_false:N \l_@@_ot_bool
+ \bool_set_true:N \l_@@_firsttime_bool
+ \@@_font_is_name:
+ \tl_clear:N \l_@@_font_path_tl
+ \tl_clear:N \l_@@_optical_size_tl
+ \tl_clear:N \l_@@_ttc_index_tl
+ \tl_clear:N \l_fontspec_renderer_tl
+ \tl_gclear:N \g_@@_defined_shapes_tl
+ \tl_gclear:N \g_@@_curr_series_tl
+ \tl_gset_eq:NN \g_@@_nfss_enc_tl \g_fontspec_encoding_tl
+%<*LU>
+ \tl_set:Nn \l_fontspec_mode_tl {node}
+ \int_set:Nn \prehyphenchar { `\- } % fixme
+ \int_zero:N \posthyphenchar % fixme
+ \int_zero:N \preexhyphenchar % fixme
+ \int_zero:N \postexhyphenchar % fixme
+%</LU>
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_init_fontface:}
+% Executed in \cs{@@_get_features:Nn}.
+% \begin{macrocode}
+\cs_new:Nn \@@_init_fontface:
+ {
+ \tl_gclear:N \g_@@_rawfeatures_sclist
+ \tl_clear:N \l_@@_scale_tl
+ \tl_set_eq:NN \l_@@_opacity_tl \c_@@_opacity_tl
+ \tl_set_eq:NN \l_@@_hexcol_tl \c_@@_hexcol_tl
+ \tl_set_eq:NN \l_@@_postadjust_tl \c_@@_postadjust_tl
+ \tl_clear:N \l_@@_wordspace_adjust_tl
+ \tl_clear:N \l_@@_punctspace_adjust_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Miscellaneous}
+%
+% \begin{macro}{\@@_ot_validate_tag:n}
+% This macro takes an OpenType tag and validates it.
+% \begin{macrocode}
+%<*LU>
+% \end{macrocode}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_ot_validate_tag:n
+ {
+ \@@_ot_validate_tag:w #1 \q_nil
+ }
+\cs_generate_variant:Nn \@@_ot_validate_tag:n {x}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Npn \@@_ot_validate_tag:w #1 #2 \q_nil
+ {
+ \bool_if:nTF { \str_if_eq_p:nn {#1} {+} || \str_if_eq_p:nn {#1} {-} }
+ { \@@_ot_validate_tag_aux:w #2 \c_empty_tl \c_empty_tl \q_nil }
+ { \@@_ot_validate_tag_aux:w #1#2 \c_empty_tl \c_empty_tl \q_nil }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Npn \@@_ot_validate_tag_aux:w #1#2#3#4#5 \q_nil
+ {
+ \int_compare:nT { \tl_count:n {#5} > 2 }
+ { \@@_error:nx {ot-tag-too-long} {#1#2#3#4#5} }
+ }
+% \end{macrocode}
+% \begin{macrocode}
+%</LU>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_iv_str_to_num:Nn}
+% This macro takes a four character string and converts it to the
+% numerical representation required for \XeTeX\ OpenType script/language/feature
+% purposes. The output is stored in |#1|.
+%
+% This code is not used in Lua\TeX, as the checking for that engine is done via Lua code
+% provided by \pkg{luaotfload}.
+% \begin{macrocode}
+%<*XE>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_iv_str_to_num:Nn
+ {
+ \@@_strip_leading_sign:Nw #1#2 \q_nil
+ }
+\cs_generate_variant:Nn \@@_iv_str_to_num:Nn {Nx}
+% \end{macrocode}
+%
+% The input can be of the form of any of these:
+% `|abcd|', `|abc|', `|abc |', `|ab|', `|ab |', \etc.
+% (It is assumed the first two chars are \emph{always} not spaces.) So this macro
+% reads in the string padded with \cmd\@empty s,
+% and anything beyond four chars is snipped. The \cmd\@empty s then are used to reconstruct
+% the spaces in the string to number calculation.
+%
+% For backwards compatibility this code also strips a leading |+| or |-|.
+%
+% \begin{macrocode}
+\cs_set:Npn \@@_strip_leading_sign:Nw #1#2#3 \q_nil
+ {
+ \bool_if:nTF { \str_if_eq_p:nn {#2} {+} || \str_if_eq_p:nn {#2} {-} }
+ { \@@_iv_str_to_num:w #1 \q_nil #3 \c_empty_tl \c_empty_tl \q_nil }
+ { \@@_iv_str_to_num:w #1 \q_nil #2#3 \c_empty_tl \c_empty_tl \q_nil }
+ }
+% \end{macrocode}
+% If input string (after sign is stripped) is more than 4 chars, \verb|#6| will contain
+% `\meta{excess}\cs{c_empty_tl}\cs{c_empty_tl}'. Therefore use \verb|#6| to verify string length.
+% \begin{macrocode}
+\cs_set:Npn \@@_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil
+ {
+ \int_compare:nT { \tl_count:n {#6} > 2 }
+ { \@@_error:nx {ot-tag-too-long} {#2#3#4#5#6} }
+
+ \str_if_eq:eeTF {#2#3#4#5#6} {DFLT}
+ {
+ \int_set:Nn #1 {0}
+ }
+ {
+
+ \int_set:Nn #1
+ {
+ `#2 * "1000000
+ + `#3 * "10000
+ + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100
+ + \ifx \c_empty_tl #5 32 \else `#5 \fi
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \@@_iv_str_to_num:Nn {No}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</XE>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,867 @@
+%%^^A%% fontspec-code-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Font loading (\pkg{keyval}) definitions}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% This package uses a large number of keyval modules which operate sequentially on keyval
+% input to ensure priority.
+% \begin{macrocode}
+\clist_gset:Nn \g_@@_all_keyval_modules_clist
+ {
+ fontspec, fontspec-opentype, fontspec-aat,
+ fontspec-preparse, fontspec-preparse-cfg, fontspec-preparse-external, fontspec-preparse-nested,
+ fontspec-renderer
+ }
+% \end{macrocode}
+%
+% Wrapper function to save some characters in the source:
+% \begin{macrocode}
+\cs_new:Nn \@@_keys_define_code:nnn
+ {
+ \keys_define:nn {#1} { #2 .code:n = {#3} }
+ }
+% \end{macrocode}
+%
+% For catching features that cannot be used in |\addfontfeatures|:
+% \begin{macrocode}
+\cs_new:Nn \@@_aff_error:n
+ {
+ \@@_keys_define_code:nnn {fontspec-addfeatures} {#1}
+ { \@@_error:nx {not-in-addfontfeatures} {#1} }
+ }
+% \end{macrocode}
+%
+% \subsection{Pre-pre-parsing stages}
+%
+% These features are extracted from the font feature list before all others.
+%
+% \paragraph{Don't load font config file}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-cfg} {IgnoreFontspecFile}
+ {
+ \bool_set_false:N \l_@@_fontcfg_bool
+ }
+\@@_keys_define_code:nnn {fontspec-preparse-external} {IgnoreFontspecFile}
+ {
+ \bool_set_false:N \l_@@_fontcfg_bool
+ }
+% \end{macrocode}
+%
+% \begin{macro}{Path}
+% For fonts that aren't installed in the system. If no argument is given, the font is located
+% with |kpsewhich|; it's either in the current directory or the \TeX\ tree. Otherwise, the
+% argument given defines the file path of the font.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {Path}
+ {
+ \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}
+ \@@_font_is_file:
+%<*XE>
+ \keys_set:nn {fontspec-renderer} {Renderer=OpenType}
+%</XE>
+ }
+\aliasfontfeature{Path}{ExternalLocation}
+\@@_keys_define_code:nnn {fontspec} {Path} {}
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{\feat{Extension}}
+% For fonts that aren't installed in the system. Specifies the font extension
+% to use.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {Extension}
+ {
+ \tl_set:Nn \l_@@_extension_tl {#1}
+ \bool_if:NF \l_@@_external_bool
+ {
+ \keys_set:nn {fontspec-preparse-external} {Path}
+ }
+ }
+\tl_clear:N \l_@@_extension_tl
+\@@_keys_define_code:nnn {fontspec} {Extension} {}
+% \end{macrocode}
+%
+%
+% \paragraph{\feat{Renderer}}
+% This feature must be processed before all others (the other font shape and features options are also pre-parsed for convenience) because the renderer determines the format of the features and even whether certain features are available.
+% \begin{macrocode}
+\keys_define:nn {fontspec-renderer}
+ {
+ Renderer .choices:nn =
+ {AAT,ICU,OpenType,Graphite,Full,Basic}
+ {
+ \int_compare:nTF {\l_keys_choice_int <= 4}
+ {
+%<*XE>
+ \tl_set:Nx \l_fontspec_renderer_tl
+ {
+ \int_case:nn \l_keys_choice_int { 1 {/AAT} 2 {/OT} 3 {/OT} 4 {/GR} }
+ }
+ \tl_gset:Nx \g_@@_single_feat_tl { \l_fontspec_renderer_tl }
+%</XE>
+%<*LU>
+ \@@_warning:nx {only-xetex-feature} {Renderer=AAT/OpenType/Graphite}
+%</LU>
+ }
+ {
+%<*XE>
+ \@@_warning:nx {only-luatex-feature} {Renderer=Full/Basic}
+%</XE>
+%<*LU>
+ \tl_set:Nx \l_fontspec_mode_tl
+ {
+ \int_case:nn \l_keys_choice_int { 5 {node} 6 {base} }
+ }
+ \tl_gset:Nx \g_@@_single_feat_tl { mode=\l_fontspec_mode_tl }
+%</LU>
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \subsection{Pre-parsed features}
+%
+% \paragraph{OpenType script/language}
+% See later for the resolutions from \pkg{fontspec} features to OpenType definitions.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse} {Script}
+ {
+%<XE> \keys_set:nn {fontspec-renderer} {Renderer=OpenType}
+ \tl_set:Nn \l_@@_script_name_tl {#1}
+ }
+% \end{macrocode}
+% Exactly the same:
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse} {Language}
+ {
+%<XE> \keys_set:nn {fontspec-renderer} {Renderer=OpenType}
+ \tl_set:Nn \l_@@_lang_name_tl {#1}
+ }
+% \end{macrocode}
+%
+%
+% \paragraph{TTC font index}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse} {FontIndex}
+ {
+ \str_if_eq:eeF { \str_lower_case:f {\l_@@_extension_tl} } {.ttc}
+ { \@@_warning:n {font-index-needs-ttc} }
+%<XE> \tl_set:Nn \l_@@_ttc_index_tl {:#1}
+%<LU> \tl_set:Nn \l_@@_ttc_index_tl {(#1)}
+ }
+\@@_keys_define_code:nnn {fontspec} {FontIndex}
+ {
+%<XE> \tl_set:Nn \l_@@_ttc_index_tl {:#1}
+%<LU> \tl_set:Nn \l_@@_ttc_index_tl {(#1)}
+ }
+% \end{macrocode}
+%
+% \subsection{Font faces}
+%
+% \paragraph{Upright}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {UprightFont}
+ {
+ \fontspec_complete_fontname:Nn \l_@@_fontname_up_tl {#1}
+ }
+% \end{macrocode}
+%
+% \paragraph{Italic and slanted}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {ItalicFont}
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l_@@_noit_bool
+ }
+ {
+ \bool_set_false:N \l_@@_noit_bool
+ \fontspec_complete_fontname:Nn \l_@@_fontname_it_tl {#1}
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
+ {
+ \fontspec_complete_fontname:Nn \l_@@_fontname_sl_tl {#1}
+ }
+% \end{macrocode}
+%
+%
+% \paragraph{Bold (NFSS) Series}
+% By default, \pkg{fontspec} uses the default bold series, \cs{bfdefault}.
+% We want to be able to make this extensible. This code is not yet functional!
+% \begin{macrocode}
+%\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldSeries}
+% {
+% \tl_gset:Nx \g_@@_curr_series_tl { #1 }
+% \seq_put_right:Nx \l_@@_bf_series_seq { #1 }
+% }
+% \end{macrocode}
+%
+% \paragraph{Bold}
+% This contains some stubb code to allow more than one bold font to be loaded.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldFont}
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l_@@_nobf_bool
+ }
+ {
+ \bool_set_false:N \l_@@_nobf_bool
+ \fontspec_complete_fontname:Nn \l_@@_curr_bfname_tl {#1}
+
+ \seq_if_empty:NT \l_@@_bf_series_seq
+ {
+ \tl_gset:Nx \g_@@_curr_series_tl {\bfdefault}
+ \seq_put_right:Nx \l_@@_bf_series_seq {\bfdefault}
+ }
+
+ \tl_if_eq:oxT \g_@@_curr_series_tl {\bfdefault}
+ {
+ \tl_set_eq:NN \l_@@_fontname_bf_tl \l_@@_curr_bfname_tl
+ }
+
+ \prop_put:NxV \l_@@_nfss_prop {BoldFont-\g_@@_curr_series_tl} \l_@@_curr_bfname_tl
+
+%<debug>\typeout{Setting~bold~font~"\l_@@_curr_bfname_tl"~with~series~"\g_@@_curr_series_tl"}
+
+ }
+ }
+% \end{macrocode}
+%
+% \paragraph{Bold italic/slanted}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldItalicFont}
+ {
+ \fontspec_complete_fontname:Nn \l_@@_fontname_bfit_tl {#1}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldSlantedFont}
+ {
+ \fontspec_complete_fontname:Nn \l_@@_fontname_bfsl_tl {#1}
+ }
+% \end{macrocode}
+%
+% \paragraph{Small caps}
+% Small caps isn't pre-parsed because it can vary with others above:
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {SmallCapsFont}
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l_@@_nosc_bool
+ }
+ {
+ \bool_set_false:N \l_@@_nosc_bool
+ \fontspec_complete_fontname:Nn \l_@@_fontname_sc_tl {#1}
+ }
+ }
+% \end{macrocode}
+%
+%
+% \subsubsection{Preparsed font features}
+%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
+ {
+ \clist_set:Nn \l_@@_fontfeat_up_clist {#1}
+ }
+\@@_keys_define_code:nnn {fontspec-preparse} {BoldFeatures}
+ {
+ \clist_set:Nn \l_@@_fontfeat_bf_clist {#1}
+
+% \prop_put:NxV \l_@@_nfss_prop
+% {BoldFont-\g_@@_curr_series_tl} \l_@@_curr_bfname_tl
+ }
+\@@_keys_define_code:nnn {fontspec-preparse} {ItalicFeatures}
+ {
+ \clist_set:Nn \l_@@_fontfeat_it_clist {#1}
+ }
+\@@_keys_define_code:nnn {fontspec-preparse} {BoldItalicFeatures}
+ {
+ \clist_set:Nn \l_@@_fontfeat_bfit_clist {#1}
+ }
+\@@_keys_define_code:nnn {fontspec-preparse} {SlantedFeatures}
+ {
+ \clist_set:Nn \l_@@_fontfeat_sl_clist {#1}
+ }
+\@@_keys_define_code:nnn {fontspec-preparse} {BoldSlantedFeatures}
+ {
+ \clist_set:Nn \l_@@_fontfeat_bfsl_clist {#1}
+ }
+% \end{macrocode}
+% Note that small caps features can vary by shape, so these in fact \emph{aren't} pre-parsed.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {SmallCapsFeatures}
+ {
+ \bool_if:NF \l_@@_firsttime_bool
+ {
+ \clist_set:Nn \l_@@_fontfeat_sc_clist {#1}
+ }
+ }
+% \end{macrocode}
+%
+% \paragraph{Features varying by size}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse} {SizeFeatures}
+ {
+ \clist_set:Nn \l_@@_sizefeat_clist {#1}
+ \clist_put_right:Nn \l_@@_fontfeat_up_clist { SizeFeatures = {#1} }
+ }
+\@@_keys_define_code:nnn {fontspec-preparse-nested} {SizeFeatures}
+ {
+ \clist_set:Nn \l_@@_sizefeat_clist {#1}
+ \tl_if_empty:NT \l_@@_this_font_tl
+ { \tl_set:Nn \l_@@_this_font_tl { -- } } % needs to be non-empty as a flag
+ }
+\@@_keys_define_code:nnn {fontspec-preparse-nested} {Font}
+ {
+ \tl_set:Nn \l_@@_this_font_tl {#1}
+ }
+\@@_keys_define_code:nnn {fontspec} {SizeFeatures}
+ {
+ % dummy
+ }
+\@@_keys_define_code:nnn {fontspec} {Font}
+ {
+ % dummy
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-sizing} {Size}
+ {
+ \tl_set:Nn \l_@@_size_tl {#1}
+ }
+\@@_keys_define_code:nnn {fontspec-sizing} {Font}
+ {
+ \fontspec_complete_fontname:Nn \l_@@_sizedfont_tl {#1}
+ }
+% \end{macrocode}
+%
+%
+%
+% \subsection{General font-independent features}
+%
+% These features can be applied to any font.
+%
+% \paragraph{NFSS encoding}
+% For the very brave.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse} {NFSSEncoding}
+ {
+ \tl_gset:Nx \g_@@_nfss_enc_tl { #1 }
+ }
+% \end{macrocode}
+%
+% \paragraph{NFSS family}
+% Interactions with other packages will sometimes require setting the NFSS family explicitly.
+% (By default \pkg{fontspec} auto-generates one based on the font name.)
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse} {NFSSFamily}
+ {
+ \tl_set:Nx \l_@@_nfss_fam_tl { #1 }
+ }
+% \end{macrocode}
+%
+% \paragraph{NFSS series/shape}
+% This option looks similar in name but has a very different function.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {FontFace}
+ {
+ \tl_clear:N \l_@@_this_font_tl
+ \clist_set:No \l_@@_arg_clist { \use_iii:nnn #1 }
+ \clist_set_eq:NN \l_@@_this_feat_clist \l_@@_arg_clist
+ \int_compare:nT { \clist_count:N \l_@@_arg_clist = 1 }
+ {
+%<debug>\typeout{FontFace~ parsing:~ one~ clist~ item}
+ \tl_if_in:NnF \l_@@_arg_clist {=}
+ {
+%<debug>\typeout{FontFace~ parsing:~ no~ equals~ =>~ font~ name~ only}
+ \tl_set_eq:NN \l_@@_this_font_tl \l_@@_arg_clist
+ \tl_clear:N \l_@@_this_feat_clist
+ }
+ }
+
+ \@@_add_nfssfont:nnnn
+ {\use_i:nnn #1} {\use_ii:nnn #1} {\l_@@_this_font_tl} {\l_@@_this_feat_clist}
+ }
+% \end{macrocode}
+%
+%
+%
+% \paragraph{Scale}
+% If the input isn't one of the pre-defined string options, then
+% it's gotta be numerical. \cs{fontspec_calc_scale:n} does all the work in
+% the auto-scaling cases.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {Scale}
+ {
+ \str_case:nnF {#1}
+ {
+ {MatchLowercase} { \@@_calc_scale:n {5} }
+ {MatchUppercase} { \@@_calc_scale:n {8} }
+ }
+ { \tl_set:Nx \l_@@_scale_tl {#1} }
+ \tl_set:Nx \l_@@_scale_tl { s*[\l_@@_scale_tl] }
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_calc_scale:n}
+% This macro calculates the amount of scaling between the default
+% roman font and the (default shape of) the font being selected such
+% that the font dimension that is input is equal for both. The only
+% font dimensions that justify this are 5 (lowercase height)
+% and 8 (uppercase height in \XeTeX).
+%
+% This script is executed for every extra shape, which seems wasteful,
+% but allows alternate italic shapes from a separate font, say, to
+% be loaded and to be auto-scaled correctly. Even if this would be ugly.
+%
+% To begin, change to \cs{rmfamily} but use internal commands in case cs{rmfamily}
+% has been overwritten.
+% (Note that changing \cs{rmfamily} with fontspec resets \cs{encodingdefault}
+% appropriately.)
+% \begin{macrocode}
+\cs_new:Nn \@@_calc_scale:n
+ {
+ \group_begin:
+
+ \fontencoding { \encodingdefault }
+ \fontfamily { \rmdefault }
+ \selectfont
+
+ \@@_set_font_dimen:NnN \l_@@_tmpa_dim {#1} \font
+ \@@_set_font_dimen:NnN \l_@@_tmpb_dim {#1} \l_fontspec_font
+
+ \tl_set:Nx \l_@@_scale_tl
+ {
+ \fp_eval:n { \dim_to_fp:n {\l_@@_tmpa_dim} /
+ \dim_to_fp:n {\l_@@_tmpb_dim} }
+ }
+
+ \@@_info:n {set-scale}
+ \exp_args:NNNx
+ \group_end:
+ \tl_set:Nx \l_@@_scale_tl { \l_@@_scale_tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_set_font_dimen:NnN}
+% This function sets the dimension |#1| (for font |#3|) to `fontdimen' |#2|
+% for either font dimension 5 (x-height) or 8 (cap-height). If, for some
+% reason, these return an incorrect `zero' value (as \cs{fontdimen8} might
+% for a \texttt{.tfm} font), then we cheat and measure the height of a glyph.
+% We assume in this case that the font contains either an `X' or an `x'.
+% \begin{macrocode}
+\cs_new:Nn \@@_set_font_dimen:NnN
+ {
+ \dim_set:Nn #1 { \fontdimen #2 #3 }
+ \dim_compare:nNnT #1 = {0pt}
+ {
+ \settoheight #1
+ {
+ \str_if_eq:nnTF {#3} {\font} \rmfamily #3
+ \int_case:nnF #2
+ {
+ {5} {x} % x-height
+ {8} {X} % cap-height
+ } {?} % "else" clause; never reached.
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \paragraph{Inter-word space}
+% These options set the relevant \cmd\fontdimen s for the
+% font being loaded.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {WordSpace}
+ {
+ \bool_if:NF \l_@@_firsttime_bool
+ { \_fontspec_parse_wordspace:w #1,,,\q_stop }
+ }
+\@@_aff_error:n {WordSpace}
+% \end{macrocode}
+%
+% \begin{macro}{\_fontspec_parse_wordspace:w}
+% This macro determines if the input to \feat{WordSpace} is
+% of the form |{X}| or |{X,Y,Z}| and executes the font scaling.
+% If the former input, it executes |{X,X,X}|.
+% \begin{macrocode}
+\cs_set:Npn \_fontspec_parse_wordspace:w #1,#2,#3,#4 \q_stop
+ {
+ \tl_if_empty:nTF {#4}
+ {
+ \tl_set:Nn \l_@@_wordspace_adjust_tl
+ {
+ \fontdimen 2 \font = #1 \fontdimen 2 \font
+ \fontdimen 3 \font = #1 \fontdimen 3 \font
+ \fontdimen 4 \font = #1 \fontdimen 4 \font
+ }
+ }
+ {
+ \tl_set:Nn \l_@@_wordspace_adjust_tl
+ {
+ \fontdimen 2 \font = #1 \fontdimen 2 \font
+ \fontdimen 3 \font = #2 \fontdimen 3 \font
+ \fontdimen 4 \font = #3 \fontdimen 4 \font
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{Punctuation space}
+% Scaling factor for the nominal \cmd\fontdimen \#7.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {PunctuationSpace}
+ {
+ \str_case_e:nnF {#1}
+ {
+ {WordSpace}
+ {
+ \tl_set:Nn \l_@@_punctspace_adjust_tl
+ { \fontdimen 7 \font = 0 \fontdimen 2 \font }
+ }
+ {TwiceWordSpace}
+ {
+ \tl_set:Nn \l_@@_punctspace_adjust_tl
+ { \fontdimen 7 \font = 1 \fontdimen 2 \font }
+ }
+ }
+ {
+ \tl_set:Nn \l_@@_punctspace_adjust_tl
+ { \fontdimen 7 \font = #1 \fontdimen 7 \font }
+ }
+ }
+\@@_aff_error:n {PunctuationSpace}
+% \end{macrocode}
+%
+% \paragraph{Secret hook into the font-adjustment code}
+%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {FontAdjustment}
+ {
+ \tl_put_right:Nx \l_@@_postadjust_tl {#1}
+ }
+% \end{macrocode}
+%
+% \paragraph{Letterspacing}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {LetterSpace}
+ {
+ \@@_update_featstr:n {letterspace=#1}
+ }
+% \end{macrocode}
+%
+% \paragraph{Hyphenation character}
+% This feature takes one of three arguments: `\opt{None}',
+% \meta{glyph}, or \meta{slot}. If the input isn't the first,
+% and it's one character, then it's the second; otherwise, it's
+% the third.
+%
+% LuaTeX decouples hyphenation from font settings, so only \verb|HyphenChar=None| works
+% for that engine.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {HyphenChar}
+ {
+ \str_if_eq:nnTF {#1} {None}
+ {
+ \tl_put_right:Nn \l_@@_postadjust_tl
+ { \@@_primitive_font_set_hyphenchar:Nn \font {-1} }
+ }
+ {
+ \@@_warning:nx {only-xetex-feature} {HyphenChar}
+
+ \tl_if_single:nTF {#1}
+ { \tl_set:Nn \l_@@_hyphenchar_tl {`#1} }
+ { \tl_set:Nn \l_@@_hyphenchar_tl { #1} }
+
+ \@@_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_@@_hyphenchar_tl}
+ {
+ \tl_put_right:Nn \l_@@_postadjust_tl
+ { \@@_primitive_font_set_hyphenchar:Nn \font { \l_@@_hyphenchar_tl } }
+ }
+ { \@@_error:nx {no-glyph}{#1} }
+
+ }
+ }
+\@@_aff_error:n {HyphenChar}
+% \end{macrocode}
+%
+% \paragraph{Color}
+% Hooks into pkg{xcolor}, which names its colours \texttt{\char`\\color@<name>}.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {Color}
+ {
+ \cs_if_exist:cTF { \token_to_str:N \color@ #1 }
+ {
+ \convertcolorspec{named}{#1}{HTML}\l_@@_hexcol_tl
+ }
+ {
+ \int_compare:nTF { \tl_count:n {#1} == 6 }
+ { \tl_set:Nn \l_@@_hexcol_tl {#1} }
+ {
+ \int_compare:nTF { \tl_count:n {#1} == 8 }
+ { \fontspec_parse_colour:viii #1 }
+ {
+ \bool_if:NF \l_@@_firsttime_bool
+ { \@@_warning:nx {bad-colour} {#1} }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Npn \fontspec_parse_colour:viii #1#2#3#4#5#6#7#8
+ {
+ \tl_set:Nn \l_@@_hexcol_tl {#1#2#3#4#5#6}
+ \tl_if_eq:NNF \l_@@_opacity_tl \c_@@_opacity_tl
+ {
+ \bool_if:NF \l_@@_firsttime_bool
+ { \@@_warning:nx {opa-twice-col} {#7#8} }
+ }
+ \tl_set:Nn \l_@@_opacity_tl {#7#8}
+ }
+\aliasfontfeature{Color}{Colour}
+% \end{macrocode}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {Opacity}
+ {
+ \int_set:Nn \l_@@_tmp_int {255}
+ \@@_int_mult_truncate:Nn \l_@@_tmp_int { #1 }
+ \tl_if_eq:NNF \l_@@_opacity_tl \c_@@_opacity_tl
+ {
+ \bool_if:NF \l_@@_firsttime_bool
+ { \@@_warning:nx {opa-twice} {#1} }
+ }
+ \tl_set:Nx \l_@@_opacity_tl
+ {
+ \int_compare:nT { \l_@@_tmp_int <= "F } {0} % zero pad
+ \int_to_hex:n { \l_@@_tmp_int }
+ }
+ }
+% \end{macrocode}
+%
+%
+% \paragraph{Mapping}
+% \begin{macrocode}
+%<*XE>
+\@@_keys_define_code:nnn {fontspec-aat} {Mapping}
+ {
+ \tl_set:Nn \l_@@_mapping_tl { #1 }
+ }
+\@@_keys_define_code:nnn {fontspec-opentype} {Mapping}
+ {
+ \tl_set:Nn \l_@@_mapping_tl { #1 }
+ }
+%</XE>
+%<*LU>
+\@@_keys_define_code:nnn {fontspec-opentype} {Mapping}
+ {
+ \str_if_eq:nnTF {#1} {tex-text}
+ {
+ \@@_warning:n {no-mapping-ligtex}
+ \msg_redirect_name:nnn {fontspec} {no-mapping-ligtex} {none}
+ \keys_set:nn {fontspec-opentype} { Ligatures=TeX }
+ }
+ { \@@_warning:n {no-mapping} }
+ }
+%</LU>
+% \end{macrocode}
+%
+%
+% \subsubsection{Continuous font axes}
+%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {Weight}
+ {
+ \@@_update_featstr:n{weight=#1}
+ }
+\@@_keys_define_code:nnn {fontspec} {Width}
+ {
+ \@@_update_featstr:n{width=#1}
+ }
+\@@_keys_define_code:nnn {fontspec} {OpticalSize}
+%<*XE>
+ {
+ \bool_if:NTF \l_@@_ot_bool
+ {
+ \tl_set:Nn \l_@@_optical_size_tl {/ S = #1}
+ }
+ {
+ \bool_if:NT \l_@@_mm_bool
+ {
+ \@@_update_featstr:n { optical size = #1 }
+ }
+ }
+ \bool_if:nT { !\l_@@_ot_bool && !\l_@@_mm_bool }
+ {
+ \bool_if:NT \l_@@_firsttime_bool
+ { \@@_warning:n {no-opticals} }
+ }
+ }
+%</XE>
+%<*LU>
+ {
+ \tl_set:Nn \l_@@_optical_size_tl {/ S = #1}
+ }
+%</LU>
+% \end{macrocode}
+%
+% \subsubsection{Font transformations}
+% These are to be specified to apply directly to a font shape:
+% \begin{macrocode}
+\keys_define:nn {fontspec}
+ {
+ FakeSlant .code:n =
+ {
+ \@@_update_featstr:n {slant=#1}
+ },
+ FakeSlant .default:n = {0.2}
+ }
+\keys_define:nn {fontspec}
+ {
+ FakeStretch .code:n =
+ {
+ \@@_update_featstr:n {extend=#1}
+ },
+ FakeStretch .default:n = {1.2}
+ }
+%<*XE>
+\keys_define:nn {fontspec}
+ {
+ FakeBold .code:n =
+ {
+ \@@_update_featstr:n {embolden=#1}
+ },
+ FakeBold .default:n = {1.5}
+ }
+%</XE>
+%<*LU>
+\keys_define:nn {fontspec}
+ {
+ FakeBold .code:n = { \@@_warning:n {fakebold-only-xetex} }
+ }
+%</LU>
+% \end{macrocode}
+% These are to be given to a shape that has no real bold/italic
+% to signal that \pkg{fontspec} should automatically create `fake' shapes.
+%
+% The behaviour is currently that only if both \opt{AutoFakeSlant} \emph{and}
+% \opt{AutoFakeBold} are specified, the bold italic is also faked.
+%
+% These features presently \emph{override} real shapes found in the font;
+% in the future I'd like these features to be ignored in this case, instead.
+% (This is just a bit harder to program in the current design of
+% \pkg{fontspec}.)
+% \begin{macrocode}
+\keys_define:nn {fontspec}
+ {
+ AutoFakeSlant .code:n =
+ {
+ \bool_if:NT \l_@@_firsttime_bool
+ {
+ \tl_set:Nn \l_@@_fake_slant_tl {#1}
+ \clist_put_right:Nn \l_@@_fontfeat_it_clist {FakeSlant=#1}
+ \tl_set_eq:NN \l_@@_fontname_it_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l_@@_noit_bool
+
+ \tl_if_empty:NF \l_@@_fake_embolden_tl
+ {
+ \clist_put_right:Nx \l_@@_fontfeat_bfit_clist
+ {FakeBold=\l_@@_fake_embolden_tl}
+ \clist_put_right:Nx \l_@@_fontfeat_bfit_clist {FakeSlant=#1}
+ \tl_set_eq:NN \l_@@_fontname_bfit_tl \l_fontspec_fontname_tl
+ }
+ }
+ },
+ AutoFakeSlant .default:n = {0.2}
+ }
+% \end{macrocode}
+% Same but reversed:
+% \begin{macrocode}
+\keys_define:nn {fontspec}
+ {
+ AutoFakeBold .code:n =
+ {
+ \bool_if:NT \l_@@_firsttime_bool
+ {
+ \tl_set:Nn \l_@@_fake_embolden_tl {#1}
+ \clist_put_right:Nn \l_@@_fontfeat_bf_clist {FakeBold=#1}
+ \tl_set_eq:NN \l_@@_fontname_bf_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l_@@_nobf_bool
+
+ \tl_if_empty:NF \l_@@_fake_slant_tl
+ {
+ \clist_put_right:Nx \l_@@_fontfeat_bfit_clist
+ {FakeSlant=\l_@@_fake_slant_tl}
+ \clist_put_right:Nx \l_@@_fontfeat_bfit_clist {FakeBold=#1}
+ \tl_set_eq:NN \l_@@_fontname_bfit_tl \l_fontspec_fontname_tl
+ }
+ }
+ },
+ AutoFakeBold .default:n = {1.5}
+ }
+% \end{macrocode}
+%
+%
+% \subsubsection{Raw feature string}
+% This allows savvy \XeTeX-ers to input font features manually if they have
+% already memorised the OpenType abbreviations and don't mind not having error checking.
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-opentype} {RawFeature}
+ {
+ \@@_update_featstr:n {#1}
+ }
+\@@_keys_define_code:nnn {fontspec-aat} {RawFeature}
+ {
+ \@@_update_featstr:n {#1}
+ }
+% \end{macrocode}
+%
+%
+%
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-lang.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-lang.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-lang.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,418 @@
+%%^^A%% fontspec-code-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Font language definitions}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% \begin{macrocode}
+\newfontlanguage{Abaza}{ABA}
+\newfontlanguage{Abkhazian}{ABK}
+\newfontlanguage{Adyghe}{ADY}
+\newfontlanguage{Afrikaans}{AFK}
+\newfontlanguage{Afar}{AFR}
+\newfontlanguage{Agaw}{AGW}
+\newfontlanguage{Altai}{ALT}
+\newfontlanguage{Amharic}{AMH}
+\newfontlanguage{Arabic}{ARA}
+\newfontlanguage{Aari}{ARI}
+\newfontlanguage{Arakanese}{ARK}
+\newfontlanguage{Assamese}{ASM}
+\newfontlanguage{Athapaskan}{ATH}
+\newfontlanguage{Avar}{AVR}
+\newfontlanguage{Awadhi}{AWA}
+\newfontlanguage{Aymara}{AYM}
+\newfontlanguage{Azeri}{AZE}
+\newfontlanguage{Badaga}{BAD}
+\newfontlanguage{Baghelkhandi}{BAG}
+\newfontlanguage{Balkar}{BAL}
+\newfontlanguage{Baule}{BAU}
+\newfontlanguage{Berber}{BBR}
+\newfontlanguage{Bench}{BCH}
+\newfontlanguage{Bible~Cree}{BCR}
+\newfontlanguage{Belarussian}{BEL}
+\newfontlanguage{Bemba}{BEM}
+\newfontlanguage{Bengali}{BEN}
+\newfontlanguage{Bulgarian}{BGR}
+\newfontlanguage{Bhili}{BHI}
+\newfontlanguage{Bhojpuri}{BHO}
+\newfontlanguage{Bikol}{BIK}
+\newfontlanguage{Bilen}{BIL}
+\newfontlanguage{Blackfoot}{BKF}
+\newfontlanguage{Balochi}{BLI}
+\newfontlanguage{Balante}{BLN}
+\newfontlanguage{Balti}{BLT}
+\newfontlanguage{Bambara}{BMB}
+\newfontlanguage{Bamileke}{BML}
+\newfontlanguage{Breton}{BRE}
+\newfontlanguage{Brahui}{BRH}
+\newfontlanguage{Braj~Bhasha}{BRI}
+\newfontlanguage{Burmese}{BRM}
+\newfontlanguage{Bashkir}{BSH}
+\newfontlanguage{Beti}{BTI}
+\newfontlanguage{Catalan}{CAT}
+\newfontlanguage{Cebuano}{CEB}
+\newfontlanguage{Chechen}{CHE}
+\newfontlanguage{Chaha~Gurage}{CHG}
+\newfontlanguage{Chattisgarhi}{CHH}
+\newfontlanguage{Chichewa}{CHI}
+\newfontlanguage{Chukchi}{CHK}
+\newfontlanguage{Chipewyan}{CHP}
+\newfontlanguage{Cherokee}{CHR}
+\newfontlanguage{Chuvash}{CHU}
+\newfontlanguage{Comorian}{CMR}
+\newfontlanguage{Coptic}{COP}
+\newfontlanguage{Cree}{CRE}
+\newfontlanguage{Carrier}{CRR}
+\newfontlanguage{Crimean~Tatar}{CRT}
+\newfontlanguage{Church~Slavonic}{CSL}
+\newfontlanguage{Czech}{CSY}
+\newfontlanguage{Danish}{DAN}
+\newfontlanguage{Dargwa}{DAR}
+\newfontlanguage{Woods~Cree}{DCR}
+\newfontlanguage{German}{DEU}
+\newfontlanguage{Dogri}{DGR}
+\newfontlanguage{Divehi}{DIV}
+\newfontlanguage{Djerma}{DJR}
+\newfontlanguage{Dangme}{DNG}
+\newfontlanguage{Dinka}{DNK}
+\newfontlanguage{Dungan}{DUN}
+\newfontlanguage{Dzongkha}{DZN}
+\newfontlanguage{Ebira}{EBI}
+\newfontlanguage{Eastern~Cree}{ECR}
+\newfontlanguage{Edo}{EDO}
+\newfontlanguage{Efik}{EFI}
+\newfontlanguage{Greek}{ELL}
+\newfontlanguage{English}{ENG}
+\newfontlanguage{Erzya}{ERZ}
+\newfontlanguage{Spanish}{ESP}
+\newfontlanguage{Estonian}{ETI}
+\newfontlanguage{Basque}{EUQ}
+\newfontlanguage{Evenki}{EVK}
+\newfontlanguage{Even}{EVN}
+\newfontlanguage{Ewe}{EWE}
+\newfontlanguage{French~Antillean}{FAN}
+\newfontlanguage{Farsi}{FAR}
+\newfontlanguage{Parsi}{FAR}
+\newfontlanguage{Persian}{FAR}
+\newfontlanguage{Finnish}{FIN}
+\newfontlanguage{Fijian}{FJI}
+\newfontlanguage{Flemish}{FLE}
+\newfontlanguage{Forest~Nenets}{FNE}
+\newfontlanguage{Fon}{FON}
+\newfontlanguage{Faroese}{FOS}
+\newfontlanguage{French}{FRA}
+\newfontlanguage{Frisian}{FRI}
+\newfontlanguage{Friulian}{FRL}
+\newfontlanguage{Futa}{FTA}
+\newfontlanguage{Fulani}{FUL}
+\newfontlanguage{Ga}{GAD}
+\newfontlanguage{Gaelic}{GAE}
+\newfontlanguage{Gagauz}{GAG}
+\newfontlanguage{Galician}{GAL}
+\newfontlanguage{Garshuni}{GAR}
+\newfontlanguage{Garhwali}{GAW}
+\newfontlanguage{Ge'ez}{GEZ}
+\newfontlanguage{Gilyak}{GIL}
+\newfontlanguage{Gumuz}{GMZ}
+\newfontlanguage{Gondi}{GON}
+\newfontlanguage{Greenlandic}{GRN}
+\newfontlanguage{Garo}{GRO}
+\newfontlanguage{Guarani}{GUA}
+\newfontlanguage{Gujarati}{GUJ}
+\newfontlanguage{Haitian}{HAI}
+\newfontlanguage{Halam}{HAL}
+\newfontlanguage{Harauti}{HAR}
+\newfontlanguage{Hausa}{HAU}
+\newfontlanguage{Hawaiin}{HAW}
+\newfontlanguage{Hammer-Banna}{HBN}
+\newfontlanguage{Hiligaynon}{HIL}
+\newfontlanguage{Hindi}{HIN}
+\newfontlanguage{High~Mari}{HMA}
+\newfontlanguage{Hindko}{HND}
+\newfontlanguage{Ho}{HO}
+\newfontlanguage{Harari}{HRI}
+\newfontlanguage{Croatian}{HRV}
+\newfontlanguage{Hungarian}{HUN}
+\newfontlanguage{Armenian}{HYE}
+\newfontlanguage{Igbo}{IBO}
+\newfontlanguage{Ijo}{IJO}
+\newfontlanguage{Ilokano}{ILO}
+\newfontlanguage{Indonesian}{IND}
+\newfontlanguage{Ingush}{ING}
+\newfontlanguage{Inuktitut}{INU}
+\newfontlanguage{Irish}{IRI}
+\newfontlanguage{Irish~Traditional}{IRT}
+\newfontlanguage{Icelandic}{ISL}
+\newfontlanguage{Inari~Sami}{ISM}
+\newfontlanguage{Italian}{ITA}
+\newfontlanguage{Hebrew}{IWR}
+\newfontlanguage{Javanese}{JAV}
+\newfontlanguage{Yiddish}{JII}
+\newfontlanguage{Japanese}{JAN}
+\newfontlanguage{Judezmo}{JUD}
+\newfontlanguage{Jula}{JUL}
+\newfontlanguage{Kabardian}{KAB}
+\newfontlanguage{Kachchi}{KAC}
+\newfontlanguage{Kalenjin}{KAL}
+\newfontlanguage{Kannada}{KAN}
+\newfontlanguage{Karachay}{KAR}
+\newfontlanguage{Georgian}{KAT}
+\newfontlanguage{Kazakh}{KAZ}
+\newfontlanguage{Kebena}{KEB}
+\newfontlanguage{Khutsuri~Georgian}{KGE}
+\newfontlanguage{Khakass}{KHA}
+\newfontlanguage{Khanty-Kazim}{KHK}
+\newfontlanguage{Khmer}{KHM}
+\newfontlanguage{Khanty-Shurishkar}{KHS}
+\newfontlanguage{Khanty-Vakhi}{KHV}
+\newfontlanguage{Khowar}{KHW}
+\newfontlanguage{Kikuyu}{KIK}
+\newfontlanguage{Kirghiz}{KIR}
+\newfontlanguage{Kisii}{KIS}
+\newfontlanguage{Kokni}{KKN}
+\newfontlanguage{Kalmyk}{KLM}
+\newfontlanguage{Kamba}{KMB}
+\newfontlanguage{Kumaoni}{KMN}
+\newfontlanguage{Komo}{KMO}
+\newfontlanguage{Komso}{KMS}
+\newfontlanguage{Kanuri}{KNR}
+\newfontlanguage{Kodagu}{KOD}
+\newfontlanguage{Korean~Old~Hangul}{KOH}
+\newfontlanguage{Konkani}{KOK}
+\newfontlanguage{Kikongo}{KON}
+\newfontlanguage{Komi-Permyak}{KOP}
+\newfontlanguage{Korean}{KOR}
+\newfontlanguage{Komi-Zyrian}{KOZ}
+\newfontlanguage{Kpelle}{KPL}
+\newfontlanguage{Krio}{KRI}
+\newfontlanguage{Karakalpak}{KRK}
+\newfontlanguage{Karelian}{KRL}
+\newfontlanguage{Karaim}{KRM}
+\newfontlanguage{Karen}{KRN}
+\newfontlanguage{Koorete}{KRT}
+\newfontlanguage{Kashmiri}{KSH}
+\newfontlanguage{Khasi}{KSI}
+\newfontlanguage{Kildin~Sami}{KSM}
+\newfontlanguage{Kui}{KUI}
+\newfontlanguage{Kulvi}{KUL}
+\newfontlanguage{Kumyk}{KUM}
+\newfontlanguage{Kurdish}{KUR}
+\newfontlanguage{Kurukh}{KUU}
+\newfontlanguage{Kuy}{KUY}
+\newfontlanguage{Koryak}{KYK}
+\newfontlanguage{Ladin}{LAD}
+\newfontlanguage{Lahuli}{LAH}
+\newfontlanguage{Lak}{LAK}
+\newfontlanguage{Lambani}{LAM}
+\newfontlanguage{Lao}{LAO}
+\newfontlanguage{Latin}{LAT}
+\newfontlanguage{Laz}{LAZ}
+\newfontlanguage{L-Cree}{LCR}
+\newfontlanguage{Ladakhi}{LDK}
+\newfontlanguage{Lezgi}{LEZ}
+\newfontlanguage{Lingala}{LIN}
+\newfontlanguage{Low~Mari}{LMA}
+\newfontlanguage{Limbu}{LMB}
+\newfontlanguage{Lomwe}{LMW}
+\newfontlanguage{Lower~Sorbian}{LSB}
+\newfontlanguage{Lule~Sami}{LSM}
+\newfontlanguage{Lithuanian}{LTH}
+\newfontlanguage{Luba}{LUB}
+\newfontlanguage{Luganda}{LUG}
+\newfontlanguage{Luhya}{LUH}
+\newfontlanguage{Luo}{LUO}
+\newfontlanguage{Latvian}{LVI}
+\newfontlanguage{Majang}{MAJ}
+\newfontlanguage{Makua}{MAK}
+\newfontlanguage{Malayalam~Traditional}{MAL}
+\newfontlanguage{Mansi}{MAN}
+\newfontlanguage{Marathi}{MAR}
+\newfontlanguage{Marwari}{MAW}
+\newfontlanguage{Mbundu}{MBN}
+\newfontlanguage{Manchu}{MCH}
+\newfontlanguage{Moose~Cree}{MCR}
+\newfontlanguage{Mende}{MDE}
+\newfontlanguage{Me'en}{MEN}
+\newfontlanguage{Mizo}{MIZ}
+\newfontlanguage{Macedonian}{MKD}
+\newfontlanguage{Male}{MLE}
+\newfontlanguage{Malagasy}{MLG}
+\newfontlanguage{Malinke}{MLN}
+\newfontlanguage{Malayalam~Reformed}{MLR}
+\newfontlanguage{Malay}{MLY}
+\newfontlanguage{Mandinka}{MND}
+\newfontlanguage{Mongolian}{MNG}
+\newfontlanguage{Manipuri}{MNI}
+\newfontlanguage{Maninka}{MNK}
+\newfontlanguage{Manx~Gaelic}{MNX}
+\newfontlanguage{Moksha}{MOK}
+\newfontlanguage{Moldavian}{MOL}
+\newfontlanguage{Mon}{MON}
+\newfontlanguage{Moroccan}{MOR}
+\newfontlanguage{Maori}{MRI}
+\newfontlanguage{Maithili}{MTH}
+\newfontlanguage{Maltese}{MTS}
+\newfontlanguage{Mundari}{MUN}
+\newfontlanguage{Naga-Assamese}{NAG}
+\newfontlanguage{Nanai}{NAN}
+\newfontlanguage{Naskapi}{NAS}
+\newfontlanguage{N-Cree}{NCR}
+\newfontlanguage{Ndebele}{NDB}
+\newfontlanguage{Ndonga}{NDG}
+\newfontlanguage{Nepali}{NEP}
+\newfontlanguage{Newari}{NEW}
+\newfontlanguage{Nagari}{NGR}
+\newfontlanguage{Norway~House~Cree}{NHC}
+\newfontlanguage{Nisi}{NIS}
+\newfontlanguage{Niuean}{NIU}
+\newfontlanguage{Nkole}{NKL}
+\newfontlanguage{N'ko}{NKO}
+\newfontlanguage{Dutch}{NLD}
+\newfontlanguage{Nogai}{NOG}
+\newfontlanguage{Norwegian}{NOR}
+\newfontlanguage{Northern~Sami}{NSM}
+\newfontlanguage{Northern~Tai}{NTA}
+\newfontlanguage{Esperanto}{NTO}
+\newfontlanguage{Nynorsk}{NYN}
+\newfontlanguage{Oji-Cree}{OCR}
+\newfontlanguage{Ojibway}{OJB}
+\newfontlanguage{Oriya}{ORI}
+\newfontlanguage{Oromo}{ORO}
+\newfontlanguage{Ossetian}{OSS}
+\newfontlanguage{Palestinian~Aramaic}{PAA}
+\newfontlanguage{Pali}{PAL}
+\newfontlanguage{Punjabi}{PAN}
+\newfontlanguage{Palpa}{PAP}
+\newfontlanguage{Pashto}{PAS}
+\newfontlanguage{Polytonic~Greek}{PGR}
+\newfontlanguage{Pilipino}{PIL}
+\newfontlanguage{Palaung}{PLG}
+\newfontlanguage{Polish}{PLK}
+\newfontlanguage{Provencal}{PRO}
+\newfontlanguage{Portuguese}{PTG}
+\newfontlanguage{Chin}{QIN}
+\newfontlanguage{Rajasthani}{RAJ}
+\newfontlanguage{R-Cree}{RCR}
+\newfontlanguage{Russian~Buriat}{RBU}
+\newfontlanguage{Riang}{RIA}
+\newfontlanguage{Rhaeto-Romanic}{RMS}
+\newfontlanguage{Romanian}{ROM}
+\newfontlanguage{Romany}{ROY}
+\newfontlanguage{Rusyn}{RSY}
+\newfontlanguage{Ruanda}{RUA}
+\newfontlanguage{Russian}{RUS}
+\newfontlanguage{Sadri}{SAD}
+\newfontlanguage{Sanskrit}{SAN}
+\newfontlanguage{Santali}{SAT}
+\newfontlanguage{Sayisi}{SAY}
+\newfontlanguage{Sekota}{SEK}
+\newfontlanguage{Selkup}{SEL}
+\newfontlanguage{Sango}{SGO}
+\newfontlanguage{Shan}{SHN}
+\newfontlanguage{Sibe}{SIB}
+\newfontlanguage{Sidamo}{SID}
+\newfontlanguage{Silte~Gurage}{SIG}
+\newfontlanguage{Skolt~Sami}{SKS}
+\newfontlanguage{Slovak}{SKY}
+\newfontlanguage{Slavey}{SLA}
+\newfontlanguage{Slovenian}{SLV}
+\newfontlanguage{Somali}{SML}
+\newfontlanguage{Samoan}{SMO}
+\newfontlanguage{Sena}{SNA}
+\newfontlanguage{Sindhi}{SND}
+\newfontlanguage{Sinhalese}{SNH}
+\newfontlanguage{Soninke}{SNK}
+\newfontlanguage{Sodo~Gurage}{SOG}
+\newfontlanguage{Sotho}{SOT}
+\newfontlanguage{Albanian}{SQI}
+\newfontlanguage{Serbian}{SRB}
+\newfontlanguage{Saraiki}{SRK}
+\newfontlanguage{Serer}{SRR}
+\newfontlanguage{South~Slavey}{SSL}
+\newfontlanguage{Southern~Sami}{SSM}
+\newfontlanguage{Suri}{SUR}
+\newfontlanguage{Svan}{SVA}
+\newfontlanguage{Swedish}{SVE}
+\newfontlanguage{Swadaya~Aramaic}{SWA}
+\newfontlanguage{Swahili}{SWK}
+\newfontlanguage{Swazi}{SWZ}
+\newfontlanguage{Sutu}{SXT}
+\newfontlanguage{Syriac}{SYR}
+\newfontlanguage{Tabasaran}{TAB}
+\newfontlanguage{Tajiki}{TAJ}
+\newfontlanguage{Tamil}{TAM}
+\newfontlanguage{Tatar}{TAT}
+\newfontlanguage{TH-Cree}{TCR}
+\newfontlanguage{Telugu}{TEL}
+\newfontlanguage{Tongan}{TGN}
+\newfontlanguage{Tigre}{TGR}
+\newfontlanguage{Tigrinya}{TGY}
+\newfontlanguage{Thai}{THA}
+\newfontlanguage{Tahitian}{THT}
+\newfontlanguage{Tibetan}{TIB}
+\newfontlanguage{Turkmen}{TKM}
+\newfontlanguage{Temne}{TMN}
+\newfontlanguage{Tswana}{TNA}
+\newfontlanguage{Tundra~Nenets}{TNE}
+\newfontlanguage{Tonga}{TNG}
+\newfontlanguage{Todo}{TOD}
+\newfontlanguage{Tsonga}{TSG}
+\newfontlanguage{Turoyo~Aramaic}{TUA}
+\newfontlanguage{Tulu}{TUL}
+\newfontlanguage{Tuvin}{TUV}
+\newfontlanguage{Twi}{TWI}
+\newfontlanguage{Udmurt}{UDM}
+\newfontlanguage{Ukrainian}{UKR}
+\newfontlanguage{Urdu}{URD}
+\newfontlanguage{Upper~Sorbian}{USB}
+\newfontlanguage{Uyghur}{UYG}
+\newfontlanguage{Uzbek}{UZB}
+\newfontlanguage{Venda}{VEN}
+\newfontlanguage{Vietnamese}{VIT}
+\newfontlanguage{Wa}{WA}
+\newfontlanguage{Wagdi}{WAG}
+\newfontlanguage{West-Cree}{WCR}
+\newfontlanguage{Welsh}{WEL}
+\newfontlanguage{Wolof}{WLF}
+\newfontlanguage{Tai~Lue}{XBD}
+\newfontlanguage{Xhosa}{XHS}
+\newfontlanguage{Yakut}{YAK}
+\newfontlanguage{Yoruba}{YBA}
+\newfontlanguage{Y-Cree}{YCR}
+\newfontlanguage{Yi~Classic}{YIC}
+\newfontlanguage{Yi~Modern}{YIM}
+\newfontlanguage{Chinese~Hong~Kong}{ZHH}
+\newfontlanguage{Chinese~Phonetic}{ZHP}
+\newfontlanguage{Chinese~Simplified}{ZHS}
+\newfontlanguage{Chinese~Traditional}{ZHT}
+\newfontlanguage{Zande}{ZND}
+\newfontlanguage{Zulu}{ZUL}
+% \end{macrocode}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-lang.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-load.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -60,7 +60,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-math.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-math.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-math.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,255 @@
+%%^^A%% fontspec-code-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%
+% \section{Selecting maths fonts}
+% Here, the fonts used in math mode are redefined to correspond to the
+% default roman, sans serif and typewriter fonts. Unfortunately, you
+% can only define maths fonts in the preamble, otherwise I'd run this
+% code whenever \cs{setmainfont} and friends was run.
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% \begin{macro}{\fontspec_setup_maths:}
+% Everything here is performed \cs{AtBeginDocument} in order to
+% overwrite \pkg{euler}'s attempt. This means \pkg{fontspec} must be
+% loaded \emph{after} \pkg{euler}. We set up a conditional to return
+% an error if this rule is violated.
+%
+% Since every maths setup is slightly different, we also take
+% different paths for defining various math glyphs depending which
+% maths font package has been loaded.
+%
+% \begin{macrocode}
+\@ifpackageloaded{euler}
+ { \bool_gset_true:N \g_@@_pkg_euler_loaded_bool }
+ { \bool_gset_false:N \g_@@_pkg_euler_loaded_bool }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \fontspec_setup_maths:
+ {
+ \@ifpackageloaded{euler}
+ {
+ \bool_if:NTF \g_@@_pkg_euler_loaded_bool
+ { \bool_gset_true:N \g_@@_math_euler_bool }
+ { \@@_error:n {euler-too-late} }
+ }
+ {}
+ \@ifpackageloaded{lucbmath}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
+ \@ifpackageloaded{lucidabr}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
+ \@ifpackageloaded{lucimatx}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
+% \end{macrocode}
+% Knuth's CM fonts fonts are all squashed together, combining letters,
+% accents, text symbols and maths symbols all in the one font,
+% \texttt{cmr}, plus other things in other fonts. Because we are
+% changing the roman font in the document, we need to redefine all of
+% the maths glyphs in \LaTeX's \texttt{operators} maths font to still
+% go back to the legacy \texttt{cmr} font for all these random glyphs,
+% unless a separate maths font package has been loaded instead.
+%
+% In every case, the maths accents are always taken from the
+% \texttt{operators} font, which is generally the main text
+% font. (Actually, there is a \cmd\hat\ accent in
+% \texttt{EulerFractur}, but it's \emph{ugly}. So I ignore it. Sorry
+% if this causes inconvenience.)
+% \begin{macrocode}
+ \DeclareSymbolFont{legacymaths}{OT1}{cmr}{m}{n}
+ \SetSymbolFont{legacymaths}{bold}{OT1}{cmr}{bx}{n}
+ \DeclareMathAccent{\acute} {\mathalpha}{legacymaths}{19}
+ \DeclareMathAccent{\grave} {\mathalpha}{legacymaths}{18}
+ \DeclareMathAccent{\ddot} {\mathalpha}{legacymaths}{127}
+ \DeclareMathAccent{\tilde} {\mathalpha}{legacymaths}{126}
+ \DeclareMathAccent{\bar} {\mathalpha}{legacymaths}{22}
+ \DeclareMathAccent{\breve} {\mathalpha}{legacymaths}{21}
+ \DeclareMathAccent{\check} {\mathalpha}{legacymaths}{20}
+ \DeclareMathAccent{\hat} {\mathalpha}{legacymaths}{94} % too bad, euler
+ \DeclareMathAccent{\dot} {\mathalpha}{legacymaths}{95}
+ \DeclareMathAccent{\mathring}{\mathalpha}{legacymaths}{23}
+% \end{macrocode}
+% \paragraph{\cmd\colon: what's going on?} Okay, so \verb":" and \cmd\colon\ in maths mode are defined in a few places, so I need to work out what does what. Respectively, we have:
+% \begin{Verbatim}
+% % fontmath.ltx:
+% \DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}
+% \DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
+%
+% % amsmath.sty:
+% \renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
+% \mkern-\thinmuskip{:}\mskip6muplus1mu\relax}
+%
+% % euler.sty:
+% \DeclareMathSymbol{:}\mathrel {EulerFraktur}{"3A}
+%
+% % lucbmath.sty:
+% \DeclareMathSymbol{\@tempb}{\mathpunct}{operators}{58}
+% \ifx\colon\@tempb
+% \DeclareMathSymbol{\colon}{\mathpunct}{operators}{58}
+% \fi
+% \DeclareMathSymbol{:}{\mathrel}{operators}{58}
+% \end{Verbatim}
+% ($\mathrm{3A_{16}}=\mathrm{58_{10}}$) So I think, based on this summary, that it is fair to tell \pkg{fontspec} to `replace' the operators font with legacymaths for this symbol, except when \pkg{amsmath} is loaded since we want to keep its definition.
+%
+%
+% \begin{macrocode}
+ \group_begin:
+ \mathchardef\@tempa="603A \relax
+ \ifx\colon\@tempa
+ \DeclareMathSymbol{\colon}{\mathpunct}{legacymaths}{58}
+ \fi
+ \group_end:
+% \end{macrocode}
+% The following symbols are only defined specifically in \pkg{euler}, so skip them
+% if that package is loaded.
+% \begin{macrocode}
+ \bool_if:NF \g_@@_math_euler_bool
+ {
+ \DeclareMathSymbol{!}{\mathclose}{legacymaths}{33}
+ \DeclareMathSymbol{:}{\mathrel} {legacymaths}{58}
+ \DeclareMathSymbol{;}{\mathpunct}{legacymaths}{59}
+ \DeclareMathSymbol{?}{\mathclose}{legacymaths}{63}
+% \end{macrocode}
+% And these ones are defined both in \pkg{euler} and \pkg{lucbmath},
+% so we only need to run this code if no extra maths package has been
+% loaded.
+% \begin{macrocode}
+ \bool_if:NF \g_@@_math_lucida_bool
+ {
+ \DeclareMathSymbol{0}{\mathalpha}{legacymaths}{`0}
+ \DeclareMathSymbol{1}{\mathalpha}{legacymaths}{`1}
+ \DeclareMathSymbol{2}{\mathalpha}{legacymaths}{`2}
+ \DeclareMathSymbol{3}{\mathalpha}{legacymaths}{`3}
+ \DeclareMathSymbol{4}{\mathalpha}{legacymaths}{`4}
+ \DeclareMathSymbol{5}{\mathalpha}{legacymaths}{`5}
+ \DeclareMathSymbol{6}{\mathalpha}{legacymaths}{`6}
+ \DeclareMathSymbol{7}{\mathalpha}{legacymaths}{`7}
+ \DeclareMathSymbol{8}{\mathalpha}{legacymaths}{`8}
+ \DeclareMathSymbol{9}{\mathalpha}{legacymaths}{`9}
+ \DeclareMathSymbol{\Gamma}{\mathalpha}{legacymaths}{0}
+ \DeclareMathSymbol{\Delta}{\mathalpha}{legacymaths}{1}
+ \DeclareMathSymbol{\Theta}{\mathalpha}{legacymaths}{2}
+ \DeclareMathSymbol{\Lambda}{\mathalpha}{legacymaths}{3}
+ \DeclareMathSymbol{\Xi}{\mathalpha}{legacymaths}{4}
+ \DeclareMathSymbol{\Pi}{\mathalpha}{legacymaths}{5}
+ \DeclareMathSymbol{\Sigma}{\mathalpha}{legacymaths}{6}
+ \DeclareMathSymbol{\Upsilon}{\mathalpha}{legacymaths}{7}
+ \DeclareMathSymbol{\Phi}{\mathalpha}{legacymaths}{8}
+ \DeclareMathSymbol{\Psi}{\mathalpha}{legacymaths}{9}
+ \DeclareMathSymbol{\Omega}{\mathalpha}{legacymaths}{10}
+ \DeclareMathSymbol{+}{\mathbin}{legacymaths}{43}
+ \DeclareMathSymbol{=}{\mathrel}{legacymaths}{61}
+ \DeclareMathDelimiter{(}{\mathopen} {legacymaths}{40}{largesymbols}{0}
+ \DeclareMathDelimiter{)}{\mathclose}{legacymaths}{41}{largesymbols}{1}
+ \DeclareMathDelimiter{[}{\mathopen} {legacymaths}{91}{largesymbols}{2}
+ \DeclareMathDelimiter{]}{\mathclose}{legacymaths}{93}{largesymbols}{3}
+ \DeclareMathDelimiter{/}{\mathord}{legacymaths}{47}{largesymbols}{14}
+ \DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{36}
+ \renewcommand{\hbar}{{\mathchar"AF\mkern-9mu h}}% TODO: test with other fonts
+ }
+ }
+% \end{macrocode}
+% Finally, we change the font definitions for \cmd\mathrm\ and so
+% on. These are defined using the \cmd\g_@@_mathrm_tl\ (\dots) macros,
+% which default to \cmd\rmdefault\ but may be specified with the
+% \cmd\setmathrm\ (\dots) commands in the preamble.
+%
+% Since \LaTeX\ only generally defines one level of boldness, we omit
+% \cmd\mathbf\ in the \textsf{bold} maths series. It can be specified
+% as per usual with \cmd\setboldmathrm, which stores the appropriate
+% family name in \cmd\g_@@_bfmathrm_tl.
+% \begin{macrocode}
+ \DeclareSymbolFont{operators}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
+ \SetSymbolFont{operators}{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
+ \DeclareSymbolFontAlphabet\mathrm{operators}
+ \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\itdefault
+ \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault
+ \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g_@@_mathsf_tl\mddefault\updefault
+ \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g_@@_mathtt_tl\mddefault\updefault
+ \SetSymbolFont{operators}{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault
+ \tl_if_empty:NTF \g_@@_bfmathrm_tl
+ {
+ \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\itdefault
+ }
+ {
+ \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g_@@_bfmathrm_tl\mddefault\updefault
+ \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g_@@_bfmathrm_tl\bfdefault\updefault
+ \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g_@@_bfmathrm_tl\mddefault\itdefault
+ }
+ \SetMathAlphabet\mathsf{bold}\g_fontspec_encoding_tl\g_@@_mathsf_tl\bfdefault\updefault
+ \SetMathAlphabet\mathtt{bold}\g_fontspec_encoding_tl\g_@@_mathtt_tl\bfdefault\updefault
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fontspec_maybe_setup_maths:}
+% We're a little less sophisticated about not executing the maths setup if various other maths font packages are loaded. This list is based on the wonderful `\LaTeX Font Catalogue': \url{http://www.tug.dk/FontCatalogue/mathfonts.html}. I'm sure there are more I've missed. Do the \TeX\ Gyre fonts have maths support yet?
+%
+% Untested: would |\unless\ifnum\Gamma=28672\relax\bool_set_false:N \g_@@_math_bool\fi| be a better test?
+% This needs more cooperation with euler and lucida, I think.
+% \begin{macrocode}
+\cs_new:Nn \fontspec_maybe_setup_maths:
+ {
+ \@ifpackageloaded{anttor}
+ {
+ \ifx\define at antt@mathversions a\bool_gset_false:N \g_@@_math_bool\fi
+ }{}
+ \@ifpackageloaded{arevmath} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{eulervm} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{mathdesign} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{concmath} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{cmbright} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{mathesf} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{gfsartemisia} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{gfsneohellenic} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{iwona}
+ {
+ \ifx\define at iwona@mathversions a\bool_set_false:N \g_@@_math_bool\fi
+ }{}
+ \@ifpackageloaded{kpfonts}{\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{kmath} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{kurier}
+ {
+ \ifx\define at kurier@mathversions a\bool_set_false:N \g_@@_math_bool\fi
+ }{}
+ \@ifpackageloaded{fouriernc} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{fourier} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{lmodern} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{mathpazo} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{mathptmx} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{MinionPro} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{unicode-math} {\bool_gset_false:N \g_@@_math_bool}{}
+ \@ifpackageloaded{breqn} {\bool_gset_false:N \g_@@_math_bool}{}
+ \bool_if:NT \g_@@_math_bool
+ {
+ \@@_info:n {setup-math}
+ \fontspec_setup_maths:
+ }
+ }
+\AtBeginDocument{\fontspec_maybe_setup_maths:}
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-math.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,290 @@
+%%^^A%% fontspec-code-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%
+% \section{Error/warning/info messages}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% Shorthands for messages:
+% \begin{macrocode}
+\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 \@@_warning:n { \msg_warning:nn {fontspec} }
+\cs_new:Npn \@@_warning:nx { \msg_warning:nnx {fontspec} }
+\cs_new:Npn \@@_warning:nxx { \msg_warning:nnxx {fontspec} }
+\cs_new:Npn \@@_info:n { \msg_info:nn {fontspec} }
+\cs_new:Npn \@@_info:nx { \msg_info:nnx {fontspec} }
+\cs_new:Npn \@@_info:nxx { \msg_info:nnxx {fontspec} }
+\cs_new:Npn \@@_trace:n { \msg_trace:nn {fontspec} }
+% \end{macrocode}
+%
+% Allow messages to be written with spaces acting as normal:
+% \begin{macrocode}
+\cs_generate_variant:Nn \msg_new:nnn {nnx}
+\cs_generate_variant:Nn \msg_new:nnnn {nnxx}
+\cs_new:Nn \@@_msg_new:nnn
+ { \msg_new:nnx {#1} {#2} { \tl_trim_spaces:n {#3} } }
+\cs_new:Nn \@@_msg_new:nnnn
+ { \msg_new:nnxx {#1} {#2} { \tl_trim_spaces:n {#3} } { \tl_trim_spaces:n {#4} } }
+\char_set_catcode_space:n {32}
+% \end{macrocode}
+%
+% \subsection{Errors}
+%
+% \begin{macrocode}
+\@@_msg_new:nnn {fontspec} {only-inside-encdef}
+ {
+ \exp_not:N#1can only be used in the second argument
+ to \string\DeclareUnicodeEncoding.
+ }
+\@@_msg_new:nnn {fontspec} {no-size-info}
+ {
+ Size information must be supplied.\\
+ For example, SizeFeatures={Size={8-12},...}.
+ }
+\@@_msg_new:nnnn {fontspec} {font-not-found}
+ {
+ The font "#1" cannot be found.
+ }
+ {
+ A font might not be found for many reasons.\\
+ Check the spelling, where the font is installed etc. etc.\\\\
+ When in doubt, ask someone for help!
+ }
+\@@_msg_new:nnnn {fontspec} {rename-feature-not-exist}
+ {
+ The feature #1 doesn't appear to be defined.
+ }
+ {
+ It looks like you're trying to rename a feature that doesn't exist.
+ }
+\@@_msg_new:nnn {fontspec} {no-glyph}
+ {
+ '\l_fontspec_fontname_tl' does not contain glyph #1.
+ }
+\@@_msg_new:nnnn {fontspec} {euler-too-late}
+ {
+ The euler package must be loaded BEFORE fontspec.
+ }
+ {
+ fontspec only overwrites euler's attempt to
+ define the maths text fonts if fontspec is
+ loaded after euler. Type <return> to proceed
+ with incorrect \string\mathit, \string\mathbf, etc.
+ }
+\@@_msg_new:nnnn {fontspec} {no-xcolor}
+ {
+ Cannot load named colours without the xcolor package.
+ }
+ {
+ Sorry, I can't do anything to help. Instead of loading
+ the color package, use xcolor instead.
+ }
+\@@_msg_new:nnnn {fontspec} {unknown-color-model}
+ {
+ Error loading colour `#1'; unknown colour model.
+ }
+ {
+ Sorry, I can't do anything to help. Please report this error
+ to my developer with a minimal example that causes the problem.
+ }
+\@@_msg_new:nnnn {fontspec} {not-in-addfontfeatures}
+ {
+ The "#1" font feature cannot be used in \string\addfontfeatures.
+ }
+ {
+ This is due to how TeX loads fonts; such settings
+ are global so adding them mid-document within a group causes
+ confusion. You'll need to define multiple font families to achieve
+ what you want.
+ }
+% \end{macrocode}
+%
+% \subsection{Warnings}
+%
+% \begin{macrocode}
+\@@_msg_new:nnn {fontspec} {tu-clash}
+ {
+ I have found the tuenc.def encoding definition file but the TU encoding is not
+ defined by the LaTeX2e kernel; attempting to correct but you really should update
+ to the latest version of LaTeX2e.
+ }
+\@@_msg_new:nnn {fontspec} {tu-missing}
+ {
+ The TU encoding seems to be missing; please update to the latest version of LaTeX2e.
+ }
+\@@_msg_new:nnn {fontspec} {addfontfeatures-ignored}
+ {
+ \string\addfontfeature (s) ignored \msg_line_context:;
+ it cannot be used with a font that wasn't selected by a fontspec command.\\
+ \\
+ The current font is "\use:c{font at name}".\\
+ \int_compare:nTF { \clist_count:n {#1} = 1 }
+ { The requested feature is "#1". }
+ { The requested features are "#1". }
+ }
+\@@_msg_new:nnn {fontspec} {feature-option-overwrite}
+ {
+ Option '#2' of font feature '#1' overwritten.
+ }
+\@@_msg_new:nnn {fontspec} {ot-tag-too-long}
+ {
+ OpenType tag '#1' is too long; script, language, and feature tags must be four characters or fewer.
+ }
+\@@_msg_new:nnn {fontspec} {script-not-exist-latn}
+ {
+ Font '\l_fontspec_fontname_tl' does not contain script '#1'.\\
+ 'Latin' script used instead.
+ }
+\@@_msg_new:nnn {fontspec} {script-not-exist}
+ {
+ Font '\l_fontspec_fontname_tl' does not contain script '#1'.
+ }
+\@@_msg_new:nnn {fontspec} {aat-feature-not-exist}
+ {
+ '\l_keys_key_tl=\l_keys_value_tl' feature not supported
+ for AAT font '\l_fontspec_fontname_tl'.
+ }
+\@@_msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
+ {
+ AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
+ in font '\l_fontspec_fontname_tl'.
+ }
+\@@_msg_new:nnn {fontspec} {icu-feature-not-exist}
+ {
+ '\l_keys_key_tl=\l_keys_value_tl' feature not supported
+ for OpenType font '\l_fontspec_fontname_tl'
+ }
+\@@_msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
+ {
+ OpenType feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
+ for font '\l_fontspec_fontname_tl'
+ with script '\l_@@_script_name_tl' and language '\l_@@_lang_name_tl'.
+ }
+\@@_msg_new:nnn {fontspec} {no-opticals}
+ {
+ '\l_fontspec_fontname_tl' doesn't appear to have an Optical Size axis.
+ }
+\@@_msg_new:nnn {fontspec} {language-not-exist}
+ {
+ Language '#1' not available
+ for font '\l_fontspec_fontname_tl'
+ with script '\l_@@_script_name_tl'.\\
+ 'Default' language used instead.
+ }
+\@@_msg_new:nnn {fontspec} {only-xetex-feature}
+ {
+ Ignored XeTeX only feature: '#1'.
+ }
+\@@_msg_new:nnn {fontspec} {only-luatex-feature}
+ {
+ Ignored LuaTeX only feature: '#1'.
+ }
+\@@_msg_new:nnn {fontspec} {no-mapping}
+ {
+ Input mapping not (yet?) supported in LuaTeX.
+ }
+\@@_msg_new:nnn {fontspec} {no-mapping-ligtex}
+ {
+ Input mapping not (yet?) supported in LuaTeX.\\
+ Use "Ligatures=TeX" instead of "Mapping=tex-text".
+ }
+\@@_msg_new:nnn {fontspec} {cm-default-obsolete}
+ {
+ The "cm-default" package option is obsolete.
+ }
+\@@_msg_new:nnn {fontspec} {fakebold-only-xetex}
+ {
+ The "FakeBold" and "AutoFakeBold" options are only available with XeLaTeX.\\
+ Option ignored.
+ }
+\@@_msg_new:nnn {fontspec} {font-index-needs-ttc}
+ {
+ The "FontIndex" feature is only supported by TTC (TrueType Collection) fonts.\\
+ Feature ignored.
+ }
+\@@_msg_new:nnn {fontspec} {feat-cannot-remove}
+ {
+ The "#1" feature cannot be deactivated. Request ignored.
+ }
+% \end{macrocode}
+%
+% \subsection{Info messages}
+%
+% \begin{macrocode}
+\@@_msg_new:nnn {fontspec} {defining-font}
+ {
+ Font family '\g_@@_nfss_family_tl' created for font '#2'
+ with options [\l_@@_all_features_clist].\\
+ \\
+ This font family consists of the following NFSS series/shapes:\\
+ \g_@@_defined_shapes_tl
+ }
+\@@_msg_new:nnn {fontspec} {no-font-shape}
+ {
+ Could not resolve font "#1" (it probably doesn't exist).
+ }
+\@@_msg_new:nnn {fontspec} {set-scale}
+ {
+ \l_fontspec_fontname_tl\space scale = \l_@@_scale_tl.
+ }
+\@@_msg_new:nnn {fontspec} {setup-math}
+ {
+ Adjusting the maths setup (use [no-math] to avoid this).
+ }
+\@@_msg_new:nnn {fontspec} {no-scripts}
+ {
+ Font "\l_fontspec_fontname_tl" does not contain any OpenType `Script' information.
+ }
+\@@_msg_new:nnn {fontspec} {opa-twice}
+ {
+ Opacity set twice, in both Colour and Opacity.\\
+ Using specification "Opacity=#1".
+ }
+\@@_msg_new:nnn {fontspec} {opa-twice-col}
+ {
+ Opacity set twice, in both Opacity and Colour.\\
+ Using an opacity specification in hex of "#1/FF".
+ }
+\@@_msg_new:nnn {fontspec} {bad-colour}
+ {
+ Bad colour declaration "#1".
+ Colour must be one of:\\
+ * a named xcolor colour\\
+ * a six-digit hex colour RRGGBB\\
+ * an eight-digit hex colour RRGGBBTT with opacity
+ }
+% \end{macrocode}
+%
+% Reset `space' behaviour:
+% \begin{macrocode}
+\char_set_catcode_ignore:n {32}
+% \end{macrocode}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,195 @@
+%%^^A%% fontspec-code-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%
+% \section{Opening code}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% \subsection{Package options}
+%
+% \begin{macrocode}
+\DeclareOption{cm-default}
+ {
+ \@@_warning:n {cm-default-obsolete}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption {math} { \bool_gset_true:N \g_@@_math_bool }
+\DeclareOption {no-math} { \bool_gset_false:N \g_@@_math_bool }
+\DeclareOption {config} { \bool_gset_true:N \g_@@_cfg_bool }
+\DeclareOption {no-config}{ \bool_gset_false:N \g_@@_cfg_bool }
+\DeclareOption {euenc} { \bool_gset_true:N \g_@@_euenc_bool }
+\DeclareOption {tuenc} { \bool_gset_false:N \g_@@_euenc_bool }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption {quiet}
+ {
+ \msg_redirect_module:nnn { fontspec } { warning } { info }
+ \msg_redirect_module:nnn { fontspec } { info } { none }
+ }
+\DeclareOption{silent}
+ {
+ \msg_redirect_module:nnn { fontspec } { warning } { none }
+ \msg_redirect_module:nnn { fontspec } { info } { none }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExecuteOptions{config,math,tuenc}
+\ProcessOptions*
+% \end{macrocode}
+%
+%
+%
+%
+% \subsection{Encodings}
+%
+% Soon to be the default, with a just-in-case check:
+% \begin{macrocode}
+\bool_if:NF \g_@@_euenc_bool
+ {
+ \file_if_exist:nTF {tuenc.def}
+ {
+ \cs_if_exist:cF {T at TU}
+ {
+ \@@_warning:n {tu-clash}
+ \DeclareFontEncoding{TU}{}{}
+ \DeclareFontSubstitution{TU}{lmr}{m}{n}
+ }
+ }
+ {
+ \@@_warning:n {tu-missing}
+ \bool_gset_true:N \g_@@_euenc_bool
+ }
+ }
+\bool_if:NTF \g_@@_euenc_bool
+ {
+%<XE> \tl_gset:Nn \g_fontspec_encoding_tl {EU1}
+%<LU> \tl_gset:Nn \g_fontspec_encoding_tl {EU2}
+ }
+ { \tl_gset:Nn \g_fontspec_encoding_tl { TU } }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_set:Nn \rmdefault {lmr}
+\tl_set:Nn \sfdefault {lmss}
+\tl_set:Nn \ttdefault {lmtt}
+\RequirePackage[\g_fontspec_encoding_tl]{fontenc}
+\tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode if needed
+% \end{macrocode}
+% To overcome the encoding changing the current font size, but only if a class has been loaded first:
+% \begin{macrocode}
+\tl_if_in:NnT \@filelist {.cls} { \normalsize }
+% \end{macrocode}
+% Dealing with a couple of the problems introduced by \pkg{babel}:
+% \begin{macrocode}
+\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
+\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
+\AtBeginDocument
+ {
+ \tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
+ \tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
+ }
+% \end{macrocode}
+% That latin encoding definition is repeated to suppress font warnings.
+% Something to do with \cmd\select at language\ ending up in the \texttt{.aux}
+% file which is read at the beginning of the document.
+%
+% \begin{macrocode}
+\bool_if:NT \g_@@_euenc_bool
+ {
+%<LU> \cs_set_eq:NN \fontspec_tmp: \XeTeXpicfile
+%<LU> \cs_set:Npn \XeTeXpicfile {}
+ \RequirePackage{xunicode}
+%<LU> \cs_set_eq:NN \XeTeXpicfile \fontspec_tmp:
+ }
+% \end{macrocode}
+%
+%
+% \subsection{Generic functions}
+%
+% \begin{macro}{\FontspecSetCheckBoolTrue}
+% \begin{macro}{\FontspecSetCheckBoolFalse}
+% These strange set functions are to simplify returning code from LuaTeX:
+% \begin{macrocode}
+\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l_@@_check_bool }
+\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l_@@_check_bool }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_keys_set_known:nnN}
+% \begin{macrocode}
+\cs_new:Nn \@@_keys_set_known:nnN
+ {
+%<debug> \typeout{:::: Keys~set:~{#1}~{#2} }
+ \keys_set_known:nnN {#1} {#2} #3
+%<debug> \typeout{:::: Leftover:~{#3} }
+ }
+\cs_generate_variant:Nn \@@_keys_set_known:nnN {nx}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_int_mult_truncate:Nn}
+% Missing in expl3, IMO.
+% \begin{macrocode}
+\cs_new:Nn \@@_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{\pkg{expl3} variants}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \int_set:Nn {Nv}
+\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_generate_variant:Nn \prop_put:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
+\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
+\cs_generate_variant:Nn \prop_get:NnNT {NxN}
+\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
+\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {x}
+\cs_generate_variant:Nn \tl_if_empty:nF {f}
+\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+% \end{macrocode}
+%
+%
+%
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,464 @@
+%%^^A%% fontspec-code-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{OpenType definitions code}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+%
+%
+% \begin{macro}{\@@_define_opentype_feature_group:n}
+% \begin{macrocode}
+\cs_new:Nn \@@_define_opentype_feature_group:n
+ {
+ \keys_define:nn {fontspec-opentype} { #1 .multichoice: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_define_opentype_feature:nnnnn}
+% \darg{Feature key}
+% \darg{Feature option val}
+% \darg{Check feature --- leave empty for no check}
+% \darg{Exact tag string to activate --- leave empty for disable only}
+% \darg{Tags to remove (clist)}
+% \begin{macrocode}
+\cs_new:Nn \@@_feat_prop_add:nn
+ {
+ \tl_if_empty:nF {#1}
+ {
+ \prop_if_in:NnF \g_@@_OT_features_prop {#1}
+ {
+ \prop_gput:Nnn \g_@@_OT_features_prop {#1} {#2}
+ }
+ }
+ }
+\cs_new:Nn \@@_define_opentype_feature:nnnnn
+ {
+ \@@_feat_prop_add:nn {#3} {#1\,=\,#2}
+ \tl_if_empty:nTF {#4}
+ {
+ \keys_define:nn {fontspec-opentype}
+ {
+ #1/#2 .code:n =
+ { \@@_remove_clashing_featstr:n {#5} }
+ }
+ }
+ {
+ \keys_define:nn {fontspec-opentype}
+ {
+ #1/#2 .code:n =
+ {
+%<debug> \typeout{::::::::fontspec-opentype~#1/#2~=~#3/#4/#5}
+ \@@_make_OT_feature:nnn {#3} {#4} {#5}
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_define_opentype_onoffreset:nnnnn}
+% \darg{Feature key}
+% \darg{Feature option val}
+% \darg{Check feature}
+% \darg{Tag prefix to activate: \texttt{+\#4} = on, \texttt{-\#4} = off.}
+% \darg{Tags to remove in the on case (clist)}
+% \begin{macrocode}
+\cs_new:Nn \@@_feat_off:n {#1Off}
+\cs_new:Nn \@@_feat_reset:n {#1Reset}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_define_opentype_onoffreset:nnnnn
+ {
+ \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} {#2} {#3} {+#4} {#5}
+ \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} { \@@_feat_off:n {#2} } {#3} {-#4} {}
+ \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} { \@@_feat_reset:n {#2} } {} {} {+#4,-#4}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_define_opentype_onreset:nnnnn}
+% \darg{Feature key}
+% \darg{Feature option val}
+% \darg{Check feature}
+% \darg{Exact tag string to activate}
+% \darg{Tags to remove (clist)}
+% \begin{macrocode}
+\cs_new:Nn \@@_define_opentype_onreset:nnnnn
+ {
+ \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} {#2} {#3} {#4} {#5}
+ \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} { \@@_feat_reset:n {#2} } {} {} {#4}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Adding features when loading fonts}
+%
+% When remove clashing features,
+% \begin{enumerate}
+% \item remove the feature being added (to avoid duplicates);
+% \item remove the inverse of the feature (to avoid cancellation);
+% \item finally remove all clashing features.
+% \end{enumerate}
+% \begin{macrocode}
+\cs_new:Nn \@@_make_OT_feature:nnn
+ {
+%<debug> \typeout{:: @@_make_OT_feature:nnn \exp_not:n { {#1}{#2}{#3} } }
+
+ \bool_set_true:N \l_@@_proceed_bool
+ \bool_set_true:N \l_@@_check_feat_bool
+
+ \tl_if_empty:nT {#1} { \bool_set_false:N \l_@@_check_feat_bool }
+ \bool_if:NT \l_@@_check_feat_bool
+ {
+ \@@_check_ot_feat:NnF \l_fontspec_font {#1}
+ {
+ \@@_warning:nx {icu-feature-not-exist-in-font} {#1}
+ \bool_set_false:N \l_@@_proceed_bool
+ }
+ }
+
+ \bool_if:NT \l_@@_proceed_bool
+ {
+ \exp_args:Nx \@@_remove_clashing_featstr:n
+ { #2 , \@@_swap_plus_minus:n {#2} , #3 }
+
+ \@@_update_featstr:n {#2}
+ }
+ }
+\cs_generate_variant:Nn \@@_make_OT_feature:nnn {xxx}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_swap_plus_minus:n { \@@_swap_plus_minus_aux:Nq #1 \q_nil }
+\cs_new:Npn \@@_swap_plus_minus_aux:Nq #1#2 \q_nil
+ { \str_case:nn {#1} { {+} {-#2} {-} {+#2} } }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_check_script:NnTF}
+% This macro takes an OpenType script tag and checks if it exists in the current
+% 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}
+ {
+ \bool_if:NTF \l_@@_never_check_bool
+ { \prg_return_true: }
+%<*XE>
+ {
+ \@@_iv_str_to_num:Nx \l_@@_strnum_int {#2}
+ \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts #1 }
+ \int_zero:N \l_tmpa_int
+ \bool_set_false:N \l__fontspec_check_bool
+ \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
+ {
+ \ifnum \XeTeXOTscripttag #1 \l_tmpa_int = \l_@@_strnum_int
+ \bool_set_true:N \l__fontspec_check_bool
+ \int_set:Nn \l_tmpa_int {\l_tmpb_int}
+ \else
+ \int_incr:N \l_tmpa_int
+ \fi
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
+%</XE>
+%<*LU>
+ {
+ \@@_ot_validate_tag:x {#2}
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l_@@_tmp_tl {\curr at fontshape/\f at size} }
+ { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
+ \directlua{fontspec.check_ot_script("\l_@@_tmp_tl", "#2")}
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
+%</LU>
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_check_lang:NnnTF}
+% \begin{macro}{\@@_check_lang:NnTF}
+% This macro takes an OpenType language tag and checks if it exists in the current
+% font/script. \cmd\l_@@_language_int\ is used to store
+% the number corresponding to the language tag string.
+% The script used is whatever's held in \cmd\l_@@_script_int. By default, that's the
+% number corresponding to `|latn|'.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_check_lang:Nn {TF}
+ {
+ \@@_check_lang:NnnTF #1 {#2} {\l_fontspec_script_tl} {\prg_return_true:} {\prg_return_false:}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_check_lang:Nnn {TF}
+ {
+ \bool_if:NTF \l_@@_never_check_bool
+ { \prg_return_true: }
+%<*XE>
+ {
+ \@@_iv_str_to_num:Nx \l_@@_strnum_int {#2}
+ \@@_iv_str_to_num:Nx \l_@@_script_int {#3}
+ \int_set:Nn \l_tmpb_int
+ { \XeTeXOTcountlanguages #1 \l_@@_script_int }
+ \int_zero:N \l_tmpa_int
+ \bool_set_false:N \l__fontspec_check_bool
+ \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
+ {
+ \ifnum\XeTeXOTlanguagetag #1 \l_@@_script_int \l_tmpa_int = \l_@@_strnum_int
+ \bool_set_true:N \l__fontspec_check_bool
+ \int_set:Nn \l_tmpa_int {\l_tmpb_int}
+ \else
+ \int_incr:N \l_tmpa_int
+ \fi
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
+%</XE>
+%<*LU>
+ {
+ \@@_ot_validate_tag:x {#2}
+ \@@_ot_validate_tag:x {#3}
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l_@@_tmp_tl {\curr at fontshape/\f at size} }
+ { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
+ \directlua
+ {
+ fontspec.check_ot_lang( "\l_@@_tmp_tl", "#2", "#3" )
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
+%</LU>
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_check_ot_feat:NnTF}
+% \begin{macro}{\@@_check_ot_feat:NnnnTF}
+% This macro takes an OpenType feature tag and checks if it exists in the current
+% font/script/language.
+% \cmd\l_@@_strnum_int\ is used to store the number corresponding to the feature tag string.
+% The script used is whatever's held in \cmd\l_@@_script_int. By default, that's the
+% number corresponding to `|latn|'. The language used is \cmd\l_@@_language_int,
+% by default |0|, the `default language'.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_check_ot_feat:Nn {TF,F}
+ {
+ \@@_check_ot_feat:NnnnTF #1 {#2} {\l_fontspec_lang_tl} {\l_fontspec_script_tl}
+ {\prg_return_true:} {\prg_return_false:}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_check_ot_feat:Nnnn {TF,F}
+ {
+ \bool_if:NTF \l_@@_never_check_bool
+ { \prg_return_true: }
+%<*XE>
+ {
+%<debug>\typeout{::~ fontspec_check_ot_feat:nnn~ {#2}{#3}{#4}}
+ \@@_iv_str_to_num:Nx \l_@@_strnum_int {#2}
+ \@@_iv_str_to_num:Nx \l_@@_language_int {#3}
+ \@@_iv_str_to_num:Nx \l_@@_script_int {#4}
+ \int_set:Nn \l_tmpb_int
+ {
+ \XeTeXOTcountfeatures #1
+ \l_@@_script_int
+ \l_@@_language_int
+ }
+ \int_zero:N \l_tmpa_int
+ \bool_set_false:N \l_@@_check_bool
+ \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
+ {
+ \ifnum\XeTeXOTfeaturetag #1 \l_@@_script_int \l_@@_language_int
+ \l_tmpa_int =\l_@@_strnum_int
+ \bool_set_true:N \l_@@_check_bool
+ \int_set:Nn \l_tmpa_int {\l_tmpb_int}
+ \else
+ \int_incr:N \l_tmpa_int
+ \fi
+ }
+ \bool_if:NTF \l_@@_check_bool \prg_return_true: \prg_return_false:
+ }
+%</XE>
+%<*LU>
+ {
+%<debug>\typeout{::~ fontspec_check_ot_feat:n~ {#1}}
+ \@@_ot_validate_tag:x {#2}
+ \@@_ot_validate_tag:x {#3}
+ \@@_ot_validate_tag:x {#4}
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l_@@_tmp_tl {\curr at fontshape/\f at size} }
+ { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
+ \directlua
+ {
+ fontspec.check_ot_feat("\l_@@_tmp_tl", "#2", "#3", "#4")
+ }
+ \bool_if:NTF \l_@@_check_bool \prg_return_true: \prg_return_false:
+ }
+%</LU>
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{OpenType feature information}
+%
+% \begin{macrocode}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {aalt}{Access~All~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {abvf}{Above-base~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {abvm}{Above-base~Mark~Positioning}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {abvs}{Above-base~Substitutions}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {afrc}{Alternative~Fractions}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {akhn}{Akhands}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {blwf}{Below-base~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {blwm}{Below-base~Mark~Positioning}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {blws}{Below-base~Substitutions}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {calt}{Contextual~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {case}{Case-Sensitive~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ccmp}{Glyph~Composition~/~Decomposition}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cfar}{Conjunct~Form~After~Ro}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cjct}{Conjunct~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {clig}{Contextual~Ligatures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cpct}{Centered~CJK~Punctuation}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cpsp}{Capital~Spacing}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cswh}{Contextual~Swash}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {curs}{Cursive~Positioning}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cvNN}{Character~Variant~$N$}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {c2pc}{Petite~Capitals~From~Capitals}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {c2sc}{Small~Capitals~From~Capitals}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {dist}{Distances}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {dlig}{Discretionary~Ligatures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {dnom}{Denominators}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {dtls}{Dotless~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {expt}{Expert~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {falt}{Final~Glyph~on~Line~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {fin2}{Terminal~Forms~\#2}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {fin3}{Terminal~Forms~\#3}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {fina}{Terminal~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {flac}{Flattened~accent~forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {frac}{Fractions}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {fwid}{Full~Widths}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {half}{Half~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {haln}{Halant~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {halt}{Alternate~Half~Widths}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hist}{Historical~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hkna}{Horizontal~Kana~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hlig}{Historical~Ligatures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hngl}{Hangul}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hojo}{Hojo~Kanji~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hwid}{Half~Widths}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {init}{Initial~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {isol}{Isolated~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ital}{Italics}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jalt}{Justification~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jp78}{JIS78~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jp83}{JIS83~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jp90}{JIS90~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jp04}{JIS2004~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {kern}{Kerning}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {lfbd}{Left~Bounds}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {liga}{Standard~Ligatures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ljmo}{Leading~Jamo~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {lnum}{Lining~Figures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {locl}{Localized~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ltra}{Left-to-right~alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ltrm}{Left-to-right~mirrored~forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {mark}{Mark~Positioning}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {med2}{Medial~Forms~\#2}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {medi}{Medial~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {mgrk}{Mathematical~Greek}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {mkmk}{Mark~to~Mark~Positioning}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {mset}{Mark~Positioning~via~Substitution}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {nalt}{Alternate~Annotation~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {nlck}{NLC~Kanji~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {nukt}{Nukta~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {numr}{Numerators}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {onum}{Oldstyle~Figures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {opbd}{Optical~Bounds}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ordn}{Ordinals}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ornm}{Ornaments}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {palt}{Proportional~Alternate~Widths}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pcap}{Petite~Capitals}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pkna}{Proportional~Kana}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pnum}{Proportional~Figures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pref}{Pre-Base~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pres}{Pre-base~Substitutions}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pstf}{Post-base~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {psts}{Post-base~Substitutions}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pwid}{Proportional~Widths}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {qwid}{Quarter~Widths}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rand}{Randomize}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rclt}{Required~Contextual~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rkrf}{Rakar~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rlig}{Required~Ligatures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rphf}{Reph~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rtbd}{Right~Bounds}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rtla}{Right-to-left~alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rtlm}{Right-to-left~mirrored~forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ruby}{Ruby~Notation~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rvrn}{Required~Variation~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {salt}{Stylistic~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {sinf}{Scientific~Inferiors}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {size}{Optical~size}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {smcp}{Small~Capitals}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {smpl}{Simplified~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ssNN}{Stylistic~Set~$N$}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ssty}{Math~script~style~alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {stch}{Stretching~Glyph~Decomposition}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {subs}{Subscript}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {sups}{Superscript}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {swsh}{Swash}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {titl}{Titling}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {tjmo}{Trailing~Jamo~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {tnam}{Traditional~Name~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {tnum}{Tabular~Figures}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {trad}{Traditional~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {twid}{Third~Widths}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {unic}{Unicase}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {valt}{Alternate~Vertical~Metrics}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vatu}{Vattu~Variants}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vert}{Vertical~Writing}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vhal}{Alternate~Vertical~Half~Metrics}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vjmo}{Vowel~Jamo~Forms}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vkna}{Vertical~Kana~Alternates}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vkrn}{Vertical~Kerning}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vpal}{Proportional~Alternate~Vertical~Metrics}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vrt2}{Vertical~Alternates~and~Rotation}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
+\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {zero}{Slashed~Zero}
+% \end{macrocode}
+% TODO: move the above elsewhere!!
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,209 @@
+%%^^A%% fontspec-code-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Patching code}
+%
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+%
+% \subsection{\cmd\-}
+%
+% \begin{macro}{\-}
+% This macro is courtesy of Frank Mittelbach and the \LaTeXe\ source code.
+% \begin{macrocode}
+\DeclareRobustCommand{\-}
+ {
+ \discretionary
+ {
+ \char\ifnum\hyphenchar\font<\z@
+ \xlx at defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}
+ }
+\def\xlx at defaulthyphenchar{`\-}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Verbatims}
+%
+% Many thanks to Apostolos Syropoulos for discovering this problem and writing the redefinion of \LaTeX's |verbatim| environment and \cs{verb*} command.
+%
+% \begin{macro}{\fontspec_visible_space:}
+% Print \unichar{2423}{Open box}, which is used to visibly display a space character.
+% \begin{macrocode}
+\cs_new:Nn \fontspec_visible_space:
+ {
+ \@@_primitive_font_glyph_if_exist:NnTF \font {"2423}
+ { \char"2423\scan_stop: }
+ { \fontspec_visible_space_fallback: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fontspec_visible_space_fallback:}
+% If the current font doesn't have \unichar{2423}{Open box}, use Latin Modern Mono instead.
+% \begin{macrocode}
+\cs_new:Nn \fontspec_visible_space_fallback:
+ {
+ {
+ \usefont{\g_fontspec_encoding_tl}{lmtt}{\f at series}{\f at shape}
+ \textvisiblespace
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fontspec_print_visible_spaces:}
+% Helper macro to turn spaces (\verb|^^20|) active and print visible space instead.
+% \begin{macrocode}
+\group_begin:
+\char_set_catcode_active:n{"20}%
+\cs_gset:Npn\fontspec_print_visible_spaces:{%
+\char_set_catcode_active:n{"20}%
+\cs_set_eq:NN^^20\fontspec_visible_space:%
+}%
+\group_end:
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\verb}
+% \begin{macro}{\verb*}
+% Redefine \cmd\verb\ to use \cmd\fontspec_print_visible_spaces:.
+% \begin{macrocode}
+\def\verb
+ {
+ \relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \verb at eol@error \let\do\@makeother \dospecials
+ \verbatim at font\@noligs
+ \@ifstar\@@sverb\@verb
+ }
+\def\@@sverb{\fontspec_print_visible_spaces:\@sverb}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% It's better to put small things into \cmd\AtBeginDocument, so here we go:
+% \begin{macrocode}
+\AtBeginDocument
+ {
+ \fontspec_patch_verbatim:
+ \fontspec_patch_moreverb:
+ \fontspec_patch_fancyvrb:
+ \fontspec_patch_listings:
+ }
+% \end{macrocode}
+%
+% \begin{environment}{verbatim*}
+% With the \pkg{verbatim} package.
+% \begin{macrocode}
+\cs_set:Npn \fontspec_patch_verbatim:
+ {
+ \@ifpackageloaded{verbatim}
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim at start
+ }
+ }
+% \end{macrocode}
+% This is for vanilla \LaTeX.
+% \begin{macrocode}
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
+ }
+ }
+ }
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{listingcont*}
+% This is for \pkg{moreverb}.
+% The main |listing*| environment inherits this definition.
+% \begin{macrocode}
+\cs_set:Npn \fontspec_patch_moreverb:
+ {
+ \@ifpackageloaded{moreverb}
+ {
+ \cs_set:cpn {listingcont*}
+ {
+ \cs_set:Npn \verbatim at processline
+ {
+ \thelisting at line \global\advance\listing at line1\relax
+ \the\verbatim at line\par
+ }
+ \@verbatim \fontspec_print_visible_spaces: \verbatim at start
+ }
+ }{}
+ }
+% \end{macrocode}
+% \end{environment}
+%
+% \pkg{listings} and \pkg{fancvrb} make things nice and easy:
+% \begin{macrocode}
+\cs_set:Npn \fontspec_patch_fancyvrb:
+ {
+ \@ifpackageloaded{fancyvrb}
+ {
+ \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
+ }{}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set:Npn \fontspec_patch_listings:
+ {
+ \@ifpackageloaded{listings}
+ {
+ \cs_set_eq:NN \lst at visiblespace \fontspec_visible_space:
+ }{}
+ }
+% \end{macrocode}
+%
+% \subsection{\cs{oldstylenums}}
+%
+%
+% \begin{macro}{\oldstylenums}
+% \begin{macro}{\liningnums}
+% This command obviously needs a redefinition.
+% And we may as well provide the reverse command.
+% \begin{macrocode}
+\RenewDocumentCommand \oldstylenums {m}
+ {
+ { \addfontfeature{Numbers=OldStyle} #1 }
+ }
+\NewDocumentCommand \liningnums {m}
+ {
+ { \addfontfeature{Numbers=Lining} #1 }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,183 @@
+%%^^A%% fontspec-code-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Font script definitions}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% \begin{macrocode}
+\newfontscript{Adlam}{adlm}
+\newfontscript{Ahom}{ahom}
+\newfontscript{Anatolian~Hieroglyphs}{hluw}
+\newfontscript{Arabic}{arab}
+\newfontscript{Armenian}{armn}
+\newfontscript{Avestan}{avst}
+\newfontscript{Balinese}{bali}
+\newfontscript{Bamum}{bamu}
+\newfontscript{Bassa~Vah}{bass}
+\newfontscript{Batak}{batk}
+\newfontscript{Bengali}{bng2,beng}
+\newfontscript{Bhaiksuki}{bhks}
+\newfontscript{Bopomofo}{bopo}
+\newfontscript{Brahmi}{brah}
+\newfontscript{Braille}{brai}
+\newfontscript{Buginese}{bugi}
+\newfontscript{Buhid}{buhd}
+\newfontscript{Byzantine~Music}{byzm}
+\newfontscript{Canadian~Syllabics}{cans}
+\newfontscript{Carian}{cari}
+\newfontscript{Caucasian~Albanian}{aghb}
+\newfontscript{Chakma}{cakm}
+\newfontscript{Cham}{cham}
+\newfontscript{Cherokee}{cher}
+\newfontscript{CJK~Ideographic}{hani}
+\newfontscript{Coptic}{copt}
+\newfontscript{Cypriot~Syllabary}{cprt}
+\newfontscript{Cyrillic}{cyrl}
+\newfontscript{Default}{DFLT}
+\newfontscript{Deseret}{dsrt}
+\newfontscript{Devanagari}{dev2,deva}
+\newfontscript{Duployan}{dupl}
+\newfontscript{Egyptian~Hieroglyphs}{egyp}
+\newfontscript{Elbasan}{elba}
+\newfontscript{Ethiopic}{ethi}
+\newfontscript{Georgian}{geor}
+\newfontscript{Glagolitic}{glag}
+\newfontscript{Gothic}{goth}
+\newfontscript{Grantha}{gran}
+\newfontscript{Greek}{grek}
+\newfontscript{Gujarati}{gjr2,gujr}
+\newfontscript{Gurmukhi}{gur2,guru}
+\newfontscript{Hangul~Jamo}{jamo}
+\newfontscript{Hangul}{hang}
+\newfontscript{Hanunoo}{hano}
+\newfontscript{Hatran}{hatr}
+\newfontscript{Hebrew}{hebr}
+\newfontscript{Hiragana~and~Katakana}{kana}
+\newfontscript{Imperial~Aramaic}{armi}
+\newfontscript{Inscriptional~Pahlavi}{phli}
+\newfontscript{Inscriptional~Parthian}{prti}
+\newfontscript{Javanese}{java}
+\newfontscript{Kaithi}{kthi}
+\newfontscript{Kannada}{knd2,knda}
+\newfontscript{Kayah~Li}{kali}
+\newfontscript{Kharosthi}{khar}
+\newfontscript{Khmer}{khmr}
+\newfontscript{Khojki}{khoj}
+\newfontscript{Khudawadi}{sind}
+\newfontscript{Lao}{lao~}
+\newfontscript{Latin}{latn}
+\newfontscript{Lepcha}{lepc}
+\newfontscript{Limbu}{limb}
+\newfontscript{Linear~A}{lina}
+\newfontscript{Linear~B}{linb}
+\newfontscript{Lisu}{lisu}
+\newfontscript{Lycian}{lyci}
+\newfontscript{Lydian}{lydi}
+\newfontscript{Mahajani}{mahj}
+\newfontscript{Malayalam}{mlm2,mlym}
+\newfontscript{Mandaic}{mand}
+\newfontscript{Manichaean}{mani}
+\newfontscript{Marchen}{marc}
+\newfontscript{Math}{math}
+\newfontscript{Meitei~Mayek}{mtei}
+\newfontscript{Mende~Kikakui}{mend}
+\newfontscript{Meroitic~Cursive}{merc}
+\newfontscript{Meroitic~Hieroglyphs}{mero}
+\newfontscript{Miao}{plrd}
+\newfontscript{Modi}{modi}
+\newfontscript{Mongolian}{mong}
+\newfontscript{Mro}{mroo}
+\newfontscript{Multani}{mult}
+\newfontscript{Musical~Symbols}{musc}
+\newfontscript{Myanmar}{mym2,mymr}
+\newfontscript{N'Ko}{nko~}
+\newfontscript{Nabataean}{nbat}
+\newfontscript{Newa}{newa}
+\newfontscript{Odia}{ory2,orya}
+\newfontscript{Ogham}{ogam}
+\newfontscript{Ol~Chiki}{olck}
+\newfontscript{Old~Italic}{ital}
+\newfontscript{Old~Hungarian}{hung}
+\newfontscript{Old~North~Arabian}{narb}
+\newfontscript{Old~Permic}{perm}
+\newfontscript{Old~Persian~Cuneiform}{xpeo}
+\newfontscript{Old~South~Arabian}{sarb}
+\newfontscript{Old~Turkic}{orkh}
+\newfontscript{Osage}{osge}
+\newfontscript{Osmanya}{osma}
+\newfontscript{Pahawh~Hmong}{hmng}
+\newfontscript{Palmyrene}{palm}
+\newfontscript{Pau~Cin~Hau}{pauc}
+\newfontscript{Phags-pa}{phag}
+\newfontscript{Phoenician}{phnx}
+\newfontscript{Psalter~Pahlavi}{phlp}
+\newfontscript{Rejang}{rjng}
+\newfontscript{Runic}{runr}
+\newfontscript{Samaritan}{samr}
+\newfontscript{Saurashtra}{saur}
+\newfontscript{Sharada}{shrd}
+\newfontscript{Shavian}{shaw}
+\newfontscript{Siddham}{sidd}
+\newfontscript{Sign~Writing}{sgnw}
+\newfontscript{Sinhala}{sinh}
+\newfontscript{Sora~Sompeng}{sora}
+\newfontscript{Sumero-Akkadian~Cuneiform}{xsux}
+\newfontscript{Sundanese}{sund}
+\newfontscript{Syloti~Nagri}{sylo}
+\newfontscript{Syriac}{syrc}
+\newfontscript{Tagalog}{tglg}
+\newfontscript{Tagbanwa}{tagb}
+\newfontscript{Tai~Le}{tale}
+\newfontscript{Tai~Lu}{talu}
+\newfontscript{Tai~Tham}{lana}
+\newfontscript{Tai~Viet}{tavt}
+\newfontscript{Takri}{takr}
+\newfontscript{Tamil}{tml2,taml}
+\newfontscript{Tangut}{tang}
+\newfontscript{Telugu}{tel2,telu}
+\newfontscript{Thaana}{thaa}
+\newfontscript{Thai}{thai}
+\newfontscript{Tibetan}{tibt}
+\newfontscript{Tifinagh}{tfng}
+\newfontscript{Tirhuta}{tirh}
+\newfontscript{Ugaritic~Cuneiform}{ugar}
+\newfontscript{Vai}{vai~}
+\newfontscript{Warang~Citi}{wara}
+\newfontscript{Yi}{yi~~}
+% \end{macrocode}
+% For convenience or backwards compatibility:
+% \begin{macrocode}
+\newfontscript{CJK}{hani}
+\newfontscript{Kana}{kana}
+\newfontscript{Maths}{math}
+\newfontscript{N'ko}{nko~}
+\newfontscript{Oriya}{ory2,orya}
+% \end{macrocode}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,509 @@
+%%^^A%% fontspec-code-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{User command internals}
+% \label{sec:codeinternal}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+%
+% \subsection{Font selection}
+%
+% \begin{macro}{\@@_main_fontspec:nn}
+% This is the main command of the package that
+% selects fonts with various features. It takes two arguments: the
+% font name and the optional requested features of that
+% font.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_fontspec:nn
+ {
+ \fontspec_set_family:Nnn \f at family {#1} {#2}
+ \fontencoding { \g_@@_nfss_enc_tl }
+ \selectfont
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setmainfont}
+% The following three macros perform equivalent operations setting
+% the default font for a particular family: `roman', sans serif, or typewriter
+% (monospaced).
+%
+% They end with |\normalfont| so that if they're
+% used in the document, the change registers immediately.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_setmainfont:nn
+ {
+ \fontspec_set_family:Nnn \l_@@_rmfamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \rmdefault \l_@@_rmfamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \rmfamily }
+ {
+ \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l_@@_rmfamily_family_tl }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq:eeT {\familydefault} {\rmdefault}
+ { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
+ \@@_setmainfont_hook:nn {#1} {#2}
+ \normalfont
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setsansfont}
+% Same as above.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_setsansfont:nn
+ {
+ \fontspec_set_family:Nnn \l_@@_sffamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \sfdefault \l_@@_sffamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \sffamily }
+ {
+ \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l_@@_sffamily_family_tl }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq:eeT {\familydefault} {\sfdefault}
+ { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
+ \@@_setsansfont_hook:nn {#1} {#2}
+ \normalfont
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setmonofont}
+% Same as above.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_setmonofont:nn
+ {
+ \fontspec_set_family:Nnn \l_@@_ttfamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \ttdefault \l_@@_ttfamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \ttfamily }
+ {
+ \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l_@@_ttfamily_family_tl }
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq:eeT {\familydefault} {\ttdefault}
+ { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
+ \@@_setmonofont_hook:nn {#1} {#2}
+ \normalfont
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\setmathrm}
+% These commands are analogous to \cmd\setmainfont\ and others,
+% but for selecting the font used for \cmd\mathrm, \etc. They
+% can only be used in the preamble of the
+% document. \cmd\setboldmathrm\ is used for specifying which
+% fonts should be used in \cmd\boldmath.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_setmathrm:nn
+ {
+%<XE> \fontspec_set_family:Nnn \g_@@_mathrm_tl {#1} {#2}
+%<LU> \fontspec_set_family:Nnn \g_@@_mathrm_tl {Renderer=Basic,#1} {#2}
+ \@@_setmathrm_hook:nn {#1} {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setboldmathrm}
+% \begin{macrocode}
+\cs_new:Nn \@@_main_setboldmathrm:nn
+ {
+%<XE> \fontspec_set_family:Nnn \g_@@_bfmathrm_tl {#1} {#2}
+%<LU> \fontspec_set_family:Nnn \g_@@_bfmathrm_tl {Renderer=Basic,#1} {#2}
+ \@@_setboldmathrm_hook:nn {#1} {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setmathsf}
+% \begin{macrocode}
+\cs_new:Nn \@@_main_setmathsf:nn
+ {
+%<XE> \fontspec_set_family:Nnn \g_@@_mathsf_tl {#1} {#2}
+%<LU> \fontspec_set_family:Nnn \g_@@_mathsf_tl {Renderer=Basic,#1} {#2}
+ \@@_setmathsf_hook:nn {#1} {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setmathtt}
+% \begin{macrocode}
+\cs_new:Nn \@@_main_setmathtt:nn
+ {
+%<XE> \fontspec_set_family:Nnn \g_@@_mathtt_tl {#1} {#2}
+%<LU> \fontspec_set_family:Nnn \g_@@_mathtt_tl {Renderer=Basic,#1} {#2}
+ \@@_setmathtt_hook:nn {#1} {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% Hooks:
+% \begin{macrocode}
+\cs_set_eq:NN \@@_setmainfont_hook:nn \use_none:nn
+\cs_set_eq:NN \@@_setsansfont_hook:nn \use_none:nn
+\cs_set_eq:NN \@@_setmonofont_hook:nn \use_none:nn
+\cs_set_eq:NN \@@_setmathrm_hook:nn \use_none:nn
+\cs_set_eq:NN \@@_setmathsf_hook:nn \use_none:nn
+\cs_set_eq:NN \@@_setmathtt_hook:nn \use_none:nn
+\cs_set_eq:NN \@@_setboldmathrm_hook:nn \use_none:nn
+% \end{macrocode}
+%
+% Hmm, this isn't necessary with \pkg{unicode-math}; oh well:
+% \begin{macrocode}
+\@onlypreamble\setmathrm
+\@onlypreamble\setboldmathrm
+\@onlypreamble\setmathsf
+\@onlypreamble\setmathtt
+% \end{macrocode}
+%
+% If the commands above are not executed, then \cmd\rmdefault\ (\etc)
+% will be used.
+% \begin{macrocode}
+\tl_gset:Nn \g_@@_mathrm_tl {\rmdefault}
+\tl_gset:Nn \g_@@_mathsf_tl {\sfdefault}
+\tl_gset:Nn \g_@@_mathtt_tl {\ttdefault}
+% \end{macrocode}
+%
+% \begin{macro}{\@@_main_newfontfamily:nnnN}
+% The inner fontspec workings define a font family, which is then used in a typical
+% NFSS \cmd\fontfamily\ declaration, saved in the macro name specified.
+% The fourth argument determines which xparse function to set the macro with (new/renew/etc).
+% \begin{macrocode}
+\cs_new:Nn \@@_main_newfontfamily:nnnN
+ {
+ \fontspec_set_family:cnn { l_@@_ \cs_to_str:N #1 _family_tl } {#2} {#3}
+ \use:x
+ {
+ \exp_not:N #4 \exp_not:N #1 {}
+ {
+ \exp_not:N \fontfamily { \use:c { l_@@_ \cs_to_str:N #1 _family_tl } }
+ \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
+ \exp_not:N \selectfont
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_main_newfontface:nnn}
+% \cmd\newfontface\ uses the fact that if the argument to \feat{BoldFont}, etc., is empty (\ie, |BoldFont={}|), then no bold font is searched for.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_newfontface:nnn
+ {
+ \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Font feature selection}
+%
+% \begin{macro}{\@@_set_default_features:nn}
+% \begin{macrocode}
+\cs_new:Nn \@@_set_default_features:nn
+ {
+ \IfBooleanTF {#1} \clist_gput_right:Nn \clist_gset:Nn
+ \g_@@_default_fontopts_clist {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_font_default_features:nnn}
+% The optional argument |#2| specifies font identifier(s).
+% Branch for either (a)~single token input such as \verb|\rmdefault|, or (b)~otherwise assume its a fontname.
+% In that case, strip spaces and file extensions and lower-case to ensure consistency.
+% \begin{macrocode}
+\cs_new:Nn \@@_set_font_default_features:nnn
+ {
+%<debug> \typeout{\unexpanded{_set_font_default_features:nnn:{#1}{#2}{#3}}}
+ \clist_map_inline:nn {#2}
+ {
+ \tl_if_single:nTF {##1}
+ { \tl_set:No \l_@@_tmp_tl { \cs:w l_@@_ \cs_to_str:N ##1 _family_tl\cs_end: } }
+ { \@@_sanitise_fontname:Nn \l_@@_tmp_tl {##1} }
+
+ \IfBooleanTF {#1}
+ {
+ \prop_get:NVNF \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
+ { \tl_clear:N \l_@@_tmpb_tl }
+ \tl_put_right:Nn \l_@@_tmpb_tl {#3,}
+ \prop_gput:NVV \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
+ }
+ {
+ \tl_if_empty:nTF {#3}
+ { \prop_gremove:NV \g_@@_fontopts_prop \l_@@_tmp_tl }
+ { \prop_gput:NVn \g_@@_fontopts_prop \l_@@_tmp_tl {#3,} }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\addfontfeatures}
+% In order to be able to extend the feature selection of
+% a given font, two things need to be known: the currently selected
+% features, and the currently selected font. Every time a font
+% family is created, this information is saved inside a control
+% sequence with the name of the font family itself.
+%
+% This macro extracts this information, then appends the requested
+% font features to add to the already existing ones, and calls the
+% font again with the top level \cs{fontspec} command.
+%
+% The default options are \emph{not} applied (which is why
+% \cs{g_fontspec_default_fontopts_tl} is emptied inside the group; this is allowed
+% as \cmd\l_fontspec_family_tl\ is globally defined in \cmd\@@_select_font_family:nn), so this
+% means that the only added features to the font are strictly those
+% specified by this command.
+%
+% \cs{addfontfeature} is defined as an alias, as I found that I
+% often typed this instead when adding only a single font feature.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_addfontfeatures:n
+ {
+%<debug> \typeout{^^J::::::::::::::::::::::::::::::::::^^J: addfontfeatures}
+ \fontspec_if_fontspec_font:TF
+ {
+ \group_begin:
+ \keys_set_known:nnN {fontspec-addfeatures} {#1} \l_@@_tmp_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {options} \l_@@_options_tl
+ \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {fontname} \l_@@_fontname_tl
+ \bool_set_true:N \l_@@_disable_defaults_bool
+%<debug> \typeout{ \@@_select_font_family:nn { \l_@@_options_tl , #1 } {\l_@@_fontname_tl} }
+ \use:x
+ {
+ \@@_select_font_family:nn
+ { \l_@@_options_tl , #1 } {\l_@@_fontname_tl}
+ }
+ \group_end:
+ \fontfamily \g_@@_nfss_family_tl \selectfont
+ }
+ {
+ \@@_warning:nx {addfontfeatures-ignored} {#1}
+ }
+ \ignorespaces
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Defining new font features}
+%
+% \begin{macro}{\newfontfeature}
+% \cs{newfontfeature} takes two arguments: the name of the feature
+% tag by which to reference it, and the string that is used to
+% select the font feature.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_newfontfeature:nn
+ {
+ \keys_define:nn { fontspec }
+ {
+ #1 .code:n = { \@@_update_featstr:n {#2} }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\newAATfeature}
+% This command assigns a new AAT feature by its code (|#2|,|#3|) to a new name (|#1|).
+% Better than \cmd\newfontfeature\ because it checks if the feature exists in the
+% font it's being used for.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_newAATfeature:nnnn
+ {
+ \keys_if_exist:nnF { fontspec } {#1}
+ { \@@_define_aat_feature_group:n {#1} }
+
+ \keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
+ { \@@_warning:nxx {feature-option-overwrite} {#1} {#2} }
+
+ \@@_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newopentypefeature}
+% This command assigns a new OpenType feature by its abbreviation (|#2|) to a new name (|#1|).
+% Better than \cmd\newfontfeature\ because it checks if the feature exists in the
+% font it's being used for.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_newopentypefeature:nnn
+ {
+ \keys_if_exist:nnF { fontspec / options } {#1}
+ { \@@_define_opentype_feature_group:n {#1} }
+
+ \keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
+ { \@@_warning:nxx {feature-option-overwrite} {#1} {#2} }
+
+ \exp_args:Nnnx \@@_define_opentype_feature:nnnnn
+ {#1} {#2} { \@@_strip_plus_minus:n {#3} } {#3} {}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Nn \@@_strip_plus_minus:n { \@@_strip_plus_minus_aux:Nq #1 \q_nil }
+\cs_new:Npn \@@_strip_plus_minus_aux:Nq #1#2 \q_nil
+ {
+ \str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\aliasfontfeature}
+% User commands for renaming font features and font feature options.
+% \begin{macrocode}
+\cs_new:Nn \@@_main_aliasfontfeature:nn
+ {
+%<debug> \typeout{::::::::::::::::::::^^J:: aliasfontfeature{#1}{#2}}
+ \bool_set_false:N \l_@@_alias_bool
+
+ \clist_map_inline:Nn \g_@@_all_keyval_modules_clist
+ {
+ \keys_if_exist:nnT {##1} {#1}
+ {
+%<debug> \typeout{:::: Key~exists~##1~/~#1}
+ \bool_set_true:N \l_@@_alias_bool
+ \keys_define:nn {##1}
+ { #2 .code:n = { \keys_set:nn {##1} { #1 = {####1} } } }
+ }
+ }
+
+ \bool_if:NF \l_@@_alias_bool
+ { \@@_warning:nx {rename-feature-not-exist} {#1} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\aliasfontfeatureoption}
+% \begin{macrocode}
+\cs_new:Nn \@@_main_aliasfontfeatureoption:nnn
+ {
+ \bool_set_false:N \l_@@_alias_bool
+
+ \clist_map_inline:Nn \g_@@_all_keyval_modules_clist
+ {
+ \keys_if_exist:nnT { ##1 / #1 } {#2}
+ {
+%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2}
+ \bool_set_true:N \l_@@_alias_bool
+ \keys_define:nn { ##1 / #1 }
+ { #3 .code:n = { \keys_set:nn {##1} { #1 = {#2} } } }
+ }
+
+ \keys_if_exist:nnT { ##1 / #1 } {#2Reset}
+ {
+%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2Reset}
+ \keys_define:nn { ##1 / #1 }
+ { #3Reset .code:n = { \keys_set:nn {##1} { #1 = {#2Reset} } } }
+ }
+
+ \keys_if_exist:nnT { ##1 / #1 } {#2Off}
+ {
+%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2Off}
+ \keys_define:nn { ##1 / #1 }
+ { #3Off .code:n = { \keys_set:nn {##1} { #1 = {#2Off} } } }
+ }
+ }
+
+ \bool_if:NF \l_@@_alias_bool
+ { \@@_warning:nx {rename-feature-not-exist} {#1/#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_main_DeclareFontExtensions:n}
+% \begin{macrocode}
+\cs_new:Nn \@@_main_DeclareFontExtensions:n
+ {
+ \clist_set:Nn \l_@@_extensions_clist { #1 }
+ }
+% \end{macrocode}
+% Defaults:
+% \begin{macrocode}
+\@@_main_DeclareFontExtensions:n {.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\IfFontFeatureActiveTF}
+% \begin{macrocode}
+\cs_new:Nn \@@_main_IfFontFeatureActiveTF:nnn
+ {
+%<debug> \typeout{^^J:::::::::::::::::::::::::::::::::::::::::::::::}
+%<debug> \typeout{:IfFontFeatureActiveTF \exp_not:n{{#1}{#2}{#3}}}
+ \@@_if_font_feature:nTF {#1} {#2} {#3}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_if_font_feature:n {TF}
+ {
+ \tl_gclear:N \g_@@_single_feat_tl
+ \group_begin:
+ \@@_font_suppress_not_found_error:
+ \@@_init:
+ \bool_set_true:N \l_@@_ot_bool
+ \bool_set_true:N \l_@@_never_check_bool
+ \bool_set_false:N \l_@@_firsttime_bool
+ \clist_clear:N \l_@@_fontfeat_clist
+ \@@_get_features:n {#1}
+ \group_end:
+
+%<debug> \typeout{:::> \exp_not:N\g_@@_rawfeatures_sclist->~{\g_@@_rawfeatures_sclist}}
+%<debug> \typeout{:::> \exp_not:N\g_@@_single_feat_tl->~{\g_@@_single_feat_tl}}
+
+ \tl_if_empty:NTF \g_@@_single_feat_tl { \prg_return_false: }
+ {
+ \exp_args:NV \fontspec_if_current_feature:nTF \g_@@_single_feat_tl
+ { \prg_return_true: } { \prg_return_false: }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,295 @@
+%%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%
+% \section{Declaration of variables}
+%
+% \iffalse
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+% \fi
+%
+% This file consists solely of declaration of variables used by \pkg{fontspec}.
+% In some cases these variables are also initialised with default values.
+% In time I would like to move these initialisations
+%
+% \paragraph{Booleans}
+%
+% \begin{macro}{\l_@@_firsttime_bool}
+% As \cs{keys_set:nn} is run multiple times, some of its
+% information storing only occurs once while we decide if the font family
+% has been defined or not. When the later processing is occuring per-shape
+% this no longer needs to happen; this is indicated by the `firsttime'
+% conditional.
+% \begin{macrocode}
+\bool_new:N \l_@@_firsttime_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\bool_new:N \l_@@_nobf_bool
+\bool_new:N \l_@@_noit_bool
+\bool_new:N \l_@@_nosc_bool
+\bool_new:N \l_@@_check_bool
+% \end{macrocode}
+%
+% \begin{macrocode}
+\bool_new:N \l_@@_tfm_bool
+\bool_new:N \l_@@_atsui_bool
+\bool_new:N \l_@@_ot_bool
+\bool_new:N \l_@@_mm_bool
+\bool_new:N \l_@@_graphite_bool
+\bool_new:N \l_@@_fontcfg_bool
+\bool_set_true:N \l_@@_fontcfg_bool
+% \end{macrocode}
+% For dealing with legacy maths:
+% \begin{macrocode}
+\bool_new:N \g_@@_math_euler_bool
+\bool_new:N \g_@@_math_lucida_bool
+\bool_new:N \g_@@_pkg_euler_loaded_bool
+% \end{macrocode}
+% For package options:
+% \begin{macrocode}
+\bool_new:N \g_@@_cfg_bool
+\bool_new:N \g_@@_math_bool
+\bool_new:N \g_@@_euenc_bool
+% \end{macrocode}
+%
+% \begin{macrocode}
+\bool_new:N \l_@@_tmpa_bool
+\bool_new:N \l_@@_disable_defaults_bool
+\bool_new:N \l_@@_alias_bool
+\bool_new:N \l_@@_external_bool
+\bool_new:N \l_@@_defining_encoding_bool
+\bool_new:N \l_@@_script_exist_bool
+\bool_new:N \g_@@_em_normalise_slant_bool
+\bool_new:N \l_@@_proceed_bool
+\bool_new:N \l_@@_check_feat_bool
+% \end{macrocode}
+%
+% \begin{macro}{\l_@@_never_check_bool}
+% This boolean is overloaded. It is used to disable checking opentype script, language, and tags
+% for two purposes: when a font has no opentype features, we just turn it true (i.e., disable checking);
+% and, when running checking code that has a user-defined return path we want to allow the higher-level
+% code to dictate the logic.
+% TODO: tidy this up!
+% \begin{macrocode}
+\bool_new:N \l_@@_never_check_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \paragraph{Counters}
+% \begin{macrocode}
+\int_new:N \l_@@_script_int
+\int_new:N \l_@@_language_int
+\int_new:N \l_@@_strnum_int
+\int_new:N \l_@@_tmp_int
+\int_new:N \l_@@_em_int
+\int_new:N \l_@@_emdef_int
+\int_new:N \l_@@_strong_int
+\int_new:N \l_@@_strongdef_int
+% \end{macrocode}
+%
+% \paragraph{Floats}
+% \begin{macrocode}
+\fp_new:N \l_@@_tmpa_fp
+\fp_new:N \l_@@_tmpb_fp
+% \end{macrocode}
+%
+% \paragraph{Dimensions}
+% \begin{macrocode}
+\dim_new:N \l_@@_tmpa_dim
+\dim_new:N \l_@@_tmpb_dim
+\dim_new:N \l_@@_tmpc_dim
+% \end{macrocode}
+%
+% \paragraph{Sequences}
+% \begin{macrocode}
+\seq_new:N \l_@@_bf_series_seq
+% \end{macrocode}
+%
+% \paragraph{Comma-lists}
+% \begin{macrocode}
+\clist_new:N \g_@@_default_fontopts_clist
+\clist_new:N \g_@@_all_keyval_modules_clist
+\clist_new:N \l_@@_sizefeat_clist
+\clist_set:Nn \l_@@_sizefeat_clist {Size={-}}
+\clist_new:N \l_@@_extensions_clist
+\clist_new:N \l_@@_fontopts_clist
+\clist_new:N \l_@@_family_fontopts_clist
+\clist_new:N \l_@@_all_features_clist
+\clist_new:N \l_@@_leftover_clist
+\clist_new:N \l_@@_keys_leftover_clist
+\clist_new:N \l_@@_sizing_leftover_clist
+\clist_new:N \l_@@_fontfeat_clist
+\clist_new:N \l_@@_fontfeat_curr_clist
+\clist_new:N \l_@@_arg_clist
+\clist_new:N \l_@@_this_feat_clist
+% \end{macrocode}
+%
+% \begin{macrocode}
+\clist_new:N \l_@@_fontfeat_up_clist
+\clist_new:N \l_@@_fontfeat_bf_clist
+\clist_new:N \l_@@_fontfeat_it_clist
+\clist_new:N \l_@@_fontfeat_bfit_clist
+\clist_new:N \l_@@_fontfeat_sl_clist
+\clist_new:N \l_@@_fontfeat_bfsl_clist
+\clist_new:N \l_@@_fontfeat_sc_clist
+% \end{macrocode}
+%
+% \paragraph{Property lists}
+% \begin{macrocode}
+\prop_new:N \g_@@_fontopts_prop
+\prop_new:N \l_@@_nfss_prop
+\prop_new:N \l_@@_nfssfont_prop
+\prop_new:N \g_@@_OT_features_prop
+\prop_new:N \g_@@_all_opentype_feature_names_prop
+\prop_new:N \g_@@_em_prop
+\prop_new:N \g_@@_strong_prop
+\prop_new:N \g_@@_fontid_family_prop
+\prop_new:N \g_@@_family_int_prop
+% \end{macrocode}
+%
+% \paragraph{Token lists}
+% \begin{macrocode}
+\tl_new:N \l_fontspec_family_tl
+\tl_new:N \g_fontspec_encoding_tl
+\tl_new:N \l_fontspec_renderer_tl
+\tl_new:N \l_fontspec_fontname_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_clear_new:N \UTFencname
+\tl_clear_new:N \cyrillicencoding
+\tl_clear_new:N \latinencoding
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \l_fontspec_mode_tl
+\tl_new:N \g_@@_curr_series_tl
+\tl_new:N \g_@@_defined_shapes_tl
+\tl_new:N \g_@@_nfss_enc_tl
+\tl_new:N \g_@@_nfss_family_tl
+\tl_new:N \g_@@_single_feat_tl
+\tl_new:N \l_@@_basename_tl
+\tl_new:N \l_@@_curr_fontname_tl
+\tl_new:N \l_@@_curr_bfname_tl
+\tl_new:N \l_@@_ext_filename_tl
+\tl_new:N \l_@@_extension_tl
+\tl_new:N \l_@@_font_path_tl
+\tl_new:N \l_@@_fontid_tl
+\tl_new:N \l_@@_fontname_tl
+\tl_new:N \l_@@_hexcol_tl
+\tl_new:N \l_@@_nfss_sc_tl
+\tl_new:N \l_@@_nfss_tl
+\tl_new:N \l_@@_nfss_fam_tl
+\tl_new:N \l_@@_opacity_tl
+\tl_new:N \l_@@_optical_size_tl
+\tl_new:N \l_@@_options_tl
+\tl_new:N \l_@@_saved_fontname_tl
+\tl_new:N \l_@@_scale_tl
+\tl_new:N \l_@@_size_tl
+\tl_new:N \l_@@_sizedfont_tl
+\tl_new:N \l_@@_this_font_tl
+\tl_new:N \l_@@_tmp_tl
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+\tl_new:N \l_@@_ttc_index_tl
+\tl_new:N \l_@@_emshape_query_tl
+\tl_new:N \l_@@_em_switch_tl
+\tl_new:N \l_@@_em_tmp_tl
+\tl_new:N \l_@@_strong_tmp_tl
+\tl_new:N \l_@@_strong_switch_tl
+\tl_new:N \l_@@_hyphenchar_tl
+\tl_new:N \l_@@_smcp_shape_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \g_@@_mathrm_tl
+\tl_new:N \g_@@_bfmathrm_tl
+\tl_new:N \g_@@_mathsf_tl
+\tl_new:N \g_@@_mathtt_tl
+% \end{macrocode}
+%
+% Defaults:
+% \begin{macrocode}
+\tl_gset:Nn \g_@@_mathrm_tl {\rmdefault}
+\tl_gset:Nn \g_@@_mathsf_tl {\sfdefault}
+\tl_gset:Nn \g_@@_mathtt_tl {\ttdefault}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_family_label_tl
+\tl_new:N \l_@@_fake_slant_tl
+\tl_new:N \l_@@_fake_embolden_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_fontname_up_tl
+\tl_new:N \l_@@_fontname_bf_tl
+\tl_new:N \l_@@_fontname_it_tl
+\tl_new:N \l_@@_fontname_bfit_tl
+\tl_new:N \l_@@_fontname_sl_tl
+\tl_new:N \l_@@_fontname_bfsl_tl
+\tl_new:N \l_@@_fontname_sc_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_script_name_tl
+\tl_new:N \l_fontspec_script_tl
+\tl_new:N \l_@@_lang_name_tl
+\tl_new:N \l_fontspec_lang_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_mapping_tl
+\tl_new:N \l_@@_punctspace_adjust_tl
+\tl_new:N \l_@@_wordspace_adjust_tl
+\tl_new:N \l_@@_postadjust_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tl_const:Nn \c_@@_hexcol_tl {000000}
+\tl_const:Nn \c_@@_opacity_tl {FF~}
+\tl_const:Nn \c_@@_postadjust_tl { \l_@@_wordspace_adjust_tl \l_@@_punctspace_adjust_tl }
+% \end{macrocode}
+%
+% \paragraph{Semi-colon-lists}
+% Not a real data structure but sensible to name accordingly.
+% \begin{macrocode}
+\tl_new:N \g_@@_rawfeatures_sclist
+\tl_new:N \l_@@_pre_feat_sclist
+% \end{macrocode}
+%
+% \paragraph{Font families}
+% Again not a real data structure, and also probably poorly named.
+% \begin{macrocode}
+\tl_new:N \l_@@_rmfamily_family_tl
+\tl_new:N \l_@@_sffamily_family_tl
+\tl_new:N \l_@@_ttfamily_family_tl
+% \end{macrocode}
+%
+%
+%
+% \iffalse
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+% \fi
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -0,0 +1,286 @@
+%%^^A%% fontspec-code-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
+
+% \section{Changes to the NFSS}
+%
+% \begin{macrocode}
+%<*fontspec>
+% \end{macrocode}
+%
+%
+% \subsection{Italic small caps and so on} \label{sec:sishape}
+%
+% \begin{macro}{\sishape}
+% \begin{macro}{\textsi}
+% These commands for actually selecting italic small caps have been defined for many years; I'm inclined to drop them.
+% They're probably used very infrequently; I personally prefer just writing
+% |\textit{\textsc{...}}| instead.
+%
+% \begin{macrocode}
+\providecommand*\itscdefault{\itdefault\scdefault}
+\providecommand*\slscdefault{\sldefault\scdefault}
+\DeclareRobustCommand{\sishape}
+ {
+ \not at math@alphabet\sishape\relax
+ \fontshape{\itscdefault}\selectfont
+ }
+\DeclareTextFontCommand{\textsi}{\sishape}
+% \end{macrocode}
+% \end{macro} \end{macro}
+%
+% \LaTeX's `shape' font axis needs to be overloaded to support italic small caps and slanted small caps.
+% These are the combinations to support:
+% \begin{macrocode}
+\cs_new:Nn \@@_shape_merge:nn { c_@@_shape_#1_#2_tl }
+\tl_const:cn { \@@_shape_merge:nn \itdefault \scdefault } {\itscdefault}
+\tl_const:cn { \@@_shape_merge:nn \sldefault \scdefault } {\slscdefault}
+\tl_const:cn { \@@_shape_merge:nn \scdefault \itdefault } {\itscdefault}
+\tl_const:cn { \@@_shape_merge:nn \scdefault \sldefault } {\slscdefault}
+\tl_const:cn { \@@_shape_merge:nn \slscdefault \itdefault } {\itscdefault}
+\tl_const:cn { \@@_shape_merge:nn \itscdefault \sldefault } {\slscdefault}
+\tl_const:cn { \@@_shape_merge:nn \itscdefault \updefault } {\scdefault}
+\tl_const:cn { \@@_shape_merge:nn \slscdefault \updefault } {\scdefault}
+% \end{macrocode}
+%
+% \begin{macro}{\fontspec_merge_shape:n}
+% These macros enable the overload on the |\..shape| commands.
+% First, a shape `new+current' (prefix) or `current+new' (suffix) is tried.
+% If not found, fall back on the `new' shape.
+% \begin{macrocode}
+\cs_new:Nn \fontspec_merge_shape:n
+ {
+ \@@_if_merge_shape:nTF {#1}
+ { \fontshape { \tl_use:c { \@@_shape_merge:nn {\f at shape} {#1} } } \selectfont }
+ { \fontshape {#1} \selectfont }
+ }
+% \end{macrocode}
+% The following is rather specific; it only returns true if the merged shape exists,
+% but more importantly also if the merged shape is defined for the current font.
+% \begin{macrocode}
+\prg_new_conditional:Nnn \@@_if_merge_shape:n {TF}
+ {
+ \bool_lazy_and:nnTF
+ { \tl_if_exist_p:c { \@@_shape_merge:nn {\f at shape} {#1} } }
+ {
+ \cs_if_exist_p:c
+ {
+ \f at encoding/\f at family/\f at series/
+ \tl_use:c { \@@_shape_merge:nn {\f at shape} {#1} }
+ }
+ }
+ \prg_return_true: \prg_return_false:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\itshape} \begin{macro}{\scshape} \begin{macro}{\upshape} \begin{macro}{\slshape}
+% The original |\..shape| commands are redefined to use the merge shape macro.
+% \begin{macrocode}
+\DeclareRobustCommand \itshape
+ {
+ \not at math@alphabet\itshape\mathit
+ \fontspec_merge_shape:n\itdefault
+ }
+\DeclareRobustCommand \slshape
+ {
+ \not at math@alphabet\slshape\relax
+ \fontspec_merge_shape:n\sldefault
+ }
+\DeclareRobustCommand \scshape
+ {
+ \not at math@alphabet\scshape\relax
+ \fontspec_merge_shape:n\scdefault
+ }
+\DeclareRobustCommand \upshape
+ {
+ \not at math@alphabet\upshape\relax
+ \fontspec_merge_shape:n\updefault
+ }
+% \end{macrocode}
+% \end{macro} \end{macro} \end{macro} \end{macro}
+%
+%
+%
+% \subsection{Emphasis}
+%
+% \begin{macro}{\emfontdeclare}
+% \begin{macrocode}
+\cs_new_protected:Npn \emfontdeclare #1
+ {
+ \prop_gclear:N \g_@@_em_prop
+ \int_zero:N \l_@@_emdef_int
+ \bool_gset_true:N \g_@@_em_normalise_slant_bool
+
+ \tl_if_in:nnT {#1} {\slshape}
+ {
+ \tl_if_in:nnT {#1} {\itshape}
+ {
+ \bool_gset_false:N \g_@@_em_normalise_slant_bool
+ }
+ }
+
+ \group_begin:
+ \normalfont
+ \clist_map_inline:nn {\emreset,#1}
+ {
+ ##1
+ \prop_gput_if_new:NxV \g_@@_em_prop { \f at shape } { \l_@@_emdef_int }
+ \prop_gput:Nxn \g_@@_em_prop { switch-\int_use:N \l_@@_emdef_int } { ##1 }
+ \int_incr:N \l_@@_emdef_int
+ }
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\em}
+% \begin{macrocode}
+\DeclareRobustCommand \em
+ {
+ \@nomath\em
+ \tl_set:Nx \l_@@_emshape_query_tl { \f at shape }
+
+ \bool_if:NT \g_@@_em_normalise_slant_bool
+ {
+ \tl_replace_all:Nnn \l_@@_emshape_query_tl {/sl} {/it}
+ }
+
+%<debug> \typeout{Emph~ level:~\int_use:N \l_@@_em_int}
+ \prop_get:NxNT \g_@@_em_prop { \l_@@_emshape_query_tl } \l_@@_em_tmp_tl
+ {
+ \int_set:Nn \l_@@_em_int { \l_@@_em_tmp_tl }
+%<debug> \typeout{Shape~ (\l_@@_emshape_query_tl)~ detected;~ new~ level:~\int_use:N \l_@@_em_int}
+ }
+
+ \int_incr:N \l_@@_em_int
+
+ \prop_get:NxNTF \g_@@_em_prop { switch-\int_use:N \l_@@_em_int } \l_@@_em_switch_tl
+ { \l_@@_em_switch_tl }
+ {
+ \int_zero:N \l_@@_em_int
+ \emreset
+ }
+
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\emph}
+% \begin{macro}{\emshape}
+% \begin{macro}{\eminnershape}
+% \begin{macro}{\emreset}
+% \begin{macrocode}
+\DeclareTextFontCommand{\emph}{\em}
+\cs_set:Npn \emreset { \upshape }
+\cs_set:Npn \emshape { \itshape }
+\cs_set:Npn \eminnershape { \upshape }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \subsection{Strong emphasis}
+%
+% \begin{macro}{\strongfontdeclare}
+% \begin{macrocode}
+\cs_new_protected:Npn \strongfontdeclare #1
+ {
+ \prop_gclear:N \g_@@_strong_prop
+ \int_zero:N \l_@@_strongdef_int
+
+ \group_begin:
+ \normalfont
+ \clist_map_inline:nn {\strongreset,#1}
+ {
+ ##1
+ \prop_gput_if_new:NxV \g_@@_strong_prop { \f at series } { \l_@@_strongdef_int }
+ \prop_gput:Nxn \g_@@_strong_prop { switch-\int_use:N \l_@@_strongdef_int } { ##1 }
+ \int_incr:N \l_@@_strongdef_int
+ }
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\strongenv}
+% \begin{macrocode}
+\DeclareRobustCommand \strongenv
+ {
+ \@nomath\strongenv
+
+%<debug> \typeout{Strong~ level:~\int_use:N \l_@@_strong_int}
+ \prop_get:NxNT \g_@@_strong_prop { \f at series } \l_@@_strong_tmp_tl
+ {
+ \int_set:Nn \l_@@_strong_int { \l_@@_strong_tmp_tl }
+%<debug> \typeout{Series~ (\f at series)~ detected;~ new~ level:~\int_use:N \l_@@_strong_int}
+ }
+
+ \int_incr:N \l_@@_strong_int
+
+ \prop_get:NxNTF \g_@@_strong_prop { switch-\int_use:N \l_@@_strong_int } \l_@@_strong_switch_tl
+ { \l_@@_strong_switch_tl }
+ {
+ \int_zero:N \l_@@_strong_int
+ \strongreset
+ }
+
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\strong}
+% \begin{macro}{\strongreset}
+% \begin{macrocode}
+\DeclareTextFontCommand{\strong}{\strongenv}
+\cs_set:Npn \strongreset {}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\reset at font}
+% Ensure nesting resets when necessary:
+% \begin{macrocode}
+\cs_set:Npn \reset at font
+ {
+ \normalfont
+ \int_zero:N \l_@@_em_int
+ \int_zero:N \l_@@_strong_int
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% Programmer's interface for setting nesting levels:
+% \begin{macrocode}
+\cs_new:Nn \fontspec_set_em_level:n { \int_set:Nn \l_@@_em_int {#1} }
+\cs_new:Nn \fontspec_set_strong_level:n { \int_set:Nn \l_@@_strong_int {#1} }
+% \end{macrocode}
+%
+% Defaults:
+% \begin{macrocode}
+\strongfontdeclare{ \bfseries }
+\emfontdeclare{ \emshape, \eminnershape }
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</fontspec>
+% \end{macrocode}
+
+
+\endinput
+
+% /©
+% ------------------------------------------------
+% The FONTSPEC package <wspr.io/fontspec>
+% ------------------------------------------------
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
+% Copyright 2009-2015 Khaled Hosny
+% Copyright 2013 Philipp Gesang
+% Copyright 2013-2016 Joseph Wright
+% ------------------------------------------------
+% This package is free software and may be redistributed and/or modified under
+% the conditions of the LaTeX Project Public License, version 1.3c or higher
+% (your choice): <http://www.latex-project.org/lppl/>.
+% ------------------------------------------------
+% ©/
Property changes on: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code-xfss.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-code.ltx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -30,7 +30,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-api.tex 2019-01-09 22:44:11 UTC (rev 49650)
@@ -324,7 +324,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-enc.tex 2019-01-09 22:44:11 UTC (rev 49650)
@@ -204,7 +204,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex 2019-01-09 22:44:11 UTC (rev 49650)
@@ -160,8 +160,8 @@
See \exref{itfeat}.
\begin{Xexample}{itfeat}{Features for, say, just italics.}
-\fontspec{EBGaramond12-Regular.otf}%
- [ItalicFont=EBGaramond12-Italic.otf]
+\fontspec{EBGaramond-Regular.otf}%
+ [ItalicFont=EBGaramond-Italic.otf]
\itshape Don’t Ask Victoria! \\
\addfontfeature{ItalicFeatures={Style=Swash}}
Don’t Ask Victoria! \\
@@ -602,7 +602,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex 2019-01-09 22:44:11 UTC (rev 49650)
@@ -619,7 +619,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-intro.tex 2019-01-09 22:44:11 UTC (rev 49650)
@@ -240,7 +240,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-luatex.tex 2019-01-09 22:44:11 UTC (rev 49650)
@@ -46,7 +46,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-opentype.tex 2019-01-09 22:44:11 UTC (rev 49650)
@@ -493,9 +493,10 @@
For fonts with multiple |salt| OpenType features,
use the fontspec \feat{Alternate} feature instead.
-\Exref{style-alt} and \exref{style-hist} both contain glyph
-substitutions with similar characteristics.
-Note the occasional inconsistency with which font features are labelled; a long-tailed `Q' could turn up anywhere!
+\Exref{style-alt} shows an example of a font feature that involves glyph substitution
+for particular letters within an alphabet.
+Other options in these categories operate in similar ways, with the choice of how
+particular substitutions are organised with which feature largely up to the font designer.
\begin{Xexample}[firstline=2]{style-alt}{Example of the \opt{Alternate} option of the \feat{Style} feature.}
\Large
@@ -505,25 +506,11 @@
M Q W
\end{Xexample}
-\begin{Xexample}[firstline=2]{style-hist}{Example of the \opt{Historic} option of the \feat{Style} feature.}
- \Large
- \fontspec{Adobe Jenson Pro}
- M Q Z \\
- \addfontfeature{Style=Historic}
- M Q Z
-\end{Xexample}
-
In other features, larger breadths of changes can be seen, covering
-the style of an entire alphabet. See \exref{style-titl} and \exref{style-itrub}; in the latter, the \opt{Italic} option affects the Latin text and the \opt{Ruby} option the Japanese.
+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-titl}{Example of the \opt{TitlingCaps} option of the \feat{Style} feature.}
- \Large
- \fontspec{Adobe Garamond Pro}
- TITLING CAPS \\
- \addfontfeature{Style=TitlingCaps}
- TITLING CAPS
-\end{Xexample}
-
\begin{Xexample}[firstline=2]{style-itrub}{Example of the \opt{Italic} and \opt{Ruby} options of the \feat{Style} feature.}
\Large \def\kana{ようこそ ワカヨタレソ}
\fontspec{Hiragino Mincho Pro}
@@ -546,6 +533,7 @@
\end{Xexample}
\subsection{Diacritics}
+
Specifies how combining diacritics should be placed.
These will usually be controlled automatically
according to the Script setting.
@@ -744,34 +732,18 @@
For each character that can be varied, it is possible to select among
possible options for that particular glyph.
-For example, in \exref{cv} a variety of glyphs for the character `v' are
-selected, in which |5| corresponds to the character `v' for this font feature,
+For example, in the example below, variants are chosen for glyphs `4' and `5',
and the trailing |:|\meta{n} corresponds to which variety to choose.
-Georg Duffner's open source Garamond revival font\footnote{\url{http://www.georgduffner.at/ebgaramond/}} is used in this example.
+\begin{Verbatim}
+ \fontspec{EB Garamond 12 Italic}[CharacterVariant={4,5:2}] \& violet
+\end{Verbatim}
+The numbering is entirely font-soecific. Glyph `5' might be the character `v', for example.
Character variants are specifically designed not to conflict with each
-other, so you can enable them individually per character as shown in
-\exref{cv2}. (Unlike stylistic alternates, say.)
-
+other, so you can enable them individually per character.
+(Unlike stylistic alternates, say.)
Note that the indexing starts from zero.
-\begin{Lexample}[firstline=2]{cv}{The \feat{CharacterVariant} feature showing off Georg Duffner's open source Garamond revival font.}
- \huge
- \fontspec{EB Garamond 12 Italic} very \\
- \fontspec{EB Garamond 12 Italic}[CharacterVariant=5] very \\
- \fontspec{EB Garamond 12 Italic}[CharacterVariant=5:0] very \\
- \fontspec{EB Garamond 12 Italic}[CharacterVariant=5:1] very \\
- \fontspec{EB Garamond 12 Italic}[CharacterVariant=5:2] very \\
- \fontspec{EB Garamond 12 Italic}[CharacterVariant=5:3] very
-\end{Lexample}
-\begin{Lexample}[firstline=2]{cv2}{The \feat{CharacterVariant} feature selecting multiple variants simultaneously.}
- \huge
- \fontspec{EB Garamond 12 Italic} \& violet \\
- \fontspec{EB Garamond 12 Italic}[CharacterVariant={4}] \& violet \\
- \fontspec{EB Garamond 12 Italic}[CharacterVariant={5:2}] \& violet \\
- \fontspec{EB Garamond 12 Italic}[CharacterVariant={4,5:2}] \& violet
-\end{Lexample}
-
\subsubsection{Alternates --- \texttt{salt}}
The \feat{Alternate} feature, alias \feat{StylisticAlternates}, is used to access alternate font glyphs when variations exist in the font, such as in \exref{salt}.
@@ -1446,7 +1418,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-xetex.tex 2019-01-09 22:44:11 UTC (rev 49650)
@@ -19,12 +19,12 @@
The \feat{Mapping} feature enables a \XeTeX\ text-mapping scheme, with an example shown in \exref{mapping}.
\begin{Xexample}{mapping}{\XeTeX's \feat{Mapping} feature.}
- \fontspec{Cochin}[Mapping=tex-text]
+ \fontspec{texgyrepagella-regular.otf}[Mapping=tex-text]
``!`A small amount of---text!''
\end{Xexample}
Only one mapping can be active at a time and a second call to \feat{Mapping}
-will simply override the first.
+will override the first.
Using the |tex-text| mapping is also equivalent to writing |Ligatures=TeX|.
The use of the latter syntax is recommended for better compatibility with
\LuaTeX\ documents.
@@ -368,7 +368,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-enc.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,173 +0,0 @@
-%%^^A%% fontspec-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Extended font encodings}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% To be removed after the 2017 release of LaTeX2e:
-% \begin{macrocode}
-\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
-\providecommand\UnicodeFontName[2]{"#1:#2"}
-%<XE>\providecommand\UnicodeFontTeXLigatures{mapping=tex-text;}
-%<LU>\providecommand\UnicodeFontTeXLigatures{+tlig;}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\providecommand\add at unicode@accent[2]{#2\char#1\relax}
-\providecommand\DeclareUnicodeAccent[3]{%
- \DeclareTextCommand{#1}{#2}{\add at unicode@accent{#3}}%
-}
-% \end{macrocode}
-%
-% \begin{macro}{\EncodingCommand}
-% \begin{macrocode}
-\DeclareDocumentCommand \EncodingCommand {mO{}m}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \EncodingCommand }
- \DeclareTextCommand{#1}{\UnicodeEncodingName}[#2]{#3}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\EncodingAccent}
-% \begin{macrocode}
-\DeclareDocumentCommand \EncodingAccent {mm}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \EncodingAccent }
- \DeclareTextCommand{#1}{\UnicodeEncodingName}{\add at unicode@accent{#2}}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\EncodingSymbol}
-% \begin{macrocode}
-\DeclareDocumentCommand \EncodingSymbol {mm}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \EncodingSymbol }
- \DeclareTextSymbol{#1}{\UnicodeEncodingName}{#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\EncodingComposite}
-% \begin{macrocode}
-\DeclareDocumentCommand \EncodingComposite {mmm}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \EncodingComposite }
- \DeclareTextComposite{#1}{\UnicodeEncodingName}{#2}{#3}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\EncodingCompositeCommand}
-% \begin{macrocode}
-\DeclareDocumentCommand \EncodingCompositeCommand {mmm}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \EncodingCompositeCommand }
- \DeclareTextCompositeCommand{#1}{\UnicodeEncodingName}{#2}{#3}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\DeclareUnicodeEncoding}
-% \begin{macrocode}
-\DeclareDocumentCommand \DeclareUnicodeEncoding {mm}
- {
- \DeclareFontEncoding{#1}{}{}
- \DeclareErrorFont{#1}{lmr}{m}{n}{10}
- \DeclareFontSubstitution{#1}{lmr}{m}{n}
- \DeclareFontFamily{#1}{lmr}{}
-
- \DeclareFontShape{#1}{lmr}{m}{n}
- {<->\UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}}{}
- \DeclareFontShape{#1}{lmr}{m}{it}
- {<->\UnicodeFontFile{lmroman10-italic}{\UnicodeFontTeXLigatures}}{}
- \DeclareFontShape{#1}{lmr}{m}{sc}
- {<->\UnicodeFontFile{lmromancaps10-regular}{\UnicodeFontTeXLigatures}}{}
- \DeclareFontShape{#1}{lmr}{bx}{n}
- {<->\UnicodeFontFile{lmroman10-bold}{\UnicodeFontTeXLigatures}}{}
- \DeclareFontShape{#1}{lmr}{bx}{it}
- {<->\UnicodeFontFile{lmroman10-bolditalic}{\UnicodeFontTeXLigatures}}{}
-
- \tl_set_eq:NN \l_@@_prev_unicode_name_tl \UnicodeEncodingName
- \tl_set:Nn \UnicodeEncodingName {#1}
- \bool_set_true:N \l_@@_defining_encoding_bool
- #2
- \bool_set_false:N \l_@@_defining_encoding_bool
- \tl_set_eq:NN \UnicodeEncodingName \l_@@_prev_unicode_name_tl
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\UndeclareSymbol}
-% \begin{macro}{\UndeclareAccent}
-% \begin{macro}{\UndeclareCommand}
-% Synonyms for each other but all included for completeness.
-% \begin{macrocode}
-\DeclareDocumentCommand \UndeclareSymbol {m}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \UndeclareSymbol }
- \UndeclareTextCommand {#1} {\UnicodeEncodingName}
- }
-\DeclareDocumentCommand \UndeclareAccent {m}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \UndeclareAccent }
- \UndeclareTextCommand {#1} {\UnicodeEncodingName}
- }
-\DeclareDocumentCommand \UndeclareCommand {m}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \UndeclareCommand }
- \UndeclareTextCommand {#1} {\UnicodeEncodingName}
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\UndeclareComposite}
-% \begin{macrocode}
-\DeclareDocumentCommand \UndeclareComposite {mm}
- {
- \bool_if:NF \l_@@_defining_encoding_bool
- { \@@_error:nn {only-inside-encdef} \UndeclareComposite }
- \cs_undefine:c
- { \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-feat-aat.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,243 +0,0 @@
-%%^^A%% fontspec-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{AAT feature definitions}
-%
-% These are only defined for \XeTeX.
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec&XE>
-% \end{macrocode}
-% \fi
-
-% \subsection{Ligatures}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Ligatures}
-\@@_define_aat_feature:nnnn {Ligatures} {Required} {1} {0}
-\@@_define_aat_feature:nnnn {Ligatures} {NoRequired} {1} {1}
-\@@_define_aat_feature:nnnn {Ligatures} {Common} {1} {2}
-\@@_define_aat_feature:nnnn {Ligatures} {NoCommon} {1} {3}
-\@@_define_aat_feature:nnnn {Ligatures} {Rare} {1} {4}
-\@@_define_aat_feature:nnnn {Ligatures} {NoRare} {1} {5}
-\@@_define_aat_feature:nnnn {Ligatures} {Discretionary} {1} {4}
-\@@_define_aat_feature:nnnn {Ligatures} {NoDiscretionary} {1} {5}
-\@@_define_aat_feature:nnnn {Ligatures} {Logos} {1} {6}
-\@@_define_aat_feature:nnnn {Ligatures} {NoLogos} {1} {7}
-\@@_define_aat_feature:nnnn {Ligatures} {Rebus} {1} {8}
-\@@_define_aat_feature:nnnn {Ligatures} {NoRebus} {1} {9}
-\@@_define_aat_feature:nnnn {Ligatures} {Diphthong} {1} {10}
-\@@_define_aat_feature:nnnn {Ligatures} {NoDiphthong} {1} {11}
-\@@_define_aat_feature:nnnn {Ligatures} {Squared} {1} {12}
-\@@_define_aat_feature:nnnn {Ligatures} {NoSquared} {1} {13}
-\@@_define_aat_feature:nnnn {Ligatures} {AbbrevSquared} {1} {14}
-\@@_define_aat_feature:nnnn {Ligatures} {NoAbbrevSquared} {1} {15}
-\@@_define_aat_feature:nnnn {Ligatures} {Icelandic} {1} {32}
-\@@_define_aat_feature:nnnn {Ligatures} {NoIcelandic} {1} {33}
-% \end{macrocode}
-% Emulate CM extra ligatures.
-% \begin{macrocode}
-\keys_define:nn {fontspec-aat}
- {
- Ligatures / TeX .code:n =
- {
- \tl_set:Nn \l_@@_mapping_tl { tex-text }
- }
- }
-% \end{macrocode}
-%
-% \subsection{Letters}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Letters}
-\@@_define_aat_feature:nnnn {Letters} {Normal} {3} {0}
-\@@_define_aat_feature:nnnn {Letters} {Uppercase} {3} {1}
-\@@_define_aat_feature:nnnn {Letters} {Lowercase} {3} {2}
-\@@_define_aat_feature:nnnn {Letters} {SmallCaps} {3} {3}
-\@@_define_aat_feature:nnnn {Letters} {InitialCaps} {3} {4}
-% \end{macrocode}
-%
-% \subsection{Numbers}
-%
-% These were originally separated into \feat{NumberCase} and
-% \feat{NumberSpacing} following \AAT, but it makes more sense to
-% combine them.
-%
-% Both naming conventions are offered to select the number case.
-%
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Numbers}
-\@@_define_aat_feature:nnnn {Numbers} {Monospaced} {6} {0}
-\@@_define_aat_feature:nnnn {Numbers} {Proportional} {6} {1}
-\@@_define_aat_feature:nnnn {Numbers} {Lowercase} {21} {0}
-\@@_define_aat_feature:nnnn {Numbers} {OldStyle} {21} {0}
-\@@_define_aat_feature:nnnn {Numbers} {Uppercase} {21} {1}
-\@@_define_aat_feature:nnnn {Numbers} {Lining} {21} {1}
-\@@_define_aat_feature:nnnn {Numbers} {SlashedZero} {14} {5}
-\@@_define_aat_feature:nnnn {Numbers} {NoSlashedZero} {14} {4}
-% \end{macrocode}
-%
-% \subsection{Contextuals}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Contextuals}
-\@@_define_aat_feature:nnnn {Contextuals} {WordInitial} {8} {0}
-\@@_define_aat_feature:nnnn {Contextuals} {NoWordInitial} {8} {1}
-\@@_define_aat_feature:nnnn {Contextuals} {WordFinal} {8} {2}
-\@@_define_aat_feature:nnnn {Contextuals} {NoWordFinal} {8} {3}
-\@@_define_aat_feature:nnnn {Contextuals} {LineInitial} {8} {4}
-\@@_define_aat_feature:nnnn {Contextuals} {NoLineInitial} {8} {5}
-\@@_define_aat_feature:nnnn {Contextuals} {LineFinal} {8} {6}
-\@@_define_aat_feature:nnnn {Contextuals} {NoLineFinal} {8} {7}
-\@@_define_aat_feature:nnnn {Contextuals} {Inner} {8} {8}
-\@@_define_aat_feature:nnnn {Contextuals} {NoInner} {8} {9}
-% \end{macrocode}
-%
-% \subsection{Diacritics}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Diacritics}
-\@@_define_aat_feature:nnnn {Diacritics} {Show} {9} {0}
-\@@_define_aat_feature:nnnn {Diacritics} {Hide} {9} {1}
-\@@_define_aat_feature:nnnn {Diacritics} {Decompose} {9} {2}
-% \end{macrocode}
-%
-%
-% \subsection{Vertical position}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {VerticalPosition}
-\@@_define_aat_feature:nnnn {VerticalPosition} {Normal} {10} {0}
-\@@_define_aat_feature:nnnn {VerticalPosition} {Superior} {10} {1}
-\@@_define_aat_feature:nnnn {VerticalPosition} {Inferior} {10} {2}
-\@@_define_aat_feature:nnnn {VerticalPosition} {Ordinal} {10} {3}
-% \end{macrocode}
-%
-% \subsection{Fractions}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Fractions}
-\@@_define_aat_feature:nnnn {Fractions} {On} {11} {1}
-\@@_define_aat_feature:nnnn {Fractions} {Off} {11} {0}
-\@@_define_aat_feature:nnnn {Fractions} {Diagonal} {11} {2}
-% \end{macrocode}
-%
-% \subsection{Alternate}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n { Alternate }
-\keys_define:nn {fontspec-aat}
- {
- Alternate .default:n = {0} ,
- Alternate / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
- {
- \@@_make_AAT_feature:nn {17}{##1}
- }
- }
- }
-% \end{macrocode}
-%
-%
-% \subsection{Variant / StylisticSet}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Variant}
-\keys_define:nn {fontspec-aat}
- {
- Variant .default:n = {0} ,
- Variant / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
- { \@@_make_AAT_feature:nn {18}{##1} }
- }
- }
-\aliasfontfeature{Variant}{StylisticSet}
-% \end{macrocode}
-%
-%
-%
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Vertical}
-\keys_define:nn {fontspec-aat}
- {
- Vertical .choice: ,
- Vertical / RotatedGlyphs .code:n =
- {
- \__fontspec_update_featstr:n {vertical}
- }
- }
-
-% \end{macrocode}
-%
-%
-% \subsection{Style}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Style}
-\@@_define_aat_feature:nnnn {Style} {Italic} {32} {2}
-\@@_define_aat_feature:nnnn {Style} {Ruby} {28} {2}
-\@@_define_aat_feature:nnnn {Style} {Display} {19} {1}
-\@@_define_aat_feature:nnnn {Style} {Engraved} {19} {2}
-\@@_define_aat_feature:nnnn {Style} {TitlingCaps} {19} {4}
-\@@_define_aat_feature:nnnn {Style} {TallCaps} {19} {5}
-% \end{macrocode}
-%
-% \subsection{CJK shape}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {CJKShape}
-\@@_define_aat_feature:nnnn {CJKShape} {Traditional} {20} {0}
-\@@_define_aat_feature:nnnn {CJKShape} {Simplified} {20} {1}
-\@@_define_aat_feature:nnnn {CJKShape} {JIS1978} {20} {2}
-\@@_define_aat_feature:nnnn {CJKShape} {JIS1983} {20} {3}
-\@@_define_aat_feature:nnnn {CJKShape} {JIS1990} {20} {4}
-\@@_define_aat_feature:nnnn {CJKShape} {Expert} {20} {10}
-\@@_define_aat_feature:nnnn {CJKShape} {NLC} {20} {13}
-% \end{macrocode}
-%
-% \subsection{Character width}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {CharacterWidth}
-\@@_define_aat_feature:nnnn {CharacterWidth} {Proportional} {22} {0}
-\@@_define_aat_feature:nnnn {CharacterWidth} {Full} {22} {1}
-\@@_define_aat_feature:nnnn {CharacterWidth} {Half} {22} {2}
-\@@_define_aat_feature:nnnn {CharacterWidth} {Third} {22} {3}
-\@@_define_aat_feature:nnnn {CharacterWidth} {Quarter} {22} {4}
-\@@_define_aat_feature:nnnn {CharacterWidth} {AlternateProportional} {22} {5}
-\@@_define_aat_feature:nnnn {CharacterWidth} {AlternateHalf} {22} {6}
-\@@_define_aat_feature:nnnn {CharacterWidth} {Default} {22} {7}
-% \end{macrocode}
-%
-% \subsection{Annotation}
-% \begin{macrocode}
-\@@_define_aat_feature_group:n {Annotation}
-\@@_define_aat_feature:nnnn {Annotation} {Off} {24} {0}
-\@@_define_aat_feature:nnnn {Annotation} {Box} {24} {1}
-\@@_define_aat_feature:nnnn {Annotation} {RoundedBox} {24} {2}
-\@@_define_aat_feature:nnnn {Annotation} {Circle} {24} {3}
-\@@_define_aat_feature:nnnn {Annotation} {BlackCircle} {24} {4}
-\@@_define_aat_feature:nnnn {Annotation} {Parenthesis} {24} {5}
-\@@_define_aat_feature:nnnn {Annotation} {Period} {24} {6}
-\@@_define_aat_feature:nnnn {Annotation} {RomanNumerals} {24} {7}
-\@@_define_aat_feature:nnnn {Annotation} {Diamond} {24} {8}
-\@@_define_aat_feature:nnnn {Annotation} {BlackSquare} {24} {9}
-\@@_define_aat_feature:nnnn {Annotation} {BlackRoundSquare} {24} {10}
-\@@_define_aat_feature:nnnn {Annotation} {DoubleCircle} {24} {11}
-% \end{macrocode}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec&XE>
-% \end{macrocode}
-% \fi
-
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-feat-opentype.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,559 +0,0 @@
-%%^^A%% fontspec-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{OpenType feature definitions}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-%
-% \begin{macrocode}
-\@@_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
-\@@_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
-\@@_feat_prop_add:nn {ornm} { Ornament\,=\,$N$ }
-\@@_feat_prop_add:nn {cvNN} { CharacterVariant\,=\,$N$:$M$ }
-\@@_feat_prop_add:nn {ssNN} { StylisticSet\,=\,$N$ }
-% \end{macrocode}
-%
-% \section{Regular key=val / tag definitions}
-%
-% \subsection{Ligatures}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Ligatures}
-\@@_define_opentype_feature:nnnnn {Ligatures} {ResetAll} {} {}
- {
- +dlig,-dlig,+rlig,-rlig,+liga,-liga,+dlig,-dlig,+clig,-clig,+hlig,-hlig,
-%<XE> mapping = tex-text
-%<LU> +tlig,-tlig
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Required} {rlig} {rlig} {}
-\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Common} {liga} {liga} {}
-\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Rare} {dlig} {dlig} {}
-\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Discretionary} {dlig} {dlig} {}
-\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Contextual} {clig} {clig} {}
-\@@_define_opentype_onoffreset:nnnnn {Ligatures} {Historic} {hlig} {hlig} {}
-% \end{macrocode}
-% Emulate CM extra ligatures.
-% \begin{macrocode}
-%<*XE>
-\keys_define:nn {fontspec-opentype}
- {
- Ligatures / TeX .code:n = { \tl_set:Nn \l_@@_mapping_tl {tex-text} },
- Ligatures / TeXReset .code:n = { \tl_clear:N \l_@@_mapping_tl },
- }
-%</XE>
-%<LU>\@@_define_opentype_onreset:nnnnn {Ligatures} {TeX} {} { +tlig } {}
-% \end{macrocode}
-%
-% \subsection{Letters}
-% \begin{macrocode}
-\@@_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
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {Letters} {Uppercase} {case} {case} {+smcp,+pcap,+c2sc,+c2pc,+unic,+rand}
-\@@_define_opentype_onoffreset:nnnnn {Letters} {SmallCaps} {smcp} {smcp} {+pcap,+unic,+rand}
-\@@_define_opentype_onoffreset:nnnnn {Letters} {PetiteCaps} {pcap} {pcap} {+smcp,+unic,+rand}
-\@@_define_opentype_onoffreset:nnnnn {Letters} {UppercaseSmallCaps} {c2sc} {c2sc} {+c2pc,+unic,+rand}
-\@@_define_opentype_onoffreset:nnnnn {Letters} {UppercasePetiteCaps} {c2pc} {c2pc} {+c2sc,+unic,+rand}
-\@@_define_opentype_onoffreset:nnnnn {Letters} {Unicase} {unic} {unic} {+rand}
-\@@_define_opentype_onoffreset:nnnnn {Letters} {Random} {rand} {rand} {+unic}
-% \end{macrocode}
-%
-% \subsection{Numbers}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Numbers}
-\@@_define_opentype_feature:nnnnn {Numbers} {ResetAll} {} {}
- {
- +tnum,-tnum,
- +pnum,-pnum,
- +onum,-onum,
- +lnum,-lnum,
- +zero,-zero,
- +anum,-anum,
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {Numbers} {Monospaced} {tnum} {tnum} {+pnum,-pnum}
-\@@_define_opentype_onoffreset:nnnnn {Numbers} {Proportional} {pnum} {pnum} {+tnum,-tnum}
-\@@_define_opentype_onoffreset:nnnnn {Numbers} {Lowercase} {onum} {onum} {+lnum,-lnum}
-\@@_define_opentype_onoffreset:nnnnn {Numbers} {Uppercase} {lnum} {lnum} {+onum,-onum}
-\@@_define_opentype_onoffreset:nnnnn {Numbers} {SlashedZero} {zero} {zero} {}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\aliasfontfeatureoption {Numbers} {Monospaced} {Tabular}
-\aliasfontfeatureoption {Numbers} {Lowercase} {OldStyle}
-\aliasfontfeatureoption {Numbers} {Uppercase} {Lining}
-% \end{macrocode}
-%
-% |luaotload| provides a custom |anum| feature for replacing Latin
-% (AKA Arabic) numbers with Arabic (AKA Indic-Arabic). The same feature
-% maps to Farsi (Persian) numbers if font language is Farsi.
-% \begin{macrocode}
-%<LU> \@@_define_opentype_onoffreset:nnnnn {Numbers} {Arabic} {anum} {anum} {}
-% \end{macrocode}
-%
-% \subsection{Vertical position}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {VerticalPosition}
-\@@_define_opentype_feature:nnnnn {VerticalPosition} {ResetAll} {} {}
- {
- +sups,-sups,
- +subs,-subs,
- +ordn,-ordn,
- +numr,-numr,
- +dnom,-dnom,
- +sinf,-sinf,
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Superior} {sups} {sups} {+subs,+ordn,+numr,+dnom,+sinf}
-\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Inferior} {subs} {subs} {+sups,+ordn,+numr,+dnom,+sinf}
-\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Ordinal} {ordn} {ordn} {+sups,+subs,+numr,+dnom,+sinf}
-\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Numerator} {numr} {numr} {+sups,+subs,+ordn,+dnom,+sinf}
-\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {Denominator} {dnom} {dnom} {+sups,+subs,+ordn,+numr,+sinf}
-\@@_define_opentype_onoffreset:nnnnn {VerticalPosition} {ScientificInferior} {sinf} {sinf} {+sups,+subs,+ordn,+numr,+dnom}
-% \end{macrocode}
-%
-% \subsection{Contextuals}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Contextuals}
-\@@_define_opentype_feature:nnnnn {Contextuals} {ResetAll} {} {}
- {
- +cswh,-cswh,
- +calt,-calt,
- +init,-init,
- +fina,-fina,
- +falt,-falt,
- +medi,-medi,
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {Contextuals} {Swash} {cswh} {cswh} {}
-\@@_define_opentype_onoffreset:nnnnn {Contextuals} {Alternate} {calt} {calt} {}
-\@@_define_opentype_onoffreset:nnnnn {Contextuals} {WordInitial} {init} {init} {}
-\@@_define_opentype_onoffreset:nnnnn {Contextuals} {WordFinal} {fina} {fina} {}
-\@@_define_opentype_onoffreset:nnnnn {Contextuals} {LineFinal} {falt} {falt} {}
-\@@_define_opentype_onoffreset:nnnnn {Contextuals} {Inner} {medi} {medi} {}
-% \end{macrocode}
-%
-% \subsection{Diacritics}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Diacritics}
-\@@_define_opentype_feature:nnnnn {Diacritics} {ResetAll} {} {}
- {
- +mark,-mark,
- +mkmk,-mkmk,
- +abvm,-abvm,
- +blwm,-blwm,
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {Diacritics} {MarkToBase} {mark} {mark} {}
-\@@_define_opentype_onoffreset:nnnnn {Diacritics} {MarkToMark} {mkmk} {mkmk} {}
-\@@_define_opentype_onoffreset:nnnnn {Diacritics} {AboveBase} {abvm} {abvm} {}
-\@@_define_opentype_onoffreset:nnnnn {Diacritics} {BelowBase} {blwm} {blwm} {}
-% \end{macrocode}
-%
-% \subsection{Kerning}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Kerning}
-\@@_define_opentype_feature:nnnnn {Kerning} {ResetAll} {} {}
- {
- +cpsp,-cpsp,
- +kern,-kern,
- }
-\@@_define_opentype_onoffreset:nnnnn {Kerning} {Uppercase} {cpsp} {cpsp} {}
-\@@_define_opentype_feature:nnnnn {Kerning} {On} {kern} {+kern} {-kern}
-\@@_define_opentype_feature:nnnnn {Kerning} {Off} {kern} {-kern} {+kern}
-\@@_define_opentype_feature:nnnnn {Kerning} {Reset} {} {} {+kern,-kern}
-% \end{macrocode}
-%
-% \subsection{Fractions}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Fractions}
-\@@_define_opentype_feature:nnnnn {Fractions} {ResetAll} {} {}
- {
- +frac,-frac,
- +afrc,-afrc,
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_feature:nnnnn {Fractions} {On} {frac} {+frac} {}
-\@@_define_opentype_feature:nnnnn {Fractions} {Off} {frac} {-frac} {}
-\@@_define_opentype_feature:nnnnn {Fractions} {Reset} {} {} {+frac,-frac}
-\@@_define_opentype_onoffreset:nnnnn {Fractions} {Alternate} {afrc} {afrc} {-frac}
-% \end{macrocode}
-%
-
-% \subsection{Style}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Style}
-\@@_define_opentype_feature:nnnnn {Style} {ResetAll} {} {}
- {
- +salt,-salt,
- +ital,-ital,
- +ruby,-ruby,
- +swsh,-swsh,
- +hist,-hist,
- +titl,-titl,
- +hkna,-hkna,
- +vkna,-vkna,
- +ssty=0,-ssty=0,
- +ssty=1,-ssty=1,
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {Style} {Alternate} {salt} {salt} {}
-\@@_define_opentype_onoffreset:nnnnn {Style} {Italic} {ital} {ital} {}
-\@@_define_opentype_onoffreset:nnnnn {Style} {Ruby} {ruby} {ruby} {}
-\@@_define_opentype_onoffreset:nnnnn {Style} {Swash} {swsh} {swsh} {}
-\@@_define_opentype_onoffreset:nnnnn {Style} {Cursive} {swsh} {curs} {}
-\@@_define_opentype_onoffreset:nnnnn {Style} {Historic} {hist} {hist} {}
-\@@_define_opentype_onoffreset:nnnnn {Style} {TitlingCaps} {titl} {titl} {}
-\@@_define_opentype_onoffreset:nnnnn {Style} {HorizontalKana} {hkna} {hkna} {+vkna,+pkna}
-\@@_define_opentype_onoffreset:nnnnn {Style} {VerticalKana} {vkna} {vkna} {+hkna,+pkna}
-\@@_define_opentype_onoffreset:nnnnn {Style} {ProportionalKana} {pkna} {pkna} {+vkna,+hkna}
-\@@_define_opentype_feature:nnnnn {Style} {MathScript} {ssty} {+ssty=0} {+ssty=1}
-\@@_define_opentype_feature:nnnnn {Style} {MathScriptScript} {ssty} {+ssty=1} {+ssty=0}
-% \end{macrocode}
-%
-% \subsection{CJK shape}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {CJKShape}
-\@@_define_opentype_feature:nnnnn {CJKShape} {ResetAll} {} {}
- {
- +trad,-trad,
- +smpl,-smpl,
- +jp78,-jp78,
- +jp83,-jp83,
- +jp90,-jp90,
- +jp04,-jp04,
- +expt,-expt,
- +nlck,-nlck,
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {CJKShape} {Traditional} {trad} {trad} {+smpl,+jp78,+jp83,+jp90,+jp04,+expt,+nlck}
-\@@_define_opentype_onoffreset:nnnnn {CJKShape} {Simplified} {smpl} {smpl} {+trad,+jp78,+jp83,+jp90,+jp04,+expt,+nlck}
-\@@_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1978} {jp78} {jp78} {+trad,+smpl,+jp83,+jp90,+jp04,+expt,+nlck}
-\@@_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1983} {jp83} {jp83} {+trad,+smpl,+jp78,+jp90,+jp04,+expt,+nlck}
-\@@_define_opentype_onoffreset:nnnnn {CJKShape} {JIS1990} {jp90} {jp90} {+trad,+smpl,+jp78,+jp83,+jp04,+expt,+nlck}
-\@@_define_opentype_onoffreset:nnnnn {CJKShape} {JIS2004} {jp04} {jp04} {+trad,+smpl,+jp78,+jp83,+jp90,+expt,+nlck}
-\@@_define_opentype_onoffreset:nnnnn {CJKShape} {Expert} {expt} {expt} {+trad,+smpl,+jp78,+jp83,+jp90,+jp04,+nlck}
-\@@_define_opentype_onoffreset:nnnnn {CJKShape} {NLC} {nlck} {nlck} {+trad,+smpl,+jp78,+jp83,+jp90,+jp04,+expt}
-% \end{macrocode}
-%
-% \subsection{Character width}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {CharacterWidth}
-\@@_define_opentype_feature:nnnnn {CharacterWidth} {ResetAll} {} {}
- {
- +pwid,-pwid,
- +fwid,-fwid,
- +hwid,-hwid,
- +twid,-twid,
- +qwid,-qwid,
- +palt,-palt,
- +halt,-halt,
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Proportional} {pwid} {pwid} {+fwid,+hwid,+twid,+qwid,+palt,+halt}
-\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Full} {fwid} {fwid} {+pwid,+hwid,+twid,+qwid,+palt,+halt}
-\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Half} {hwid} {hwid} {+pwid,+fwid,+twid,+qwid,+palt,+halt}
-\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Third} {twid} {twid} {+pwid,+fwid,+hwid,+qwid,+palt,+halt}
-\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {Quarter} {qwid} {qwid} {+pwid,+fwid,+hwid,+twid,+palt,+halt}
-\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {AlternateProportional} {palt} {palt} {+pwid,+fwid,+hwid,+twid,+qwid,+halt}
-\@@_define_opentype_onoffreset:nnnnn {CharacterWidth} {AlternateHalf} {halt} {halt} {+pwid,+fwid,+hwid,+twid,+qwid,+palt}
-% \end{macrocode}
-%
-% \subsection{Vertical}
-% According to spec |vkrn| must also activate |vpal| if available but for simplicity we don't do that here (yet?).
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Vertical}
-\@@_define_opentype_onoffreset:nnnnn {Vertical} {RotatedGlyphs} {vrt2} {vrt2} {+vrtr,+vert}
-\@@_define_opentype_onoffreset:nnnnn {Vertical} {AlternatesForRotation} {vrtr} {vrtr} {+vrt2}
-\@@_define_opentype_onoffreset:nnnnn {Vertical} {Alternates} {vert} {vert} {+vrt2}
-\@@_define_opentype_onoffreset:nnnnn {Vertical} {KanaAlternates} {vkna} {vkna} {+hkna}
-\@@_define_opentype_onoffreset:nnnnn {Vertical} {Kerning} {vkrn} {vkrn} {}
-\@@_define_opentype_onoffreset:nnnnn {Vertical} {AlternateMetrics} {valt} {valt} {+vhal,+vpal,+kern}
-\@@_define_opentype_onoffreset:nnnnn {Vertical} {HalfMetrics} {vhal} {vhal} {+valt,+vpal,+kern}
-\@@_define_opentype_onoffreset:nnnnn {Vertical} {ProportionalMetrics} {vpal} {vpal} {+valt,+vhal}
-% \end{macrocode}
-%
-%
-%
-%
-% \section{OpenType features that need numbering}
-%
-% \subsection{Alternate}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Alternate}
-\keys_define:nn {fontspec-opentype}
- {
- Alternate .default:n = {0} ,
-%<LU> Alternate / Random .code:n =
-%<LU> { \@@_make_OT_feature:nnn {salt}{ +salt = random }{} } ,
- Alternate / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
- { \@@_make_OT_feature:nnn {salt}{ +salt = ##1 }{} }
- }
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\aliasfontfeature{Alternate}{StylisticAlternates}
-% \end{macrocode}
-%
-%
-% \subsection{Variant / StylisticSet}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Variant}
-\keys_define:nn {fontspec-opentype}
- {
- Variant .default:n = {0} ,
- Variant / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
- {
- \@@_make_OT_feature:xxx { ss \two at digits {##1} } { +ss \two at digits {##1} } {}
- }
- }
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\aliasfontfeature{Variant}{StylisticSet}
-% \end{macrocode}
-%
-% \subsection{CharacterVariant}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {CharacterVariant}
-\use:x
- {
- \cs_new:Npn \exp_not:N \fontspec_parse_cv:w
- ##1 \c_colon_str ##2 \c_colon_str ##3 \exp_not:N \q_nil
- {
- \@@_make_OT_feature:xxx
- { cv \exp_not:N \two at digits {##1} } { +cv \exp_not:N \two at digits {##1} = ##2 } {}
- }
- \keys_define:nn {fontspec-opentype}
- {
- CharacterVariant / unknown .code:n =
- {
- \clist_map_inline:nn {##1}
- {
- \exp_not:N \fontspec_parse_cv:w
- ####1 \c_colon_str 0 \c_colon_str \exp_not:N \q_nil
- }
- }
- }
- }
-% \end{macrocode}
-% Possibilities: \verb|a:0:\q_nil| or \verb|a:b:0:\q_nil|.
-%
-%
-% \subsection{Annotation}
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Annotation}
-\keys_define:nn {fontspec-opentype}
- {
- Annotation .default:n = {0} ,
- Annotation / unknown .code:n =
- {
- \@@_make_OT_feature:nnn {nalt} {+nalt=#1} {}
- }
- }
-% \end{macrocode}
-%
-% \subsection{Ornament}
-%
-% \begin{macrocode}
-\@@_define_opentype_feature_group:n {Ornament}
-\keys_define:nn {fontspec-opentype}
- {
- Ornament .default:n = {0} ,
- Ornament / unknown .code:n =
- {
- \@@_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
- }
- }
-% \end{macrocode}
-%
-%
-% \section{Script and Language}
-%
-%
-% \subsection{Script}
-%
-% \begin{macrocode}
-\keys_define:nn { fontspec-opentype } { Script .choice: }
-\cs_new:Nn \fontspec_new_script:nn
- {
- \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
- \bool_set_false:N \l_@@_script_exist_bool
- \clist_map_inline:nn {#2}
- {
- \@@_check_script:NnTF \l_fontspec_font {####1}
- {
- \tl_set:Nn \l_fontspec_script_tl {####1}
- \int_set:Nn \l_@@_script_int {\l_@@_strnum_int}
- \bool_set_true:N \l_@@_script_exist_bool
- \tl_gset:Nx \g_@@_single_feat_tl { script=####1 }
- \clist_map_break:
- }
- { }
- }
- \bool_if:NF \l_@@_script_exist_bool
- {
- \str_if_eq:nnTF {#1} {Latin}
- {
- \@@_warning:nx {script-not-exist} {#1}
- }
- {
- \@@_check_script:NnTF \l_fontspec_font {latn}
- {
- \@@_warning:nx {script-not-exist-latn} {#1}
- \tl_set:Nn \l_fontspec_script_tl {latn}
- \int_set:Nn \l_@@_script_int {\l_@@_strnum_int}
- }
- {
- \@@_warning:nx {script-not-exist} {#1}
- }
- }
- }
- }
- }
-% \end{macrocode}
-%
-%
-% \subsection{Language}
-%
-% \begin{macrocode}
-\keys_define:nn { fontspec-opentype } { Language .choice: }
-\cs_new:Nn \fontspec_new_lang:nn
- {
- \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
- \@@_check_lang:NnTF \l_fontspec_font {#2}
- {
- \tl_set:Nn \l_fontspec_lang_tl {#2}
- \int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
- \tl_gset:Nx \g_@@_single_feat_tl { language=#2 }
- }
- {
- \@@_warning:nx {language-not-exist} {#1}
- \keys_set:nn { fontspec-opentype } { Language = Default }
- }
- }
- }
-% \end{macrocode}
-%
-% \paragraph{Default}
-%
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-opentype}{ Language / Default }
- {
- \tl_set:Nn \l_fontspec_lang_tl {DFLT}
- \int_zero:N \l_@@_language_int
- \tl_gset:Nn \g_@@_single_feat_tl { language=DFLT }
- }
-% \end{macrocode}
-%
-% \paragraph{Turkish} Turns out that many fonts use `TUR' as their Turkish language tag rather than the specified `TRK'. So we check for both:
-% \begin{macrocode}
-\keys_define:nn {fontspec-opentype}
- {
- Language / Turkish .code:n =
- {
- \@@_check_lang:NnTF \l_fontspec_font {TRK}
- {
- \int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TRK}
- \tl_gset:Nn \g_@@_single_feat_tl { language=TRK }
- }
- {
- \@@_check_lang:NnTF \l_fontspec_font {TUR}
- {
- \int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TUR}
- \tl_gset:Nn \g_@@_single_feat_tl { language=TUR }
- }
- {
- \@@_warning:nx {language-not-exist} {Turkish}
- \keys_set:nn {fontspec-opentype} {Language=Default}
- }
- }
- }
- }
-% \end{macrocode}
-%
-% \section{Backwards compatibility}
-% Backwards compatibility:
-% \begin{macrocode}
-\cs_new:Nn \@@_ot_compat:nn
- {
- \aliasfontfeatureoption {#1} {#2Off} {No#2}
- }
-\@@_ot_compat:nn {Ligatures} {Rare}
-\@@_ot_compat:nn {Ligatures} {Required}
-\@@_ot_compat:nn {Ligatures} {Common}
-\@@_ot_compat:nn {Ligatures} {Discretionary}
-\@@_ot_compat:nn {Ligatures} {Contextual}
-\@@_ot_compat:nn {Ligatures} {Historic}
-\@@_ot_compat:nn {Numbers} {SlashedZero}
-\@@_ot_compat:nn {Contextuals} {Swash}
-\@@_ot_compat:nn {Contextuals} {Alternate}
-\@@_ot_compat:nn {Contextuals} {WordInitial}
-\@@_ot_compat:nn {Contextuals} {WordFinal}
-\@@_ot_compat:nn {Contextuals} {LineFinal}
-\@@_ot_compat:nn {Contextuals} {Inner}
-\@@_ot_compat:nn {Diacritics} {MarkToBase}
-\@@_ot_compat:nn {Diacritics} {MarkToMark}
-\@@_ot_compat:nn {Diacritics} {AboveBase}
-\@@_ot_compat:nn {Diacritics} {BelowBase}
-% \end{macrocode}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-fontload.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,105 +0,0 @@
-%%^^A%% fontspec-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{expl3 interface for primitive font loading}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% \begin{macro}{\@@_primitive_font_set:Nnn,\@@_primitive_font_gset:Nnn}
-% \begin{macrocode}
-\cs_set:Npn \@@_primitive_font_set:Nnn #1#2#3
- {
- \font #1 = #2 ~at~ #3 \scan_stop:
- }
-% \end{macrocode}
-% \begin{macrocode}
-\cs_set:Npn \@@_primitive_font_gset:Nnn #1#2#3
- {
- \global \font #1 = #2 ~at~ #3 \scan_stop:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_font_suppress_not_found_error:}
-% \begin{macrocode}
-\cs_set:Npn \@@_font_suppress_not_found_error:
- {
- \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[pTF]{\@@_primitive_font_if_null:N}
-% \begin{macrocode}
-\prg_set_conditional:Nnn \@@_primitive_font_if_null:N {p,TF,T,F}
- {
- \ifx #1 \nullfont
- \prg_return_true:
- \else
- \prg_return_false:
- \fi
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[TF]{\@@_primitive_font_if_exist:n}
-% \begin{macrocode}
-\prg_set_conditional:Nnn \@@_primitive_font_if_exist:n {TF,T,F}
- {
- \group_begin:
- \@@_font_suppress_not_found_error:
- \@@_primitive_font_set:Nnn \l_@@_primitive_font {#1} {10pt}
- \@@_primitive_font_if_null:NTF \l_@@_primitive_font
- { \group_end: \prg_return_false: }
- { \group_end: \prg_return_true: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_primitive_font_glyph_if_exist:NnTF}
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_primitive_font_glyph_if_exist:Nn {p,TF,T,F}
- {
- \etex_iffontchar:D #1 #2 \scan_stop:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_primitive_font_set_hyphenchar:Nn}
-% \begin{macrocode}
-\cs_new:Nn \@@_primitive_font_set_hyphenchar:Nn
- {
- \tex_hyphenchar:D #1 = #2 \scan_stop:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,123 +0,0 @@
-%%^^A%% fontspec-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Graphite/AAT code}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec&XE>
-% \end{macrocode}
-% \fi
-%
-
-
-% \begin{macro}{\@@_define_aat_feature_group:n}
-% \begin{macrocode}
-\cs_new:Nn \@@_define_aat_feature_group:n
- { \keys_define:nn {fontspec-aat} { #1 .multichoice: } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_define_aat_feature:nnnn}
-% \begin{macrocode}
-\cs_new:Nn \@@_define_aat_feature:nnnn
- {
- \keys_define:nn {fontspec-aat}
- {
- #1/#2 .code:n = { \@@_make_AAT_feature:nn {#3}{#4} }
- }
- }
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}{\@@_make_AAT_feature:nn}
-% \begin{macrocode}
-\cs_new:Nn \@@_make_AAT_feature:nn
- {
- \tl_if_empty:nTF {#1}
- { \@@_warning:n {aat-feature-not-exist} }
- {
- \@@_make_AAT_feature_string:NnnTF \l_fontspec_font {#1}{#2}
- {
- \@@_update_featstr:n {\l_fontspec_feature_string_tl}
- }
- { \@@_warning:nx {aat-feature-not-exist-in-font} {#1,#2} }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_make_AAT_feature_string:NnnTF}
-% This macro takes the numerical codes for a font feature and
-% creates a specified macro containing the string required in the
-% font definition to turn that feature on or off. Used primarily in
-% [...], but also used to check if small caps
-% exists in the requested font (see page~\pageref{mac:makesmallcaps}).
-%
-% For exclusive selectors, it's easy; just grab the string:
-% For \emph{non}-exclusive selectors, it's a little more complex.
-% If the selector is even, it corresponds to switching the feature on.
-% If the selector is \emph{odd}, it corresponds to switching the feature off.
-% But \XeTeX\ doesn't return a selector string for this number, since the
-% feature is defined for the `switching on' value. So we need to check the
-% selector of the previous number, and then prefix the feature string with |!|
-% to denote the switch.
-%
-% Finally, save out the complete feature string in \cmd\l_fontspec_feature_string_tl.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_make_AAT_feature_string:Nnn {TF,T,F}
- {
- \tl_set:Nx \l_@@_tmpa_tl { \XeTeXfeaturename #1 #2 }
- \tl_if_empty:NTF \l_@@_tmpa_tl
- { \prg_return_false: }
- {
- \int_compare:nTF { \XeTeXisexclusivefeature #1 #2 > 0 }
- {
- \tl_set:Nx \l_@@_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
- }
- {
- \int_if_even:nTF {#3}
- {
- \tl_set:Nx \l_@@_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
- }
- {
- \tl_set:Nx \l_@@_tmpb_tl
- {
- \XeTeXselectorname #1 #2\space \numexpr#3-1\relax
- }
- \tl_if_empty:NF \l_@@_tmpb_tl { \tl_put_left:Nn \l_@@_tmpb_tl {!} }
- }
- }
- \tl_if_empty:NTF \l_@@_tmpb_tl
- { \prg_return_false: }
- {
- \tl_set:Nx \l_fontspec_feature_string_tl { \l_@@_tmpa_tl = \l_@@_tmpb_tl }
- \prg_return_true:
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec&XE>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-interfaces.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,246 +0,0 @@
-%%^^A%% fontspec-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{User commands}\label{sec:codeuser}
-%
-% This section contains the definitions of the commands detailed in
-% the user documentation. Only the `top level' definitions of the
-% commands are contained herein; they all use or define macros which
-% are defined or used later on in \vref{sec:codeinternal}.
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% \begin{macrocode}
-\NewDocumentCommand \fontspec { O{} m O{} }
- {
- \@@_main_fontspec:nn {#1,#3} {#2}
- \ignorespaces
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \setmainfont { O{} m O{} }
- {
- \@@_main_setmainfont:nn {#1,#3} {#2}
- \ignorespaces
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \setsansfont { O{} m O{} }
- {
- \@@_main_setsansfont:nn {#1,#3} {#2}
- \ignorespaces
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \setmonofont { O{} m O{} }
- {
- \@@_main_setmonofont:nn {#1,#3} {#2}
- \ignorespaces
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \setmathrm { O{} m O{} }
- {
- \@@_main_setmathrm:nn {#1,#3} {#2}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \setboldmathrm { O{} m O{} }
- {
- \@@_main_setboldmathrm:nn {#1,#3} {#2}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \setmathsf { O{} m O{} }
- {
- \@@_main_setmathsf:nn {#1,#3} {#2}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \setmathtt { O{} m O{} }
- {
- \@@_main_setmathtt:nn {#1,#3} {#2}
- }
-% \end{macrocode}
-%
-% \begin{macro}{\setromanfont}
-% This is the old name for \cs{setmainfont}, retained \emph{ad infinitum}
-% for backwards compatibility. It was deprecated in 2010.
-% \begin{macrocode}
-\NewDocumentCommand \setromanfont { O{} m O{} }
- {
- \@@_main_setmainfont:nn {#1,#3} {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\NewDocumentCommand \newfontfamily { m O{} m O{} }
- {
- \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \NewDocumentCommand
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \renewfontfamily { m O{} m O{} }
- {
- \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \RenewDocumentCommand
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \setfontfamily { m O{} m O{} }
- {
- \@@_main_newfontfamily:nnnN {#1} {#2,#4} {#3} \DeclareDocumentCommand
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \newfontface { m O{} m O{} }
- {
- \@@_main_newfontface:nnn {#1} {#2,#4} {#3}
- }
-% \end{macrocode}
-%
-% \begin{macro}{\defaultfontfeatures}
-% This macro takes one argument that consists of all of feature
-% options that will be applied by default to all subsequent \cs{fontspec} commands.
-% \begin{macrocode}
-\NewDocumentCommand \defaultfontfeatures { t+ o m }
- {
- \IfNoValueTF {#2}
- { \@@_set_default_features:nn {#1} {#3} }
- { \@@_set_font_default_features:nnn {#1} {#2} {#3} }
- \ignorespaces
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\NewDocumentCommand \addfontfeatures {m}
- {
- \@@_main_addfontfeatures:n {#1}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \addfontfeature {m}
- {
- \@@_main_addfontfeatures:n {#1}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \newfontfeature {mm}
- {
- \@@_main_newfontfeature:nn {#1} {#2}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \newAATfeature {mmmm}
- {
- \@@_main_newAATfeature:nnnn {#1} {#2} {#3} {#4}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \newopentypefeature {mmm}
- {
- \@@_main_newopentypefeature:nnn {#1} {#2} {#3}
- }
-% \end{macrocode}
-%
-% \begin{macro}{\newICUfeature}
-% Deprecated.
-% \begin{macrocode}
-\NewDocumentCommand \newICUfeature {mmm}
- {
- \@@_main_newopentypefeature:nnn {#1} {#2} {#3}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\NewDocumentCommand \aliasfontfeature {mm}
- {
- \@@_main_aliasfontfeature:nn {#1} {#2}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \aliasfontfeatureoption {mmm}
- {
- \@@_main_aliasfontfeatureoption:nnn {#1} {#2} {#3}
- }
-% \end{macrocode}
-%
-% \begin{macro}{\newfontscript}
-% Mostly used internally, but also possibly useful for users, to define new OpenType
-% `scripts', mapping logical names to OpenType script tags.
-% \begin{macrocode}
-\NewDocumentCommand \newfontscript {mm}
- {
- \fontspec_new_script:nn {#1} {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfontlanguage}
-% Mostly used internally, but also possibly useful for users, to define new OpenType
-% `languages', mapping logical names to OpenType language tags.
-% \begin{macrocode}
-\NewDocumentCommand \newfontlanguage {mm}
- {
- \fontspec_new_lang:nn {#1} {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\NewDocumentCommand \DeclareFontExtensions {m}
- {
- \@@_main_DeclareFontExtensions:n {#1}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NewDocumentCommand \IfFontFeatureActiveTF {mmm}
- {
- \@@_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
- }
-% \end{macrocode}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,1098 +0,0 @@
-%%^^A%% fontspec-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Internals}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% \subsection{The main function for setting fonts}
-%
-% \begin{macro}{\@@_select_font_family:nn}
-% This is the command that defines font families for use, the underlying
-% procedure of all \cmd\fontspec-like commands. Given a
-% list of font features (|#1|) for a requested font (|#2|),
-% it will define an NFSS
-% family for that font and put the family name (globally) into \cs{l_fontspec_family_tl}.
-% The \TeX\ `\cs{font}' command is (globally) stored in \cs{l_fontspec_font}.
-%
-% This macro does its processing inside a group to attempt to restrict the scope of its internal processing.
-% This works to some degree to insulate the internal commands from having to be manually cleared.
-%
-% Some often-used variables to know about:
-% \begin{itemize}
-% \item \cmd{\l_fontspec_fontname_tl} is used as the generic name of the font being defined.
-% \item \cmd{\l_@@_fontid_tl} is the unique identifier of the font with all its features.
-% \item \cmd{\l_@@_fontname_up_tl} is the font specifically to be used as the upright font.
-% \item \cmd{\l_@@_basename_tl} is the (immutable) original argument used for |*|-replacing.
-% \item \cmd{\l_fontspec_font} is the plain \TeX{} font of the upright font requested.
-% \end{itemize}
-% \begin{macrocode}
-\cs_new_protected:Nn \@@_select_font_family:nn
- {
-%<debug>\typeout{^^J^^J::::::::::::::::::::::::::::::^^J:: fontspec_select:nn~ {#1}~ {#2} }
- \group_begin:
- \@@_font_suppress_not_found_error:
- \@@_init:
-
- \@@_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
- \@@_sanitise_fontname:Nn \l_@@_fontname_up_tl {#2}
- \@@_sanitise_fontname:Nn \l_@@_basename_tl {#2}
-
- \@@_if_detect_external:nT {#2}
- { \keys_set:nn {fontspec-preparse-external} {Path} }
-
- \keys_set_known:nn {fontspec-preparse-cfg} {#1}
-
- \@@_init_ttc:n {#2}
- \@@_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
-
- \@@_extract_all_features:n {#1}
- \tl_set:Nx \l_@@_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l_@@_all_features_clist }
-
-%<debug>\typeout{fontid: \l_@@_fontid_tl}
-
- \@@_preparse_features:
- \@@_load_font:
- \@@_set_scriptlang:
- \@@_get_features:n {}
- \bool_set_false:N \l_@@_firsttime_bool
-
- \@@_save_family_needed:nTF {#2}
- {
- \@@_save_family:nn {#1} {#2}
-%<debug> \@@_warning:nxx {defining-font} {#1} {#2}
- }
- {
-%<debug> \typeout{Font~ family~ already~ defined.}
- }
- \group_end:
-
- \tl_set_eq:NN \l_fontspec_family_tl \g_@@_nfss_family_tl
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fontspec_select:nn}
-% This old name has been used by 3rd party packages so for compatibility:
-% \begin{macrocode}
-\cs_set_eq:NN \fontspec_select:nn \@@_select_font_family:nn %% deprecated, for compatibility only
-% \end{macrocode}
-% \end{macro}
-%
-% \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 {~}
- \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}
- \clist_map_break:
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_if_detect_external:nT}
-% Check if either the fontname ends with a known font extension.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_if_detect_external:n {T}
- {
-%<debug> \typeout{:: @@_if_detect_external:n { \exp_not:n {#1} } }
- \clist_map_inline:Nn \l_@@_extensions_clist
- {
- \bool_set_false:N \l_@@_tmpa_bool
- \exp_args:Nx % <- this should be handled earlier
- \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
- { \bool_set_true:N \l_@@_tmpa_bool \clist_map_break: }
- }
- \bool_if:NTF \l_@@_tmpa_bool \prg_return_true: \prg_return_false:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_init_ttc:n}
-% For TTC fonts we assume they will be loading the italic/bold fonts from the same file,
-% so prepopulate the fontnames to avoid needing to do it manually.
-% \begin{macrocode}
-\cs_new:Nn \@@_init_ttc:n
- {
- \str_if_eq_x:nnT { \str_lower_case:f {\l_@@_extension_tl} } {.ttc}
- {
- \@@_sanitise_fontname:Nn \l_@@_fontname_it_tl {#1}
- \@@_sanitise_fontname:Nn \l_@@_fontname_bf_tl {#1}
- \@@_sanitise_fontname:Nn \l_@@_fontname_bfit_tl {#1}
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_load_external_fontoptions:Nn}
-% Load a possible \texttt{.fontspec} font configuration file.
-% This file could set font-specific options for the font about to be loaded.
-% \begin{macrocode}
-\cs_new:Nn \@@_load_external_fontoptions:Nn
- {
- \bool_if:NT \l_@@_fontcfg_bool
- {
-%<debug> \typeout{:: @@_load_external_fontoptions:Nn \exp_not:N #1 {#2} }
- \@@_sanitise_fontname:Nn #1 {#2}
- \tl_set:Nx \l_@@_ext_filename_tl {#1.fontspec}
- \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 } }
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_extract_all_features:}
-% \begin{macrocode}
-\cs_new:Nn \@@_extract_all_features:n
- {
-%<debug> \typeout{:: @@_extract_all_features:n { \unexpanded {#1} } }
- \bool_if:NTF \l_@@_disable_defaults_bool
- {
- \clist_set:Nx \l_@@_all_features_clist {#1}
- }
- {
- \prop_get:NVNF \g_@@_fontopts_prop \l_fontspec_fontname_tl \l_@@_fontopts_clist
- { \clist_clear:N \l_@@_fontopts_clist }
-
- \prop_get:NVNF \g_@@_fontopts_prop \l_@@_family_label_tl \l_@@_family_fontopts_clist
- { \clist_clear:N \l_@@_family_fontopts_clist }
- \tl_clear:N \l_@@_family_label_tl
-
- \clist_set:Nx \l_@@_all_features_clist
- {
- \g_@@_default_fontopts_clist,
- \l_@@_family_fontopts_clist,
- \l_@@_fontopts_clist,
- #1
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_preparse_features:}
-% \darg{feature options}
-% \darg{font name}
-% Perform the (multi-step) feature parsing process.
-%
-% Convert the requested features to font definition
-% strings. First the features are parsed for information about font
-% loading (whether it's a named font or external font, etc.), and then
-% information is extracted for the names of the other shape fonts.
-% \begin{macrocode}
-\cs_new:Nn \@@_preparse_features:
- {
-%<debug> \typeout{:: @@_preparse_features:}
-% \end{macrocode}
-% Detect if external fonts are to be used, possibly automatically, and
-% parse fontspec features for bold/italic fonts and their features.
-% \begin{macrocode}
-
- \@@_keys_set_known:nxN {fontspec-preparse-external}
- { \l_@@_all_features_clist }
- \l_@@_keys_leftover_clist
-
-% \end{macrocode}
-% When \cmd{\l_fontspec_fontname_tl} is augmented with a prefix or whatever to create
-% the name of the upright font (\cmd{\l_@@_fontname_up_tl}), this latter is the new `general
-% font name' to use.
-% \begin{macrocode}
- \tl_set_eq:NN \l_fontspec_fontname_tl \l_@@_fontname_up_tl
- \@@_keys_set_known:nxN {fontspec-renderer} {\l_@@_keys_leftover_clist}
- \l_@@_keys_leftover_clist
- \@@_keys_set_known:nxN {fontspec-preparse} {\l_@@_keys_leftover_clist}
- \l_@@_fontfeat_clist
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_load_font:}
-% \begin{macrocode}
-\cs_new:Nn \@@_load_font:
- {
-%<debug>\typeout{:: @@_load_font}
-%<debug>\typeout{Set~ base~ font~ for~ preliminary~ analysis: \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} }
- \@@_primitive_font_set:Nnn \l_fontspec_font
- { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } {\f at size pt}
- \@@_primitive_font_if_null:NT \l_fontspec_font { \@@_error:nx {font-not-found} {\l_@@_fontname_up_tl} }
- \@@_set_font_type:N \l_fontspec_font
-%<debug>\typeout{Set~ base~ font~ properly: \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} }
- \@@_primitive_font_gset:Nnn \l_fontspec_font
- { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } {\f at size pt}
- \l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_construct_font_call:nn}
-% Constructs the complete font invocation.
-% \darg{Base name}
-% \darg{Extension}
-% \darg{TTC Index}
-% \darg{Renderer}
-% \darg{Optical size}
-% \darg{Font features}
-% We check if \meta{Font features} are empty and if so don't add in the separator colon.
-% \begin{macrocode}
-\cs_new:Nn \@@_construct_font_call:nnnnnn
- {
-%<XE> " \@@_fontname_wrap:n { #1 #2 #3 }
-%<LU> " \@@_fontname_wrap:n { #1 #2 } #3
- #4 #5
- \str_if_eq_x:nnF {#6}{} {:#6} "
- }
-% \end{macrocode}
-% In practice, we don't use the six-argument version, since most arguments are constructed on-the-fly:
-% \begin{macrocode}
-\cs_new:Nn \@@_construct_font_call:nn
- {
- \@@_construct_font_call:nnnnnn
- {#1}
- \l_@@_extension_tl
- \l_@@_ttc_index_tl
- \l_fontspec_renderer_tl
- \l_@@_optical_size_tl
- {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \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'.
-% \XeTeX's syntax is followed since \pkg{luaotfload} provides compatibility.
-% \begin{macrocode}
-\cs_new:Nn \@@_font_is_name:
- {
- \cs_set_eq:NN \@@_fontname_wrap:n \use:n
- }
-\cs_new:Nn \@@_font_is_file:
- {
- \cs_set:Npn \@@_fontname_wrap:n ##1 { [ \l_@@_font_path_tl ##1 ] }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_set_scriptlang:}
-% Only necessary for OpenType fonts.
-% First check if the font supports scripts, then apply defaults if
-% none are explicitly requested. Similarly with the language settings.
-% \begin{macrocode}
-\cs_new:Nn \@@_set_scriptlang:
- {
- \bool_if:NT \l_@@_firsttime_bool
- {
- \tl_if_empty:NTF \l_@@_script_name_tl
- {
- \@@_check_script:NnTF \l_fontspec_font {latn}
- {
- \tl_set:Nn \l_@@_script_name_tl {Latin}
- \tl_if_empty:NT \l_@@_lang_name_tl
- {
- \tl_set:Nn \l_@@_lang_name_tl {Default}
- }
- \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl}
- \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl}
- }
- {
- \@@_info:n {no-scripts}
- }
- }
- {
- \tl_if_empty:NT \l_@@_lang_name_tl
- {
- \tl_set:Nn \l_@@_lang_name_tl {Default}
- }
- \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl}
- \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl}
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_get_features:Nn}
-% This macro is a wrapper for |\keys_set:nn| which expands and adds a
-% default specification to the original passed options. It begins by
-% initialising the commands used to hold font-feature specific
-% strings.
-% Its argument is any additional features to prepend to the default.
-%
-% Do not set the colour if not explicitly spec'd else \verb|\color| (using
-% specials) will not work.
-% \begin{macrocode}
-\cs_new:Nn \@@_get_features:n
- {
-%<debug> \typeout{:: @@_get_features:Nn { \exp_not:n {#1} } }
- \@@_init_fontface:
- \@@_keys_set_known:nxN {fontspec-renderer} {\l_@@_fontfeat_clist,#1}
- \l_@@_keys_leftover_clist
- \@@_keys_set_known:nxN {fontspec} {\l_@@_keys_leftover_clist} \l_@@_keys_leftover_clist
-%<*XE>
- \bool_if:NTF \l_@@_ot_bool
- {
-%<debug> \typeout{::: Setting~ keys~ for~ OpenType~ font~ features:~"\l_@@_keys_leftover_clist"}
- % \tracingall
- \keys_set:nV {fontspec-opentype} \l_@@_keys_leftover_clist
- % \EROROR
- }
- {
-%<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 }
- }
-%</XE>
-%<*LU>
-%<debug> \typeout{::: Setting~ keys~ for~ OpenType~ font~ features:~"\l_@@_keys_leftover_clist"}
- \keys_set:nV {fontspec-opentype} \l_@@_keys_leftover_clist
-%</LU>
-
- \tl_if_empty:NF \l_@@_mapping_tl
- { \@@_update_featstr:n { mapping = \l_@@_mapping_tl } }
-
- \str_if_eq_x:nnF { \l_@@_hexcol_tl \l_@@_opacity_tl }
- { \c_@@_hexcol_tl \c_@@_opacity_tl }
- { \@@_update_featstr:n { color = \l_@@_hexcol_tl\l_@@_opacity_tl } }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_save_family_needed:nTF}
-% Check if the family is unique and, if so, save its information.
-% (\cs{addfontfeature} and other macros use this data.)
-% Then the font family and its shapes are defined in the NFSS.
-%
-% Now we have a unique (in fact, too unique!) string that contains
-% the family name and every option in abbreviated form. This is used
-% with a counter to create a simple NFSS family name for the font we're
-% selecting.
-%
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_save_family_needed:n { TF }
- {
-
-%<debug> \typeout{save~ family:~ #1}
-%<debug> \typeout{== fontid_tl: "\l_@@_fontid_tl".}
-
- \tl_if_empty:NTF \l_@@_nfss_fam_tl
- {
- \prop_get:NVNTF \g_@@_fontid_family_prop \l_@@_fontid_tl \l_@@_tmp_tl
- {
- \tl_gset_eq:NN \g_@@_nfss_family_tl \l_@@_tmp_tl
- \prg_return_false:
- }
- {
- \tl_set:Nx \l_@@_tmp_tl {#1}
- \tl_remove_all:Nn \l_@@_tmp_tl { ~ }
- \@@_save_fontid_family:VV \l_@@_fontid_tl \l_@@_tmp_tl
- \prg_return_true:
- }
- }
- {
- \tl_gset_eq:NN \g_@@_nfss_family_tl \l_@@_nfss_fam_tl
- \cs_undefine:c { g_@@_fontinfo_ \g_@@_nfss_family_tl _prop }
- \prg_return_true:
- }
- }
-\cs_new:Nn \@@_save_fontid_family:nn
- {
- \prop_get:NnNTF \g_@@_family_int_prop {#2} \l_@@_tmp_tl
- {
- \tl_set:Nx \l_@@_tmp_tl
- { \int_eval:n { \l_@@_tmp_tl + 1 } }
- }
- { \tl_set:Nn \l_@@_tmp_tl { 0 } }
- \prop_gput:NnV \g_@@_family_int_prop {#2} \l_@@_tmp_tl
- \tl_gset:Nx \g_@@_nfss_family_tl { #2 ( \l_@@_tmp_tl ) }
- \prop_gput:NnV \g_@@_fontid_family_prop {#1} \g_@@_nfss_family_tl
- }
-\cs_generate_variant:Nn \@@_save_fontid_family:nn { VV }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_save_family:nn}
-% Saves the relevant font information for future processing.
-% \begin{macrocode}
-\cs_new:Nn \@@_save_family:nn
- {
- \@@_save_fontinfo:n {#2}
- \@@_find_autofonts:
- \DeclareFontFamily{\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{}
- \@@_set_faces:
- \@@_info:nxx {defining-font} {#1} {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_save_fontinfo:n}
-% Saves the relevant font information for future processing.
-% \begin{macrocode}
-\cs_new:Nn \@@_save_fontinfo:n
- {
- \prop_new:c {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop}
- \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {fontname} { #1 }
- \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {options} { \l_@@_all_features_clist }
- \prop_gput:cnx {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {fontdef}
- {
- \@@_construct_font_call:nn {\l_fontspec_fontname_tl}
- { \l_@@_pre_feat_sclist \g_@@_rawfeatures_sclist }
- }
- \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {script-num} \l_@@_script_int
- \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {lang-num} \l_@@_language_int
- \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {script-tag} \l_fontspec_script_tl
- \prop_gput:cnV {g_@@_fontinfo_ \g_@@_nfss_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Setting font shapes in a family}
-%
-% All NFSS specifications take their default values, so if any of them
-% are redefined, the shapes will be selected to fit in with the
-% current state. For example, if \cmd\bfdefault\ is redefined to |b|, all
-% bold shapes defined by this package will also be assigned to |b|.
-%
-% The combination shapes are searched first because they use information that may be redefined in the single cases.
-% E.g., if no bold font is specified then |set_autofont| will attempt to set it.
-% This has subtle/small ramifications on the logic of choosing the bold italic font.
-%
-% \begin{macro}{\@@_find_autofonts:}
-% \begin{macrocode}
-\cs_new:Nn \@@_find_autofonts:
- {
- \bool_if:nF {\l_@@_noit_bool || \l_@@_nobf_bool}
- {
- \@@_set_autofont:Nnn \l_@@_fontname_bfit_tl {\l_@@_fontname_it_tl} {/B}
- \@@_set_autofont:Nnn \l_@@_fontname_bfit_tl {\l_@@_fontname_bf_tl} {/I}
- \@@_set_autofont:Nnn \l_@@_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
- }
-
- \bool_if:NF \l_@@_nobf_bool
- {
- \@@_set_autofont:Nnn \l_@@_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
- }
-
- \bool_if:NF \l_@@_noit_bool
- {
- \@@_set_autofont:Nnn \l_@@_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
- }
-
- \@@_set_autofont:Nnn \l_@@_fontname_bfsl_tl {\l_@@_fontname_sl_tl} {/B}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_set_faces:}
-% \begin{macrocode}
-\cs_new:Nn \@@_set_faces:
- {
- \@@_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l_@@_fontfeat_up_clist
- \@@_add_nfssfont:nnnn \bfdefault \updefault \l_@@_fontname_bf_tl \l_@@_fontfeat_bf_clist
- \@@_add_nfssfont:nnnn \mddefault \itdefault \l_@@_fontname_it_tl \l_@@_fontfeat_it_clist
- \@@_add_nfssfont:nnnn \mddefault \sldefault \l_@@_fontname_sl_tl \l_@@_fontfeat_sl_clist
- \@@_add_nfssfont:nnnn \bfdefault \itdefault \l_@@_fontname_bfit_tl \l_@@_fontfeat_bfit_clist
- \@@_add_nfssfont:nnnn \bfdefault \sldefault \l_@@_fontname_bfsl_tl \l_@@_fontfeat_bfsl_clist
-
- \prop_map_inline:Nn \l_@@_nfssfont_prop { \@@_set_faces_aux:nnnnn ##2 }
- }
-\cs_new:Nn \@@_set_faces_aux:nnnnn
- {
- \fontspec_complete_fontname:Nn \l_@@_curr_fontname_tl {#3}
- \@@_make_font_shapes:Nnnnn \l_@@_curr_fontname_tl {#1} {#2} {#4} {#5}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fontspec_complete_fontname:Nn}
-% This macro defines |#1| as the input with any |*| tokens of its input
-% replaced by the font name. This lets us define supplementary fonts in full
-% (``\texttt{Baskerville Semibold}'') or in abbreviation (``\texttt{* Semibold}'').
-% \begin{macrocode}
-\cs_new:Nn \fontspec_complete_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
- \tl_replace_all:Nnx #1 {*} {\l_@@_basename_tl}
-%<LU> \tl_remove_all:Nn #1 {~}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_nfssfont:nnnn}
-% \darg{series}
-% \darg{shape}
-% \darg{fontname}
-% \darg{fontspec features}
-% \begin{macrocode}
-\cs_new:Nn \@@_add_nfssfont:nnnn
- {
- \tl_set:Nx \l_@@_this_font_tl {#3}
-
- \tl_if_empty:xTF {#4}
- { \clist_set:Nn \l_@@_sizefeat_clist {Size={-}} }
- { \@@_keys_set_known:nxN {fontspec-preparse-nested} {#4} \l_@@_tmp_tl }
-
- \tl_if_empty:NF \l_@@_this_font_tl
- {
- \prop_put:Nxx \l_@@_nfssfont_prop {#1/#2}
- { {#1}{#2}{\l_@@_this_font_tl}{#4}{\l_@@_sizefeat_clist} }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Fonts}
-%
-% \begin{macro}{\@@_set_font_type:N}
-% Now check if the font is to be rendered with \ATSUI\ or Harfbuzz. This will either
-% be automatic (based on the font type), or specified by the user via a font feature.
-%
-% This macro sets booleans
-% accordingly depending if the font in \cmd\l_fontspec_font\ is an \AAT\
-% font or an OpenType font or a font with feature axes (either \AAT\ or
-% Multiple Master), respectively.
-% \begin{macrocode}
-\cs_new:Nn \@@_set_font_type:N
- {
-%<debug> \typeout{:: @@_set_font_type:}
-%<*XE>
- \bool_set_false:N \l_@@_tfm_bool
- \bool_set_false:N \l_@@_atsui_bool
- \bool_set_false:N \l_@@_ot_bool
- \bool_set_false:N \l_@@_mm_bool
- \bool_set_false:N \l_@@_graphite_bool
- \ifcase\XeTeXfonttype #1
- \bool_set_true:N \l_@@_tfm_bool
- \or
- \bool_set_true:N \l_@@_atsui_bool
- \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
- \ifnum\XeTeXcountvariations #1 > \c_zero
- \bool_set_true:N \l_@@_mm_bool
- \fi
- \or
- \bool_set_true:N \l_@@_ot_bool
- \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
- \or
- \bool_set_true:N \l_@@_graphite_bool
- \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/GR} }
- \fi
-%</XE>
-% \end{macrocode}
-% If automatic, the \cmd{\l_fontspec_renderer_tl} token list will still be
-% empty (other suffices that could be added will be later in the feature
-% processing), and if it is indeed still empty, assign it a value so that the
-% other weights of the font are specifically loaded with the same renderer.
-%
-% LuaTeX only supports one:
-% \begin{macrocode}
-%<*LU>
- \bool_set_true:N \l_@@_ot_bool
-%</LU>
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_set_autofont:Nnn}
-% \darg{Font name tl}
-% \darg{Base font name}
-% \darg{Font name modifier}
-%
-% This function looks for font with \meta{name} and \meta{modifier} |#2#3|, and if found (i.e., different to font with name |#2|) stores it in tl |#1|. A modifier is something like |/B| to look for a bold font, for example.
-%
-% We can't match external fonts in this way (in \XeTeX\ anyway; todo: test with LuaTeX).
-% If \meta{font name tl} is not empty, then it's already been specified by the user so abort.
-% If \meta{Base font name} is not given, we also abort for obvious reasons.
-%
-% If \meta{font name tl} is empty, then proceed.
-% If not found, \meta{font name tl} remains empty.
-% Otherwise, we have a match.
-% \begin{macrocode}
-\cs_new:Nn \@@_set_autofont:Nnn
- {
- \bool_if:NF \l_@@_external_bool
- {
- \tl_if_empty:xF {#2}
- {
- \tl_if_empty:NT #1
- {
- \@@_if_autofont:nnTF {#2} {#3}
- { \tl_set:Nx #1 {#2#3} }
- { \@@_info:nx {no-font-shape} {#2#3} }
- }
- }
- }
- }
-
-\prg_new_conditional:Nnn \@@_if_autofont:nn {T,TF}
- {
- \@@_primitive_font_set:Nnn \l_tmpa_font { \@@_construct_font_call:nn {#1} {} } {\f at size pt}
- \@@_primitive_font_set:Nnn \l_tmpb_font { \@@_construct_font_call:nn {#1#2} {} } {\f at size pt}
- \str_if_eq_x:nnTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
- { \prg_return_false: }
- { \prg_return_true: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_make_font_shapes:Nnnnn}
-% \darg{Font name}
-% \darg{Font series}
-% \darg{Font shape}
-% \darg{Font features}
-% \darg{Size features}
-% This macro eventually uses \cs{DeclareFontShape} to define the font shape in
-% question.
-% \begin{macrocode}
-\cs_new:Nn \@@_make_font_shapes:Nnnnn
- {
- \group_begin:
- \@@_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l_@@_leftover_clist
- \@@_load_fontname:n {#1}
- \@@_declare_shape:nnxx {#2} {#3} { \l_@@_fontopts_clist, \l_@@_leftover_clist } {#5}
- \group_end:
- }
-
-\cs_new:Nn \@@_load_fontname:n
- {
-%<debug> \typeout{:: @@_load_fontname:n {#1} }
- \@@_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#1}
- \prop_get:NVNF \g_@@_fontopts_prop \l_fontspec_fontname_tl \l_@@_fontopts_clist
- { \clist_clear:N \l_@@_fontopts_clist }
- \keys_set_groups:nnV {fontspec/fontname} {getfontname} \l_@@_fontopts_clist
- \@@_primitive_font_set:Nnn \l_fontspec_font { \@@_construct_font_call:nn {\l_fontspec_fontname_tl} {} } {\f at size pt}
- \@@_primitive_font_if_null:NT \l_fontspec_font { \@@_error:nx {font-not-found} {#1} }
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\keys_define:nn {fontspec/fontname}
- {
- Font .tl_set:N = \l_fontspec_fontname_tl ,
- Font .groups:n = {getfontname} ,
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_declare_shape:nnnn}
-% \darg{Font series}
-% \darg{Font shape}
-% \darg{Font features}
-% \darg{Size features}
-% Wrapper for \cmd\DeclareFontShape.
-% And finally the actual font shape declaration using \cmd\l_@@_nfss_tl\ defined above.
-% \cmd\l_@@_postadjust_tl\ is defined in various places to deal with things like the hyphenation
-% character and interword spacing.
-%
-% The main part is to loop through \feat{SizeFeatures} arguments, which are of the form
-% {\par\centering |SizeFeatures={{<one>},{<two>},{<three>}}|.\par}
-% \begin{macrocode}
-\cs_new:Nn \@@_declare_shape:nnnn
- {
-%<debug>\typeout{=~ declare_shape:~{\l_fontspec_fontname_tl}~{#1}~{#2}}
- \tl_clear:N \l_@@_nfss_tl
- \tl_clear:N \l_@@_nfss_sc_tl
- \tl_set_eq:NN \l_@@_saved_fontname_tl \l_fontspec_fontname_tl
-
- \exp_args:Nx \clist_map_inline:nn {#4} { \@@_setup_single_size:nn {#3} {##1} }
-
- \@@_declare_shapes_normal:nn {#1} {#2}
- \@@_declare_shapes_smcaps:nn {#1} {#2}
- \@@_declare_shape_slanted:nn {#1} {#2}
- \@@_declare_shape_loginfo:nn {#1} {#2}
- }
-\cs_generate_variant:Nn \@@_declare_shape:nnnn {nnxx}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_setup_single_size:nn}
-% \begin{macrocode}
-\cs_new:Nn \@@_setup_single_size:nn
- {
- \tl_clear:N \l_@@_size_tl
- \tl_set_eq:NN \l_@@_sizedfont_tl \l_@@_saved_fontname_tl % in case not spec'ed
-
- \keys_set_known:nxN {fontspec-sizing} { \exp_after:wN \use:n #2 }
- \l_@@_sizing_leftover_clist
- \tl_if_empty:NT \l_@@_size_tl { \@@_error:n {no-size-info} }
-%<debug>\typeout{==~ size:~\l_@@_size_tl}
-
- % "normal"
- \@@_load_fontname:n {\l_@@_sizedfont_tl}
- \@@_setup_nfss:Nnnn \l_@@_nfss_tl {#1} {\l_@@_sizing_leftover_clist} {}
-%<debug> \typeout{===~ sized~ font:~ \l_@@_sizedfont_tl}
-
- % small caps
- \clist_set_eq:NN \l_@@_fontfeat_curr_clist \l_@@_fontfeat_sc_clist
-
- \bool_if:NF \l_@@_nosc_bool
- {
- \tl_if_empty:NTF \l_@@_fontname_sc_tl
- {
- \@@_make_smallcaps:TF
- {
-%<debug>\typeout{====~Small~ caps~ found.}
- \clist_put_left:Nn \l_@@_fontfeat_curr_clist {Letters=SmallCaps}
- }
- {
-%<debug>\typeout{====~Small~ caps~ not~ found.}
- \bool_set_true:N \l_@@_nosc_bool
- }
- }
- { \@@_load_fontname:n {\l_@@_fontname_sc_tl} }% local for each size
- }
-
- \bool_if:NF \l_@@_nosc_bool
- {
- \@@_setup_nfss:Nnnn \l_@@_nfss_sc_tl
- {#1} {\l_@@_sizing_leftover_clist} {\l_@@_fontfeat_curr_clist}
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_setup_nfss:Nnnn}
-% \begin{macrocode}
-\cs_new:Nn \@@_setup_nfss:Nnnn
- {
-%<debug>\typeout{====~Setup~NFSS~shape:~<\l_@@_size_tl>~\l_fontspec_fontname_tl}
-
- \@@_get_features:n { #2 , #3 , #4 }
-%<debug>\typeout{====~Gathered~features:~\g_@@_rawfeatures_sclist}
-
- \tl_put_right:Nx #1
- {
- <\l_@@_size_tl> \l_@@_scale_tl
- \@@_construct_font_call:nn { \l_fontspec_fontname_tl }
- { \l_@@_pre_feat_sclist \g_@@_rawfeatures_sclist }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_declare_shapes_normal:nn}
-% \begin{macrocode}
-\cs_new:Nn \@@_declare_shapes_normal:nn
- {
- \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl}
- {#1} {#2} {\l_@@_nfss_tl}{\l_@@_postadjust_tl}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_declare_shapes_smcaps:nn}
-% \begin{macrocode}
-\cs_new:Nn \@@_declare_shapes_smcaps:nn
- {
- \tl_if_empty:NF \l_@@_nfss_sc_tl
- {
- \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl} {\g_@@_nfss_family_tl} {#1}
- { \@@_combo_sc_shape:n {#2} } {\l_@@_nfss_sc_tl} {\l_@@_postadjust_tl}
- }
- }
-
-\cs_new:Nn \@@_combo_sc_shape:n
- {
- \tl_if_exist:cTF { \@@_shape_merge:nn {#1} {\scdefault} }
- { \tl_use:c { \@@_shape_merge:nn {#1} {\scdefault} } }
- { \scdefault }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_DeclareFontShape:nnnnnn}
-% \begin{macrocode}
-\cs_new:Nn \@@_DeclareFontShape:nnnnnn
- {
-%<debug>\typeout{DeclareFontShape:~{#1}{#2}{#3}{#4}...}
- \group_begin:
- \normalsize
- \cs_undefine:c {#1/#2/#3/#4/\f at size}
- \group_end:
- \DeclareFontShape{#1}{#2}{#3}{#4}{#5}{#6}
- }
-\cs_generate_variant:Nn \@@_DeclareFontShape:nnnnnn {xxxxxx}
-% \end{macrocode}
-%
-% \begin{macro}{\@@_declare_shape_slanted:nn}
-% This extra stuff for the slanted shape substitution is a little bit awkward.
-% We define the slanted shape to be a synonym for it when (a)~we're defining an italic font, but also (b)~when the default slanted shape isn't `it'.
-% (Presumably this turned up once in a test and I realised it caused problems. I doubt this would happen much.)
-%
-% We should test when a slanted font has been specified and not run this code if so, but the \verb|\@@_set_slanted:| code will overwrite this anyway if necessary.
-% \begin{macrocode}
-\cs_new:Nn \@@_declare_shape_slanted:nn
- {
- \bool_if:nT
- {
- \str_if_eq_x_p:nn {#2} {\itdefault} &&
- !(\str_if_eq_x_p:nn {\itdefault} {\sldefault})
- }
- {
- \@@_DeclareFontShape:xxxxxx {\g_@@_nfss_enc_tl}{\g_@@_nfss_family_tl}{#1}{\sldefault}
- {<->ssub*\g_@@_nfss_family_tl/#1/\itdefault}{\l_@@_postadjust_tl}
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_declare_shape_loginfo:nn}
-% Lastly some informative messaging.
-% \begin{macrocode}
-\cs_new:Nn \@@_declare_shape_loginfo:nn
- {
- \tl_gput_right:Nx \g_@@_defined_shapes_tl
- {
- \exp_not:n { \\ }
- -~ \exp_not:N \str_case:nn {#1/#2}
- {
- {\mddefault/\updefault} {'normal'~}
- {\bfdefault/\updefault} {'bold'~}
- {\mddefault/\itdefault} {'italic'~}
- {\mddefault/\sldefault} {'slanted'~}
- {\bfdefault/\itdefault} {'bold~ italic'~}
- {\bfdefault/\sldefault} {'bold~ slanted'~}
- } (#1/#2)~
- with~ NFSS~ spec.:~
- \l_@@_nfss_tl
- \exp_not:n { \\ }
- -~ \exp_not:N \str_case:nn { #1 / \@@_combo_sc_shape:n {#2} }
- {
- {\mddefault/\scdefault} {'small~ caps'~}
- {\bfdefault/\scdefault} {'bold~ small~ caps'~}
- {\mddefault/\itscdefault} {'italic~ small~ caps'~}
- {\bfdefault/\itscdefault} {'bold~ italic~ small~ caps'~}
- {\mddefault/\slscdefault} {'slanted~ small~ caps'~}
- {\bfdefault/\slscdefault} {'bold~ slanted~ small~ caps'~}
- }~( #1 / \@@_combo_sc_shape:n {#2} )~
- with~ NFSS~ spec.:~
- \l_@@_nfss_sc_tl
- \tl_if_empty:fF {\l_@@_postadjust_tl}
- {
- \exp_not:N \\ and~ font~ adjustment~ code: \exp_not:N \\ \l_@@_postadjust_tl
- }
- }
- }
-% \end{macrocode}
-% Maybe |\str_if_eq_x:nnF| would be better?
-% \end{macro}
-%
-%
-% \subsubsection{Features}
-%
-% \begin{macro}{\l_@@_pre_feat_sclist}
-% These are the features always applied to a font selection before other
-% features.
-% \begin{macrocode}
-\tl_set:Nn \l_@@_pre_feat_sclist
-%<*XE>
- {
- \bool_if:NT \l_@@_ot_bool
- {
- \tl_if_empty:NF \l_fontspec_script_tl
- {
- script = \l_fontspec_script_tl ;
- language = \l_fontspec_lang_tl ;
- }
- }
- }
-%</XE>
-%<*LU>
- {
- mode = \l_fontspec_mode_tl ;
- \tl_if_empty:NF \l_fontspec_script_tl
- {
- script = \l_fontspec_script_tl ;
- language = \l_fontspec_lang_tl ;
- }
- }
-%</LU>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@_make_ot_smallcaps:TF}
-% \label{mac:makesmallcaps}
-% This macro checks if the font contains small caps.
-% \begin{macrocode}
-%<LU>\cs_new:Nn \@@_make_smallcaps:TF
-%<XE>\cs_new:Nn \@@_make_ot_smallcaps:TF
- {
- \@@_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
- }
-%<*XE>
-\cs_new:Nn \@@_make_smallcaps:TF
- {
- \bool_if:NTF \l_@@_ot_bool
- { \@@_make_ot_smallcaps:TF {#1} {#2} }
- {
- \bool_if:NT \l_@@_atsui_bool
- { \@@_make_AAT_feature_string:NnnTF \l_fontspec_font {3}{3} {#1} {#2} }
- }
- }
-%</XE>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_update_featstr:n}
-% \cmd{\g_@@_rawfeatures_sclist} is the string used to define the list of specific
-% font features. Each time another font feature is requested, this
-% macro is used to add that feature to the list. Font features are
-% separated by semicolons.
-% \begin{macrocode}
-\cs_new:Nn \@@_update_featstr:n
- {
-%<debug> \typeout{:::: @@_update_featstr:n {#1}}
- \bool_if:NF \l_@@_firsttime_bool
- {
- \tl_gset:Nx \g_@@_single_feat_tl { #1 }
-%<debug> \typeout{::::~ Adding~ feature.}
- \tl_gput_right:Nx \g_@@_rawfeatures_sclist {#1;}
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_remove_clashing_featstr:n}
-% \begin{macrocode}
-\cs_new:Nn \@@_remove_clashing_featstr:n
- {
-%<debug> \typeout{:::: @@_remove_clashing_featstr:n {#1}}
- \clist_map_inline:nn {#1}
- {
-%<debug> \typeout{::::~ Removing~ feature~ "##1;"}
- \tl_gremove_all:Nn \g_@@_rawfeatures_sclist {##1;}
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Initialisation}
-%
-% \begin{macro}{\@@_init:}
-% Initialisations that need to occur once per fontspec font invocation.
-% (Some of these may be redundant.
-% Check whether they're assigned to globally or not.)
-% \begin{macrocode}
-\cs_set:Npn \@@_init:
- {
-%<debug> \typeout{:: @@_init:}
- \bool_set_false:N \l_@@_ot_bool
- \bool_set_true:N \l_@@_firsttime_bool
- \@@_font_is_name:
- \tl_clear:N \l_@@_font_path_tl
- \tl_clear:N \l_@@_optical_size_tl
- \tl_clear:N \l_@@_ttc_index_tl
- \tl_clear:N \l_fontspec_renderer_tl
- \tl_gclear:N \g_@@_defined_shapes_tl
- \tl_gclear:N \g_@@_curr_series_tl
- \tl_gset_eq:NN \g_@@_nfss_enc_tl \g_fontspec_encoding_tl
-%<*LU>
- \tl_set:Nn \l_fontspec_mode_tl {node}
- \int_set:Nn \luatex_prehyphenchar:D { `\- } % fixme
- \int_zero:N \luatex_posthyphenchar:D % fixme
- \int_zero:N \luatex_preexhyphenchar:D % fixme
- \int_zero:N \luatex_postexhyphenchar:D % fixme
-%</LU>
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_init_fontface:}
-% Executed in \cs{@@_get_features:Nn}.
-% \begin{macrocode}
-\cs_new:Nn \@@_init_fontface:
- {
- \tl_gclear:N \g_@@_rawfeatures_sclist
- \tl_clear:N \l_@@_scale_tl
- \tl_set_eq:NN \l_@@_opacity_tl \c_@@_opacity_tl
- \tl_set_eq:NN \l_@@_hexcol_tl \c_@@_hexcol_tl
- \tl_set_eq:NN \l_@@_postadjust_tl \c_@@_postadjust_tl
- \tl_clear:N \l_@@_wordspace_adjust_tl
- \tl_clear:N \l_@@_punctspace_adjust_tl
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Miscellaneous}
-%
-% \begin{macro}{\@@_iv_str_to_num:Nn}
-% This macro takes a four character string and converts it to the
-% numerical representation required for \XeTeX\ OpenType script/language/feature
-% purposes. The output is stored in |#1|.
-%
-% The reason it's ugly is because the input can be of the form of any of these:
-% `|abcd|', `|abc|', `|abc |', `|ab|', `|ab |', \etc.
-% (It is assumed the first two chars are \emph{always} not spaces.) So this macro
-% reads in the string, delimited by a space; this input is padded with \cmd\@empty s
-% and anything beyond four chars is snipped. The \cmd\@empty s then are used to reconstruct
-% the spaces in the string to number calculation.
-%
-% For backwards compatibility this code also strips a leading |+| or |-|.
-% \begin{macrocode}
-\cs_new:Nn \@@_iv_str_to_num:Nn
- {
- \@@_strip_leading_sign:Nw #1#2 \q_nil
- }
-\cs_set:Npn \@@_strip_leading_sign:Nw #1#2#3 \q_nil
- {
- \bool_if:nTF { \str_if_eq_p:nn {#2} {+} || \str_if_eq_p:nn {#2} {-} }
- { \@@_iv_str_to_num:w #1 \q_nil #3 \c_empty_tl \c_empty_tl \q_nil }
- { \@@_iv_str_to_num:w #1 \q_nil #2#3 \c_empty_tl \c_empty_tl \q_nil }
- }
-\cs_set:Npn \@@_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil
- {
- \int_set:Nn #1
- {
- `#2 * "1000000
- + `#3 * "10000
- + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100
- + \ifx \c_empty_tl #5 32 \else `#5 \fi
- }
- }
-\cs_generate_variant:Nn \@@_iv_str_to_num:Nn {No}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,864 +0,0 @@
-%%^^A%% fontspec-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Font loading (\pkg{keyval}) definitions}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% This package uses a large number of keyval modules which operate sequentially on keyval
-% input to ensure priority.
-% \begin{macrocode}
-\clist_gset:Nn \g_@@_all_keyval_modules_clist
- {
- fontspec, fontspec-opentype, fontspec-aat,
- fontspec-preparse, fontspec-preparse-cfg, fontspec-preparse-external, fontspec-preparse-nested,
- fontspec-renderer
- }
-% \end{macrocode}
-%
-% Wrapper function to save some characters in the source:
-% \begin{macrocode}
-\cs_new:Nn \@@_keys_define_code:nnn
- {
- \keys_define:nn {#1} { #2 .code:n = {#3} }
- }
-% \end{macrocode}
-%
-% For catching features that cannot be used in |\addfontfeatures|:
-% \begin{macrocode}
-\cs_new:Nn \@@_aff_error:n
- {
- \@@_keys_define_code:nnn {fontspec-addfeatures} {#1}
- { \@@_error:nx {not-in-addfontfeatures} {#1} }
- }
-% \end{macrocode}
-%
-% \subsection{Pre-pre-parsing stages}
-%
-% These features are extracted from the font feature list before all others.
-%
-% \paragraph{Don't load font config file}
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-cfg} {IgnoreFontspecFile}
- {
- \bool_set_false:N \l_@@_fontcfg_bool
- }
-\@@_keys_define_code:nnn {fontspec-preparse-external} {IgnoreFontspecFile}
- {
- \bool_set_false:N \l_@@_fontcfg_bool
- }
-% \end{macrocode}
-%
-% \begin{macro}{Path}
-% For fonts that aren't installed in the system. If no argument is given, the font is located
-% with |kpsewhich|; it's either in the current directory or the \TeX\ tree. Otherwise, the
-% argument given defines the file path of the font.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {Path}
- {
- \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}
- \@@_font_is_file:
-%<*XE>
- \keys_set:nn {fontspec-renderer} {Renderer=OpenType}
-%</XE>
- }
-\aliasfontfeature{Path}{ExternalLocation}
-\@@_keys_define_code:nnn {fontspec} {Path} {}
-% \end{macrocode}
-% \end{macro}
-%
-% \paragraph{\feat{Extension}}
-% For fonts that aren't installed in the system. Specifies the font extension
-% to use.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {Extension}
- {
- \tl_set:Nn \l_@@_extension_tl {#1}
- \bool_if:NF \l_@@_external_bool
- {
- \keys_set:nn {fontspec-preparse-external} {Path}
- }
- }
-\tl_clear:N \l_@@_extension_tl
-\@@_keys_define_code:nnn {fontspec} {Extension} {}
-% \end{macrocode}
-%
-%
-% \paragraph{\feat{Renderer}}
-% This feature must be processed before all others (the other font shape and features options are also pre-parsed for convenience) because the renderer determines the format of the features and even whether certain features are available.
-% \begin{macrocode}
-\keys_define:nn {fontspec-renderer}
- {
- Renderer .choices:nn =
- {AAT,ICU,OpenType,Graphite,Full,Basic}
- {
- \int_compare:nTF {\l_keys_choice_int <= 4} {
-%<*XE>
- \tl_set:Nx \l_fontspec_renderer_tl
- {
- \int_case:nn \l_keys_choice_int { 1 {/AAT} 2 {/OT} 3 {/OT} 4 {/GR} }
- }
- \tl_gset:Nx \g_@@_single_feat_tl { \l_fontspec_renderer_tl }
-%</XE>
-%<*LU>
- \@@_warning:nx {only-xetex-feature} {Renderer=AAT/OpenType/Graphite}
-%</LU>
- }
- {
-%<*XE>
- \@@_warning:nx {only-luatex-feature} {Renderer=Full/Basic}
-%</XE>
-%<*LU>
- \tl_set:Nx \l_fontspec_mode_tl
- {
- \int_case:nn \l_keys_choice_int { 5 {node} 6 {base} }
- }
- \tl_gset:Nx \g_@@_single_feat_tl { mode=\l_fontspec_mode_tl }
-%</LU>
- }
- }
- }
-% \end{macrocode}
-%
-% \subsection{Pre-parsed features}
-%
-% \paragraph{OpenType script/language}
-% See later for the resolutions from \pkg{fontspec} features to OpenType definitions.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse} {Script}
- {
-%<XE> \keys_set:nn {fontspec-renderer} {Renderer=OpenType}
- \tl_set:Nn \l_@@_script_name_tl {#1}
- }
-% \end{macrocode}
-% Exactly the same:
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse} {Language}
- {
-%<XE> \keys_set:nn {fontspec-renderer} {Renderer=OpenType}
- \tl_set:Nn \l_@@_lang_name_tl {#1}
- }
-% \end{macrocode}
-%
-%
-% \paragraph{TTC font index}
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse} {FontIndex}
- {
- \str_if_eq_x:nnF { \str_lower_case:f {\l_@@_extension_tl} } {.ttc}
- { \@@_warning:n {font-index-needs-ttc} }
-%<XE> \tl_set:Nn \l_@@_ttc_index_tl {:#1}
-%<LU> \tl_set:Nn \l_@@_ttc_index_tl {(#1)}
- }
-\@@_keys_define_code:nnn {fontspec} {FontIndex}
- {
-%<XE> \tl_set:Nn \l_@@_ttc_index_tl {:#1}
-%<LU> \tl_set:Nn \l_@@_ttc_index_tl {(#1)}
- }
-% \end{macrocode}
-%
-% \subsection{Font faces}
-%
-% \paragraph{Upright}
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {UprightFont}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_up_tl {#1}
- }
-% \end{macrocode}
-%
-% \paragraph{Italic and slanted}
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {ItalicFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l_@@_noit_bool
- }
- {
- \bool_set_false:N \l_@@_noit_bool
- \fontspec_complete_fontname:Nn \l_@@_fontname_it_tl {#1}
- }
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_sl_tl {#1}
- }
-% \end{macrocode}
-%
-%
-% \paragraph{Bold (NFSS) Series}
-% By default, \pkg{fontspec} uses the default bold series, \cs{bfdefault}.
-% We want to be able to make this extensible. This code is not yet functional!
-% \begin{macrocode}
-%\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldSeries}
-% {
-% \tl_gset:Nx \g_@@_curr_series_tl { #1 }
-% \seq_put_right:Nx \l_@@_bf_series_seq { #1 }
-% }
-% \end{macrocode}
-%
-% \paragraph{Bold}
-% This contains some stubb code to allow more than one bold font to be loaded.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l_@@_nobf_bool
- }
- {
- \bool_set_false:N \l_@@_nobf_bool
- \fontspec_complete_fontname:Nn \l_@@_curr_bfname_tl {#1}
-
- \seq_if_empty:NT \l_@@_bf_series_seq
- {
- \tl_gset:Nx \g_@@_curr_series_tl {\bfdefault}
- \seq_put_right:Nx \l_@@_bf_series_seq {\bfdefault}
- }
-
- \tl_if_eq:oxT \g_@@_curr_series_tl {\bfdefault}
- {
- \tl_set_eq:NN \l_@@_fontname_bf_tl \l_@@_curr_bfname_tl
- }
-
- \prop_put:NxV \l_@@_nfss_prop {BoldFont-\g_@@_curr_series_tl} \l_@@_curr_bfname_tl
-
-%<debug>\typeout{Setting~bold~font~"\l_@@_curr_bfname_tl"~with~series~"\g_@@_curr_series_tl"}
-
- }
- }
-% \end{macrocode}
-%
-% \paragraph{Bold italic/slanted}
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldItalicFont}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_bfit_tl {#1}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldSlantedFont}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_bfsl_tl {#1}
- }
-% \end{macrocode}
-%
-% \paragraph{Small caps}
-% Small caps isn't pre-parsed because it can vary with others above:
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {SmallCapsFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l_@@_nosc_bool
- }
- {
- \bool_set_false:N \l_@@_nosc_bool
- \fontspec_complete_fontname:Nn \l_@@_fontname_sc_tl {#1}
- }
- }
-% \end{macrocode}
-%
-%
-% \subsubsection{Preparsed font features}
-%
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
- {
- \clist_set:Nn \l_@@_fontfeat_up_clist {#1}
- }
-\@@_keys_define_code:nnn {fontspec-preparse} {BoldFeatures}
- {
- \clist_set:Nn \l_@@_fontfeat_bf_clist {#1}
-
-% \prop_put:NxV \l_@@_nfss_prop
-% {BoldFont-\g_@@_curr_series_tl} \l_@@_curr_bfname_tl
- }
-\@@_keys_define_code:nnn {fontspec-preparse} {ItalicFeatures}
- {
- \clist_set:Nn \l_@@_fontfeat_it_clist {#1}
- }
-\@@_keys_define_code:nnn {fontspec-preparse} {BoldItalicFeatures}
- {
- \clist_set:Nn \l_@@_fontfeat_bfit_clist {#1}
- }
-\@@_keys_define_code:nnn {fontspec-preparse} {SlantedFeatures}
- {
- \clist_set:Nn \l_@@_fontfeat_sl_clist {#1}
- }
-\@@_keys_define_code:nnn {fontspec-preparse} {BoldSlantedFeatures}
- {
- \clist_set:Nn \l_@@_fontfeat_bfsl_clist {#1}
- }
-% \end{macrocode}
-% Note that small caps features can vary by shape, so these in fact \emph{aren't} pre-parsed.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {SmallCapsFeatures}
- {
- \bool_if:NF \l_@@_firsttime_bool
- {
- \clist_set:Nn \l_@@_fontfeat_sc_clist {#1}
- }
- }
-% \end{macrocode}
-%
-% \paragraph{Features varying by size}
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse} {SizeFeatures}
- {
- \clist_set:Nn \l_@@_sizefeat_clist {#1}
- \clist_put_right:Nn \l_@@_fontfeat_up_clist { SizeFeatures = {#1} }
- }
-\@@_keys_define_code:nnn {fontspec-preparse-nested} {SizeFeatures}
- {
- \clist_set:Nn \l_@@_sizefeat_clist {#1}
- \tl_if_empty:NT \l_@@_this_font_tl
- { \tl_set:Nn \l_@@_this_font_tl { -- } } % needs to be non-empty as a flag
- }
-\@@_keys_define_code:nnn {fontspec-preparse-nested} {Font}
- {
- \tl_set:Nn \l_@@_this_font_tl {#1}
- }
-\@@_keys_define_code:nnn {fontspec} {SizeFeatures}
- {
- % dummy
- }
-\@@_keys_define_code:nnn {fontspec} {Font}
- {
- % dummy
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-sizing} {Size}
- {
- \tl_set:Nn \l_@@_size_tl {#1}
- }
-\@@_keys_define_code:nnn {fontspec-sizing} {Font}
- {
- \fontspec_complete_fontname:Nn \l_@@_sizedfont_tl {#1}
- }
-% \end{macrocode}
-%
-%
-%
-% \subsection{General font-independent features}
-%
-% These features can be applied to any font.
-%
-% \paragraph{NFSS encoding}
-% For the very brave.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse} {NFSSEncoding}
- {
- \tl_gset:Nx \g_@@_nfss_enc_tl { #1 }
- }
-% \end{macrocode}
-%
-% \paragraph{NFSS family}
-% Interactions with other packages will sometimes require setting the NFSS family explicitly.
-% (By default \pkg{fontspec} auto-generates one based on the font name.)
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse} {NFSSFamily}
- {
- \tl_set:Nx \l_@@_nfss_fam_tl { #1 }
- }
-% \end{macrocode}
-%
-% \paragraph{NFSS series/shape}
-% This option looks similar in name but has a very different function.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {FontFace}
- {
- \tl_clear:N \l_@@_this_font_tl
- \clist_set:No \l_@@_arg_clist { \use_iii:nnn #1 }
- \clist_set_eq:NN \l_@@_this_feat_clist \l_@@_arg_clist
- \int_compare:nT { \clist_count:N \l_@@_arg_clist = 1 }
- {
-%<debug>\typeout{FontFace~ parsing:~ one~ clist~ item}
- \tl_if_in:NnF \l_@@_arg_clist {=}
- {
-%<debug>\typeout{FontFace~ parsing:~ no~ equals~ =>~ font~ name~ only}
- \tl_set_eq:NN \l_@@_this_font_tl \l_@@_arg_clist
- \tl_clear:N \l_@@_this_feat_clist
- }
- }
-
- \@@_add_nfssfont:nnnn
- {\use_i:nnn #1} {\use_ii:nnn #1} {\l_@@_this_font_tl} {\l_@@_this_feat_clist}
- }
-% \end{macrocode}
-%
-%
-%
-% \paragraph{Scale}
-% If the input isn't one of the pre-defined string options, then
-% it's gotta be numerical. \cs{fontspec_calc_scale:n} does all the work in
-% the auto-scaling cases.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {Scale}
- {
- \str_case:nnF {#1}
- {
- {MatchLowercase} { \@@_calc_scale:n {5} }
- {MatchUppercase} { \@@_calc_scale:n {8} }
- }
- { \tl_set:Nx \l_@@_scale_tl {#1} }
- \tl_set:Nx \l_@@_scale_tl { s*[\l_@@_scale_tl] }
- }
-% \end{macrocode}
-%
-% \begin{macro}{\@@_calc_scale:n}
-% This macro calculates the amount of scaling between the default
-% roman font and the (default shape of) the font being selected such
-% that the font dimension that is input is equal for both. The only
-% font dimensions that justify this are 5 (lowercase height)
-% and 8 (uppercase height in \XeTeX).
-%
-% This script is executed for every extra shape, which seems wasteful,
-% but allows alternate italic shapes from a separate font, say, to
-% be loaded and to be auto-scaled correctly. Even if this would be ugly.
-%
-% To begin, change to \cs{rmfamily} but use internal commands in case cs{rmfamily}
-% has been overwritten.
-% (Note that changing \cs{rmfamily} with fontspec resets \cs{encodingdefault}
-% appropriately.)
-% \begin{macrocode}
-\cs_new:Nn \@@_calc_scale:n
- {
- \group_begin:
-
- \fontencoding { \encodingdefault }
- \fontfamily { \rmdefault }
- \selectfont
-
- \@@_set_font_dimen:NnN \l_@@_tmpa_dim {#1} \font
- \@@_set_font_dimen:NnN \l_@@_tmpb_dim {#1} \l_fontspec_font
-
- \tl_gset:Nx \l_@@_scale_tl
- {
- \fp_eval:n { \dim_to_fp:n {\l_@@_tmpa_dim} /
- \dim_to_fp:n {\l_@@_tmpb_dim} }
- }
-
- \@@_info:n {set-scale}
- \group_end:
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@_set_font_dimen:NnN}
-% This function sets the dimension |#1| (for font |#3|) to `fontdimen' |#2|
-% for either font dimension 5 (x-height) or 8 (cap-height). If, for some
-% reason, these return an incorrect `zero' value (as \cs{fontdimen8} might
-% for a \texttt{.tfm} font), then we cheat and measure the height of a glyph.
-% We assume in this case that the font contains either an `X' or an `x'.
-% \begin{macrocode}
-\cs_new:Nn \@@_set_font_dimen:NnN
- {
- \dim_set:Nn #1 { \fontdimen #2 #3 }
- \dim_compare:nNnT #1 = {0pt}
- {
- \settoheight #1
- {
- \str_if_eq:nnTF {#3} {\font} \rmfamily #3
- \int_case:nnF #2
- {
- {5} {x} % x-height
- {8} {X} % cap-height
- } {?} % "else" clause; never reached.
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \paragraph{Inter-word space}
-% These options set the relevant \cmd\fontdimen s for the
-% font being loaded.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {WordSpace}
- {
- \bool_if:NF \l_@@_firsttime_bool
- { \_fontspec_parse_wordspace:w #1,,,\q_stop }
- }
-\@@_aff_error:n {WordSpace}
-% \end{macrocode}
-%
-% \begin{macro}{\_fontspec_parse_wordspace:w}
-% This macro determines if the input to \feat{WordSpace} is
-% of the form |{X}| or |{X,Y,Z}| and executes the font scaling.
-% If the former input, it executes |{X,X,X}|.
-% \begin{macrocode}
-\cs_set:Npn \_fontspec_parse_wordspace:w #1,#2,#3,#4 \q_stop
- {
- \tl_if_empty:nTF {#4}
- {
- \tl_set:Nn \l_@@_wordspace_adjust_tl
- {
- \fontdimen 2 \font = #1 \fontdimen 2 \font
- \fontdimen 3 \font = #1 \fontdimen 3 \font
- \fontdimen 4 \font = #1 \fontdimen 4 \font
- }
- }
- {
- \tl_set:Nn \l_@@_wordspace_adjust_tl
- {
- \fontdimen 2 \font = #1 \fontdimen 2 \font
- \fontdimen 3 \font = #2 \fontdimen 3 \font
- \fontdimen 4 \font = #3 \fontdimen 4 \font
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \paragraph{Punctuation space}
-% Scaling factor for the nominal \cmd\fontdimen \#7.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {PunctuationSpace}
- {
- \str_case_x:nnF {#1}
- {
- {WordSpace}
- {
- \tl_set:Nn \l_@@_punctspace_adjust_tl
- { \fontdimen 7 \font = 0 \fontdimen 2 \font }
- }
- {TwiceWordSpace}
- {
- \tl_set:Nn \l_@@_punctspace_adjust_tl
- { \fontdimen 7 \font = 1 \fontdimen 2 \font }
- }
- }
- {
- \tl_set:Nn \l_@@_punctspace_adjust_tl
- { \fontdimen 7 \font = #1 \fontdimen 7 \font }
- }
- }
-\@@_aff_error:n {PunctuationSpace}
-% \end{macrocode}
-%
-% \paragraph{Secret hook into the font-adjustment code}
-%
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {FontAdjustment}
- {
- \tl_put_right:Nx \l_@@_postadjust_tl {#1}
- }
-% \end{macrocode}
-%
-% \paragraph{Letterspacing}
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {LetterSpace}
- {
- \@@_update_featstr:n {letterspace=#1}
- }
-% \end{macrocode}
-%
-% \paragraph{Hyphenation character}
-% This feature takes one of three arguments: `\opt{None}',
-% \meta{glyph}, or \meta{slot}. If the input isn't the first,
-% and it's one character, then it's the second; otherwise, it's
-% the third.
-%
-% LuaTeX decouples hyphenation from font settings, so only \verb|HyphenChar=None| works
-% for that engine.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {HyphenChar}
- {
- \str_if_eq:nnTF {#1} {None}
- {
- \tl_put_right:Nn \l_@@_postadjust_tl
- { \@@_primitive_font_set_hyphenchar:Nn \font {-1} }
- }
- {
- \@@_warning:nx {only-xetex-feature} {HyphenChar}
-
- \tl_if_single:nTF {#1}
- { \tl_set:Nn \l_fontspec_hyphenchar_tl {`#1} }
- { \tl_set:Nn \l_fontspec_hyphenchar_tl { #1} }
-
- \@@_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
- {
- \tl_put_right:Nn \l_@@_postadjust_tl
- { \@@_primitive_font_set_hyphenchar:Nn \font { \l_fontspec_hyphenchar_tl } }
- }
- { \@@_error:nx {no-glyph}{#1} }
-
- }
- }
-\@@_aff_error:n {HyphenChar}
-% \end{macrocode}
-%
-% \paragraph{Color}
-% Hooks into pkg{xcolor}, which names its colours \texttt{\char`\\color@<name>}.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {Color}
- {
- \cs_if_exist:cTF { \token_to_str:N \color@ #1 }
- {
- \convertcolorspec{named}{#1}{HTML}\l_@@_hexcol_tl
- }
- {
- \int_compare:nTF { \tl_count:n {#1} == 6 }
- { \tl_set:Nn \l_@@_hexcol_tl {#1} }
- {
- \int_compare:nTF { \tl_count:n {#1} == 8 }
- { \fontspec_parse_colour:viii #1 }
- {
- \bool_if:NF \l_@@_firsttime_bool
- { \@@_warning:nx {bad-colour} {#1} }
- }
- }
- }
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_set:Npn \fontspec_parse_colour:viii #1#2#3#4#5#6#7#8
- {
- \tl_set:Nn \l_@@_hexcol_tl {#1#2#3#4#5#6}
- \tl_if_eq:NNF \l_@@_opacity_tl \c_@@_opacity_tl
- {
- \bool_if:NF \l_@@_firsttime_bool
- { \@@_warning:nx {opa-twice-col} {#7#8} }
- }
- \tl_set:Nn \l_@@_opacity_tl {#7#8}
- }
-\aliasfontfeature{Color}{Colour}
-% \end{macrocode}
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {Opacity}
- {
- \int_set:Nn \l_@@_tmp_int {255}
- \@@_int_mult_truncate:Nn \l_@@_tmp_int { #1 }
- \tl_if_eq:NNF \l_@@_opacity_tl \c_@@_opacity_tl
- {
- \bool_if:NF \l_@@_firsttime_bool
- { \@@_warning:nx {opa-twice} {#1} }
- }
- \tl_set:Nx \l_@@_opacity_tl
- {
- \int_compare:nT { \l_@@_tmp_int <= "F } {0} % zero pad
- \int_to_hex:n { \l_@@_tmp_int }
- }
- }
-% \end{macrocode}
-%
-%
-% \paragraph{Mapping}
-% \begin{macrocode}
-%<*XE>
-\@@_keys_define_code:nnn {fontspec-aat} {Mapping}
- {
- \tl_set:Nn \l_@@_mapping_tl { #1 }
- }
-\@@_keys_define_code:nnn {fontspec-opentype} {Mapping}
- {
- \tl_set:Nn \l_@@_mapping_tl { #1 }
- }
-%</XE>
-%<*LU>
-\@@_keys_define_code:nnn {fontspec-opentype} {Mapping}
- {
- \str_if_eq:nnTF {#1} {tex-text}
- {
- \@@_warning:n {no-mapping-ligtex}
- \msg_redirect_name:nnn {fontspec} {no-mapping-ligtex} {none}
- \keys_set:nn {fontspec-opentype} { Ligatures=TeX }
- }
- { \@@_warning:n {no-mapping} }
- }
-%</LU>
-% \end{macrocode}
-%
-%
-% \subsubsection{Continuous font axes}
-%
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec} {Weight}
- {
- \@@_update_featstr:n{weight=#1}
- }
-\@@_keys_define_code:nnn {fontspec} {Width}
- {
- \@@_update_featstr:n{width=#1}
- }
-\@@_keys_define_code:nnn {fontspec} {OpticalSize}
-%<*XE>
- {
- \bool_if:NTF \l_@@_ot_bool
- {
- \tl_set:Nn \l_@@_optical_size_tl {/ S = #1}
- }
- {
- \bool_if:NT \l_@@_mm_bool
- {
- \@@_update_featstr:n { optical size = #1 }
- }
- }
- \bool_if:nT { !\l_@@_ot_bool && !\l_@@_mm_bool }
- {
- \bool_if:NT \l_@@_firsttime_bool
- { \@@_warning:n {no-opticals} }
- }
- }
-%</XE>
-%<*LU>
- {
- \tl_set:Nn \l_@@_optical_size_tl {/ S = #1}
- }
-%</LU>
-% \end{macrocode}
-%
-% \subsubsection{Font transformations}
-% These are to be specified to apply directly to a font shape:
-% \begin{macrocode}
-\keys_define:nn {fontspec}
- {
- FakeSlant .code:n =
- {
- \@@_update_featstr:n{slant=#1}
- },
- FakeSlant .default:n = {0.2}
-}
-\keys_define:nn {fontspec}
- {
- FakeStretch .code:n =
- {
- \@@_update_featstr:n{extend=#1}
- },
- FakeStretch .default:n = {1.2}
-}
-%<*XE>
-\keys_define:nn {fontspec}
- {
- FakeBold .code:n =
- {
- \@@_update_featstr:n {embolden=#1}
- },
- FakeBold .default:n = {1.5}
- }
-%</XE>
-%<*LU>
-\keys_define:nn {fontspec}
- {
- FakeBold .code:n = { \@@_warning:n {fakebold-only-xetex} }
- }
-%</LU>
-% \end{macrocode}
-% These are to be given to a shape that has no real bold/italic
-% to signal that \pkg{fontspec} should automatically create `fake' shapes.
-%
-% The behaviour is currently that only if both \opt{AutoFakeSlant} \emph{and}
-% \opt{AutoFakeBold} are specified, the bold italic is also faked.
-%
-% These features presently \emph{override} real shapes found in the font;
-% in the future I'd like these features to be ignored in this case, instead.
-% (This is just a bit harder to program in the current design of
-% \pkg{fontspec}.)
-% \begin{macrocode}
-\keys_define:nn {fontspec}
- {
- AutoFakeSlant .code:n =
- {
- \bool_if:NT \l_@@_firsttime_bool
- {
- \tl_set:Nn \l_@@_fake_slant_tl {#1}
- \clist_put_right:Nn \l_@@_fontfeat_it_clist {FakeSlant=#1}
- \tl_set_eq:NN \l_@@_fontname_it_tl \l_fontspec_fontname_tl
- \bool_set_false:N \l_@@_noit_bool
-
- \tl_if_empty:NF \l_@@_fake_embolden_tl
- {
- \clist_put_right:Nx \l_@@_fontfeat_bfit_clist
- {FakeBold=\l_@@_fake_embolden_tl}
- \clist_put_right:Nx \l_@@_fontfeat_bfit_clist {FakeSlant=#1}
- \tl_set_eq:NN \l_@@_fontname_bfit_tl \l_fontspec_fontname_tl
- }
- }
- },
- AutoFakeSlant .default:n = {0.2}
-}
-% \end{macrocode}
-% Same but reversed:
-% \begin{macrocode}
-\keys_define:nn {fontspec}
- {
- AutoFakeBold .code:n =
- {
- \bool_if:NT \l_@@_firsttime_bool
- {
- \tl_set:Nn \l_@@_fake_embolden_tl {#1}
- \clist_put_right:Nn \l_@@_fontfeat_bf_clist {FakeBold=#1}
- \tl_set_eq:NN \l_@@_fontname_bf_tl \l_fontspec_fontname_tl
- \bool_set_false:N \l_@@_nobf_bool
-
- \tl_if_empty:NF \l_@@_fake_slant_tl
- {
- \clist_put_right:Nx \l_@@_fontfeat_bfit_clist
- {FakeSlant=\l_@@_fake_slant_tl}
- \clist_put_right:Nx \l_@@_fontfeat_bfit_clist {FakeBold=#1}
- \tl_set_eq:NN \l_@@_fontname_bfit_tl \l_fontspec_fontname_tl
- }
- }
- },
- AutoFakeBold .default:n = {1.5}
-}
-% \end{macrocode}
-%
-%
-% \subsubsection{Raw feature string}
-% This allows savvy \XeTeX-ers to input font features manually if they have
-% already memorised the OpenType abbreviations and don't mind not having error checking.
-% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-opentype} {RawFeature}
- {
- \@@_update_featstr:n {#1}
- }
-\@@_keys_define_code:nnn {fontspec-aat} {RawFeature}
- {
- \@@_update_featstr:n {#1}
- }
-% \end{macrocode}
-%
-%
-%
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-lang.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,418 +0,0 @@
-%%^^A%% fontspec-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Font language definitions}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% \begin{macrocode}
-\newfontlanguage{Abaza}{ABA}
-\newfontlanguage{Abkhazian}{ABK}
-\newfontlanguage{Adyghe}{ADY}
-\newfontlanguage{Afrikaans}{AFK}
-\newfontlanguage{Afar}{AFR}
-\newfontlanguage{Agaw}{AGW}
-\newfontlanguage{Altai}{ALT}
-\newfontlanguage{Amharic}{AMH}
-\newfontlanguage{Arabic}{ARA}
-\newfontlanguage{Aari}{ARI}
-\newfontlanguage{Arakanese}{ARK}
-\newfontlanguage{Assamese}{ASM}
-\newfontlanguage{Athapaskan}{ATH}
-\newfontlanguage{Avar}{AVR}
-\newfontlanguage{Awadhi}{AWA}
-\newfontlanguage{Aymara}{AYM}
-\newfontlanguage{Azeri}{AZE}
-\newfontlanguage{Badaga}{BAD}
-\newfontlanguage{Baghelkhandi}{BAG}
-\newfontlanguage{Balkar}{BAL}
-\newfontlanguage{Baule}{BAU}
-\newfontlanguage{Berber}{BBR}
-\newfontlanguage{Bench}{BCH}
-\newfontlanguage{Bible~Cree}{BCR}
-\newfontlanguage{Belarussian}{BEL}
-\newfontlanguage{Bemba}{BEM}
-\newfontlanguage{Bengali}{BEN}
-\newfontlanguage{Bulgarian}{BGR}
-\newfontlanguage{Bhili}{BHI}
-\newfontlanguage{Bhojpuri}{BHO}
-\newfontlanguage{Bikol}{BIK}
-\newfontlanguage{Bilen}{BIL}
-\newfontlanguage{Blackfoot}{BKF}
-\newfontlanguage{Balochi}{BLI}
-\newfontlanguage{Balante}{BLN}
-\newfontlanguage{Balti}{BLT}
-\newfontlanguage{Bambara}{BMB}
-\newfontlanguage{Bamileke}{BML}
-\newfontlanguage{Breton}{BRE}
-\newfontlanguage{Brahui}{BRH}
-\newfontlanguage{Braj~Bhasha}{BRI}
-\newfontlanguage{Burmese}{BRM}
-\newfontlanguage{Bashkir}{BSH}
-\newfontlanguage{Beti}{BTI}
-\newfontlanguage{Catalan}{CAT}
-\newfontlanguage{Cebuano}{CEB}
-\newfontlanguage{Chechen}{CHE}
-\newfontlanguage{Chaha~Gurage}{CHG}
-\newfontlanguage{Chattisgarhi}{CHH}
-\newfontlanguage{Chichewa}{CHI}
-\newfontlanguage{Chukchi}{CHK}
-\newfontlanguage{Chipewyan}{CHP}
-\newfontlanguage{Cherokee}{CHR}
-\newfontlanguage{Chuvash}{CHU}
-\newfontlanguage{Comorian}{CMR}
-\newfontlanguage{Coptic}{COP}
-\newfontlanguage{Cree}{CRE}
-\newfontlanguage{Carrier}{CRR}
-\newfontlanguage{Crimean~Tatar}{CRT}
-\newfontlanguage{Church~Slavonic}{CSL}
-\newfontlanguage{Czech}{CSY}
-\newfontlanguage{Danish}{DAN}
-\newfontlanguage{Dargwa}{DAR}
-\newfontlanguage{Woods~Cree}{DCR}
-\newfontlanguage{German}{DEU}
-\newfontlanguage{Dogri}{DGR}
-\newfontlanguage{Divehi}{DIV}
-\newfontlanguage{Djerma}{DJR}
-\newfontlanguage{Dangme}{DNG}
-\newfontlanguage{Dinka}{DNK}
-\newfontlanguage{Dungan}{DUN}
-\newfontlanguage{Dzongkha}{DZN}
-\newfontlanguage{Ebira}{EBI}
-\newfontlanguage{Eastern~Cree}{ECR}
-\newfontlanguage{Edo}{EDO}
-\newfontlanguage{Efik}{EFI}
-\newfontlanguage{Greek}{ELL}
-\newfontlanguage{English}{ENG}
-\newfontlanguage{Erzya}{ERZ}
-\newfontlanguage{Spanish}{ESP}
-\newfontlanguage{Estonian}{ETI}
-\newfontlanguage{Basque}{EUQ}
-\newfontlanguage{Evenki}{EVK}
-\newfontlanguage{Even}{EVN}
-\newfontlanguage{Ewe}{EWE}
-\newfontlanguage{French~Antillean}{FAN}
-\newfontlanguage{Farsi}{FAR}
-\newfontlanguage{Parsi}{FAR}
-\newfontlanguage{Persian}{FAR}
-\newfontlanguage{Finnish}{FIN}
-\newfontlanguage{Fijian}{FJI}
-\newfontlanguage{Flemish}{FLE}
-\newfontlanguage{Forest~Nenets}{FNE}
-\newfontlanguage{Fon}{FON}
-\newfontlanguage{Faroese}{FOS}
-\newfontlanguage{French}{FRA}
-\newfontlanguage{Frisian}{FRI}
-\newfontlanguage{Friulian}{FRL}
-\newfontlanguage{Futa}{FTA}
-\newfontlanguage{Fulani}{FUL}
-\newfontlanguage{Ga}{GAD}
-\newfontlanguage{Gaelic}{GAE}
-\newfontlanguage{Gagauz}{GAG}
-\newfontlanguage{Galician}{GAL}
-\newfontlanguage{Garshuni}{GAR}
-\newfontlanguage{Garhwali}{GAW}
-\newfontlanguage{Ge'ez}{GEZ}
-\newfontlanguage{Gilyak}{GIL}
-\newfontlanguage{Gumuz}{GMZ}
-\newfontlanguage{Gondi}{GON}
-\newfontlanguage{Greenlandic}{GRN}
-\newfontlanguage{Garo}{GRO}
-\newfontlanguage{Guarani}{GUA}
-\newfontlanguage{Gujarati}{GUJ}
-\newfontlanguage{Haitian}{HAI}
-\newfontlanguage{Halam}{HAL}
-\newfontlanguage{Harauti}{HAR}
-\newfontlanguage{Hausa}{HAU}
-\newfontlanguage{Hawaiin}{HAW}
-\newfontlanguage{Hammer-Banna}{HBN}
-\newfontlanguage{Hiligaynon}{HIL}
-\newfontlanguage{Hindi}{HIN}
-\newfontlanguage{High~Mari}{HMA}
-\newfontlanguage{Hindko}{HND}
-\newfontlanguage{Ho}{HO}
-\newfontlanguage{Harari}{HRI}
-\newfontlanguage{Croatian}{HRV}
-\newfontlanguage{Hungarian}{HUN}
-\newfontlanguage{Armenian}{HYE}
-\newfontlanguage{Igbo}{IBO}
-\newfontlanguage{Ijo}{IJO}
-\newfontlanguage{Ilokano}{ILO}
-\newfontlanguage{Indonesian}{IND}
-\newfontlanguage{Ingush}{ING}
-\newfontlanguage{Inuktitut}{INU}
-\newfontlanguage{Irish}{IRI}
-\newfontlanguage{Irish~Traditional}{IRT}
-\newfontlanguage{Icelandic}{ISL}
-\newfontlanguage{Inari~Sami}{ISM}
-\newfontlanguage{Italian}{ITA}
-\newfontlanguage{Hebrew}{IWR}
-\newfontlanguage{Javanese}{JAV}
-\newfontlanguage{Yiddish}{JII}
-\newfontlanguage{Japanese}{JAN}
-\newfontlanguage{Judezmo}{JUD}
-\newfontlanguage{Jula}{JUL}
-\newfontlanguage{Kabardian}{KAB}
-\newfontlanguage{Kachchi}{KAC}
-\newfontlanguage{Kalenjin}{KAL}
-\newfontlanguage{Kannada}{KAN}
-\newfontlanguage{Karachay}{KAR}
-\newfontlanguage{Georgian}{KAT}
-\newfontlanguage{Kazakh}{KAZ}
-\newfontlanguage{Kebena}{KEB}
-\newfontlanguage{Khutsuri~Georgian}{KGE}
-\newfontlanguage{Khakass}{KHA}
-\newfontlanguage{Khanty-Kazim}{KHK}
-\newfontlanguage{Khmer}{KHM}
-\newfontlanguage{Khanty-Shurishkar}{KHS}
-\newfontlanguage{Khanty-Vakhi}{KHV}
-\newfontlanguage{Khowar}{KHW}
-\newfontlanguage{Kikuyu}{KIK}
-\newfontlanguage{Kirghiz}{KIR}
-\newfontlanguage{Kisii}{KIS}
-\newfontlanguage{Kokni}{KKN}
-\newfontlanguage{Kalmyk}{KLM}
-\newfontlanguage{Kamba}{KMB}
-\newfontlanguage{Kumaoni}{KMN}
-\newfontlanguage{Komo}{KMO}
-\newfontlanguage{Komso}{KMS}
-\newfontlanguage{Kanuri}{KNR}
-\newfontlanguage{Kodagu}{KOD}
-\newfontlanguage{Korean~Old~Hangul}{KOH}
-\newfontlanguage{Konkani}{KOK}
-\newfontlanguage{Kikongo}{KON}
-\newfontlanguage{Komi-Permyak}{KOP}
-\newfontlanguage{Korean}{KOR}
-\newfontlanguage{Komi-Zyrian}{KOZ}
-\newfontlanguage{Kpelle}{KPL}
-\newfontlanguage{Krio}{KRI}
-\newfontlanguage{Karakalpak}{KRK}
-\newfontlanguage{Karelian}{KRL}
-\newfontlanguage{Karaim}{KRM}
-\newfontlanguage{Karen}{KRN}
-\newfontlanguage{Koorete}{KRT}
-\newfontlanguage{Kashmiri}{KSH}
-\newfontlanguage{Khasi}{KSI}
-\newfontlanguage{Kildin~Sami}{KSM}
-\newfontlanguage{Kui}{KUI}
-\newfontlanguage{Kulvi}{KUL}
-\newfontlanguage{Kumyk}{KUM}
-\newfontlanguage{Kurdish}{KUR}
-\newfontlanguage{Kurukh}{KUU}
-\newfontlanguage{Kuy}{KUY}
-\newfontlanguage{Koryak}{KYK}
-\newfontlanguage{Ladin}{LAD}
-\newfontlanguage{Lahuli}{LAH}
-\newfontlanguage{Lak}{LAK}
-\newfontlanguage{Lambani}{LAM}
-\newfontlanguage{Lao}{LAO}
-\newfontlanguage{Latin}{LAT}
-\newfontlanguage{Laz}{LAZ}
-\newfontlanguage{L-Cree}{LCR}
-\newfontlanguage{Ladakhi}{LDK}
-\newfontlanguage{Lezgi}{LEZ}
-\newfontlanguage{Lingala}{LIN}
-\newfontlanguage{Low~Mari}{LMA}
-\newfontlanguage{Limbu}{LMB}
-\newfontlanguage{Lomwe}{LMW}
-\newfontlanguage{Lower~Sorbian}{LSB}
-\newfontlanguage{Lule~Sami}{LSM}
-\newfontlanguage{Lithuanian}{LTH}
-\newfontlanguage{Luba}{LUB}
-\newfontlanguage{Luganda}{LUG}
-\newfontlanguage{Luhya}{LUH}
-\newfontlanguage{Luo}{LUO}
-\newfontlanguage{Latvian}{LVI}
-\newfontlanguage{Majang}{MAJ}
-\newfontlanguage{Makua}{MAK}
-\newfontlanguage{Malayalam~Traditional}{MAL}
-\newfontlanguage{Mansi}{MAN}
-\newfontlanguage{Marathi}{MAR}
-\newfontlanguage{Marwari}{MAW}
-\newfontlanguage{Mbundu}{MBN}
-\newfontlanguage{Manchu}{MCH}
-\newfontlanguage{Moose~Cree}{MCR}
-\newfontlanguage{Mende}{MDE}
-\newfontlanguage{Me'en}{MEN}
-\newfontlanguage{Mizo}{MIZ}
-\newfontlanguage{Macedonian}{MKD}
-\newfontlanguage{Male}{MLE}
-\newfontlanguage{Malagasy}{MLG}
-\newfontlanguage{Malinke}{MLN}
-\newfontlanguage{Malayalam~Reformed}{MLR}
-\newfontlanguage{Malay}{MLY}
-\newfontlanguage{Mandinka}{MND}
-\newfontlanguage{Mongolian}{MNG}
-\newfontlanguage{Manipuri}{MNI}
-\newfontlanguage{Maninka}{MNK}
-\newfontlanguage{Manx~Gaelic}{MNX}
-\newfontlanguage{Moksha}{MOK}
-\newfontlanguage{Moldavian}{MOL}
-\newfontlanguage{Mon}{MON}
-\newfontlanguage{Moroccan}{MOR}
-\newfontlanguage{Maori}{MRI}
-\newfontlanguage{Maithili}{MTH}
-\newfontlanguage{Maltese}{MTS}
-\newfontlanguage{Mundari}{MUN}
-\newfontlanguage{Naga-Assamese}{NAG}
-\newfontlanguage{Nanai}{NAN}
-\newfontlanguage{Naskapi}{NAS}
-\newfontlanguage{N-Cree}{NCR}
-\newfontlanguage{Ndebele}{NDB}
-\newfontlanguage{Ndonga}{NDG}
-\newfontlanguage{Nepali}{NEP}
-\newfontlanguage{Newari}{NEW}
-\newfontlanguage{Nagari}{NGR}
-\newfontlanguage{Norway~House~Cree}{NHC}
-\newfontlanguage{Nisi}{NIS}
-\newfontlanguage{Niuean}{NIU}
-\newfontlanguage{Nkole}{NKL}
-\newfontlanguage{N'ko}{NKO}
-\newfontlanguage{Dutch}{NLD}
-\newfontlanguage{Nogai}{NOG}
-\newfontlanguage{Norwegian}{NOR}
-\newfontlanguage{Northern~Sami}{NSM}
-\newfontlanguage{Northern~Tai}{NTA}
-\newfontlanguage{Esperanto}{NTO}
-\newfontlanguage{Nynorsk}{NYN}
-\newfontlanguage{Oji-Cree}{OCR}
-\newfontlanguage{Ojibway}{OJB}
-\newfontlanguage{Oriya}{ORI}
-\newfontlanguage{Oromo}{ORO}
-\newfontlanguage{Ossetian}{OSS}
-\newfontlanguage{Palestinian~Aramaic}{PAA}
-\newfontlanguage{Pali}{PAL}
-\newfontlanguage{Punjabi}{PAN}
-\newfontlanguage{Palpa}{PAP}
-\newfontlanguage{Pashto}{PAS}
-\newfontlanguage{Polytonic~Greek}{PGR}
-\newfontlanguage{Pilipino}{PIL}
-\newfontlanguage{Palaung}{PLG}
-\newfontlanguage{Polish}{PLK}
-\newfontlanguage{Provencal}{PRO}
-\newfontlanguage{Portuguese}{PTG}
-\newfontlanguage{Chin}{QIN}
-\newfontlanguage{Rajasthani}{RAJ}
-\newfontlanguage{R-Cree}{RCR}
-\newfontlanguage{Russian~Buriat}{RBU}
-\newfontlanguage{Riang}{RIA}
-\newfontlanguage{Rhaeto-Romanic}{RMS}
-\newfontlanguage{Romanian}{ROM}
-\newfontlanguage{Romany}{ROY}
-\newfontlanguage{Rusyn}{RSY}
-\newfontlanguage{Ruanda}{RUA}
-\newfontlanguage{Russian}{RUS}
-\newfontlanguage{Sadri}{SAD}
-\newfontlanguage{Sanskrit}{SAN}
-\newfontlanguage{Santali}{SAT}
-\newfontlanguage{Sayisi}{SAY}
-\newfontlanguage{Sekota}{SEK}
-\newfontlanguage{Selkup}{SEL}
-\newfontlanguage{Sango}{SGO}
-\newfontlanguage{Shan}{SHN}
-\newfontlanguage{Sibe}{SIB}
-\newfontlanguage{Sidamo}{SID}
-\newfontlanguage{Silte~Gurage}{SIG}
-\newfontlanguage{Skolt~Sami}{SKS}
-\newfontlanguage{Slovak}{SKY}
-\newfontlanguage{Slavey}{SLA}
-\newfontlanguage{Slovenian}{SLV}
-\newfontlanguage{Somali}{SML}
-\newfontlanguage{Samoan}{SMO}
-\newfontlanguage{Sena}{SNA}
-\newfontlanguage{Sindhi}{SND}
-\newfontlanguage{Sinhalese}{SNH}
-\newfontlanguage{Soninke}{SNK}
-\newfontlanguage{Sodo~Gurage}{SOG}
-\newfontlanguage{Sotho}{SOT}
-\newfontlanguage{Albanian}{SQI}
-\newfontlanguage{Serbian}{SRB}
-\newfontlanguage{Saraiki}{SRK}
-\newfontlanguage{Serer}{SRR}
-\newfontlanguage{South~Slavey}{SSL}
-\newfontlanguage{Southern~Sami}{SSM}
-\newfontlanguage{Suri}{SUR}
-\newfontlanguage{Svan}{SVA}
-\newfontlanguage{Swedish}{SVE}
-\newfontlanguage{Swadaya~Aramaic}{SWA}
-\newfontlanguage{Swahili}{SWK}
-\newfontlanguage{Swazi}{SWZ}
-\newfontlanguage{Sutu}{SXT}
-\newfontlanguage{Syriac}{SYR}
-\newfontlanguage{Tabasaran}{TAB}
-\newfontlanguage{Tajiki}{TAJ}
-\newfontlanguage{Tamil}{TAM}
-\newfontlanguage{Tatar}{TAT}
-\newfontlanguage{TH-Cree}{TCR}
-\newfontlanguage{Telugu}{TEL}
-\newfontlanguage{Tongan}{TGN}
-\newfontlanguage{Tigre}{TGR}
-\newfontlanguage{Tigrinya}{TGY}
-\newfontlanguage{Thai}{THA}
-\newfontlanguage{Tahitian}{THT}
-\newfontlanguage{Tibetan}{TIB}
-\newfontlanguage{Turkmen}{TKM}
-\newfontlanguage{Temne}{TMN}
-\newfontlanguage{Tswana}{TNA}
-\newfontlanguage{Tundra~Nenets}{TNE}
-\newfontlanguage{Tonga}{TNG}
-\newfontlanguage{Todo}{TOD}
-\newfontlanguage{Tsonga}{TSG}
-\newfontlanguage{Turoyo~Aramaic}{TUA}
-\newfontlanguage{Tulu}{TUL}
-\newfontlanguage{Tuvin}{TUV}
-\newfontlanguage{Twi}{TWI}
-\newfontlanguage{Udmurt}{UDM}
-\newfontlanguage{Ukrainian}{UKR}
-\newfontlanguage{Urdu}{URD}
-\newfontlanguage{Upper~Sorbian}{USB}
-\newfontlanguage{Uyghur}{UYG}
-\newfontlanguage{Uzbek}{UZB}
-\newfontlanguage{Venda}{VEN}
-\newfontlanguage{Vietnamese}{VIT}
-\newfontlanguage{Wa}{WA}
-\newfontlanguage{Wagdi}{WAG}
-\newfontlanguage{West-Cree}{WCR}
-\newfontlanguage{Welsh}{WEL}
-\newfontlanguage{Wolof}{WLF}
-\newfontlanguage{Tai~Lue}{XBD}
-\newfontlanguage{Xhosa}{XHS}
-\newfontlanguage{Yakut}{YAK}
-\newfontlanguage{Yoruba}{YBA}
-\newfontlanguage{Y-Cree}{YCR}
-\newfontlanguage{Yi~Classic}{YIC}
-\newfontlanguage{Yi~Modern}{YIM}
-\newfontlanguage{Chinese~Hong~Kong}{ZHH}
-\newfontlanguage{Chinese~Phonetic}{ZHP}
-\newfontlanguage{Chinese~Simplified}{ZHS}
-\newfontlanguage{Chinese~Traditional}{ZHT}
-\newfontlanguage{Zande}{ZND}
-\newfontlanguage{Zulu}{ZUL}
-% \end{macrocode}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-lua.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -89,7 +89,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-math.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,254 +0,0 @@
-%%^^A%% fontspec-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%
-% \section{Selecting maths fonts}
-% Here, the fonts used in math mode are redefined to correspond to the
-% default roman, sans serif and typewriter fonts. Unfortunately, you
-% can only define maths fonts in the preamble, otherwise I'd run this
-% code whenever \cs{setmainfont} and friends was run.
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% \begin{macro}{\fontspec_setup_maths:}
-% Everything here is performed \cs{AtBeginDocument} in order to
-% overwrite \pkg{euler}'s attempt. This means \pkg{fontspec} must be
-% loaded \emph{after} \pkg{euler}. We set up a conditional to return
-% an error if this rule is violated.
-%
-% Since every maths setup is slightly different, we also take
-% different paths for defining various math glyphs depending which
-% maths font package has been loaded.
-%
-% \begin{macrocode}
-\@ifpackageloaded{euler}
- { \bool_gset_true:N \g_@@_pkg_euler_loaded_bool }
- { \bool_gset_false:N \g_@@_pkg_euler_loaded_bool }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new:Nn \fontspec_setup_maths:
- {
- \@ifpackageloaded{euler}
- {
- \bool_if:NTF \g_@@_pkg_euler_loaded_bool
- { \bool_gset_true:N \g_@@_math_euler_bool }
- { \@@_error:n {euler-too-late} }
- }
- {}
- \@ifpackageloaded{lucbmath}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
- \@ifpackageloaded{lucidabr}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
- \@ifpackageloaded{lucimatx}{ \bool_gset_true:N \g_@@_math_lucida_bool }{}
-% \end{macrocode}
-% Knuth's CM fonts fonts are all squashed together, combining letters,
-% accents, text symbols and maths symbols all in the one font,
-% \texttt{cmr}, plus other things in other fonts. Because we are
-% changing the roman font in the document, we need to redefine all of
-% the maths glyphs in \LaTeX's \texttt{operators} maths font to still
-% go back to the legacy \texttt{cmr} font for all these random glyphs,
-% unless a separate maths font package has been loaded instead.
-%
-% In every case, the maths accents are always taken from the
-% \texttt{operators} font, which is generally the main text
-% font. (Actually, there is a \cmd\hat\ accent in
-% \texttt{EulerFractur}, but it's \emph{ugly}. So I ignore it. Sorry
-% if this causes inconvenience.)
-% \begin{macrocode}
- \DeclareSymbolFont{legacymaths}{OT1}{cmr}{m}{n}
- \SetSymbolFont{legacymaths}{bold}{OT1}{cmr}{bx}{n}
- \DeclareMathAccent{\acute} {\mathalpha}{legacymaths}{19}
- \DeclareMathAccent{\grave} {\mathalpha}{legacymaths}{18}
- \DeclareMathAccent{\ddot} {\mathalpha}{legacymaths}{127}
- \DeclareMathAccent{\tilde} {\mathalpha}{legacymaths}{126}
- \DeclareMathAccent{\bar} {\mathalpha}{legacymaths}{22}
- \DeclareMathAccent{\breve} {\mathalpha}{legacymaths}{21}
- \DeclareMathAccent{\check} {\mathalpha}{legacymaths}{20}
- \DeclareMathAccent{\hat} {\mathalpha}{legacymaths}{94} % too bad, euler
- \DeclareMathAccent{\dot} {\mathalpha}{legacymaths}{95}
- \DeclareMathAccent{\mathring}{\mathalpha}{legacymaths}{23}
-% \end{macrocode}
-% \paragraph{\cmd\colon: what's going on?} Okay, so \verb":" and \cmd\colon\ in maths mode are defined in a few places, so I need to work out what does what. Respectively, we have:
-% \begin{Verbatim}
-% % fontmath.ltx:
-% \DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}
-% \DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
-%
-% % amsmath.sty:
-% \renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
-% \mkern-\thinmuskip{:}\mskip6muplus1mu\relax}
-%
-% % euler.sty:
-% \DeclareMathSymbol{:}\mathrel {EulerFraktur}{"3A}
-%
-% % lucbmath.sty:
-% \DeclareMathSymbol{\@tempb}{\mathpunct}{operators}{58}
-% \ifx\colon\@tempb
-% \DeclareMathSymbol{\colon}{\mathpunct}{operators}{58}
-% \fi
-% \DeclareMathSymbol{:}{\mathrel}{operators}{58}
-% \end{Verbatim}
-% ($\mathrm{3A_{16}}=\mathrm{58_{10}}$) So I think, based on this summary, that it is fair to tell \pkg{fontspec} to `replace' the operators font with legacymaths for this symbol, except when \pkg{amsmath} is loaded since we want to keep its definition.
-%
-%
-% \begin{macrocode}
- \group_begin:
- \mathchardef\@tempa="603A \relax
- \ifx\colon\@tempa
- \DeclareMathSymbol{\colon}{\mathpunct}{legacymaths}{58}
- \fi
- \group_end:
-% \end{macrocode}
-% The following symbols are only defined specifically in \pkg{euler}, so skip them
-% if that package is loaded.
-% \begin{macrocode}
- \bool_if:NF \g_@@_math_euler_bool
- {
- \DeclareMathSymbol{!}{\mathclose}{legacymaths}{33}
- \DeclareMathSymbol{:}{\mathrel} {legacymaths}{58}
- \DeclareMathSymbol{;}{\mathpunct}{legacymaths}{59}
- \DeclareMathSymbol{?}{\mathclose}{legacymaths}{63}
-% \end{macrocode}
-% And these ones are defined both in \pkg{euler} and \pkg{lucbmath},
-% so we only need to run this code if no extra maths package has been
-% loaded.
-% \begin{macrocode}
- \bool_if:NF \g_@@_math_lucida_bool
- {
- \DeclareMathSymbol{0}{\mathalpha}{legacymaths}{`0}
- \DeclareMathSymbol{1}{\mathalpha}{legacymaths}{`1}
- \DeclareMathSymbol{2}{\mathalpha}{legacymaths}{`2}
- \DeclareMathSymbol{3}{\mathalpha}{legacymaths}{`3}
- \DeclareMathSymbol{4}{\mathalpha}{legacymaths}{`4}
- \DeclareMathSymbol{5}{\mathalpha}{legacymaths}{`5}
- \DeclareMathSymbol{6}{\mathalpha}{legacymaths}{`6}
- \DeclareMathSymbol{7}{\mathalpha}{legacymaths}{`7}
- \DeclareMathSymbol{8}{\mathalpha}{legacymaths}{`8}
- \DeclareMathSymbol{9}{\mathalpha}{legacymaths}{`9}
- \DeclareMathSymbol{\Gamma}{\mathalpha}{legacymaths}{0}
- \DeclareMathSymbol{\Delta}{\mathalpha}{legacymaths}{1}
- \DeclareMathSymbol{\Theta}{\mathalpha}{legacymaths}{2}
- \DeclareMathSymbol{\Lambda}{\mathalpha}{legacymaths}{3}
- \DeclareMathSymbol{\Xi}{\mathalpha}{legacymaths}{4}
- \DeclareMathSymbol{\Pi}{\mathalpha}{legacymaths}{5}
- \DeclareMathSymbol{\Sigma}{\mathalpha}{legacymaths}{6}
- \DeclareMathSymbol{\Upsilon}{\mathalpha}{legacymaths}{7}
- \DeclareMathSymbol{\Phi}{\mathalpha}{legacymaths}{8}
- \DeclareMathSymbol{\Psi}{\mathalpha}{legacymaths}{9}
- \DeclareMathSymbol{\Omega}{\mathalpha}{legacymaths}{10}
- \DeclareMathSymbol{+}{\mathbin}{legacymaths}{43}
- \DeclareMathSymbol{=}{\mathrel}{legacymaths}{61}
- \DeclareMathDelimiter{(}{\mathopen} {legacymaths}{40}{largesymbols}{0}
- \DeclareMathDelimiter{)}{\mathclose}{legacymaths}{41}{largesymbols}{1}
- \DeclareMathDelimiter{[}{\mathopen} {legacymaths}{91}{largesymbols}{2}
- \DeclareMathDelimiter{]}{\mathclose}{legacymaths}{93}{largesymbols}{3}
- \DeclareMathDelimiter{/}{\mathord}{legacymaths}{47}{largesymbols}{14}
- \DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{36}
- }
- }
-% \end{macrocode}
-% Finally, we change the font definitions for \cmd\mathrm\ and so
-% on. These are defined using the \cmd\g_@@_mathrm_tl\ (\dots) macros,
-% which default to \cmd\rmdefault\ but may be specified with the
-% \cmd\setmathrm\ (\dots) commands in the preamble.
-%
-% Since \LaTeX\ only generally defines one level of boldness, we omit
-% \cmd\mathbf\ in the \textsf{bold} maths series. It can be specified
-% as per usual with \cmd\setboldmathrm, which stores the appropriate
-% family name in \cmd\g_@@_bfmathrm_tl.
-% \begin{macrocode}
- \DeclareSymbolFont{operators}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
- \SetSymbolFont{operators}{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
- \DeclareSymbolFontAlphabet\mathrm{operators}
- \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\itdefault
- \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault
- \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g_@@_mathsf_tl\mddefault\updefault
- \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g_@@_mathtt_tl\mddefault\updefault
- \SetSymbolFont{operators}{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault
- \tl_if_empty:NTF \g_@@_bfmathrm_tl
- {
- \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\itdefault
- }
- {
- \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g_@@_bfmathrm_tl\mddefault\updefault
- \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g_@@_bfmathrm_tl\bfdefault\updefault
- \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g_@@_bfmathrm_tl\mddefault\itdefault
- }
- \SetMathAlphabet\mathsf{bold}\g_fontspec_encoding_tl\g_@@_mathsf_tl\bfdefault\updefault
- \SetMathAlphabet\mathtt{bold}\g_fontspec_encoding_tl\g_@@_mathtt_tl\bfdefault\updefault
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fontspec_maybe_setup_maths:}
-% We're a little less sophisticated about not executing the maths setup if various other maths font packages are loaded. This list is based on the wonderful `\LaTeX Font Catalogue': \url{http://www.tug.dk/FontCatalogue/mathfonts.html}. I'm sure there are more I've missed. Do the \TeX\ Gyre fonts have maths support yet?
-%
-% Untested: would |\unless\ifnum\Gamma=28672\relax\bool_set_false:N \g_@@_math_bool\fi| be a better test?
-% This needs more cooperation with euler and lucida, I think.
-% \begin{macrocode}
-\cs_new:Nn \fontspec_maybe_setup_maths:
- {
- \@ifpackageloaded{anttor}
- {
- \ifx\define at antt@mathversions a\bool_gset_false:N \g_@@_math_bool\fi
- }{}
- \@ifpackageloaded{arevmath} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{eulervm} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{mathdesign} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{concmath} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{cmbright} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{mathesf} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{gfsartemisia} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{gfsneohellenic} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{iwona}
- {
- \ifx\define at iwona@mathversions a\bool_set_false:N \g_@@_math_bool\fi
- }{}
- \@ifpackageloaded{kpfonts}{\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{kmath} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{kurier}
- {
- \ifx\define at kurier@mathversions a\bool_set_false:N \g_@@_math_bool\fi
- }{}
- \@ifpackageloaded{fouriernc} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{fourier} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{lmodern} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{mathpazo} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{mathptmx} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{MinionPro} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{unicode-math} {\bool_gset_false:N \g_@@_math_bool}{}
- \@ifpackageloaded{breqn} {\bool_gset_false:N \g_@@_math_bool}{}
- \bool_if:NT \g_@@_math_bool
- {
- \@@_info:n {setup-math}
- \fontspec_setup_maths:
- }
- }
-\AtBeginDocument{\fontspec_maybe_setup_maths:}
-% \end{macrocode}
-% \end{macro}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-msg.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,286 +0,0 @@
-%%^^A%% fontspec-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%
-% \section{Error/warning/info messages}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% Shorthands for messages:
-% \begin{macrocode}
-\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 \@@_warning:n { \msg_warning:nn {fontspec} }
-\cs_new:Npn \@@_warning:nx { \msg_warning:nnx {fontspec} }
-\cs_new:Npn \@@_warning:nxx { \msg_warning:nnxx {fontspec} }
-\cs_new:Npn \@@_info:n { \msg_info:nn {fontspec} }
-\cs_new:Npn \@@_info:nx { \msg_info:nnx {fontspec} }
-\cs_new:Npn \@@_info:nxx { \msg_info:nnxx {fontspec} }
-\cs_new:Npn \@@_trace:n { \msg_trace:nn {fontspec} }
-% \end{macrocode}
-%
-% Allow messages to be written with spaces acting as normal:
-% \begin{macrocode}
-\cs_generate_variant:Nn \msg_new:nnn {nnx}
-\cs_generate_variant:Nn \msg_new:nnnn {nnxx}
-\cs_new:Nn \@@_msg_new:nnn
- { \msg_new:nnx {#1} {#2} { \tl_trim_spaces:n {#3} } }
-\cs_new:Nn \@@_msg_new:nnnn
- { \msg_new:nnxx {#1} {#2} { \tl_trim_spaces:n {#3} } { \tl_trim_spaces:n {#4} } }
-\char_set_catcode_space:n {32}
-% \end{macrocode}
-%
-% \subsection{Errors}
-%
-% \begin{macrocode}
-\@@_msg_new:nnn {fontspec} {only-inside-encdef}
- {
- \exp_not:N#1can only be used in the second argument
- to \string\DeclareUnicodeEncoding.
- }
-\@@_msg_new:nnn {fontspec} {no-size-info}
- {
- Size information must be supplied.\\
- For example, SizeFeatures={Size={8-12},...}.
- }
-\@@_msg_new:nnnn {fontspec} {font-not-found}
- {
- The font "#1" cannot be found.
- }
- {
- A font might not be found for many reasons.\\
- Check the spelling, where the font is installed etc. etc.\\\\
- When in doubt, ask someone for help!
- }
-\@@_msg_new:nnnn {fontspec} {rename-feature-not-exist}
- {
- The feature #1 doesn't appear to be defined.
- }
- {
- It looks like you're trying to rename a feature that doesn't exist.
- }
-\@@_msg_new:nnn {fontspec} {no-glyph}
- {
- '\l_fontspec_fontname_tl' does not contain glyph #1.
- }
-\@@_msg_new:nnnn {fontspec} {euler-too-late}
- {
- The euler package must be loaded BEFORE fontspec.
- }
- {
- fontspec only overwrites euler's attempt to
- define the maths text fonts if fontspec is
- loaded after euler. Type <return> to proceed
- with incorrect \string\mathit, \string\mathbf, etc.
- }
-\@@_msg_new:nnnn {fontspec} {no-xcolor}
- {
- Cannot load named colours without the xcolor package.
- }
- {
- Sorry, I can't do anything to help. Instead of loading
- the color package, use xcolor instead.
- }
-\@@_msg_new:nnnn {fontspec} {unknown-color-model}
- {
- Error loading colour `#1'; unknown colour model.
- }
- {
- Sorry, I can't do anything to help. Please report this error
- to my developer with a minimal example that causes the problem.
- }
-\@@_msg_new:nnnn {fontspec} {not-in-addfontfeatures}
- {
- The "#1" font feature cannot be used in \string\addfontfeatures.
- }
- {
- This is due to how TeX loads fonts; such settings
- are global so adding them mid-document within a group causes
- confusion. You'll need to define multiple font families to achieve
- what you want.
- }
-% \end{macrocode}
-%
-% \subsection{Warnings}
-%
-% \begin{macrocode}
-\@@_msg_new:nnn {fontspec} {tu-clash}
- {
- I have found the tuenc.def encoding definition file but the TU encoding is not
- defined by the LaTeX2e kernel; attempting to correct but you really should update
- to the latest version of LaTeX2e.
- }
-\@@_msg_new:nnn {fontspec} {tu-missing}
- {
- The TU encoding seems to be missing; please update to the latest version of LaTeX2e.
- }
-\@@_msg_new:nnn {fontspec} {addfontfeatures-ignored}
- {
- \string\addfontfeature (s) ignored \msg_line_context:;
- it cannot be used with a font that wasn't selected by a fontspec command.\\
- \\
- The current font is "\use:c{font at name}".\\
- \int_compare:nTF { \clist_count:n {#1} = 1 }
- { The requested feature is "#1". }
- { The requested features are "#1". }
- }
-\@@_msg_new:nnn {fontspec} {feature-option-overwrite}
- {
- Option '#2' of font feature '#1' overwritten.
- }
-\@@_msg_new:nnn {fontspec} {script-not-exist-latn}
- {
- Font '\l_fontspec_fontname_tl' does not contain script '#1'.\\
- 'Latin' script used instead.
- }
-\@@_msg_new:nnn {fontspec} {script-not-exist}
- {
- Font '\l_fontspec_fontname_tl' does not contain script '#1'.
- }
-\@@_msg_new:nnn {fontspec} {aat-feature-not-exist}
- {
- '\l_keys_key_tl=\l_keys_value_tl' feature not supported
- for AAT font '\l_fontspec_fontname_tl'.
- }
-\@@_msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
- {
- AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
- in font '\l_fontspec_fontname_tl'.
- }
-\@@_msg_new:nnn {fontspec} {icu-feature-not-exist}
- {
- '\l_keys_key_tl=\l_keys_value_tl' feature not supported
- for OpenType font '\l_fontspec_fontname_tl'
- }
-\@@_msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
- {
- OpenType feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
- for font '\l_fontspec_fontname_tl'
- with script '\l_@@_script_name_tl' and language '\l_@@_lang_name_tl'.
- }
-\@@_msg_new:nnn {fontspec} {no-opticals}
- {
- '\l_fontspec_fontname_tl' doesn't appear to have an Optical Size axis.
- }
-\@@_msg_new:nnn {fontspec} {language-not-exist}
- {
- Language '#1' not available
- for font '\l_fontspec_fontname_tl'
- with script '\l_@@_script_name_tl'.\\
- 'Default' language used instead.
- }
-\@@_msg_new:nnn {fontspec} {only-xetex-feature}
- {
- Ignored XeTeX only feature: '#1'.
- }
-\@@_msg_new:nnn {fontspec} {only-luatex-feature}
- {
- Ignored LuaTeX only feature: '#1'.
- }
-\@@_msg_new:nnn {fontspec} {no-mapping}
- {
- Input mapping not (yet?) supported in LuaTeX.
- }
-\@@_msg_new:nnn {fontspec} {no-mapping-ligtex}
- {
- Input mapping not (yet?) supported in LuaTeX.\\
- Use "Ligatures=TeX" instead of "Mapping=tex-text".
- }
-\@@_msg_new:nnn {fontspec} {cm-default-obsolete}
- {
- The "cm-default" package option is obsolete.
- }
-\@@_msg_new:nnn {fontspec} {fakebold-only-xetex}
- {
- The "FakeBold" and "AutoFakeBold" options are only available with XeLaTeX.\\
- Option ignored.
- }
-\@@_msg_new:nnn {fontspec} {font-index-needs-ttc}
- {
- The "FontIndex" feature is only supported by TTC (TrueType Collection) fonts.\\
- Feature ignored.
- }
-\@@_msg_new:nnn {fontspec} {feat-cannot-remove}
- {
- The "#1" feature cannot be deactivated. Request ignored.
- }
-% \end{macrocode}
-%
-% \subsection{Info messages}
-%
-% \begin{macrocode}
-\@@_msg_new:nnn {fontspec} {defining-font}
- {
- Font family '\g_@@_nfss_family_tl' created for font '#2'
- with options [\l_@@_all_features_clist].\\
- \\
- This font family consists of the following NFSS series/shapes:\\
- \g_@@_defined_shapes_tl
- }
-\@@_msg_new:nnn {fontspec} {no-font-shape}
- {
- Could not resolve font "#1" (it probably doesn't exist).
- }
-\@@_msg_new:nnn {fontspec} {set-scale}
- {
- \l_fontspec_fontname_tl\space scale = \l_@@_scale_tl.
- }
-\@@_msg_new:nnn {fontspec} {setup-math}
- {
- Adjusting the maths setup (use [no-math] to avoid this).
- }
-\@@_msg_new:nnn {fontspec} {no-scripts}
- {
- Font "\l_fontspec_fontname_tl" does not contain any OpenType `Script' information.
- }
-\@@_msg_new:nnn {fontspec} {opa-twice}
- {
- Opacity set twice, in both Colour and Opacity.\\
- Using specification "Opacity=#1".
- }
-\@@_msg_new:nnn {fontspec} {opa-twice-col}
- {
- Opacity set twice, in both Opacity and Colour.\\
- Using an opacity specification in hex of "#1/FF".
- }
-\@@_msg_new:nnn {fontspec} {bad-colour}
- {
- Bad colour declaration "#1".
- Colour must be one of:\\
- * a named xcolor colour\\
- * a six-digit hex colour RRGGBB\\
- * an eight-digit hex colour RRGGBBTT with opacity
- }
-% \end{macrocode}
-%
-% Reset `space' behaviour:
-% \begin{macrocode}
-\char_set_catcode_ignore:n {32}
-% \end{macrocode}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-opening.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,195 +0,0 @@
-%%^^A%% fontspec-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%
-% \section{Opening code}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% \subsection{Package options}
-%
-% \begin{macrocode}
-\DeclareOption{cm-default}
- {
- \@@_warning:n {cm-default-obsolete}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption {math} { \bool_gset_true:N \g_@@_math_bool }
-\DeclareOption {no-math} { \bool_gset_false:N \g_@@_math_bool }
-\DeclareOption {config} { \bool_gset_true:N \g_@@_cfg_bool }
-\DeclareOption {no-config}{ \bool_gset_false:N \g_@@_cfg_bool }
-\DeclareOption {euenc} { \bool_gset_true:N \g_@@_euenc_bool }
-\DeclareOption {tuenc} { \bool_gset_false:N \g_@@_euenc_bool }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\DeclareOption {quiet}
- {
- \msg_redirect_module:nnn { fontspec } { warning } { info }
- \msg_redirect_module:nnn { fontspec } { info } { none }
- }
-\DeclareOption{silent}
- {
- \msg_redirect_module:nnn { fontspec } { warning } { none }
- \msg_redirect_module:nnn { fontspec } { info } { none }
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\ExecuteOptions{config,math,tuenc}
-\ProcessOptions*
-% \end{macrocode}
-%
-%
-%
-%
-% \subsection{Encodings}
-%
-% Soon to be the default, with a just-in-case check:
-% \begin{macrocode}
-\bool_if:NF \g_@@_euenc_bool
- {
- \file_if_exist:nTF {tuenc.def}
- {
- \cs_if_exist:cF {T at TU}
- {
- \@@_warning:n {tu-clash}
- \DeclareFontEncoding{TU}{}{}
- \DeclareFontSubstitution{TU}{lmr}{m}{n}
- }
- }
- {
- \@@_warning:n {tu-missing}
- \bool_gset_true:N \g_@@_euenc_bool
- }
- }
-\bool_if:NTF \g_@@_euenc_bool
- {
-%<XE> \tl_gset:Nn \g_fontspec_encoding_tl {EU1}
-%<LU> \tl_gset:Nn \g_fontspec_encoding_tl {EU2}
- }
- { \tl_gset:Nn \g_fontspec_encoding_tl { TU } }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_set:Nn \rmdefault {lmr}
-\tl_set:Nn \sfdefault {lmss}
-\tl_set:Nn \ttdefault {lmtt}
-\RequirePackage[\g_fontspec_encoding_tl]{fontenc}
-\tl_set_eq:NN \UTFencname \g_fontspec_encoding_tl % for xunicode if needed
-% \end{macrocode}
-% To overcome the encoding changing the current font size, but only if a class has been loaded first:
-% \begin{macrocode}
-\tl_if_in:NnT \@filelist {.cls} { \normalsize }
-% \end{macrocode}
-% Dealing with a couple of the problems introduced by \pkg{babel}:
-% \begin{macrocode}
-\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
-\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
-\AtBeginDocument
- {
- \tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
- \tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
- }
-% \end{macrocode}
-% That latin encoding definition is repeated to suppress font warnings.
-% Something to do with \cmd\select at language\ ending up in the \texttt{.aux}
-% file which is read at the beginning of the document.
-%
-% \begin{macrocode}
-\bool_if:NT \g_@@_euenc_bool
- {
-%<LU> \cs_set_eq:NN \fontspec_tmp: \XeTeXpicfile
-%<LU> \cs_set:Npn \XeTeXpicfile {}
- \RequirePackage{xunicode}
-%<LU> \cs_set_eq:NN \XeTeXpicfile \fontspec_tmp:
- }
-% \end{macrocode}
-%
-%
-% \subsection{Generic functions}
-%
-% \begin{macro}{\FontspecSetCheckBoolTrue}
-% \begin{macro}{\FontspecSetCheckBoolFalse}
-% These strange set functions are to simplify returning code from LuaTeX:
-% \begin{macrocode}
-\cs_new:Npn \FontspecSetCheckBoolTrue { \bool_set_true:N \l_@@_check_bool }
-\cs_new:Npn \FontspecSetCheckBoolFalse { \bool_set_false:N \l_@@_check_bool }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_keys_set_known:nnN}
-% \begin{macrocode}
-\cs_new:Nn \@@_keys_set_known:nnN
- {
-%<debug> \typeout{:::: Keys~set:~{#1}~{#2} }
- \keys_set_known:nnN {#1} {#2} #3
-%<debug> \typeout{:::: Leftover:~{#3} }
- }
-\cs_generate_variant:Nn \@@_keys_set_known:nnN {nx}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_int_mult_truncate:Nn}
-% Missing in expl3, IMO.
-% \begin{macrocode}
-\cs_new:Nn \@@_int_mult_truncate:Nn
- {
- \int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \subsection{\pkg{expl3} variants}
-%
-% \begin{macrocode}
-\cs_generate_variant:Nn \int_set:Nn {Nv}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
-\cs_generate_variant:Nn \prop_put:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput_if_new:Nnn {NxV}
-\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
-\cs_generate_variant:Nn \prop_get:NnNT {NxN}
-\cs_generate_variant:Nn \prop_get:NnNTF {NxN}
-\cs_generate_variant:Nn \str_if_eq:nnTF {nv}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {x}
-\cs_generate_variant:Nn \tl_if_empty:nF {f}
-\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
-\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
-% \end{macrocode}
-%
-%
-%
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-opentype.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,438 +0,0 @@
-%%^^A%% fontspec-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{OpenType definitions code}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-%
-%
-% \begin{macro}{\@@_define_opentype_feature_group:n}
-% \begin{macrocode}
-\cs_new:Nn \@@_define_opentype_feature_group:n
- {
- \keys_define:nn {fontspec-opentype} { #1 .multichoice: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_define_opentype_feature:nnnnn}
-% \darg{Feature key}
-% \darg{Feature option val}
-% \darg{Check feature --- leave empty for no check}
-% \darg{Exact tag string to activate --- leave empty for disable only}
-% \darg{Tags to remove (clist)}
-% \begin{macrocode}
-\cs_new:Nn \@@_feat_prop_add:nn
- {
- \tl_if_empty:nF {#1}
- {
- \prop_if_in:NnF \g_@@_OT_features_prop {#1}
- {
- \prop_gput:Nnn \g_@@_OT_features_prop {#1} {#2}
- }
- }
- }
-\cs_new:Nn \@@_define_opentype_feature:nnnnn
- {
- \@@_feat_prop_add:nn {#3} {#1\,=\,#2}
- \tl_if_empty:nTF {#4}
- {
- \keys_define:nn {fontspec-opentype}
- {
- #1/#2 .code:n =
- { \@@_remove_clashing_featstr:n {#5} }
- }
- }
- {
- \keys_define:nn {fontspec-opentype}
- {
- #1/#2 .code:n =
- {
-%<debug> \typeout{::::::::fontspec-opentype~#1/#2~=~#3/#4/#5}
- \@@_make_OT_feature:nnn {#3} {#4} {#5}
- }
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_define_opentype_onoffreset:nnnnn}
-% \darg{Feature key}
-% \darg{Feature option val}
-% \darg{Check feature}
-% \darg{Tag prefix to activate: \texttt{+\#4} = on, \texttt{-\#4} = off.}
-% \darg{Tags to remove in the on case (clist)}
-% \begin{macrocode}
-\cs_new:Nn \@@_feat_off:n {#1Off}
-\cs_new:Nn \@@_feat_reset:n {#1Reset}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new:Nn \@@_define_opentype_onoffreset:nnnnn
- {
- \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} {#2} {#3} {+#4} {#5}
- \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} { \@@_feat_off:n {#2} } {#3} {-#4} {}
- \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} { \@@_feat_reset:n {#2} } {} {} {+#4,-#4}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_define_opentype_onreset:nnnnn}
-% \darg{Feature key}
-% \darg{Feature option val}
-% \darg{Check feature}
-% \darg{Exact tag string to activate}
-% \darg{Tags to remove (clist)}
-% \begin{macrocode}
-\cs_new:Nn \@@_define_opentype_onreset:nnnnn
- {
- \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} {#2} {#3} {#4} {#5}
- \exp_args:Nnx \@@_define_opentype_feature:nnnnn {#1} { \@@_feat_reset:n {#2} } {} {} {#4}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Adding features when loading fonts}
-%
-% When remove clashing features,
-% \begin{enumerate}
-% \item remove the feature being added (to avoid duplicates);
-% \item remove the inverse of the feature (to avoid cancellation);
-% \item finally remove all clashing features.
-% \end{enumerate}
-% \begin{macrocode}
-\cs_new:Nn \@@_make_OT_feature:nnn
- {
-%<debug> \typeout{:: @@_make_OT_feature:nnn \exp_not:n { {#1}{#2}{#3} } }
-
- \bool_set_true:N \l_@@_proceed_bool
- \bool_set_true:N \l_@@_check_feat_bool
-
- \tl_if_empty:nT {#1} { \bool_set_false:N \l_@@_check_feat_bool }
- \bool_if:NT \l_@@_check_feat_bool
- {
- \@@_check_ot_feat:NnF \l_fontspec_font {#1}
- {
- \@@_warning:nx {icu-feature-not-exist-in-font} {#1}
- \bool_set_false:N \l_@@_proceed_bool
- }
- }
-
- \bool_if:NT \l_@@_proceed_bool
- {
- \exp_args:Nx \@@_remove_clashing_featstr:n
- { #2 , \@@_swap_plus_minus:n {#2} , #3 }
-
- \@@_update_featstr:n {#2}
- }
- }
-\cs_generate_variant:Nn \@@_make_OT_feature:nnn {xxx}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new:Nn \@@_swap_plus_minus:n { \@@_swap_plus_minus_aux:Nq #1 \q_nil }
-\cs_new:Npn \@@_swap_plus_minus_aux:Nq #1#2 \q_nil
- { \str_case:nn {#1} { {+} {-#2} {-} {+#2} } }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@_check_script:NnTF}
-% This macro takes an OpenType script tag and checks if it exists in the current
-% font. The output boolean is \cmd\@tempswatrue. \cmd\l_@@_script_int\ is used to store
-% the number corresponding to the script tag string.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_check_script:Nn {TF}
- {
- \bool_if:NTF \l_@@_never_check_bool
- { \prg_return_true: }
-%<*XE>
- {
- \@@_iv_str_to_num:Nn \l_@@_strnum_int {#2}
- \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts #1 }
- \int_zero:N \l_tmpa_int
- \bool_set_false:N \l__fontspec_check_bool
- \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
- {
- \ifnum \XeTeXOTscripttag #1 \l_tmpa_int = \l_@@_strnum_int
- \bool_set_true:N \l__fontspec_check_bool
- \int_set:Nn \l_tmpa_int {\l_tmpb_int}
- \else
- \int_incr:N \l_tmpa_int
- \fi
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
-%</XE>
-%<*LU>
- {
- \cs_if_eq:NNTF #1 \font
- { \tl_set:Nx \l_@@_tmp_tl {\curr at fontshape/\f at size} }
- { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
- \directlua{fontspec.check_ot_script("\l_@@_tmp_tl", "#2")}
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
-%</LU>
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_check_lang:NnTF}
-% This macro takes an OpenType language tag and checks if it exists in the current
-% font/script. The output boolean is \cmd\@tempswatrue. \cmd\l_@@_language_int\ is used to store
-% the number corresponding to the language tag string.
-% The script used is whatever's held in \cmd\l_@@_script_int. By default, that's the
-% number corresponding to `|latn|'.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_check_lang:Nn {TF}
- {
- \bool_if:NTF \l_@@_never_check_bool
- { \prg_return_true: }
-%<*XE>
- {
- \@@_iv_str_to_num:Nn \l_@@_strnum_int {#2}
- \int_set:Nn \l_tmpb_int
- { \XeTeXOTcountlanguages #1 \l_@@_script_int }
- \int_zero:N \l_tmpa_int
- \bool_set_false:N \l__fontspec_check_bool
- \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
- {
- \ifnum\XeTeXOTlanguagetag #1 \l_@@_script_int \l_tmpa_int = \l_@@_strnum_int
- \bool_set_true:N \l__fontspec_check_bool
- \int_set:Nn \l_tmpa_int {\l_tmpb_int}
- \else
- \int_incr:N \l_tmpa_int
- \fi
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
-%</XE>
-%<*LU>
- {
- \cs_if_eq:NNTF #1 \font
- { \tl_set:Nx \l_@@_tmp_tl {\curr at fontshape/\f at size} }
- { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
- \directlua
- {
- fontspec.check_ot_lang( "\l_@@_tmp_tl", "#2", "\l_fontspec_script_tl" )
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
-%</LU>
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_check_ot_feat:NnTF}
-% This macro takes an OpenType feature tag and checks if it exists in the current
-% font/script/language.
-% \cmd\l_@@_strnum_int\ is used to store the number corresponding to the feature tag string.
-% The script used is whatever's held in \cmd\l_@@_script_int. By default, that's the
-% number corresponding to `|latn|'. The language used is \cmd\l_@@_language_int,
-% by default |0|, the `default language'.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_check_ot_feat:Nn {TF,F}
- {
- \bool_if:NTF \l_@@_never_check_bool
- { \prg_return_true: }
-%<*XE>
- {
-%<debug>\typeout{::~ fontspec_check_ot_feat:n~ {#1}}
- \int_set:Nn \l_tmpb_int
- {
- \XeTeXOTcountfeatures #1
- \l_@@_script_int
- \l_@@_language_int
- }
- \@@_iv_str_to_num:Nn \l_@@_strnum_int {#2}
- \int_zero:N \l_tmpa_int
- \bool_set_false:N \l_@@_check_bool
- \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
- {
- \ifnum\XeTeXOTfeaturetag #1 \l_@@_script_int \l_@@_language_int
- \l_tmpa_int =\l_@@_strnum_int
- \bool_set_true:N \l_@@_check_bool
- \int_set:Nn \l_tmpa_int {\l_tmpb_int}
- \else
- \int_incr:N \l_tmpa_int
- \fi
- }
- \bool_if:NTF \l_@@_check_bool \prg_return_true: \prg_return_false:
- }
-%</XE>
-%<*LU>
- {
-%<debug>\typeout{::~ fontspec_check_ot_feat:n~ {#1}}
- \cs_if_eq:NNTF #1 \font
- { \tl_set:Nx \l_@@_tmp_tl {\curr at fontshape/\f at size} }
- { \tl_set:Nx \l_@@_tmp_tl {\cs_to_str:N #1} }
- \directlua
- {
- fontspec.check_ot_feat(
- "\l_@@_tmp_tl", "#2",
- "\l_fontspec_lang_tl", "\l_fontspec_script_tl"
- )
- }
- \bool_if:NTF \l_@@_check_bool \prg_return_true: \prg_return_false:
- }
-%</LU>
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{OpenType feature information}
-%
-% \begin{macrocode}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {aalt}{Access~All~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {abvf}{Above-base~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {abvm}{Above-base~Mark~Positioning}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {abvs}{Above-base~Substitutions}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {afrc}{Alternative~Fractions}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {akhn}{Akhands}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {blwf}{Below-base~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {blwm}{Below-base~Mark~Positioning}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {blws}{Below-base~Substitutions}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {calt}{Contextual~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {case}{Case-Sensitive~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ccmp}{Glyph~Composition~/~Decomposition}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cfar}{Conjunct~Form~After~Ro}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cjct}{Conjunct~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {clig}{Contextual~Ligatures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cpct}{Centered~CJK~Punctuation}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cpsp}{Capital~Spacing}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cswh}{Contextual~Swash}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {curs}{Cursive~Positioning}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {cvNN}{Character~Variant~$N$}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {c2pc}{Petite~Capitals~From~Capitals}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {c2sc}{Small~Capitals~From~Capitals}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {dist}{Distances}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {dlig}{Discretionary~Ligatures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {dnom}{Denominators}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {dtls}{Dotless~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {expt}{Expert~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {falt}{Final~Glyph~on~Line~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {fin2}{Terminal~Forms~\#2}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {fin3}{Terminal~Forms~\#3}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {fina}{Terminal~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {flac}{Flattened~accent~forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {frac}{Fractions}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {fwid}{Full~Widths}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {half}{Half~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {haln}{Halant~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {halt}{Alternate~Half~Widths}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hist}{Historical~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hkna}{Horizontal~Kana~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hlig}{Historical~Ligatures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hngl}{Hangul}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hojo}{Hojo~Kanji~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {hwid}{Half~Widths}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {init}{Initial~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {isol}{Isolated~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ital}{Italics}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jalt}{Justification~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jp78}{JIS78~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jp83}{JIS83~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jp90}{JIS90~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {jp04}{JIS2004~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {kern}{Kerning}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {lfbd}{Left~Bounds}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {liga}{Standard~Ligatures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ljmo}{Leading~Jamo~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {lnum}{Lining~Figures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {locl}{Localized~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ltra}{Left-to-right~alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ltrm}{Left-to-right~mirrored~forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {mark}{Mark~Positioning}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {med2}{Medial~Forms~\#2}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {medi}{Medial~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {mgrk}{Mathematical~Greek}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {mkmk}{Mark~to~Mark~Positioning}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {mset}{Mark~Positioning~via~Substitution}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {nalt}{Alternate~Annotation~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {nlck}{NLC~Kanji~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {nukt}{Nukta~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {numr}{Numerators}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {onum}{Oldstyle~Figures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {opbd}{Optical~Bounds}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ordn}{Ordinals}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ornm}{Ornaments}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {palt}{Proportional~Alternate~Widths}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pcap}{Petite~Capitals}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pkna}{Proportional~Kana}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pnum}{Proportional~Figures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pref}{Pre-Base~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pres}{Pre-base~Substitutions}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pstf}{Post-base~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {psts}{Post-base~Substitutions}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {pwid}{Proportional~Widths}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {qwid}{Quarter~Widths}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rand}{Randomize}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rclt}{Required~Contextual~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rkrf}{Rakar~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rlig}{Required~Ligatures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rphf}{Reph~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rtbd}{Right~Bounds}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rtla}{Right-to-left~alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rtlm}{Right-to-left~mirrored~forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ruby}{Ruby~Notation~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {rvrn}{Required~Variation~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {salt}{Stylistic~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {sinf}{Scientific~Inferiors}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {size}{Optical~size}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {smcp}{Small~Capitals}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {smpl}{Simplified~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ssNN}{Stylistic~Set~$N$}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {ssty}{Math~script~style~alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {stch}{Stretching~Glyph~Decomposition}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {subs}{Subscript}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {sups}{Superscript}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {swsh}{Swash}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {titl}{Titling}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {tjmo}{Trailing~Jamo~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {tnam}{Traditional~Name~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {tnum}{Tabular~Figures}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {trad}{Traditional~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {twid}{Third~Widths}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {unic}{Unicase}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {valt}{Alternate~Vertical~Metrics}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vatu}{Vattu~Variants}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vert}{Vertical~Writing}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vhal}{Alternate~Vertical~Half~Metrics}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vjmo}{Vowel~Jamo~Forms}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vkna}{Vertical~Kana~Alternates}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vkrn}{Vertical~Kerning}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vpal}{Proportional~Alternate~Vertical~Metrics}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vrt2}{Vertical~Alternates~and~Rotation}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
-\prop_gput:Nnn \g_@@_all_opentype_feature_names_prop {zero}{Slashed~Zero}
-% \end{macrocode}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-patches.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,208 +0,0 @@
-%%^^A%% fontspec-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Patching code}
-%
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-%
-% \subsection{\cmd\-}
-%
-% \begin{macro}{\-}
-% This macro is courtesy of Frank Mittelbach and the \LaTeXe\ source code.
-% \begin{macrocode}
-\DeclareRobustCommand{\-}
- {
- \discretionary
- {
- \char\ifnum\hyphenchar\font<\z@
- \xlx at defaulthyphenchar
- \else
- \hyphenchar\font
- \fi
- }{}{}
- }
-\def\xlx at defaulthyphenchar{`\-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Verbatims}
-%
-% Many thanks to Apostolos Syropoulos for discovering this problem and writing the redefinion of \LaTeX's |verbatim| environment and \cs{verb*} command.
-%
-% \begin{macro}{\fontspec_visible_space:}
-% Print \unichar{2423}{Open box}, which is used to visibly display a space character.
-% \begin{macrocode}
-\cs_new:Nn \fontspec_visible_space:
- {
- \@@_primitive_font_glyph_if_exist:NnTF \font {"2423}
- { \char"2423\scan_stop: }
- { \fontspec_visible_space_fallback: }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fontspec_visible_space_fallback:}
-% If the current font doesn't have \unichar{2423}{Open box}, use Latin Modern Mono instead.
-% \begin{macrocode}
-\cs_new:Nn \fontspec_visible_space_fallback:
- {
- {
- \usefont{\g_fontspec_encoding_tl}{lmtt}{\f at series}{\f at shape}
- \textvisiblespace
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fontspec_print_visible_spaces:}
-% Helper macro to turn spaces (\verb|^^20|) active and print visible space instead.
-% \begin{macrocode}
-\group_begin:
-\char_set_catcode_active:n{"20}%
-\cs_gset:Npn\fontspec_print_visible_spaces:{%
-\char_set_catcode_active:n{"20}%
-\cs_set_eq:NN^^20\fontspec_visible_space:%
-}%
-\group_end:
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\verb}
-% \begin{macro}{\verb*}
-% Redefine \cmd\verb\ to use \cmd\fontspec_print_visible_spaces:.
-% \begin{macrocode}
-\def\verb
- {
- \relax\ifmmode\hbox\else\leavevmode\null\fi
- \bgroup
- \verb at eol@error \let\do\@makeother \dospecials
- \verbatim at font\@noligs
- \@ifstar\@@sverb\@verb
- }
-\def\@@sverb{\fontspec_print_visible_spaces:\@sverb}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% It's better to put small things into \cmd\AtBeginDocument, so here we go:
-% \begin{macrocode}
-\AtBeginDocument
- {
- \fontspec_patch_verbatim:
- \fontspec_patch_moreverb:
- \fontspec_patch_fancyvrb:
- \fontspec_patch_listings:
- }
-% \end{macrocode}
-%
-% \begin{environment}{verbatim*}
-% With the \pkg{verbatim} package.
-% \begin{macrocode}
-\cs_set:Npn \fontspec_patch_verbatim:
- {
- \@ifpackageloaded{verbatim}
- {
- \cs_set:cpn {verbatim*}
- {
- \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim at start
- }
- }
-% \end{macrocode}
-% This is for vanilla \LaTeX.
-% \begin{macrocode}
- {
- \cs_set:cpn {verbatim*}
- {
- \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
- }
- }
- }
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{environment}{listingcont*}
-% This is for \pkg{moreverb}.
-% The main |listing*| environment inherits this definition.
-% \begin{macrocode}
-\cs_set:Npn \fontspec_patch_moreverb:
- {
- \@ifpackageloaded{moreverb}{
- \cs_set:cpn {listingcont*}
- {
- \cs_set:Npn \verbatim at processline
- {
- \thelisting at line \global\advance\listing at line\c_one
- \the\verbatim at line\par
- }
- \@verbatim \fontspec_print_visible_spaces: \verbatim at start
- }
- }{}
- }
-% \end{macrocode}
-% \end{environment}
-%
-% \pkg{listings} and \pkg{fancvrb} make things nice and easy:
-% \begin{macrocode}
-\cs_set:Npn \fontspec_patch_fancyvrb:
- {
- \@ifpackageloaded{fancyvrb}
- {
- \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
- }{}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_set:Npn \fontspec_patch_listings:
- {
- \@ifpackageloaded{listings}
- {
- \cs_set_eq:NN \lst at visiblespace \fontspec_visible_space:
- }{}
- }
-% \end{macrocode}
-%
-% \subsection{\cs{oldstylenums}}
-%
-%
-% \begin{macro}{\oldstylenums}
-% \begin{macro}{\liningnums}
-% This command obviously needs a redefinition.
-% And we may as well provide the reverse command.
-% \begin{macrocode}
-\RenewDocumentCommand \oldstylenums {m}
- {
- { \addfontfeature{Numbers=OldStyle} #1 }
- }
-\NewDocumentCommand \liningnums {m}
- {
- { \addfontfeature{Numbers=Lining} #1 }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-scripts.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,183 +0,0 @@
-%%^^A%% fontspec-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Font script definitions}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% \begin{macrocode}
-\newfontscript{Adlam}{adlm}
-\newfontscript{Ahom}{ahom}
-\newfontscript{Anatolian~Hieroglyphs}{hluw}
-\newfontscript{Arabic}{arab}
-\newfontscript{Armenian}{armn}
-\newfontscript{Avestan}{avst}
-\newfontscript{Balinese}{bali}
-\newfontscript{Bamum}{bamu}
-\newfontscript{Bassa~Vah}{bass}
-\newfontscript{Batak}{batk}
-\newfontscript{Bengali}{bng2,beng}
-\newfontscript{Bhaiksuki}{bhks}
-\newfontscript{Bopomofo}{bopo}
-\newfontscript{Brahmi}{brah}
-\newfontscript{Braille}{brai}
-\newfontscript{Buginese}{bugi}
-\newfontscript{Buhid}{buhd}
-\newfontscript{Byzantine~Music}{byzm}
-\newfontscript{Canadian~Syllabics}{cans}
-\newfontscript{Carian}{cari}
-\newfontscript{Caucasian~Albanian}{aghb}
-\newfontscript{Chakma}{cakm}
-\newfontscript{Cham}{cham}
-\newfontscript{Cherokee}{cher}
-\newfontscript{CJK~Ideographic}{hani}
-\newfontscript{Coptic}{copt}
-\newfontscript{Cypriot~Syllabary}{cprt}
-\newfontscript{Cyrillic}{cyrl}
-\newfontscript{Default}{DFLT}
-\newfontscript{Deseret}{dsrt}
-\newfontscript{Devanagari}{dev2,deva}
-\newfontscript{Duployan}{dupl}
-\newfontscript{Egyptian~Hieroglyphs}{egyp}
-\newfontscript{Elbasan}{elba}
-\newfontscript{Ethiopic}{ethi}
-\newfontscript{Georgian}{geor}
-\newfontscript{Glagolitic}{glag}
-\newfontscript{Gothic}{goth}
-\newfontscript{Grantha}{gran}
-\newfontscript{Greek}{grek}
-\newfontscript{Gujarati}{gjr2,gujr}
-\newfontscript{Gurmukhi}{gur2,guru}
-\newfontscript{Hangul~Jamo}{jamo}
-\newfontscript{Hangul}{hang}
-\newfontscript{Hanunoo}{hano}
-\newfontscript{Hatran}{hatr}
-\newfontscript{Hebrew}{hebr}
-\newfontscript{Hiragana~and~Katakana}{kana}
-\newfontscript{Imperial~Aramaic}{armi}
-\newfontscript{Inscriptional~Pahlavi}{phli}
-\newfontscript{Inscriptional~Parthian}{prti}
-\newfontscript{Javanese}{java}
-\newfontscript{Kaithi}{kthi}
-\newfontscript{Kannada}{knd2,knda}
-\newfontscript{Kayah~Li}{kali}
-\newfontscript{Kharosthi}{khar}
-\newfontscript{Khmer}{khmr}
-\newfontscript{Khojki}{khoj}
-\newfontscript{Khudawadi}{sind}
-\newfontscript{Lao}{lao~}
-\newfontscript{Latin}{latn}
-\newfontscript{Lepcha}{lepc}
-\newfontscript{Limbu}{limb}
-\newfontscript{Linear~A}{lina}
-\newfontscript{Linear~B}{linb}
-\newfontscript{Lisu}{lisu}
-\newfontscript{Lycian}{lyci}
-\newfontscript{Lydian}{lydi}
-\newfontscript{Mahajani}{mahj}
-\newfontscript{Malayalam}{mlm2,mlym}
-\newfontscript{Mandaic}{mand}
-\newfontscript{Manichaean}{mani}
-\newfontscript{Marchen}{marc}
-\newfontscript{Math}{math}
-\newfontscript{Meitei~Mayek}{mtei}
-\newfontscript{Mende~Kikakui}{mend}
-\newfontscript{Meroitic~Cursive}{merc}
-\newfontscript{Meroitic~Hieroglyphs}{mero}
-\newfontscript{Miao}{plrd}
-\newfontscript{Modi}{modi}
-\newfontscript{Mongolian}{mong}
-\newfontscript{Mro}{mroo}
-\newfontscript{Multani}{mult}
-\newfontscript{Musical~Symbols}{musc}
-\newfontscript{Myanmar}{mym2,mymr}
-\newfontscript{N'Ko}{nko~}
-\newfontscript{Nabataean}{nbat}
-\newfontscript{Newa}{newa}
-\newfontscript{Odia}{ory2,orya}
-\newfontscript{Ogham}{ogam}
-\newfontscript{Ol~Chiki}{olck}
-\newfontscript{Old~Italic}{ital}
-\newfontscript{Old~Hungarian}{hung}
-\newfontscript{Old~North~Arabian}{narb}
-\newfontscript{Old~Permic}{perm}
-\newfontscript{Old~Persian~Cuneiform}{xpeo}
-\newfontscript{Old~South~Arabian}{sarb}
-\newfontscript{Old~Turkic}{orkh}
-\newfontscript{Osage}{osge}
-\newfontscript{Osmanya}{osma}
-\newfontscript{Pahawh~Hmong}{hmng}
-\newfontscript{Palmyrene}{palm}
-\newfontscript{Pau~Cin~Hau}{pauc}
-\newfontscript{Phags-pa}{phag}
-\newfontscript{Phoenician}{phnx}
-\newfontscript{Psalter~Pahlavi}{phlp}
-\newfontscript{Rejang}{rjng}
-\newfontscript{Runic}{runr}
-\newfontscript{Samaritan}{samr}
-\newfontscript{Saurashtra}{saur}
-\newfontscript{Sharada}{shrd}
-\newfontscript{Shavian}{shaw}
-\newfontscript{Siddham}{sidd}
-\newfontscript{Sign~Writing}{sgnw}
-\newfontscript{Sinhala}{sinh}
-\newfontscript{Sora~Sompeng}{sora}
-\newfontscript{Sumero-Akkadian~Cuneiform}{xsux}
-\newfontscript{Sundanese}{sund}
-\newfontscript{Syloti~Nagri}{sylo}
-\newfontscript{Syriac}{syrc}
-\newfontscript{Tagalog}{tglg}
-\newfontscript{Tagbanwa}{tagb}
-\newfontscript{Tai~Le}{tale}
-\newfontscript{Tai~Lu}{talu}
-\newfontscript{Tai~Tham}{lana}
-\newfontscript{Tai~Viet}{tavt}
-\newfontscript{Takri}{takr}
-\newfontscript{Tamil}{tml2,taml}
-\newfontscript{Tangut}{tang}
-\newfontscript{Telugu}{tel2,telu}
-\newfontscript{Thaana}{thaa}
-\newfontscript{Thai}{thai}
-\newfontscript{Tibetan}{tibt}
-\newfontscript{Tifinagh}{tfng}
-\newfontscript{Tirhuta}{tirh}
-\newfontscript{Ugaritic~Cuneiform}{ugar}
-\newfontscript{Vai}{vai~}
-\newfontscript{Warang~Citi}{wara}
-\newfontscript{Yi}{yi~~}
-% \end{macrocode}
-% For convenience or backwards compatibility:
-% \begin{macrocode}
-\newfontscript{CJK}{hani}
-\newfontscript{Kana}{kana}
-\newfontscript{Maths}{math}
-\newfontscript{N'ko}{nko~}
-\newfontscript{Oriya}{ory2,orya}
-% \end{macrocode}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,509 +0,0 @@
-%%^^A%% fontspec-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{User command internals}
-% \label{sec:codeinternal}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-%
-% \subsection{Font selection}
-%
-% \begin{macro}{\@@_main_fontspec:nn}
-% This is the main command of the package that
-% selects fonts with various features. It takes two arguments: the
-% font name and the optional requested features of that
-% font.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_fontspec:nn
- {
- \fontspec_set_family:Nnn \f at family {#1} {#2}
- \fontencoding { \g_@@_nfss_enc_tl }
- \selectfont
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setmainfont}
-% The following three macros perform equivalent operations setting
-% the default font for a particular family: `roman', sans serif, or typewriter
-% (monospaced).
-%
-% They end with |\normalfont| so that if they're
-% used in the document, the change registers immediately.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_setmainfont:nn
- {
- \fontspec_set_family:Nnn \l_@@_rmfamily_family_tl {#1} {#2}
- \tl_set_eq:NN \rmdefault \l_@@_rmfamily_family_tl
- \use:x
- {
- \exp_not:n { \DeclareRobustCommand \rmfamily }
- {
- \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
- \exp_not:N \fontfamily { \l_@@_rmfamily_family_tl }
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\rmdefault}
- { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
- \@@_setmainfont_hook:nn {#1} {#2}
- \normalfont
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setsansfont}
-% Same as above.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_setsansfont:nn
- {
- \fontspec_set_family:Nnn \l_@@_sffamily_family_tl {#1} {#2}
- \tl_set_eq:NN \sfdefault \l_@@_sffamily_family_tl
- \use:x
- {
- \exp_not:n { \DeclareRobustCommand \sffamily }
- {
- \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
- \exp_not:N \fontfamily { \l_@@_sffamily_family_tl }
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\sfdefault}
- { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
- \@@_setsansfont_hook:nn {#1} {#2}
- \normalfont
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setmonofont}
-% Same as above.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_setmonofont:nn
- {
- \fontspec_set_family:Nnn \l_@@_ttfamily_family_tl {#1} {#2}
- \tl_set_eq:NN \ttdefault \l_@@_ttfamily_family_tl
- \use:x
- {
- \exp_not:n { \DeclareRobustCommand \ttfamily }
- {
- \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
- \exp_not:N \fontfamily { \l_@@_ttfamily_family_tl }
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\ttdefault}
- { \tl_set_eq:NN \encodingdefault \g_@@_nfss_enc_tl }
- \@@_setmonofont_hook:nn {#1} {#2}
- \normalfont
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-% \begin{macro}{\setmathrm}
-% These commands are analogous to \cmd\setmainfont\ and others,
-% but for selecting the font used for \cmd\mathrm, \etc. They
-% can only be used in the preamble of the
-% document. \cmd\setboldmathrm\ is used for specifying which
-% fonts should be used in \cmd\boldmath.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_setmathrm:nn
- {
-%<XE> \fontspec_set_family:Nnn \g_@@_mathrm_tl {#1} {#2}
-%<LU> \fontspec_set_family:Nnn \g_@@_mathrm_tl {Renderer=Basic,#1} {#2}
- \@@_setmathrm_hook:nn {#1} {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setboldmathrm}
-% \begin{macrocode}
-\cs_new:Nn \@@_main_setboldmathrm:nn
- {
-%<XE> \fontspec_set_family:Nnn \g_@@_bfmathrm_tl {#1} {#2}
-%<LU> \fontspec_set_family:Nnn \g_@@_bfmathrm_tl {Renderer=Basic,#1} {#2}
- \@@_setboldmathrm_hook:nn {#1} {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setmathsf}
-% \begin{macrocode}
-\cs_new:Nn \@@_main_setmathsf:nn
- {
-%<XE> \fontspec_set_family:Nnn \g_@@_mathsf_tl {#1} {#2}
-%<LU> \fontspec_set_family:Nnn \g_@@_mathsf_tl {Renderer=Basic,#1} {#2}
- \@@_setmathsf_hook:nn {#1} {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setmathtt}
-% \begin{macrocode}
-\cs_new:Nn \@@_main_setmathtt:nn
- {
-%<XE> \fontspec_set_family:Nnn \g_@@_mathtt_tl {#1} {#2}
-%<LU> \fontspec_set_family:Nnn \g_@@_mathtt_tl {Renderer=Basic,#1} {#2}
- \@@_setmathtt_hook:nn {#1} {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% Hooks:
-% \begin{macrocode}
-\cs_set_eq:NN \@@_setmainfont_hook:nn \use_none:nn
-\cs_set_eq:NN \@@_setsansfont_hook:nn \use_none:nn
-\cs_set_eq:NN \@@_setmonofont_hook:nn \use_none:nn
-\cs_set_eq:NN \@@_setmathrm_hook:nn \use_none:nn
-\cs_set_eq:NN \@@_setmathsf_hook:nn \use_none:nn
-\cs_set_eq:NN \@@_setmathtt_hook:nn \use_none:nn
-\cs_set_eq:NN \@@_setboldmathrm_hook:nn \use_none:nn
-% \end{macrocode}
-%
-% Hmm, this isn't necessary with \pkg{unicode-math}; oh well:
-% \begin{macrocode}
-\@onlypreamble\setmathrm
-\@onlypreamble\setboldmathrm
-\@onlypreamble\setmathsf
-\@onlypreamble\setmathtt
-% \end{macrocode}
-%
-% If the commands above are not executed, then \cmd\rmdefault\ (\etc)
-% will be used.
-% \begin{macrocode}
-\tl_gset:Nn \g_@@_mathrm_tl {\rmdefault}
-\tl_gset:Nn \g_@@_mathsf_tl {\sfdefault}
-\tl_gset:Nn \g_@@_mathtt_tl {\ttdefault}
-% \end{macrocode}
-%
-% \begin{macro}{\@@_main_newfontfamily:nnnN}
-% The inner fontspec workings define a font family, which is then used in a typical
-% NFSS \cmd\fontfamily\ declaration, saved in the macro name specified.
-% The fourth argument determines which xparse function to set the macro with (new/renew/etc).
-% \begin{macrocode}
-\cs_new:Nn \@@_main_newfontfamily:nnnN
- {
- \fontspec_set_family:cnn { l_@@_ \cs_to_str:N #1 _family_tl } {#2} {#3}
- \use:x
- {
- \exp_not:N #4 \exp_not:N #1 {}
- {
- \exp_not:N \fontfamily { \use:c { l_@@_ \cs_to_str:N #1 _family_tl } }
- \exp_not:N \fontencoding { \g_@@_nfss_enc_tl }
- \exp_not:N \selectfont
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_main_newfontface:nnn}
-% \cmd\newfontface\ uses the fact that if the argument to \feat{BoldFont}, etc., is empty (\ie, |BoldFont={}|), then no bold font is searched for.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_newfontface:nnn
- {
- \newfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2 ] {#3}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Font feature selection}
-%
-% \begin{macro}{\@@_set_default_features:nn}
-% \begin{macrocode}
-\cs_new:Nn \@@_set_default_features:nn
- {
- \IfBooleanTF {#1} \clist_gput_right:Nn \clist_gset:Nn
- \g_@@_default_fontopts_clist {#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_set_font_default_features:nnn}
-% The optional argument |#2| specifies font identifier(s).
-% Branch for either (a)~single token input such as \verb|\rmdefault|, or (b)~otherwise assume its a fontname.
-% In that case, strip spaces and file extensions and lower-case to ensure consistency.
-% \begin{macrocode}
-\cs_new:Nn \@@_set_font_default_features:nnn
- {
-%<debug> \typeout{\unexpanded{_set_font_default_features:nnn:{#1}{#2}{#3}}}
- \clist_map_inline:nn {#2}
- {
- \tl_if_single:nTF {##1}
- { \tl_set:No \l_@@_tmp_tl { \cs:w l_@@_ \cs_to_str:N ##1 _family_tl\cs_end: } }
- { \@@_sanitise_fontname:Nn \l_@@_tmp_tl {##1} }
-
- \IfBooleanTF {#1}
- {
- \prop_get:NVNF \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
- { \tl_clear:N \l_@@_tmpb_tl }
- \tl_put_right:Nn \l_@@_tmpb_tl {#3,}
- \prop_gput:NVV \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
- }
- {
- \tl_if_empty:nTF {#3}
- { \prop_gremove:NV \g_@@_fontopts_prop \l_@@_tmp_tl }
- { \prop_gput:NVn \g_@@_fontopts_prop \l_@@_tmp_tl {#3,} }
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\addfontfeatures}
-% In order to be able to extend the feature selection of
-% a given font, two things need to be known: the currently selected
-% features, and the currently selected font. Every time a font
-% family is created, this information is saved inside a control
-% sequence with the name of the font family itself.
-%
-% This macro extracts this information, then appends the requested
-% font features to add to the already existing ones, and calls the
-% font again with the top level \cs{fontspec} command.
-%
-% The default options are \emph{not} applied (which is why
-% \cs{g_fontspec_default_fontopts_tl} is emptied inside the group; this is allowed
-% as \cmd\l_fontspec_family_tl\ is globally defined in \cmd\@@_select_font_family:nn), so this
-% means that the only added features to the font are strictly those
-% specified by this command.
-%
-% \cs{addfontfeature} is defined as an alias, as I found that I
-% often typed this instead when adding only a single font feature.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_addfontfeatures:n
- {
-%<debug> \typeout{^^J::::::::::::::::::::::::::::::::::^^J: addfontfeatures}
- \fontspec_if_fontspec_font:TF
- {
- \group_begin:
- \keys_set_known:nnN {fontspec-addfeatures} {#1} \l_@@_tmp_tl
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {options} \l_@@_options_tl
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {fontname} \l_@@_fontname_tl
- \bool_set_true:N \l_@@_disable_defaults_bool
-%<debug> \typeout{ \@@_select_font_family:nn { \l_@@_options_tl , #1 } {\l_@@_fontname_tl} }
- \use:x
- {
- \@@_select_font_family:nn
- { \l_@@_options_tl , #1 } {\l_@@_fontname_tl}
- }
- \group_end:
- \fontfamily \g_@@_nfss_family_tl \selectfont
- }
- {
- \@@_warning:nx {addfontfeatures-ignored} {#1}
- }
- \ignorespaces
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Defining new font features}
-%
-% \begin{macro}{\newfontfeature}
-% \cs{newfontfeature} takes two arguments: the name of the feature
-% tag by which to reference it, and the string that is used to
-% select the font feature.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_newfontfeature:nn
- {
- \keys_define:nn { fontspec }
- {
- #1 .code:n = { \@@_update_featstr:n {#2} }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\newAATfeature}
-% This command assigns a new AAT feature by its code (|#2|,|#3|) to a new name (|#1|).
-% Better than \cmd\newfontfeature\ because it checks if the feature exists in the
-% font it's being used for.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_newAATfeature:nnnn
- {
- \keys_if_exist:nnF { fontspec } {#1}
- { \@@_define_aat_feature_group:n {#1} }
-
- \keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
- { \@@_warning:nxx {feature-option-overwrite} {#1} {#2} }
-
- \@@_define_aat_feature:nnnn {#1}{#2}{#3}{#4}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newopentypefeature}
-% This command assigns a new OpenType feature by its abbreviation (|#2|) to a new name (|#1|).
-% Better than \cmd\newfontfeature\ because it checks if the feature exists in the
-% font it's being used for.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_newopentypefeature:nnn
- {
- \keys_if_exist:nnF { fontspec / options } {#1}
- { \@@_define_opentype_feature_group:n {#1} }
-
- \keys_if_choice_exist:nnnT {fontspec} {#1} {#2}
- { \@@_warning:nxx {feature-option-overwrite} {#1} {#2} }
-
- \exp_args:Nnnx \@@_define_opentype_feature:nnnnn
- {#1} {#2} { \@@_strip_plus_minus:n {#3} } {#3} {}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new:Nn \@@_strip_plus_minus:n { \@@_strip_plus_minus_aux:Nq #1 \q_nil }
-\cs_new:Npn \@@_strip_plus_minus_aux:Nq #1#2 \q_nil
- {
- \str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2}
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\aliasfontfeature}
-% User commands for renaming font features and font feature options.
-% \begin{macrocode}
-\cs_new:Nn \@@_main_aliasfontfeature:nn
- {
-%<debug> \typeout{::::::::::::::::::::^^J:: aliasfontfeature{#1}{#2}}
- \bool_set_false:N \l_@@_alias_bool
-
- \clist_map_inline:Nn \g_@@_all_keyval_modules_clist
- {
- \keys_if_exist:nnT {##1} {#1}
- {
-%<debug> \typeout{:::: Key~exists~##1~/~#1}
- \bool_set_true:N \l_@@_alias_bool
- \keys_define:nn {##1}
- { #2 .code:n = { \keys_set:nn {##1} { #1 = {####1} } } }
- }
- }
-
- \bool_if:NF \l_@@_alias_bool
- { \@@_warning:nx {rename-feature-not-exist} {#1} }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\aliasfontfeatureoption}
-% \begin{macrocode}
-\cs_new:Nn \@@_main_aliasfontfeatureoption:nnn
- {
- \bool_set_false:N \l_@@_alias_bool
-
- \clist_map_inline:Nn \g_@@_all_keyval_modules_clist
- {
- \keys_if_exist:nnT { ##1 / #1 } {#2}
- {
-%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2}
- \bool_set_true:N \l_@@_alias_bool
- \keys_define:nn { ##1 / #1 }
- { #3 .code:n = { \keys_set:nn {##1} { #1 = {#2} } } }
- }
-
- \keys_if_exist:nnT { ##1 / #1 } {#2Reset}
- {
-%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2Reset}
- \keys_define:nn { ##1 / #1 }
- { #3Reset .code:n = { \keys_set:nn {##1} { #1 = {#2Reset} } } }
- }
-
- \keys_if_exist:nnT { ##1 / #1 } {#2Off}
- {
-%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2Off}
- \keys_define:nn { ##1 / #1 }
- { #3Off .code:n = { \keys_set:nn {##1} { #1 = {#2Off} } } }
- }
- }
-
- \bool_if:NF \l_@@_alias_bool
- { \@@_warning:nx {rename-feature-not-exist} {#1/#2} }
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@_main_DeclareFontExtensions:n}
-% \begin{macrocode}
-\cs_new:Nn \@@_main_DeclareFontExtensions:n
- {
- \clist_set:Nn \l_@@_extensions_clist { #1 }
- }
-% \end{macrocode}
-% Defaults:
-% \begin{macrocode}
-\@@_main_DeclareFontExtensions:n {.otf,.ttf,.OTF,.TTF,.ttc,.TTC,.dfont}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\IfFontFeatureActiveTF}
-% \begin{macrocode}
-\cs_new:Nn \@@_main_IfFontFeatureActiveTF:nnn
- {
-%<debug> \typeout{^^J:::::::::::::::::::::::::::::::::::::::::::::::}
-%<debug> \typeout{:IfFontFeatureActiveTF \exp_not:n{{#1}{#2}{#3}}}
- \@@_if_font_feature:nTF {#1} {#2} {#3}
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_if_font_feature:n {TF}
- {
- \tl_gclear:N \g_@@_single_feat_tl
- \group_begin:
- \@@_font_suppress_not_found_error:
- \@@_init:
- \bool_set_true:N \l_@@_ot_bool
- \bool_set_true:N \l_@@_never_check_bool
- \bool_set_false:N \l_@@_firsttime_bool
- \clist_clear:N \l_@@_fontfeat_clist
- \@@_get_features:n {#1}
- \group_end:
-
-%<debug> \typeout{:::> \exp_not:N\g_@@_rawfeatures_sclist->~{\g_@@_rawfeatures_sclist}}
-%<debug> \typeout{:::> \exp_not:N\g_@@_single_feat_tl->~{\g_@@_single_feat_tl}}
-
- \tl_if_empty:NTF \g_@@_single_feat_tl { \prg_return_false: }
- {
- \exp_args:NV \fontspec_if_current_feature:nTF \g_@@_single_feat_tl
- { \prg_return_true: } { \prg_return_false: }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,281 +0,0 @@
-%%^^A%% fontspec-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%
-% \section{Declaration of variables}
-%
-% \iffalse
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% \fi
-%
-% This file consists solely of declaration of variables used by \pkg{fontspec}.
-% In some cases these variables are also initialised with default values.
-% In time I would like to move these initialisations
-%
-% \paragraph{Booleans}
-%
-% \begin{macro}{\l_@@_firsttime_bool}
-% As \cs{keys_set:nn} is run multiple times, some of its
-% information storing only occurs once while we decide if the font family
-% has been defined or not. When the later processing is occuring per-shape
-% this no longer needs to happen; this is indicated by the `firsttime'
-% conditional.
-% \begin{macrocode}
-\bool_new:N \l_@@_firsttime_bool
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\bool_new:N \l_@@_nobf_bool
-\bool_new:N \l_@@_noit_bool
-\bool_new:N \l_@@_nosc_bool
-\bool_new:N \l_@@_check_bool
-% \end{macrocode}
-%
-% \begin{macrocode}
-\bool_new:N \l_@@_tfm_bool
-\bool_new:N \l_@@_atsui_bool
-\bool_new:N \l_@@_ot_bool
-\bool_new:N \l_@@_mm_bool
-\bool_new:N \l_@@_graphite_bool
-\bool_new:N \l_@@_fontcfg_bool
-\bool_set_true:N \l_@@_fontcfg_bool
-% \end{macrocode}
-% For dealing with legacy maths:
-% \begin{macrocode}
-\bool_new:N \g_@@_math_euler_bool
-\bool_new:N \g_@@_math_lucida_bool
-\bool_new:N \g_@@_pkg_euler_loaded_bool
-% \end{macrocode}
-% For package options:
-% \begin{macrocode}
-\bool_new:N \g_@@_cfg_bool
-\bool_new:N \g_@@_math_bool
-\bool_new:N \g_@@_euenc_bool
-% \end{macrocode}
-%
-% \begin{macrocode}
-\bool_new:N \l_@@_tmpa_bool
-\bool_new:N \l_@@_disable_defaults_bool
-\bool_new:N \l_@@_alias_bool
-\bool_new:N \l_@@_external_bool
-\bool_new:N \l_@@_never_check_bool
-\bool_new:N \l_@@_defining_encoding_bool
-\bool_new:N \l_@@_script_exist_bool
-\bool_new:N \g_@@_em_normalise_slant_bool
-\bool_new:N \l_@@_proceed_bool
-\bool_new:N \l_@@_check_feat_bool
-% \end{macrocode}
-%
-% \paragraph{Counters}
-% \begin{macrocode}
-\int_new:N \l_@@_script_int
-\int_new:N \l_@@_language_int
-\int_new:N \l_@@_strnum_int
-\int_new:N \l_@@_tmp_int
-\int_new:N \l_@@_em_int
-\int_new:N \l_@@_emdef_int
-\int_new:N \l_@@_strong_int
-\int_new:N \l_@@_strongdef_int
-% \end{macrocode}
-%
-% \paragraph{Floats}
-% \begin{macrocode}
-\fp_new:N \l_@@_tmpa_fp
-\fp_new:N \l_@@_tmpb_fp
-% \end{macrocode}
-%
-% \paragraph{Dimensions}
-% \begin{macrocode}
-\dim_new:N \l_@@_tmpa_dim
-\dim_new:N \l_@@_tmpb_dim
-\dim_new:N \l_@@_tmpc_dim
-% \end{macrocode}
-%
-% \paragraph{Sequences}
-% \begin{macrocode}
-\seq_new:N \l_@@_bf_series_seq
-% \end{macrocode}
-%
-% \paragraph{Comma-lists}
-% \begin{macrocode}
-\clist_new:N \g_@@_default_fontopts_clist
-\clist_new:N \g_@@_all_keyval_modules_clist
-\clist_new:N \l_@@_sizefeat_clist
-\clist_set:Nn \l_@@_sizefeat_clist {Size={-}}
-\clist_new:N \l_@@_extensions_clist
-\clist_new:N \l_@@_fontopts_clist
-\clist_new:N \l_@@_family_fontopts_clist
-\clist_new:N \l_@@_all_features_clist
-\clist_new:N \l_@@_leftover_clist
-\clist_new:N \l_@@_keys_leftover_clist
-\clist_new:N \l_@@_sizing_leftover_clist
-\clist_new:N \l_@@_fontfeat_clist
-\clist_new:N \l_@@_fontfeat_curr_clist
-\clist_new:N \l_@@_arg_clist
-\clist_new:N \l_@@_this_feat_clist
-% \end{macrocode}
-%
-% \begin{macrocode}
-\clist_new:N \l_@@_fontfeat_up_clist
-\clist_new:N \l_@@_fontfeat_bf_clist
-\clist_new:N \l_@@_fontfeat_it_clist
-\clist_new:N \l_@@_fontfeat_bfit_clist
-\clist_new:N \l_@@_fontfeat_sl_clist
-\clist_new:N \l_@@_fontfeat_bfsl_clist
-\clist_new:N \l_@@_fontfeat_sc_clist
-% \end{macrocode}
-%
-% \paragraph{Property lists}
-% \begin{macrocode}
-\prop_new:N \g_@@_fontopts_prop
-\prop_new:N \l_@@_nfss_prop
-\prop_new:N \l_@@_nfssfont_prop
-\prop_new:N \g_@@_OT_features_prop
-\prop_new:N \g_@@_all_opentype_feature_names_prop
-\prop_new:N \g_@@_em_prop
-\prop_new:N \g_@@_strong_prop
-\prop_new:N \g_@@_fontid_family_prop
-\prop_new:N \g_@@_family_int_prop
-% \end{macrocode}
-%
-% \paragraph{Token lists}
-% \begin{macrocode}
-\tl_new:N \l_fontspec_family_tl
-\tl_new:N \g_fontspec_encoding_tl
-\tl_new:N \l_fontspec_renderer_tl
-\tl_new:N \l_fontspec_fontname_tl
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_clear_new:N \UTFencname
-\tl_clear_new:N \cyrillicencoding
-\tl_clear_new:N \latinencoding
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_new:N \l_fontspec_mode_tl
-\tl_new:N \g_@@_curr_series_tl
-\tl_new:N \g_@@_defined_shapes_tl
-\tl_new:N \g_@@_nfss_enc_tl
-\tl_new:N \g_@@_nfss_family_tl
-\tl_new:N \g_@@_single_feat_tl
-\tl_new:N \l_@@_basename_tl
-\tl_new:N \l_@@_curr_fontname_tl
-\tl_new:N \l_@@_curr_bfname_tl
-\tl_new:N \l_@@_ext_filename_tl
-\tl_new:N \l_@@_extension_tl
-\tl_new:N \l_@@_font_path_tl
-\tl_new:N \l_@@_fontid_tl
-\tl_new:N \l_@@_fontname_tl
-\tl_new:N \l_@@_hexcol_tl
-\tl_new:N \l_@@_nfss_sc_tl
-\tl_new:N \l_@@_nfss_tl
-\tl_new:N \l_@@_nfss_fam_tl
-\tl_new:N \l_@@_opacity_tl
-\tl_new:N \l_@@_optical_size_tl
-\tl_new:N \l_@@_options_tl
-\tl_new:N \l_@@_saved_fontname_tl
-\tl_new:N \l_@@_scale_tl
-\tl_new:N \l_@@_size_tl
-\tl_new:N \l_@@_sizedfont_tl
-\tl_new:N \l_@@_this_font_tl
-\tl_new:N \l_@@_tmp_tl
-\tl_new:N \l_@@_tmpa_tl
-\tl_new:N \l_@@_tmpb_tl
-\tl_new:N \l_@@_ttc_index_tl
-\tl_new:N \l_@@_emshape_query_tl
-\tl_new:N \l_@@_em_switch_tl
-\tl_new:N \l_@@_em_tmp_tl
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_new:N \g_@@_mathrm_tl
-\tl_new:N \g_@@_bfmathrm_tl
-\tl_new:N \g_@@_mathsf_tl
-\tl_new:N \g_@@_mathtt_tl
-% \end{macrocode}
-%
-% Defaults:
-% \begin{macrocode}
-\tl_gset:Nn \g_@@_mathrm_tl {\rmdefault}
-\tl_gset:Nn \g_@@_mathsf_tl {\sfdefault}
-\tl_gset:Nn \g_@@_mathtt_tl {\ttdefault}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_new:N \l_@@_family_label_tl
-\tl_new:N \l_@@_fake_slant_tl
-\tl_new:N \l_@@_fake_embolden_tl
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_new:N \l_@@_fontname_up_tl
-\tl_new:N \l_@@_fontname_bf_tl
-\tl_new:N \l_@@_fontname_it_tl
-\tl_new:N \l_@@_fontname_bfit_tl
-\tl_new:N \l_@@_fontname_sl_tl
-\tl_new:N \l_@@_fontname_bfsl_tl
-\tl_new:N \l_@@_fontname_sc_tl
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_new:N \l_@@_script_name_tl
-\tl_new:N \l_fontspec_script_tl
-\tl_new:N \l_@@_lang_name_tl
-\tl_new:N \l_fontspec_lang_tl
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_new:N \l_@@_mapping_tl
-\tl_new:N \l_@@_punctspace_adjust_tl
-\tl_new:N \l_@@_wordspace_adjust_tl
-\tl_new:N \l_@@_postadjust_tl
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tl_const:Nn \c_@@_hexcol_tl {000000}
-\tl_const:Nn \c_@@_opacity_tl {FF~}
-\tl_const:Nn \c_@@_postadjust_tl { \l_@@_wordspace_adjust_tl \l_@@_punctspace_adjust_tl }
-% \end{macrocode}
-%
-% \paragraph{Semi-colon-lists}
-% Not a real data structure but sensible to name accordingly.
-% \begin{macrocode}
-\tl_new:N \g_@@_rawfeatures_sclist
-\tl_new:N \l_@@_pre_feat_sclist
-% \end{macrocode}
-%
-% \paragraph{Font families}
-% Again not a real data structure, and also probably poorly named.
-% \begin{macrocode}
-\tl_new:N \l_@@_rmfamily_family_tl
-\tl_new:N \l_@@_sffamily_family_tl
-\tl_new:N \l_@@_ttfamily_family_tl
-% \end{macrocode}
-%
-%
-%
-% \iffalse
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-% \fi
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Deleted: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-xfss.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -1,286 +0,0 @@
-%%^^A%% fontspec-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
-
-% \section{Changes to the NFSS}
-%
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-%
-%
-% \subsection{Italic small caps and so on} \label{sec:sishape}
-%
-% \begin{macro}{\sishape}
-% \begin{macro}{\textsi}
-% These commands for actually selecting italic small caps have been defined for many years; I'm inclined to drop them.
-% They're probably used very infrequently; I personally prefer just writing
-% |\textit{\textsc{...}}| instead.
-%
-% \begin{macrocode}
-\providecommand*\itscdefault{\itdefault\scdefault}
-\providecommand*\slscdefault{\sldefault\scdefault}
-\DeclareRobustCommand{\sishape}
- {
- \not at math@alphabet\sishape\relax
- \fontshape{\itscdefault}\selectfont
- }
-\DeclareTextFontCommand{\textsi}{\sishape}
-% \end{macrocode}
-% \end{macro} \end{macro}
-%
-% \LaTeX's `shape' font axis needs to be overloaded to support italic small caps and slanted small caps.
-% These are the combinations to support:
-% \begin{macrocode}
-\cs_new:Nn \@@_shape_merge:nn { c_@@_shape_#1_#2_tl }
-\tl_const:cn { \@@_shape_merge:nn \itdefault \scdefault } {\itscdefault}
-\tl_const:cn { \@@_shape_merge:nn \sldefault \scdefault } {\slscdefault}
-\tl_const:cn { \@@_shape_merge:nn \scdefault \itdefault } {\itscdefault}
-\tl_const:cn { \@@_shape_merge:nn \scdefault \sldefault } {\slscdefault}
-\tl_const:cn { \@@_shape_merge:nn \slscdefault \itdefault } {\itscdefault}
-\tl_const:cn { \@@_shape_merge:nn \itscdefault \sldefault } {\slscdefault}
-\tl_const:cn { \@@_shape_merge:nn \itscdefault \updefault } {\scdefault}
-\tl_const:cn { \@@_shape_merge:nn \slscdefault \updefault } {\scdefault}
-% \end{macrocode}
-%
-% \begin{macro}{\fontspec_merge_shape:n}
-% These macros enable the overload on the |\..shape| commands.
-% First, a shape `new+current' (prefix) or `current+new' (suffix) is tried.
-% If not found, fall back on the `new' shape.
-% \begin{macrocode}
-\cs_new:Nn \fontspec_merge_shape:n
- {
- \@@_if_merge_shape:nTF {#1}
- { \fontshape { \tl_use:c { \@@_shape_merge:nn {\f at shape} {#1} } } \selectfont }
- { \fontshape {#1} \selectfont }
- }
-% \end{macrocode}
-% The following is rather specific; it only returns true if the merged shape exists,
-% but more importantly also if the merged shape is defined for the current font.
-% \begin{macrocode}
-\prg_new_conditional:Nnn \@@_if_merge_shape:n {TF}
- {
- \bool_lazy_and:nnTF
- { \tl_if_exist_p:c { \@@_shape_merge:nn {\f at shape} {#1} } }
- {
- \cs_if_exist_p:c
- {
- \f at encoding/\f at family/\f at series/
- \tl_use:c { \@@_shape_merge:nn {\f at shape} {#1} }
- }
- }
- \prg_return_true: \prg_return_false:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\itshape} \begin{macro}{\scshape} \begin{macro}{\upshape} \begin{macro}{\slshape}
-% The original |\..shape| commands are redefined to use the merge shape macro.
-% \begin{macrocode}
-\DeclareRobustCommand \itshape
- {
- \not at math@alphabet\itshape\mathit
- \fontspec_merge_shape:n\itdefault
- }
-\DeclareRobustCommand \slshape
- {
- \not at math@alphabet\slshape\relax
- \fontspec_merge_shape:n\sldefault
- }
-\DeclareRobustCommand \scshape
- {
- \not at math@alphabet\scshape\relax
- \fontspec_merge_shape:n\scdefault
- }
-\DeclareRobustCommand \upshape
- {
- \not at math@alphabet\upshape\relax
- \fontspec_merge_shape:n\updefault
- }
-% \end{macrocode}
-% \end{macro} \end{macro} \end{macro} \end{macro}
-%
-%
-%
-% \subsection{Emphasis}
-%
-% \begin{macro}{\emfontdeclare}
-% \begin{macrocode}
-\cs_new_protected:Npn \emfontdeclare #1
- {
- \prop_gclear:N \g_@@_em_prop
- \int_zero:N \l_@@_emdef_int
- \bool_gset_true:N \g_@@_em_normalise_slant_bool
-
- \tl_if_in:nnT {#1} {\slshape}
- {
- \tl_if_in:nnT {#1} {\itshape}
- {
- \bool_gset_false:N \g_@@_em_normalise_slant_bool
- }
- }
-
- \group_begin:
- \normalfont
- \clist_map_inline:nn {\emreset,#1}
- {
- ##1
- \prop_gput_if_new:NxV \g_@@_em_prop { \f at shape } { \l_@@_emdef_int }
- \prop_gput:Nxn \g_@@_em_prop { switch-\int_use:N \l_@@_emdef_int } { ##1 }
- \int_incr:N \l_@@_emdef_int
- }
- \group_end:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\em}
-% \begin{macrocode}
-\DeclareRobustCommand \em
- {
- \@nomath\em
- \tl_set:Nx \l_@@_emshape_query_tl { \f at shape }
-
- \bool_if:NT \g_@@_em_normalise_slant_bool
- {
- \tl_replace_all:Nnn \l_@@_emshape_query_tl {/sl} {/it}
- }
-
-%<debug> \typeout{Emph~ level:~\int_use:N \l_@@_em_int}
- \prop_get:NxNT \g_@@_em_prop { \l_@@_emshape_query_tl } \l_@@_em_tmp_tl
- {
- \int_set:Nn \l_@@_em_int { \l_@@_em_tmp_tl }
-%<debug> \typeout{Shape~ (\l_@@_emshape_query_tl)~ detected;~ new~ level:~\int_use:N \l_@@_em_int}
- }
-
- \int_incr:N \l_@@_em_int
-
- \prop_get:NxNTF \g_@@_em_prop { switch-\int_use:N \l_@@_em_int } \l_@@_em_switch_tl
- { \l_@@_em_switch_tl }
- {
- \int_zero:N \l_@@_em_int
- \emreset
- }
-
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\emph}
-% \begin{macro}{\emshape}
-% \begin{macro}{\eminnershape}
-% \begin{macro}{\emreset}
-% \begin{macrocode}
-\DeclareTextFontCommand{\emph}{\em}
-\cs_set:Npn \emreset { \upshape }
-\cs_set:Npn \emshape { \itshape }
-\cs_set:Npn \eminnershape { \upshape }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-%
-% \subsection{Strong emphasis}
-%
-% \begin{macro}{\strongfontdeclare}
-% \begin{macrocode}
-\cs_new_protected:Npn \strongfontdeclare #1
- {
- \prop_gclear:N \g_@@_strong_prop
- \int_zero:N \l_@@_strongdef_int
-
- \group_begin:
- \normalfont
- \clist_map_inline:nn {\strongreset,#1}
- {
- ##1
- \prop_gput_if_new:NxV \g_@@_strong_prop { \f at series } { \l_@@_strongdef_int }
- \prop_gput:Nxn \g_@@_strong_prop { switch-\int_use:N \l_@@_strongdef_int } { ##1 }
- \int_incr:N \l_@@_strongdef_int
- }
- \group_end:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\strongenv}
-% \begin{macrocode}
-\DeclareRobustCommand \strongenv
- {
- \@nomath\strongenv
-
-%<debug> \typeout{Strong~ level:~\int_use:N \l_@@_strong_int}
- \prop_get:NxNT \g_@@_strong_prop { \f at series } \l_@@_strong_tmp_tl
- {
- \int_set:Nn \l_@@_strong_int { \l_@@_strong_tmp_tl }
-%<debug> \typeout{Series~ (\f at series)~ detected;~ new~ level:~\int_use:N \l_@@_strong_int}
- }
-
- \int_incr:N \l_@@_strong_int
-
- \prop_get:NxNTF \g_@@_strong_prop { switch-\int_use:N \l_@@_strong_int } \l_@@_strong_switch_tl
- { \l_@@_strong_switch_tl }
- {
- \int_zero:N \l_@@_strong_int
- \strongreset
- }
-
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\strong}
-% \begin{macro}{\strongreset}
-% \begin{macrocode}
-\DeclareTextFontCommand{\strong}{\strongenv}
-\cs_set:Npn \strongreset {}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\reset at font}
-% Ensure nesting resets when necessary:
-% \begin{macrocode}
-\cs_set:Npn \reset at font
- {
- \normalfont
- \int_zero:N \l_@@_em_int
- \int_zero:N \l_@@_strong_int
- }
-% \end{macrocode}
-% \end{macro}
-%
-% Programmer's interface for setting nesting levels:
-% \begin{macrocode}
-\cs_new:Nn \fontspec_set_em_level:n { \int_set:Nn \l_@@_em_int {#1} }
-\cs_new:Nn \fontspec_set_strong_level:n { \int_set:Nn \l_@@_strong_int {#1} }
-% \end{macrocode}
-%
-% Defaults:
-% \begin{macrocode}
-\strongfontdeclare{ \bfseries }
-\emfontdeclare{ \emshape, \eminnershape }
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-
-
-\endinput
-
-% /©
-% ------------------------------------------------
-% The FONTSPEC package <wspr.io/fontspec>
-% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
-% Copyright 2009-2015 Khaled Hosny
-% Copyright 2013 Philipp Gesang
-% Copyright 2013-2016 Joseph Wright
-% ------------------------------------------------
-% This package is free software and may be redistributed and/or modified under
-% the conditions of the LaTeX Project Public License, version 1.3c or higher
-% (your choice): <http://www.latex-project.org/lppl/>.
-% ------------------------------------------------
-% ©/
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec.dtx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec.dtx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -10,26 +10,26 @@
\gdef\FONTSPECDTX{
\DTX{fontspec.dtx}
\DTX{fontspec-code-load.dtx}
- \DTX{fontspec-vars.dtx}
- \DTX{fontspec-msg.dtx}
- \DTX{fontspec-opening.dtx}
- \DTX{fontspec-fontload.dtx}
- \DTX{fontspec-interfaces.dtx}
- \DTX{fontspec-user.dtx}
- \DTX{fontspec-api.dtx}
- \DTX{fontspec-internal.dtx}
- \DTX{fontspec-opentype.dtx}
- \DTX{fontspec-graphite.dtx}
- \DTX{fontspec-keyval.dtx}
- \DTX{fontspec-feat-opentype.dtx}
- \DTX{fontspec-scripts.dtx}
- \DTX{fontspec-lang.dtx}
- \DTX{fontspec-feat-aat.dtx}
- \DTX{fontspec-enc.dtx}
- \DTX{fontspec-math.dtx}
- \DTX{fontspec-closing.dtx}
- \DTX{fontspec-xfss.dtx}
- \DTX{fontspec-patches.dtx}
+ \DTX{fontspec-code-vars.dtx}
+ \DTX{fontspec-code-msg.dtx}
+ \DTX{fontspec-code-opening.dtx}
+ \DTX{fontspec-code-fontload.dtx}
+ \DTX{fontspec-code-interfaces.dtx}
+ \DTX{fontspec-code-user.dtx}
+ \DTX{fontspec-code-api.dtx}
+ \DTX{fontspec-code-internal.dtx}
+ \DTX{fontspec-code-opentype.dtx}
+ \DTX{fontspec-code-graphite.dtx}
+ \DTX{fontspec-code-keyval.dtx}
+ \DTX{fontspec-code-feat-opentype.dtx}
+ \DTX{fontspec-code-scripts.dtx}
+ \DTX{fontspec-code-lang.dtx}
+ \DTX{fontspec-code-feat-aat.dtx}
+ \DTX{fontspec-code-enc.dtx}
+ \DTX{fontspec-code-math.dtx}
+ \DTX{fontspec-code-closing.dtx}
+ \DTX{fontspec-code-xfss.dtx}
+ \DTX{fontspec-code-patches.dtx}
}
%</dtx>
% \end{macrocode}
@@ -71,7 +71,7 @@
\ProvidesExplFile{fontspec.dtx}
%</dtx>
%<*fontspec>
- {2018/07/30}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
+ {2019/01/10}{2.6j}{Font selection for XeLaTeX and LuaLaTeX}
%</fontspec>
% \end{macrocode}
%
@@ -90,8 +90,8 @@
%<lua>local fontspec = fontspec
%<lua>fontspec.module = {
%<lua> name = "fontspec",
-%<lua> version = "v2.6h",
-%<lua> date = "2018/07/30",
+%<lua> version = "2.6j",
+%<lua> date = "2019/01/10",
%<lua> description = "Font selection for XeLaTeX and LuaLaTeX",
%<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
@@ -105,7 +105,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec.ins 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec.ins 2019-01-09 22:44:11 UTC (rev 49650)
@@ -48,7 +48,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec.ltx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec.ltx 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec.ltx 2019-01-09 22:44:11 UTC (rev 49650)
@@ -28,7 +28,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2018 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2019 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
Modified: trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty 2019-01-09 22:44:11 UTC (rev 49650)
@@ -6,26 +6,26 @@
%%
%% fontspec.dtx (with options: `fontspec,LU')
%% fontspec-code-load.dtx (with options: `fontspec,LU')
-%% fontspec-vars.dtx (with options: `fontspec,LU')
-%% fontspec-msg.dtx (with options: `fontspec,LU')
-%% fontspec-opening.dtx (with options: `fontspec,LU')
-%% fontspec-fontload.dtx (with options: `fontspec,LU')
-%% fontspec-interfaces.dtx (with options: `fontspec,LU')
-%% fontspec-user.dtx (with options: `fontspec,LU')
-%% fontspec-api.dtx (with options: `fontspec,LU')
-%% fontspec-internal.dtx (with options: `fontspec,LU')
-%% fontspec-opentype.dtx (with options: `fontspec,LU')
-%% fontspec-graphite.dtx (with options: `fontspec,LU')
-%% fontspec-keyval.dtx (with options: `fontspec,LU')
-%% fontspec-feat-opentype.dtx (with options: `fontspec,LU')
-%% fontspec-scripts.dtx (with options: `fontspec,LU')
-%% fontspec-lang.dtx (with options: `fontspec,LU')
-%% fontspec-feat-aat.dtx (with options: `fontspec,LU')
-%% fontspec-enc.dtx (with options: `fontspec,LU')
-%% fontspec-math.dtx (with options: `fontspec,LU')
-%% fontspec-closing.dtx (with options: `fontspec,LU')
-%% fontspec-xfss.dtx (with options: `fontspec,LU')
-%% fontspec-patches.dtx (with options: `fontspec,LU')
+%% fontspec-code-vars.dtx (with options: `fontspec,LU')
+%% fontspec-code-msg.dtx (with options: `fontspec,LU')
+%% fontspec-code-opening.dtx (with options: `fontspec,LU')
+%% fontspec-code-fontload.dtx (with options: `fontspec,LU')
+%% fontspec-code-interfaces.dtx (with options: `fontspec,LU')
+%% fontspec-code-user.dtx (with options: `fontspec,LU')
+%% fontspec-code-api.dtx (with options: `fontspec,LU')
+%% fontspec-code-internal.dtx (with options: `fontspec,LU')
+%% fontspec-code-opentype.dtx (with options: `fontspec,LU')
+%% fontspec-code-graphite.dtx (with options: `fontspec,LU')
+%% fontspec-code-keyval.dtx (with options: `fontspec,LU')
+%% fontspec-code-feat-opentype.dtx (with options: `fontspec,LU')
+%% fontspec-code-scripts.dtx (with options: `fontspec,LU')
+%% fontspec-code-lang.dtx (with options: `fontspec,LU')
+%% fontspec-code-feat-aat.dtx (with options: `fontspec,LU')
+%% fontspec-code-enc.dtx (with options: `fontspec,LU')
+%% fontspec-code-math.dtx (with options: `fontspec,LU')
+%% fontspec-code-closing.dtx (with options: `fontspec,LU')
+%% fontspec-code-xfss.dtx (with options: `fontspec,LU')
+%% fontspec-code-patches.dtx (with options: `fontspec,LU')
%% ------------------------------------------------
%% The FONTSPEC package <wspr.io/fontspec>
%% ------------------------------------------------
@@ -41,10 +41,10 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-luatex}%
- {2018/07/30}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
+ {2019/01/10}{2.6j}{Font selection for XeLaTeX and LuaLaTeX}
%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%%^^A%% fontspec-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
@@ -67,12 +67,12 @@
\bool_new:N \l__fontspec_disable_defaults_bool
\bool_new:N \l__fontspec_alias_bool
\bool_new:N \l__fontspec_external_bool
-\bool_new:N \l__fontspec_never_check_bool
\bool_new:N \l__fontspec_defining_encoding_bool
\bool_new:N \l__fontspec_script_exist_bool
\bool_new:N \g__fontspec_em_normalise_slant_bool
\bool_new:N \l__fontspec_proceed_bool
\bool_new:N \l__fontspec_check_feat_bool
+\bool_new:N \l__fontspec_never_check_bool
\int_new:N \l__fontspec_script_int
\int_new:N \l__fontspec_language_int
\int_new:N \l__fontspec_strnum_int
@@ -158,6 +158,10 @@
\tl_new:N \l__fontspec_emshape_query_tl
\tl_new:N \l__fontspec_em_switch_tl
\tl_new:N \l__fontspec_em_tmp_tl
+\tl_new:N \l__fontspec_strong_tmp_tl
+\tl_new:N \l__fontspec_strong_switch_tl
+\tl_new:N \l__fontspec_hyphenchar_tl
+\tl_new:N \l__fontspec_smcp_shape_tl
\tl_new:N \g__fontspec_mathrm_tl
\tl_new:N \g__fontspec_bfmathrm_tl
\tl_new:N \g__fontspec_mathsf_tl
@@ -192,7 +196,7 @@
\tl_new:N \l__fontspec_sffamily_family_tl
\tl_new:N \l__fontspec_ttfamily_family_tl
-%%^^A%% fontspec-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
\cs_new:Npn \__fontspec_error:nn { \msg_error:nnn {fontspec} }
\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
@@ -300,6 +304,10 @@
{
Option '#2' of font feature '#1' overwritten.
}
+\__fontspec_msg_new:nnn {fontspec} {ot-tag-too-long}
+ {
+ OpenType tag '#1' is too long; script, language, and feature tags must be four characters or fewer.
+ }
\__fontspec_msg_new:nnn {fontspec} {script-not-exist-latn}
{
Font '\l_fontspec_fontname_tl' does not contain script '#1'.\\
@@ -420,7 +428,7 @@
}
\char_set_catcode_ignore:n {32}
-%%^^A%% fontspec-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
\DeclareOption{cm-default}
{
\__fontspec_warning:n {cm-default-obsolete}
@@ -473,10 +481,10 @@
\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
\AtBeginDocument
- {
- \tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
- \tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
- }
+ {
+ \tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
+ \tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
+ }
\bool_if:NT \g__fontspec_euenc_bool
{
\cs_set_eq:NN \fontspec_tmp: \XeTeXpicfile
@@ -511,7 +519,7 @@
\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
-%%^^A%% fontspec-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
{
@@ -523,7 +531,7 @@
}
\cs_set:Npn \__fontspec_font_suppress_not_found_error:
{
- \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
+ \int_set:Nn \suppressfontnotfounderror {1}
}
\prg_set_conditional:Nnn \__fontspec_primitive_font_if_null:N {p,TF,T,F}
{
@@ -544,7 +552,7 @@
}
\prg_new_conditional:Nnn \__fontspec_primitive_font_glyph_if_exist:Nn {p,TF,T,F}
{
- \etex_iffontchar:D #1 #2 \scan_stop:
+ \tex_iffontchar:D #1 #2 \scan_stop:
\prg_return_true:
\else:
\prg_return_false:
@@ -555,7 +563,7 @@
\tex_hyphenchar:D #1 = #2 \scan_stop:
}
-%%^^A%% fontspec-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
\NewDocumentCommand \fontspec { O{} m O{} }
{
@@ -669,7 +677,7 @@
\__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
}
-%%^^A%% fontspec-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Nn \__fontspec_main_fontspec:nn
{
@@ -690,7 +698,7 @@
\exp_not:N \selectfont
}
}
- \str_if_eq_x:nnT {\familydefault} {\rmdefault}
+ \str_if_eq:eeT {\familydefault} {\rmdefault}
{ \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
\__fontspec_setmainfont_hook:nn {#1} {#2}
\normalfont
@@ -708,7 +716,7 @@
\exp_not:N \selectfont
}
}
- \str_if_eq_x:nnT {\familydefault} {\sfdefault}
+ \str_if_eq:eeT {\familydefault} {\sfdefault}
{ \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
\__fontspec_setsansfont_hook:nn {#1} {#2}
\normalfont
@@ -726,7 +734,7 @@
\exp_not:N \selectfont
}
}
- \str_if_eq_x:nnT {\familydefault} {\ttdefault}
+ \str_if_eq:eeT {\familydefault} {\ttdefault}
{ \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
\__fontspec_setmonofont_hook:nn {#1} {#2}
\normalfont
@@ -940,7 +948,7 @@
}
}
-%%^^A%% fontspec-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
@@ -1002,99 +1010,96 @@
}
}
\prg_new_conditional:Nnn \fontspec_if_feature:nnn {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
- \__fontspec_iv_str_to_num:Nn \l__fontspec_language_int {#2}
- \__fontspec_check_ot_feat:NnTF \font {#3} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \__fontspec_check_ot_feat:NnnnTF \font {#3} {#2} {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_script:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \__fontspec_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \__fontspec_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_language:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-tag} \l_fontspec_script_tl
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-num} \l__fontspec_tmp_tl
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
+ \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-tag} \l_fontspec_script_tl
- \__fontspec_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ \__fontspec_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_language:nn {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \tl_set:Nn \l_fontspec_script_tl {#1}
- \__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
- \__fontspec_check_lang:NnTF \font {#2} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \__fontspec_check_lang:NnnTF \font {#2} {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_current_script:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-tag} \l__fontspec_tmp_tl
- \str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
- {\prg_return_true:} {\prg_return_false:}
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-tag} \l__fontspec_tmp_tl
+ \str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
+ {\prg_return_true:} {\prg_return_false:}
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_current_language:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {lang-tag} \l__fontspec_tmp_tl
- \str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
- {\prg_return_true:} {\prg_return_false:}
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {lang-tag} \l__fontspec_tmp_tl
+ \str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
+ {\prg_return_true:} {\prg_return_false:}
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\cs_new:Nn \fontspec_set_family:Nnn
{
\tl_set:Nn \l__fontspec_family_label_tl {#1}
\__fontspec_select_font_family:nn {#2} {#3}
+ \tl_clear_new:N #1
\tl_set_eq:NN #1 \l_fontspec_family_tl
}
\cs_generate_variant:Nn \fontspec_set_family:Nnn {c}
@@ -1143,81 +1148,81 @@
{ \prg_return_false: }
}
-%%^^A%% fontspec-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new_protected:Nn \__fontspec_select_font_family:nn
- {
- \group_begin:
- \__fontspec_font_suppress_not_found_error:
- \__fontspec_init:
+ {
+ \group_begin:
+ \__fontspec_font_suppress_not_found_error:
+ \__fontspec_init:
- \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
- \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl {#2}
- \__fontspec_sanitise_fontname:Nn \l__fontspec_basename_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_basename_tl {#2}
- \__fontspec_if_detect_external:nT {#2}
- { \keys_set:nn {fontspec-preparse-external} {Path} }
+ \__fontspec_if_detect_external:nT {#2}
+ { \keys_set:nn {fontspec-preparse-external} {Path} }
- \keys_set_known:nn {fontspec-preparse-cfg} {#1}
+ \keys_set_known:nn {fontspec-preparse-cfg} {#1}
- \__fontspec_init_ttc:n {#2}
- \__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
+ \__fontspec_init_ttc:n {#2}
+ \__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
- \__fontspec_extract_all_features:n {#1}
- \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
+ \__fontspec_extract_all_features:n {#1}
+ \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
- \__fontspec_preparse_features:
- \__fontspec_load_font:
- \__fontspec_set_scriptlang:
- \__fontspec_get_features:n {}
- \bool_set_false:N \l__fontspec_firsttime_bool
+ \__fontspec_preparse_features:
+ \__fontspec_load_font:
+ \__fontspec_set_scriptlang:
+ \__fontspec_get_features:n {}
+ \bool_set_false:N \l__fontspec_firsttime_bool
- \__fontspec_save_family_needed:nTF {#2}
- {
- \__fontspec_save_family:nn {#1} {#2}
- }
- {
- }
- \group_end:
+ \__fontspec_save_family_needed:nTF {#2}
+ {
+ \__fontspec_save_family:nn {#1} {#2}
+ }
+ {
+ }
+ \group_end:
- \tl_set_eq:NN \l_fontspec_family_tl \g__fontspec_nfss_family_tl
- }
+ \tl_set_eq:NN \l_fontspec_family_tl \g__fontspec_nfss_family_tl
+ }
\cs_set_eq:NN \fontspec_select:nn \__fontspec_select_font_family:nn %% deprecated, for compatibility only
\cs_new:Nn \__fontspec_sanitise_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
+ {
+ \tl_set:Nx #1 {#2}
\tl_remove_all:Nn #1 {~}
- \clist_map_inline:Nn \l__fontspec_extensions_clist
- {
- \tl_if_in:NnT #1 {##1}
- {
- \tl_remove_once:Nn #1 {##1}
- \tl_set:Nn \l__fontspec_extension_tl {##1}
- \clist_map_break:
- }
- }
- }
+ \clist_map_inline:Nn \l__fontspec_extensions_clist
+ {
+ \tl_if_in:NnT #1 {##1}
+ {
+ \tl_remove_once:Nn #1 {##1}
+ \tl_set:Nn \l__fontspec_extension_tl {##1}
+ \clist_map_break:
+ }
+ }
+ }
\prg_new_conditional:Nnn \__fontspec_if_detect_external:n {T}
- {
- \clist_map_inline:Nn \l__fontspec_extensions_clist
- {
- \bool_set_false:N \l__fontspec_tmpa_bool
- \exp_args:Nx % <- this should be handled earlier
- \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
- { \bool_set_true:N \l__fontspec_tmpa_bool \clist_map_break: }
- }
- \bool_if:NTF \l__fontspec_tmpa_bool \prg_return_true: \prg_return_false:
- }
+ {
+ \clist_map_inline:Nn \l__fontspec_extensions_clist
+ {
+ \bool_set_false:N \l__fontspec_tmpa_bool
+ \exp_args:Nx % <- this should be handled earlier
+ \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
+ { \bool_set_true:N \l__fontspec_tmpa_bool \clist_map_break: }
+ }
+ \bool_if:NTF \l__fontspec_tmpa_bool \prg_return_true: \prg_return_false:
+ }
\cs_new:Nn \__fontspec_init_ttc:n
- {
- \str_if_eq_x:nnT { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
- {
- \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_it_tl {#1}
- \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bf_tl {#1}
- \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
- }
- }
+ {
+ \str_if_eq:eeT { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
+ {
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_it_tl {#1}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bf_tl {#1}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
+ }
+ }
\cs_new:Nn \__fontspec_load_external_fontoptions:Nn
{
\bool_if:NT \l__fontspec_fontcfg_bool
@@ -1233,67 +1238,67 @@
}
}
\cs_new:Nn \__fontspec_extract_all_features:n
- {
- \bool_if:NTF \l__fontspec_disable_defaults_bool
- {
- \clist_set:Nx \l__fontspec_all_features_clist {#1}
- }
- {
- \prop_get:NVNF \g__fontspec_fontopts_prop \l_fontspec_fontname_tl \l__fontspec_fontopts_clist
- { \clist_clear:N \l__fontspec_fontopts_clist }
+ {
+ \bool_if:NTF \l__fontspec_disable_defaults_bool
+ {
+ \clist_set:Nx \l__fontspec_all_features_clist {#1}
+ }
+ {
+ \prop_get:NVNF \g__fontspec_fontopts_prop \l_fontspec_fontname_tl \l__fontspec_fontopts_clist
+ { \clist_clear:N \l__fontspec_fontopts_clist }
- \prop_get:NVNF \g__fontspec_fontopts_prop \l__fontspec_family_label_tl \l__fontspec_family_fontopts_clist
- { \clist_clear:N \l__fontspec_family_fontopts_clist }
- \tl_clear:N \l__fontspec_family_label_tl
+ \prop_get:NVNF \g__fontspec_fontopts_prop \l__fontspec_family_label_tl \l__fontspec_family_fontopts_clist
+ { \clist_clear:N \l__fontspec_family_fontopts_clist }
+ \tl_clear:N \l__fontspec_family_label_tl
- \clist_set:Nx \l__fontspec_all_features_clist
- {
- \g__fontspec_default_fontopts_clist,
- \l__fontspec_family_fontopts_clist,
- \l__fontspec_fontopts_clist,
- #1
- }
- }
- }
+ \clist_set:Nx \l__fontspec_all_features_clist
+ {
+ \g__fontspec_default_fontopts_clist,
+ \l__fontspec_family_fontopts_clist,
+ \l__fontspec_fontopts_clist,
+ #1
+ }
+ }
+ }
\cs_new:Nn \__fontspec_preparse_features:
- {
+ {
- \__fontspec_keys_set_known:nxN {fontspec-preparse-external}
- { \l__fontspec_all_features_clist }
- \l__fontspec_keys_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec-preparse-external}
+ { \l__fontspec_all_features_clist }
+ \l__fontspec_keys_leftover_clist
- \tl_set_eq:NN \l_fontspec_fontname_tl \l__fontspec_fontname_up_tl
- \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_keys_leftover_clist}
- \l__fontspec_keys_leftover_clist
- \__fontspec_keys_set_known:nxN {fontspec-preparse} {\l__fontspec_keys_leftover_clist}
- \l__fontspec_fontfeat_clist
- }
+ \tl_set_eq:NN \l_fontspec_fontname_tl \l__fontspec_fontname_up_tl
+ \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_keys_leftover_clist}
+ \l__fontspec_keys_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec-preparse} {\l__fontspec_keys_leftover_clist}
+ \l__fontspec_fontfeat_clist
+ }
\cs_new:Nn \__fontspec_load_font:
- {
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font
- { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f at size pt}
- \__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
- \__fontspec_set_font_type:N \l_fontspec_font
- \__fontspec_primitive_font_gset:Nnn \l_fontspec_font
- { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f at size pt}
- \l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
- }
+ {
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font
+ { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f at size pt}
+ \__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
+ \__fontspec_set_font_type:N \l_fontspec_font
+ \__fontspec_primitive_font_gset:Nnn \l_fontspec_font
+ { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f at size pt}
+ \l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
+ }
\cs_new:Nn \__fontspec_construct_font_call:nnnnnn
- {
+ {
" \__fontspec_fontname_wrap:n { #1 #2 } #3
#4 #5
- \str_if_eq_x:nnF {#6}{} {:#6} "
- }
+ \str_if_eq:eeF {#6}{} {:#6} "
+ }
\cs_new:Nn \__fontspec_construct_font_call:nn
- {
- \__fontspec_construct_font_call:nnnnnn
- {#1}
- \l__fontspec_extension_tl
- \l__fontspec_ttc_index_tl
- \l_fontspec_renderer_tl
- \l__fontspec_optical_size_tl
- {#2}
- }
+ {
+ \__fontspec_construct_font_call:nnnnnn
+ {#1}
+ \l__fontspec_extension_tl
+ \l__fontspec_ttc_index_tl
+ \l_fontspec_renderer_tl
+ \l__fontspec_optical_size_tl
+ {#2}
+ }
\cs_new:Nn \__fontspec_font_is_name:
{
\cs_set_eq:NN \__fontspec_fontname_wrap:n \use:n
@@ -1303,50 +1308,51 @@
\cs_set:Npn \__fontspec_fontname_wrap:n ##1 { [ \l__fontspec_font_path_tl ##1 ] }
}
\cs_new:Nn \__fontspec_set_scriptlang:
- {
- \bool_if:NT \l__fontspec_firsttime_bool
- {
- \tl_if_empty:NTF \l__fontspec_script_name_tl
- {
- \__fontspec_check_script:NnTF \l_fontspec_font {latn}
- {
- \tl_set:Nn \l__fontspec_script_name_tl {Latin}
- \tl_if_empty:NT \l__fontspec_lang_name_tl
- {
- \tl_set:Nn \l__fontspec_lang_name_tl {Default}
- }
- \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
- \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
- }
- {
- \__fontspec_info:n {no-scripts}
- }
- }
- {
- \tl_if_empty:NT \l__fontspec_lang_name_tl
- {
- \tl_set:Nn \l__fontspec_lang_name_tl {Default}
- }
- \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
- \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
- }
- }
- }
+ {
+ \bool_if:NT \l__fontspec_firsttime_bool
+ {
+ \tl_if_empty:NTF \l__fontspec_script_name_tl
+ {
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
+ {
+ \tl_set:Nn \l__fontspec_script_name_tl {Latin}
+ \tl_if_empty:NT \l__fontspec_lang_name_tl
+ {
+ \tl_set:Nn \l__fontspec_lang_name_tl {Default}
+ }
+ \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
+ }
+ {
+ \__fontspec_info:n {no-scripts}
+ \bool_set_true:N \l__fontspec_never_check_bool
+ }
+ }
+ {
+ \tl_if_empty:NT \l__fontspec_lang_name_tl
+ {
+ \tl_set:Nn \l__fontspec_lang_name_tl {Default}
+ }
+ \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
+ }
+ }
+ }
\cs_new:Nn \__fontspec_get_features:n
- {
- \__fontspec_init_fontface:
- \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_fontfeat_clist,#1}
- \l__fontspec_keys_leftover_clist
- \__fontspec_keys_set_known:nxN {fontspec} {\l__fontspec_keys_leftover_clist} \l__fontspec_keys_leftover_clist
- \keys_set:nV {fontspec-opentype} \l__fontspec_keys_leftover_clist
+ {
+ \__fontspec_init_fontface:
+ \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_fontfeat_clist,#1}
+ \l__fontspec_keys_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec} {\l__fontspec_keys_leftover_clist} \l__fontspec_keys_leftover_clist
+ \keys_set:nV {fontspec-opentype} \l__fontspec_keys_leftover_clist
- \tl_if_empty:NF \l__fontspec_mapping_tl
- { \__fontspec_update_featstr:n { mapping = \l__fontspec_mapping_tl } }
+ \tl_if_empty:NF \l__fontspec_mapping_tl
+ { \__fontspec_update_featstr:n { mapping = \l__fontspec_mapping_tl } }
- \str_if_eq_x:nnF { \l__fontspec_hexcol_tl \l__fontspec_opacity_tl }
- { \c__fontspec_hexcol_tl \c__fontspec_opacity_tl }
- { \__fontspec_update_featstr:n { color = \l__fontspec_hexcol_tl\l__fontspec_opacity_tl } }
- }
+ \str_if_eq:eeF { \l__fontspec_hexcol_tl \l__fontspec_opacity_tl }
+ { \c__fontspec_hexcol_tl \c__fontspec_opacity_tl }
+ { \__fontspec_update_featstr:n { color = \l__fontspec_hexcol_tl\l__fontspec_opacity_tl } }
+ }
\prg_new_conditional:Nnn \__fontspec_save_family_needed:n { TF }
{
@@ -1393,123 +1399,121 @@
\__fontspec_info:nxx {defining-font} {#1} {#2}
}
\cs_new:Nn \__fontspec_save_fontinfo:n
- {
- \prop_new:c {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop}
- \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {fontname} { #1 }
- \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {options} { \l__fontspec_all_features_clist }
- \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {fontdef}
- {
- \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
- { \l__fontspec_pre_feat_sclist \g__fontspec_rawfeatures_sclist }
- }
- \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {script-num} \l__fontspec_script_int
- \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {lang-num} \l__fontspec_language_int
- \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {script-tag} \l_fontspec_script_tl
- \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
- }
+ {
+ \prop_new:c {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop}
+ \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {fontname} { #1 }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {options} { \l__fontspec_all_features_clist }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {fontdef}
+ {
+ \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
+ { \l__fontspec_pre_feat_sclist \g__fontspec_rawfeatures_sclist }
+ }
+ \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {script-num} \l__fontspec_script_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {lang-num} \l__fontspec_language_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {script-tag} \l_fontspec_script_tl
+ \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
+ }
\cs_new:Nn \__fontspec_find_autofonts:
- {
- \bool_if:nF {\l__fontspec_noit_bool || \l__fontspec_nobf_bool}
- {
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_it_tl} {/B}
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_bf_tl} {/I}
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
- }
+ {
+ \bool_if:nF {\l__fontspec_noit_bool || \l__fontspec_nobf_bool}
+ {
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_it_tl} {/B}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_bf_tl} {/I}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
+ }
- \bool_if:NF \l__fontspec_nobf_bool
- {
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
- }
+ \bool_if:NF \l__fontspec_nobf_bool
+ {
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
+ }
- \bool_if:NF \l__fontspec_noit_bool
- {
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
- }
+ \bool_if:NF \l__fontspec_noit_bool
+ {
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
+ }
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfsl_tl {\l__fontspec_fontname_sl_tl} {/B}
- }
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfsl_tl {\l__fontspec_fontname_sl_tl} {/B}
+ }
\cs_new:Nn \__fontspec_set_faces:
- {
- \__fontspec_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l__fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
- \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l__fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
- \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l__fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l__fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l__fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
+ {
+ \__fontspec_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l__fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l__fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l__fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l__fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l__fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
- \prop_map_inline:Nn \l__fontspec_nfssfont_prop { \__fontspec_set_faces_aux:nnnnn ##2 }
- }
+ \prop_map_inline:Nn \l__fontspec_nfssfont_prop { \__fontspec_set_faces_aux:nnnnn ##2 }
+ }
\cs_new:Nn \__fontspec_set_faces_aux:nnnnn
- {
- \fontspec_complete_fontname:Nn \l__fontspec_curr_fontname_tl {#3}
- \__fontspec_make_font_shapes:Nnnnn \l__fontspec_curr_fontname_tl {#1} {#2} {#4} {#5}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_curr_fontname_tl {#3}
+ \__fontspec_make_font_shapes:Nnnnn \l__fontspec_curr_fontname_tl {#1} {#2} {#4} {#5}
+ }
\cs_new:Nn \fontspec_complete_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
- \tl_replace_all:Nnx #1 {*} {\l__fontspec_basename_tl}
+ {
+ \tl_set:Nx #1 {#2}
+ \tl_replace_all:Nnx #1 {*} {\l__fontspec_basename_tl}
\tl_remove_all:Nn #1 {~}
- }
+ }
\cs_new:Nn \__fontspec_add_nfssfont:nnnn
- {
- \tl_set:Nx \l__fontspec_this_font_tl {#3}
+ {
+ \tl_set:Nx \l__fontspec_this_font_tl {#3}
- \tl_if_empty:xTF {#4}
- { \clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}} }
- { \__fontspec_keys_set_known:nxN {fontspec-preparse-nested} {#4} \l__fontspec_tmp_tl }
+ \tl_if_empty:xTF {#4}
+ { \clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}} }
+ { \__fontspec_keys_set_known:nxN {fontspec-preparse-nested} {#4} \l__fontspec_tmp_tl }
- \tl_if_empty:NF \l__fontspec_this_font_tl
- {
- \prop_put:Nxx \l__fontspec_nfssfont_prop {#1/#2}
- { {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
- }
- }
+ \tl_if_empty:NF \l__fontspec_this_font_tl
+ {
+ \prop_put:Nxx \l__fontspec_nfssfont_prop {#1/#2}
+ { {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
+ }
+ }
\cs_new:Nn \__fontspec_set_font_type:N
- {
- \bool_set_true:N \l__fontspec_ot_bool
- }
+ {
+ \bool_set_true:N \l__fontspec_ot_bool
+ }
\cs_new:Nn \__fontspec_set_autofont:Nnn
- {
- \bool_if:NF \l__fontspec_external_bool
- {
- \tl_if_empty:xF {#2}
- {
- \tl_if_empty:NT #1
- {
- \__fontspec_if_autofont:nnTF {#2} {#3}
- { \tl_set:Nx #1 {#2#3} }
- { \__fontspec_info:nx {no-font-shape} {#2#3} }
- }
- }
- }
- }
-
+ {
+ \bool_if:NF \l__fontspec_external_bool
+ {
+ \tl_if_empty:xF {#2}
+ {
+ \tl_if_empty:NT #1
+ {
+ \__fontspec_if_autofont:nnTF {#2} {#3}
+ { \tl_set:Nx #1 {#2#3} }
+ { \__fontspec_info:nx {no-font-shape} {#2#3} }
+ }
+ }
+ }
+ }
\prg_new_conditional:Nnn \__fontspec_if_autofont:nn {T,TF}
- {
- \__fontspec_primitive_font_set:Nnn \l_tmpa_font { \__fontspec_construct_font_call:nn {#1} {} } {\f at size pt}
- \__fontspec_primitive_font_set:Nnn \l_tmpb_font { \__fontspec_construct_font_call:nn {#1#2} {} } {\f at size pt}
- \str_if_eq_x:nnTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
- { \prg_return_false: }
- { \prg_return_true: }
- }
+ {
+ \__fontspec_primitive_font_set:Nnn \l_tmpa_font { \__fontspec_construct_font_call:nn {#1} {} } {\f at size pt}
+ \__fontspec_primitive_font_set:Nnn \l_tmpb_font { \__fontspec_construct_font_call:nn {#1#2} {} } {\f at size pt}
+ \str_if_eq:eeTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
\cs_new:Nn \__fontspec_make_font_shapes:Nnnnn
- {
- \group_begin:
- \__fontspec_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l__fontspec_leftover_clist
- \__fontspec_load_fontname:n {#1}
- \__fontspec_declare_shape:nnxx {#2} {#3} { \l__fontspec_fontopts_clist, \l__fontspec_leftover_clist } {#5}
- \group_end:
- }
-
+ {
+ \group_begin:
+ \__fontspec_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l__fontspec_leftover_clist
+ \__fontspec_load_fontname:n {#1}
+ \__fontspec_declare_shape:nnxx {#2} {#3} { \l__fontspec_fontopts_clist, \l__fontspec_leftover_clist } {#5}
+ \group_end:
+ }
\cs_new:Nn \__fontspec_load_fontname:n
- {
+ {
\__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#1}
\prop_get:NVNF \g__fontspec_fontopts_prop \l_fontspec_fontname_tl \l__fontspec_fontopts_clist
- { \clist_clear:N \l__fontspec_fontopts_clist }
+ { \clist_clear:N \l__fontspec_fontopts_clist }
\keys_set_groups:nnV {fontspec/fontname} {getfontname} \l__fontspec_fontopts_clist
\__fontspec_primitive_font_set:Nnn \l_fontspec_font { \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl} {} } {\f at size pt}
\__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {#1} }
- }
+ }
\keys_define:nn {fontspec/fontname}
{
Font .tl_set:N = \l_fontspec_fontname_tl ,
@@ -1516,18 +1520,18 @@
Font .groups:n = {getfontname} ,
}
\cs_new:Nn \__fontspec_declare_shape:nnnn
- {
- \tl_clear:N \l__fontspec_nfss_tl
- \tl_clear:N \l__fontspec_nfss_sc_tl
- \tl_set_eq:NN \l__fontspec_saved_fontname_tl \l_fontspec_fontname_tl
+ {
+ \tl_clear:N \l__fontspec_nfss_tl
+ \tl_clear:N \l__fontspec_nfss_sc_tl
+ \tl_set_eq:NN \l__fontspec_saved_fontname_tl \l_fontspec_fontname_tl
- \exp_args:Nx \clist_map_inline:nn {#4} { \__fontspec_setup_single_size:nn {#3} {##1} }
+ \exp_args:Nx \clist_map_inline:nn {#4} { \__fontspec_setup_single_size:nn {#3} {##1} }
- \__fontspec_declare_shapes_normal:nn {#1} {#2}
- \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
- \__fontspec_declare_shape_slanted:nn {#1} {#2}
- \__fontspec_declare_shape_loginfo:nn {#1} {#2}
- }
+ \__fontspec_declare_shapes_normal:nn {#1} {#2}
+ \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
+ \__fontspec_declare_shape_slanted:nn {#1} {#2}
+ \__fontspec_declare_shape_loginfo:nn {#1} {#2}
+ }
\cs_generate_variant:Nn \__fontspec_declare_shape:nnnn {nnxx}
\cs_new:Nn \__fontspec_setup_single_size:nn
{
@@ -1546,38 +1550,38 @@
\clist_set_eq:NN \l__fontspec_fontfeat_curr_clist \l__fontspec_fontfeat_sc_clist
\bool_if:NF \l__fontspec_nosc_bool
- {
- \tl_if_empty:NTF \l__fontspec_fontname_sc_tl
- {
- \__fontspec_make_smallcaps:TF
- {
- \clist_put_left:Nn \l__fontspec_fontfeat_curr_clist {Letters=SmallCaps}
- }
- {
- \bool_set_true:N \l__fontspec_nosc_bool
- }
- }
- { \__fontspec_load_fontname:n {\l__fontspec_fontname_sc_tl} }% local for each size
- }
+ {
+ \tl_if_empty:NTF \l__fontspec_fontname_sc_tl
+ {
+ \__fontspec_make_smallcaps:TF
+ {
+ \clist_put_left:Nn \l__fontspec_fontfeat_curr_clist {Letters=SmallCaps}
+ }
+ {
+ \bool_set_true:N \l__fontspec_nosc_bool
+ }
+ }
+ { \__fontspec_load_fontname:n {\l__fontspec_fontname_sc_tl} }% local for each size
+ }
\bool_if:NF \l__fontspec_nosc_bool
- {
- \__fontspec_setup_nfss:Nnnn \l__fontspec_nfss_sc_tl
- {#1} {\l__fontspec_sizing_leftover_clist} {\l__fontspec_fontfeat_curr_clist}
- }
+ {
+ \__fontspec_setup_nfss:Nnnn \l__fontspec_nfss_sc_tl
+ {#1} {\l__fontspec_sizing_leftover_clist} {\l__fontspec_fontfeat_curr_clist}
+ }
}
\cs_new:Nn \__fontspec_setup_nfss:Nnnn
- {
+ {
- \__fontspec_get_features:n { #2 , #3 , #4 }
+ \__fontspec_get_features:n { #2 , #3 , #4 }
- \tl_put_right:Nx #1
- {
- <\l__fontspec_size_tl> \l__fontspec_scale_tl
- \__fontspec_construct_font_call:nn { \l_fontspec_fontname_tl }
- { \l__fontspec_pre_feat_sclist \g__fontspec_rawfeatures_sclist }
- }
- }
+ \tl_put_right:Nx #1
+ {
+ <\l__fontspec_size_tl> \l__fontspec_scale_tl
+ \__fontspec_construct_font_call:nn { \l_fontspec_fontname_tl }
+ { \l__fontspec_pre_feat_sclist \g__fontspec_rawfeatures_sclist }
+ }
+ }
\cs_new:Nn \__fontspec_declare_shapes_normal:nn
{
\__fontspec_DeclareFontShape:xxxxxx {\g__fontspec_nfss_enc_tl} {\g__fontspec_nfss_family_tl}
@@ -1591,7 +1595,6 @@
{ \__fontspec_combo_sc_shape:n {#2} } {\l__fontspec_nfss_sc_tl} {\l__fontspec_postadjust_tl}
}
}
-
\cs_new:Nn \__fontspec_combo_sc_shape:n
{
\tl_if_exist:cTF { \__fontspec_shape_merge:nn {#1} {\scdefault} }
@@ -1599,73 +1602,74 @@
{ \scdefault }
}
\cs_new:Nn \__fontspec_DeclareFontShape:nnnnnn
- {
- \group_begin:
- \normalsize
- \cs_undefine:c {#1/#2/#3/#4/\f at size}
- \group_end:
- \DeclareFontShape{#1}{#2}{#3}{#4}{#5}{#6}
- }
+ {
+\group_begin:
+\normalsize
+\cs_undefine:c {#1/#2/#3/#4/\f at size}
+\group_end:
+\DeclareFontShape{#1}{#2}{#3}{#4}{#5}{#6}
+ }
\cs_generate_variant:Nn \__fontspec_DeclareFontShape:nnnnnn {xxxxxx}
\cs_new:Nn \__fontspec_declare_shape_slanted:nn
- {
- \bool_if:nT
- {
- \str_if_eq_x_p:nn {#2} {\itdefault} &&
- !(\str_if_eq_x_p:nn {\itdefault} {\sldefault})
- }
- {
- \__fontspec_DeclareFontShape:xxxxxx {\g__fontspec_nfss_enc_tl}{\g__fontspec_nfss_family_tl}{#1}{\sldefault}
- {<->ssub*\g__fontspec_nfss_family_tl/#1/\itdefault}{\l__fontspec_postadjust_tl}
- }
- }
+ {
+ \bool_if:nT
+ {
+ \str_if_eq_p:ee {#2} {\itdefault} &&
+ !(\str_if_eq_p:ee {\itdefault} {\sldefault})
+ }
+ {
+ \__fontspec_DeclareFontShape:xxxxxx {\g__fontspec_nfss_enc_tl}{\g__fontspec_nfss_family_tl}{#1}{\sldefault}
+ {<->ssub*\g__fontspec_nfss_family_tl/#1/\itdefault}{\l__fontspec_postadjust_tl}
+ }
+ }
\cs_new:Nn \__fontspec_declare_shape_loginfo:nn
- {
- \tl_gput_right:Nx \g__fontspec_defined_shapes_tl
- {
- \exp_not:n { \\ }
- -~ \exp_not:N \str_case:nn {#1/#2}
- {
- {\mddefault/\updefault} {'normal'~}
- {\bfdefault/\updefault} {'bold'~}
- {\mddefault/\itdefault} {'italic'~}
- {\mddefault/\sldefault} {'slanted'~}
- {\bfdefault/\itdefault} {'bold~ italic'~}
- {\bfdefault/\sldefault} {'bold~ slanted'~}
- } (#1/#2)~
- with~ NFSS~ spec.:~
- \l__fontspec_nfss_tl
- \exp_not:n { \\ }
- -~ \exp_not:N \str_case:nn { #1 / \__fontspec_combo_sc_shape:n {#2} }
- {
- {\mddefault/\scdefault} {'small~ caps'~}
- {\bfdefault/\scdefault} {'bold~ small~ caps'~}
- {\mddefault/\itscdefault} {'italic~ small~ caps'~}
- {\bfdefault/\itscdefault} {'bold~ italic~ small~ caps'~}
- {\mddefault/\slscdefault} {'slanted~ small~ caps'~}
- {\bfdefault/\slscdefault} {'bold~ slanted~ small~ caps'~}
- }~( #1 / \__fontspec_combo_sc_shape:n {#2} )~
- with~ NFSS~ spec.:~
- \l__fontspec_nfss_sc_tl
- \tl_if_empty:fF {\l__fontspec_postadjust_tl}
- {
- \exp_not:N \\ and~ font~ adjustment~ code: \exp_not:N \\ \l__fontspec_postadjust_tl
- }
- }
- }
+ {
+ \tl_gput_right:Nx \g__fontspec_defined_shapes_tl
+ {
+ \exp_not:n { \\ }
+ -~ \exp_not:N \str_case:nn {#1/#2}
+ {
+ {\mddefault/\updefault} {'normal'~}
+ {\bfdefault/\updefault} {'bold'~}
+ {\mddefault/\itdefault} {'italic'~}
+ {\mddefault/\sldefault} {'slanted'~}
+ {\bfdefault/\itdefault} {'bold~ italic'~}
+ {\bfdefault/\sldefault} {'bold~ slanted'~}
+ } (#1/#2)~
+ with~ NFSS~ spec.:~
+ \l__fontspec_nfss_tl
+ \exp_not:n { \\ }
+ -~ \exp_not:N \str_case:nn { #1 / \__fontspec_combo_sc_shape:n {#2} }
+ {
+ {\mddefault/\scdefault} {'small~ caps'~}
+ {\bfdefault/\scdefault} {'bold~ small~ caps'~}
+ {\mddefault/\itscdefault} {'italic~ small~ caps'~}
+ {\bfdefault/\itscdefault} {'bold~ italic~ small~ caps'~}
+ {\mddefault/\slscdefault} {'slanted~ small~ caps'~}
+ {\bfdefault/\slscdefault} {'bold~ slanted~ small~ caps'~}
+ }~( #1 / \__fontspec_combo_sc_shape:n {#2} )~
+ with~ NFSS~ spec.:~
+ \l__fontspec_nfss_sc_tl
+ \tl_if_empty:fF {\l__fontspec_postadjust_tl}
+ {
+ \exp_not:N \\ and~ font~ adjustment~ code:
+ \exp_not:N \\ \l__fontspec_postadjust_tl
+ }
+ }
+ }
\tl_set:Nn \l__fontspec_pre_feat_sclist
- {
- mode = \l_fontspec_mode_tl ;
- \tl_if_empty:NF \l_fontspec_script_tl
- {
- script = \l_fontspec_script_tl ;
- language = \l_fontspec_lang_tl ;
- }
- }
+ {
+ mode = \l_fontspec_mode_tl ;
+ \tl_if_empty:NF \l_fontspec_script_tl
+ {
+ script = \l_fontspec_script_tl ;
+ language = \l_fontspec_lang_tl ;
+ }
+ }
\cs_new:Nn \__fontspec_make_smallcaps:TF
- {
- \__fontspec_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
- }
+ {
+ \__fontspec_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
+ }
\cs_new:Nn \__fontspec_update_featstr:n
{
\bool_if:NF \l__fontspec_firsttime_bool
@@ -1682,23 +1686,23 @@
}
}
\cs_set:Npn \__fontspec_init:
- {
- \bool_set_false:N \l__fontspec_ot_bool
- \bool_set_true:N \l__fontspec_firsttime_bool
- \__fontspec_font_is_name:
- \tl_clear:N \l__fontspec_font_path_tl
- \tl_clear:N \l__fontspec_optical_size_tl
- \tl_clear:N \l__fontspec_ttc_index_tl
- \tl_clear:N \l_fontspec_renderer_tl
- \tl_gclear:N \g__fontspec_defined_shapes_tl
- \tl_gclear:N \g__fontspec_curr_series_tl
- \tl_gset_eq:NN \g__fontspec_nfss_enc_tl \g_fontspec_encoding_tl
- \tl_set:Nn \l_fontspec_mode_tl {node}
- \int_set:Nn \luatex_prehyphenchar:D { `\- } % fixme
- \int_zero:N \luatex_posthyphenchar:D % fixme
- \int_zero:N \luatex_preexhyphenchar:D % fixme
- \int_zero:N \luatex_postexhyphenchar:D % fixme
- }
+ {
+ \bool_set_false:N \l__fontspec_ot_bool
+ \bool_set_true:N \l__fontspec_firsttime_bool
+ \__fontspec_font_is_name:
+ \tl_clear:N \l__fontspec_font_path_tl
+ \tl_clear:N \l__fontspec_optical_size_tl
+ \tl_clear:N \l__fontspec_ttc_index_tl
+ \tl_clear:N \l_fontspec_renderer_tl
+ \tl_gclear:N \g__fontspec_defined_shapes_tl
+ \tl_gclear:N \g__fontspec_curr_series_tl
+ \tl_gset_eq:NN \g__fontspec_nfss_enc_tl \g_fontspec_encoding_tl
+ \tl_set:Nn \l_fontspec_mode_tl {node}
+ \int_set:Nn \prehyphenchar { `\- } % fixme
+ \int_zero:N \posthyphenchar % fixme
+ \int_zero:N \preexhyphenchar % fixme
+ \int_zero:N \postexhyphenchar % fixme
+ }
\cs_new:Nn \__fontspec_init_fontface:
{
\tl_gclear:N \g__fontspec_rawfeatures_sclist
@@ -1709,29 +1713,24 @@
\tl_clear:N \l__fontspec_wordspace_adjust_tl
\tl_clear:N \l__fontspec_punctspace_adjust_tl
}
-\cs_new:Nn \__fontspec_iv_str_to_num:Nn
+\cs_new_protected:Nn \__fontspec_ot_validate_tag:n
{
- \__fontspec_strip_leading_sign:Nw #1#2 \q_nil
+ \__fontspec_ot_validate_tag:w #1 \q_nil
}
-\cs_set:Npn \__fontspec_strip_leading_sign:Nw #1#2#3 \q_nil
+\cs_generate_variant:Nn \__fontspec_ot_validate_tag:n {x}
+\cs_set:Npn \__fontspec_ot_validate_tag:w #1 #2 \q_nil
{
- \bool_if:nTF { \str_if_eq_p:nn {#2} {+} || \str_if_eq_p:nn {#2} {-} }
- { \__fontspec_iv_str_to_num:w #1 \q_nil #3 \c_empty_tl \c_empty_tl \q_nil }
- { \__fontspec_iv_str_to_num:w #1 \q_nil #2#3 \c_empty_tl \c_empty_tl \q_nil }
+ \bool_if:nTF { \str_if_eq_p:nn {#1} {+} || \str_if_eq_p:nn {#1} {-} }
+ { \__fontspec_ot_validate_tag_aux:w #2 \c_empty_tl \c_empty_tl \q_nil }
+ { \__fontspec_ot_validate_tag_aux:w #1#2 \c_empty_tl \c_empty_tl \q_nil }
}
-\cs_set:Npn \__fontspec_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil
- {
- \int_set:Nn #1
- {
- `#2 * "1000000
- + `#3 * "10000
- + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100
- + \ifx \c_empty_tl #5 32 \else `#5 \fi
- }
- }
-\cs_generate_variant:Nn \__fontspec_iv_str_to_num:Nn {No}
+\cs_set:Npn \__fontspec_ot_validate_tag_aux:w #1#2#3#4#5 \q_nil
+ {
+ \int_compare:nT { \tl_count:n {#5} > 2 }
+ { \__fontspec_error:nx {ot-tag-too-long} {#1#2#3#4#5} }
+ }
-%%^^A%% fontspec-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Nn \__fontspec_define_opentype_feature_group:n
{
@@ -1771,16 +1770,16 @@
\cs_new:Nn \__fontspec_feat_off:n {#1Off}
\cs_new:Nn \__fontspec_feat_reset:n {#1Reset}
\cs_new:Nn \__fontspec_define_opentype_onoffreset:nnnnn
- {
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {+#4} {#5}
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_off:n {#2} } {#3} {-#4} {}
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {+#4,-#4}
- }
+ {
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {+#4} {#5}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_off:n {#2} } {#3} {-#4} {}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {+#4,-#4}
+ }
\cs_new:Nn \__fontspec_define_opentype_onreset:nnnnn
- {
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {#4} {#5}
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {#4}
- }
+ {
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {#4} {#5}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {#4}
+ }
\cs_new:Nn \__fontspec_make_OT_feature:nnn
{
@@ -1813,47 +1812,59 @@
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \cs_if_eq:NNTF #1 \font
- { \tl_set:Nx \l__fontspec_tmp_tl {\curr at fontshape/\f at size} }
- { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
- \directlua{fontspec.check_ot_script("\l__fontspec_tmp_tl", "#2")}
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ {
+ \__fontspec_ot_validate_tag:x {#2}
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l__fontspec_tmp_tl {\curr at fontshape/\f at size} }
+ { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
+ \directlua{fontspec.check_ot_script("\l__fontspec_tmp_tl", "#2")}
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
}
- }
\prg_new_conditional:Nnn \__fontspec_check_lang:Nn {TF}
{
+ \__fontspec_check_lang:NnnTF #1 {#2} {\l_fontspec_script_tl} {\prg_return_true:} {\prg_return_false:}
+ }
+\prg_new_conditional:Nnn \__fontspec_check_lang:Nnn {TF}
+ {
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \cs_if_eq:NNTF #1 \font
- { \tl_set:Nx \l__fontspec_tmp_tl {\curr at fontshape/\f at size} }
- { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
- \directlua
{
- fontspec.check_ot_lang( "\l__fontspec_tmp_tl", "#2", "\l_fontspec_script_tl" )
+ \__fontspec_ot_validate_tag:x {#2}
+ \__fontspec_ot_validate_tag:x {#3}
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l__fontspec_tmp_tl {\curr at fontshape/\f at size} }
+ { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
+ \directlua
+ {
+ fontspec.check_ot_lang( "\l__fontspec_tmp_tl", "#2", "#3" )
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
- }
\prg_new_conditional:Nnn \__fontspec_check_ot_feat:Nn {TF,F}
{
+ \__fontspec_check_ot_feat:NnnnTF #1 {#2} {\l_fontspec_lang_tl} {\l_fontspec_script_tl}
+ {\prg_return_true:} {\prg_return_false:}
+ }
+\prg_new_conditional:Nnn \__fontspec_check_ot_feat:Nnnn {TF,F}
+ {
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \cs_if_eq:NNTF #1 \font
- { \tl_set:Nx \l__fontspec_tmp_tl {\curr at fontshape/\f at size} }
- { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
- \directlua
{
- fontspec.check_ot_feat(
- "\l__fontspec_tmp_tl", "#2",
- "\l_fontspec_lang_tl", "\l_fontspec_script_tl"
- )
+ \__fontspec_ot_validate_tag:x {#2}
+ \__fontspec_ot_validate_tag:x {#3}
+ \__fontspec_ot_validate_tag:x {#4}
+ \cs_if_eq:NNTF #1 \font
+ { \tl_set:Nx \l__fontspec_tmp_tl {\curr at fontshape/\f at size} }
+ { \tl_set:Nx \l__fontspec_tmp_tl {\cs_to_str:N #1} }
+ \directlua
+ {
+ fontspec.check_ot_feat("\l__fontspec_tmp_tl", "#2", "#3", "#4")
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
}
- }
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {aalt}{Access~All~Alternates}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvf}{Above-base~Forms}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvm}{Above-base~Mark~Positioning}
@@ -1977,10 +1988,10 @@
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {zero}{Slashed~Zero}
-%%^^A%% fontspec-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%%^^A%% fontspec-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
\clist_gset:Nn \g__fontspec_all_keyval_modules_clist
{
@@ -2006,60 +2017,61 @@
\bool_set_false:N \l__fontspec_fontcfg_bool
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Path}
- {
- \bool_set_true:N \l__fontspec_nobf_bool
- \bool_set_true:N \l__fontspec_noit_bool
- \bool_set_true:N \l__fontspec_external_bool
- \tl_set:Nn \l__fontspec_font_path_tl {#1}
- \__fontspec_font_is_file:
- }
+ {
+ \bool_set_true:N \l__fontspec_nobf_bool
+ \bool_set_true:N \l__fontspec_noit_bool
+ \bool_set_true:N \l__fontspec_external_bool
+ \tl_set:Nn \l__fontspec_font_path_tl {#1}
+ \__fontspec_font_is_file:
+ }
\aliasfontfeature{Path}{ExternalLocation}
\__fontspec_keys_define_code:nnn {fontspec} {Path} {}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Extension}
- {
- \tl_set:Nn \l__fontspec_extension_tl {#1}
- \bool_if:NF \l__fontspec_external_bool
- {
- \keys_set:nn {fontspec-preparse-external} {Path}
- }
- }
+ {
+ \tl_set:Nn \l__fontspec_extension_tl {#1}
+ \bool_if:NF \l__fontspec_external_bool
+ {
+ \keys_set:nn {fontspec-preparse-external} {Path}
+ }
+ }
\tl_clear:N \l__fontspec_extension_tl
\__fontspec_keys_define_code:nnn {fontspec} {Extension} {}
\keys_define:nn {fontspec-renderer}
- {
- Renderer .choices:nn =
- {AAT,ICU,OpenType,Graphite,Full,Basic}
- {
- \int_compare:nTF {\l_keys_choice_int <= 4} {
- \__fontspec_warning:nx {only-xetex-feature} {Renderer=AAT/OpenType/Graphite}
- }
- {
- \tl_set:Nx \l_fontspec_mode_tl
- {
- \int_case:nn \l_keys_choice_int { 5 {node} 6 {base} }
- }
- \tl_gset:Nx \g__fontspec_single_feat_tl { mode=\l_fontspec_mode_tl }
- }
- }
- }
+ {
+ Renderer .choices:nn =
+ {AAT,ICU,OpenType,Graphite,Full,Basic}
+ {
+ \int_compare:nTF {\l_keys_choice_int <= 4}
+ {
+ \__fontspec_warning:nx {only-xetex-feature} {Renderer=AAT/OpenType/Graphite}
+ }
+ {
+ \tl_set:Nx \l_fontspec_mode_tl
+ {
+ \int_case:nn \l_keys_choice_int { 5 {node} 6 {base} }
+ }
+ \tl_gset:Nx \g__fontspec_single_feat_tl { mode=\l_fontspec_mode_tl }
+ }
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {Script}
- {
- \tl_set:Nn \l__fontspec_script_name_tl {#1}
- }
+ {
+ \tl_set:Nn \l__fontspec_script_name_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {Language}
- {
- \tl_set:Nn \l__fontspec_lang_name_tl {#1}
- }
+ {
+ \tl_set:Nn \l__fontspec_lang_name_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {FontIndex}
- {
- \str_if_eq_x:nnF { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
- { \__fontspec_warning:n {font-index-needs-ttc} }
+ {
+ \str_if_eq:eeF { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
+ { \__fontspec_warning:n {font-index-needs-ttc} }
\tl_set:Nn \l__fontspec_ttc_index_tl {(#1)}
- }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {FontIndex}
- {
+ {
\tl_set:Nn \l__fontspec_ttc_index_tl {(#1)}
- }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {UprightFont}
{
\fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
@@ -2125,76 +2137,76 @@
}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_up_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_up_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {BoldFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_bf_clist {#1}
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_bf_clist {#1}
- }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {ItalicFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_it_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_it_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {BoldItalicFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_bfit_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_bfit_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {SlantedFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_sl_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_sl_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {BoldSlantedFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_bfsl_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_bfsl_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {SmallCapsFeatures}
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- {
- \clist_set:Nn \l__fontspec_fontfeat_sc_clist {#1}
- }
- }
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_sc_clist {#1}
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {SizeFeatures}
- {
- \clist_set:Nn \l__fontspec_sizefeat_clist {#1}
- \clist_put_right:Nn \l__fontspec_fontfeat_up_clist { SizeFeatures = {#1} }
- }
+ {
+ \clist_set:Nn \l__fontspec_sizefeat_clist {#1}
+ \clist_put_right:Nn \l__fontspec_fontfeat_up_clist { SizeFeatures = {#1} }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-nested} {SizeFeatures}
- {
- \clist_set:Nn \l__fontspec_sizefeat_clist {#1}
- \tl_if_empty:NT \l__fontspec_this_font_tl
- { \tl_set:Nn \l__fontspec_this_font_tl { -- } } % needs to be non-empty as a flag
- }
+ {
+ \clist_set:Nn \l__fontspec_sizefeat_clist {#1}
+ \tl_if_empty:NT \l__fontspec_this_font_tl
+ { \tl_set:Nn \l__fontspec_this_font_tl { -- } } % needs to be non-empty as a flag
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-nested} {Font}
- {
- \tl_set:Nn \l__fontspec_this_font_tl {#1}
- }
+ {
+ \tl_set:Nn \l__fontspec_this_font_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {SizeFeatures}
- {
- % dummy
- }
+ {
+ % dummy
+ }
\__fontspec_keys_define_code:nnn {fontspec} {Font}
- {
- % dummy
- }
+ {
+ % dummy
+ }
\__fontspec_keys_define_code:nnn {fontspec-sizing} {Size}
- {
- \tl_set:Nn \l__fontspec_size_tl {#1}
- }
+ {
+ \tl_set:Nn \l__fontspec_size_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-sizing} {Font}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_sizedfont_tl {#1}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_sizedfont_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {NFSSEncoding}
- {
- \tl_gset:Nx \g__fontspec_nfss_enc_tl { #1 }
- }
+ {
+ \tl_gset:Nx \g__fontspec_nfss_enc_tl { #1 }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {NFSSFamily}
- {
- \tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
- }
+ {
+ \tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
\tl_clear:N \l__fontspec_this_font_tl
@@ -2213,271 +2225,273 @@
{\use_i:nnn #1} {\use_ii:nnn #1} {\l__fontspec_this_font_tl} {\l__fontspec_this_feat_clist}
}
\__fontspec_keys_define_code:nnn {fontspec} {Scale}
- {
- \str_case:nnF {#1}
- {
- {MatchLowercase} { \__fontspec_calc_scale:n {5} }
- {MatchUppercase} { \__fontspec_calc_scale:n {8} }
- }
- { \tl_set:Nx \l__fontspec_scale_tl {#1} }
- \tl_set:Nx \l__fontspec_scale_tl { s*[\l__fontspec_scale_tl] }
- }
+ {
+ \str_case:nnF {#1}
+ {
+ {MatchLowercase} { \__fontspec_calc_scale:n {5} }
+ {MatchUppercase} { \__fontspec_calc_scale:n {8} }
+ }
+ { \tl_set:Nx \l__fontspec_scale_tl {#1} }
+ \tl_set:Nx \l__fontspec_scale_tl { s*[\l__fontspec_scale_tl] }
+ }
\cs_new:Nn \__fontspec_calc_scale:n
- {
- \group_begin:
+ {
+ \group_begin:
- \fontencoding { \encodingdefault }
- \fontfamily { \rmdefault }
- \selectfont
+ \fontencoding { \encodingdefault }
+ \fontfamily { \rmdefault }
+ \selectfont
- \__fontspec_set_font_dimen:NnN \l__fontspec_tmpa_dim {#1} \font
- \__fontspec_set_font_dimen:NnN \l__fontspec_tmpb_dim {#1} \l_fontspec_font
+ \__fontspec_set_font_dimen:NnN \l__fontspec_tmpa_dim {#1} \font
+ \__fontspec_set_font_dimen:NnN \l__fontspec_tmpb_dim {#1} \l_fontspec_font
- \tl_gset:Nx \l__fontspec_scale_tl
+ \tl_set:Nx \l__fontspec_scale_tl
+ {
+ \fp_eval:n { \dim_to_fp:n {\l__fontspec_tmpa_dim} /
+ \dim_to_fp:n {\l__fontspec_tmpb_dim} }
+ }
+
+ \__fontspec_info:n {set-scale}
+ \exp_args:NNNx
+ \group_end:
+ \tl_set:Nx \l__fontspec_scale_tl { \l__fontspec_scale_tl }
+ }
+\cs_new:Nn \__fontspec_set_font_dimen:NnN
+ {
+ \dim_set:Nn #1 { \fontdimen #2 #3 }
+ \dim_compare:nNnT #1 = {0pt}
{
- \fp_eval:n { \dim_to_fp:n {\l__fontspec_tmpa_dim} /
- \dim_to_fp:n {\l__fontspec_tmpb_dim} }
+ \settoheight #1
+ {
+ \str_if_eq:nnTF {#3} {\font} \rmfamily #3
+ \int_case:nnF #2
+ {
+ {5} {x} % x-height
+ {8} {X} % cap-height
+ } {?} % "else" clause; never reached.
+ }
}
-
- \__fontspec_info:n {set-scale}
- \group_end:
- }
-\cs_new:Nn \__fontspec_set_font_dimen:NnN
- {
- \dim_set:Nn #1 { \fontdimen #2 #3 }
- \dim_compare:nNnT #1 = {0pt}
- {
- \settoheight #1
- {
- \str_if_eq:nnTF {#3} {\font} \rmfamily #3
- \int_case:nnF #2
- {
- {5} {x} % x-height
- {8} {X} % cap-height
- } {?} % "else" clause; never reached.
- }
- }
- }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {WordSpace}
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- { \_fontspec_parse_wordspace:w #1,,,\q_stop }
- }
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ { \_fontspec_parse_wordspace:w #1,,,\q_stop }
+ }
\__fontspec_aff_error:n {WordSpace}
\cs_set:Npn \_fontspec_parse_wordspace:w #1,#2,#3,#4 \q_stop
- {
- \tl_if_empty:nTF {#4}
- {
- \tl_set:Nn \l__fontspec_wordspace_adjust_tl
- {
- \fontdimen 2 \font = #1 \fontdimen 2 \font
- \fontdimen 3 \font = #1 \fontdimen 3 \font
- \fontdimen 4 \font = #1 \fontdimen 4 \font
- }
- }
- {
- \tl_set:Nn \l__fontspec_wordspace_adjust_tl
- {
- \fontdimen 2 \font = #1 \fontdimen 2 \font
- \fontdimen 3 \font = #2 \fontdimen 3 \font
- \fontdimen 4 \font = #3 \fontdimen 4 \font
- }
- }
- }
+ {
+ \tl_if_empty:nTF {#4}
+ {
+ \tl_set:Nn \l__fontspec_wordspace_adjust_tl
+ {
+ \fontdimen 2 \font = #1 \fontdimen 2 \font
+ \fontdimen 3 \font = #1 \fontdimen 3 \font
+ \fontdimen 4 \font = #1 \fontdimen 4 \font
+ }
+ }
+ {
+ \tl_set:Nn \l__fontspec_wordspace_adjust_tl
+ {
+ \fontdimen 2 \font = #1 \fontdimen 2 \font
+ \fontdimen 3 \font = #2 \fontdimen 3 \font
+ \fontdimen 4 \font = #3 \fontdimen 4 \font
+ }
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {PunctuationSpace}
- {
- \str_case_x:nnF {#1}
- {
- {WordSpace}
- {
- \tl_set:Nn \l__fontspec_punctspace_adjust_tl
- { \fontdimen 7 \font = 0 \fontdimen 2 \font }
- }
- {TwiceWordSpace}
- {
- \tl_set:Nn \l__fontspec_punctspace_adjust_tl
- { \fontdimen 7 \font = 1 \fontdimen 2 \font }
- }
- }
- {
- \tl_set:Nn \l__fontspec_punctspace_adjust_tl
- { \fontdimen 7 \font = #1 \fontdimen 7 \font }
- }
- }
+ {
+ \str_case_e:nnF {#1}
+ {
+ {WordSpace}
+ {
+ \tl_set:Nn \l__fontspec_punctspace_adjust_tl
+ { \fontdimen 7 \font = 0 \fontdimen 2 \font }
+ }
+ {TwiceWordSpace}
+ {
+ \tl_set:Nn \l__fontspec_punctspace_adjust_tl
+ { \fontdimen 7 \font = 1 \fontdimen 2 \font }
+ }
+ }
+ {
+ \tl_set:Nn \l__fontspec_punctspace_adjust_tl
+ { \fontdimen 7 \font = #1 \fontdimen 7 \font }
+ }
+ }
\__fontspec_aff_error:n {PunctuationSpace}
\__fontspec_keys_define_code:nnn {fontspec} {FontAdjustment}
- {
- \tl_put_right:Nx \l__fontspec_postadjust_tl {#1}
- }
+ {
+ \tl_put_right:Nx \l__fontspec_postadjust_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {LetterSpace}
- {
- \__fontspec_update_featstr:n {letterspace=#1}
- }
+ {
+ \__fontspec_update_featstr:n {letterspace=#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {HyphenChar}
- {
- \str_if_eq:nnTF {#1} {None}
- {
- \tl_put_right:Nn \l__fontspec_postadjust_tl
- { \__fontspec_primitive_font_set_hyphenchar:Nn \font {-1} }
- }
- {
- \__fontspec_warning:nx {only-xetex-feature} {HyphenChar}
+ {
+ \str_if_eq:nnTF {#1} {None}
+ {
+ \tl_put_right:Nn \l__fontspec_postadjust_tl
+ { \__fontspec_primitive_font_set_hyphenchar:Nn \font {-1} }
+ }
+ {
+ \__fontspec_warning:nx {only-xetex-feature} {HyphenChar}
- \tl_if_single:nTF {#1}
- { \tl_set:Nn \l_fontspec_hyphenchar_tl {`#1} }
- { \tl_set:Nn \l_fontspec_hyphenchar_tl { #1} }
+ \tl_if_single:nTF {#1}
+ { \tl_set:Nn \l__fontspec_hyphenchar_tl {`#1} }
+ { \tl_set:Nn \l__fontspec_hyphenchar_tl { #1} }
- \__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
- {
- \tl_put_right:Nn \l__fontspec_postadjust_tl
- { \__fontspec_primitive_font_set_hyphenchar:Nn \font { \l_fontspec_hyphenchar_tl } }
- }
- { \__fontspec_error:nx {no-glyph}{#1} }
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l__fontspec_hyphenchar_tl}
+ {
+ \tl_put_right:Nn \l__fontspec_postadjust_tl
+ { \__fontspec_primitive_font_set_hyphenchar:Nn \font { \l__fontspec_hyphenchar_tl } }
+ }
+ { \__fontspec_error:nx {no-glyph}{#1} }
- }
- }
+ }
+ }
\__fontspec_aff_error:n {HyphenChar}
\__fontspec_keys_define_code:nnn {fontspec} {Color}
- {
- \cs_if_exist:cTF { \token_to_str:N \color@ #1 }
- {
- \convertcolorspec{named}{#1}{HTML}\l__fontspec_hexcol_tl
- }
- {
- \int_compare:nTF { \tl_count:n {#1} == 6 }
- { \tl_set:Nn \l__fontspec_hexcol_tl {#1} }
- {
- \int_compare:nTF { \tl_count:n {#1} == 8 }
- { \fontspec_parse_colour:viii #1 }
- {
+ {
+ \cs_if_exist:cTF { \token_to_str:N \color@ #1 }
+ {
+ \convertcolorspec{named}{#1}{HTML}\l__fontspec_hexcol_tl
+ }
+ {
+ \int_compare:nTF { \tl_count:n {#1} == 6 }
+ { \tl_set:Nn \l__fontspec_hexcol_tl {#1} }
+ {
+ \int_compare:nTF { \tl_count:n {#1} == 8 }
+ { \fontspec_parse_colour:viii #1 }
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ { \__fontspec_warning:nx {bad-colour} {#1} }
+ }
+ }
+ }
+ }
+\cs_set:Npn \fontspec_parse_colour:viii #1#2#3#4#5#6#7#8
+ {
+ \tl_set:Nn \l__fontspec_hexcol_tl {#1#2#3#4#5#6}
+ \tl_if_eq:NNF \l__fontspec_opacity_tl \c__fontspec_opacity_tl
+ {
\bool_if:NF \l__fontspec_firsttime_bool
- { \__fontspec_warning:nx {bad-colour} {#1} }
- }
- }
- }
- }
-\cs_set:Npn \fontspec_parse_colour:viii #1#2#3#4#5#6#7#8
- {
- \tl_set:Nn \l__fontspec_hexcol_tl {#1#2#3#4#5#6}
- \tl_if_eq:NNF \l__fontspec_opacity_tl \c__fontspec_opacity_tl
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- { \__fontspec_warning:nx {opa-twice-col} {#7#8} }
- }
- \tl_set:Nn \l__fontspec_opacity_tl {#7#8}
- }
+ { \__fontspec_warning:nx {opa-twice-col} {#7#8} }
+ }
+ \tl_set:Nn \l__fontspec_opacity_tl {#7#8}
+ }
\aliasfontfeature{Color}{Colour}
\__fontspec_keys_define_code:nnn {fontspec} {Opacity}
- {
- \int_set:Nn \l__fontspec_tmp_int {255}
- \__fontspec_int_mult_truncate:Nn \l__fontspec_tmp_int { #1 }
- \tl_if_eq:NNF \l__fontspec_opacity_tl \c__fontspec_opacity_tl
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- { \__fontspec_warning:nx {opa-twice} {#1} }
- }
- \tl_set:Nx \l__fontspec_opacity_tl
- {
- \int_compare:nT { \l__fontspec_tmp_int <= "F } {0} % zero pad
- \int_to_hex:n { \l__fontspec_tmp_int }
- }
- }
+ {
+ \int_set:Nn \l__fontspec_tmp_int {255}
+ \__fontspec_int_mult_truncate:Nn \l__fontspec_tmp_int { #1 }
+ \tl_if_eq:NNF \l__fontspec_opacity_tl \c__fontspec_opacity_tl
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ { \__fontspec_warning:nx {opa-twice} {#1} }
+ }
+ \tl_set:Nx \l__fontspec_opacity_tl
+ {
+ \int_compare:nT { \l__fontspec_tmp_int <= "F } {0} % zero pad
+ \int_to_hex:n { \l__fontspec_tmp_int }
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-opentype} {Mapping}
- {
- \str_if_eq:nnTF {#1} {tex-text}
- {
- \__fontspec_warning:n {no-mapping-ligtex}
- \msg_redirect_name:nnn {fontspec} {no-mapping-ligtex} {none}
- \keys_set:nn {fontspec-opentype} { Ligatures=TeX }
- }
- { \__fontspec_warning:n {no-mapping} }
- }
+ {
+ \str_if_eq:nnTF {#1} {tex-text}
+ {
+ \__fontspec_warning:n {no-mapping-ligtex}
+ \msg_redirect_name:nnn {fontspec} {no-mapping-ligtex} {none}
+ \keys_set:nn {fontspec-opentype} { Ligatures=TeX }
+ }
+ { \__fontspec_warning:n {no-mapping} }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {Weight}
- {
- \__fontspec_update_featstr:n{weight=#1}
- }
+ {
+ \__fontspec_update_featstr:n{weight=#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {Width}
- {
- \__fontspec_update_featstr:n{width=#1}
- }
+ {
+ \__fontspec_update_featstr:n{width=#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {OpticalSize}
- {
- \tl_set:Nn \l__fontspec_optical_size_tl {/ S = #1}
+ {
+ \tl_set:Nn \l__fontspec_optical_size_tl {/ S = #1}
+ }
+\keys_define:nn {fontspec}
+ {
+ FakeSlant .code:n =
+ {
+ \__fontspec_update_featstr:n {slant=#1}
+ },
+ FakeSlant .default:n = {0.2}
}
\keys_define:nn {fontspec}
- {
- FakeSlant .code:n =
- {
- \__fontspec_update_featstr:n{slant=#1}
- },
- FakeSlant .default:n = {0.2}
-}
+ {
+ FakeStretch .code:n =
+ {
+ \__fontspec_update_featstr:n {extend=#1}
+ },
+ FakeStretch .default:n = {1.2}
+ }
\keys_define:nn {fontspec}
- {
- FakeStretch .code:n =
- {
- \__fontspec_update_featstr:n{extend=#1}
- },
- FakeStretch .default:n = {1.2}
-}
+ {
+ FakeBold .code:n = { \__fontspec_warning:n {fakebold-only-xetex} }
+ }
\keys_define:nn {fontspec}
- {
- FakeBold .code:n = { \__fontspec_warning:n {fakebold-only-xetex} }
- }
-\keys_define:nn {fontspec}
- {
- AutoFakeSlant .code:n =
- {
- \bool_if:NT \l__fontspec_firsttime_bool
- {
- \tl_set:Nn \l__fontspec_fake_slant_tl {#1}
- \clist_put_right:Nn \l__fontspec_fontfeat_it_clist {FakeSlant=#1}
- \tl_set_eq:NN \l__fontspec_fontname_it_tl \l_fontspec_fontname_tl
- \bool_set_false:N \l__fontspec_noit_bool
+ {
+ AutoFakeSlant .code:n =
+ {
+ \bool_if:NT \l__fontspec_firsttime_bool
+ {
+ \tl_set:Nn \l__fontspec_fake_slant_tl {#1}
+ \clist_put_right:Nn \l__fontspec_fontfeat_it_clist {FakeSlant=#1}
+ \tl_set_eq:NN \l__fontspec_fontname_it_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l__fontspec_noit_bool
- \tl_if_empty:NF \l__fontspec_fake_embolden_tl
- {
- \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
- {FakeBold=\l__fontspec_fake_embolden_tl}
- \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeSlant=#1}
- \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
- }
- }
- },
- AutoFakeSlant .default:n = {0.2}
-}
+ \tl_if_empty:NF \l__fontspec_fake_embolden_tl
+ {
+ \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
+ {FakeBold=\l__fontspec_fake_embolden_tl}
+ \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeSlant=#1}
+ \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
+ }
+ }
+ },
+ AutoFakeSlant .default:n = {0.2}
+ }
\keys_define:nn {fontspec}
- {
- AutoFakeBold .code:n =
- {
- \bool_if:NT \l__fontspec_firsttime_bool
- {
- \tl_set:Nn \l__fontspec_fake_embolden_tl {#1}
- \clist_put_right:Nn \l__fontspec_fontfeat_bf_clist {FakeBold=#1}
- \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l_fontspec_fontname_tl
- \bool_set_false:N \l__fontspec_nobf_bool
+ {
+ AutoFakeBold .code:n =
+ {
+ \bool_if:NT \l__fontspec_firsttime_bool
+ {
+ \tl_set:Nn \l__fontspec_fake_embolden_tl {#1}
+ \clist_put_right:Nn \l__fontspec_fontfeat_bf_clist {FakeBold=#1}
+ \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l__fontspec_nobf_bool
- \tl_if_empty:NF \l__fontspec_fake_slant_tl
- {
- \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
- {FakeSlant=\l__fontspec_fake_slant_tl}
- \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeBold=#1}
- \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
- }
- }
- },
- AutoFakeBold .default:n = {1.5}
-}
+ \tl_if_empty:NF \l__fontspec_fake_slant_tl
+ {
+ \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
+ {FakeSlant=\l__fontspec_fake_slant_tl}
+ \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeBold=#1}
+ \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
+ }
+ }
+ },
+ AutoFakeBold .default:n = {1.5}
+ }
\__fontspec_keys_define_code:nnn {fontspec-opentype} {RawFeature}
- {
- \__fontspec_update_featstr:n {#1}
- }
+ {
+ \__fontspec_update_featstr:n {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-aat} {RawFeature}
- {
- \__fontspec_update_featstr:n {#1}
- }
+ {
+ \__fontspec_update_featstr:n {#1}
+ }
-%%^^A%% fontspec-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
\__fontspec_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
\__fontspec_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
@@ -2669,152 +2683,156 @@
\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {ProportionalMetrics} {vpal} {vpal} {+valt,+vhal}
\__fontspec_define_opentype_feature_group:n {Alternate}
\keys_define:nn {fontspec-opentype}
- {
- Alternate .default:n = {0} ,
- Alternate / Random .code:n =
- { \__fontspec_make_OT_feature:nnn {salt}{ +salt = random }{} } ,
- Alternate / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
- { \__fontspec_make_OT_feature:nnn {salt}{ +salt = ##1 }{} }
- }
- }
+ {
+ Alternate .default:n = {0} ,
+ Alternate / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ { \__fontspec_make_OT_feature:nnn {salt}{ +salt = ##1 }{} }
+ }
+ }
+\keys_define:nn {fontspec-opentype}
+ {
+ Alternate / Random .code:n =
+ { \__fontspec_make_OT_feature:nnn {salt}{ +salt = random }{} } ,
+ }
\aliasfontfeature{Alternate}{StylisticAlternates}
\__fontspec_define_opentype_feature_group:n {Variant}
\keys_define:nn {fontspec-opentype}
- {
- Variant .default:n = {0} ,
- Variant / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
+ {
+ Variant .default:n = {0} ,
+ Variant / unknown .code:n =
{
- \__fontspec_make_OT_feature:xxx { ss \two at digits {##1} } { +ss \two at digits {##1} } {}
+ \clist_map_inline:nn {#1}
+ {
+ \__fontspec_make_OT_feature:xxx { ss \two at digits {##1} } { +ss \two at digits {##1} } {}
+ }
}
- }
- }
+ }
\aliasfontfeature{Variant}{StylisticSet}
\__fontspec_define_opentype_feature_group:n {CharacterVariant}
\use:x
- {
- \cs_new:Npn \exp_not:N \fontspec_parse_cv:w
- ##1 \c_colon_str ##2 \c_colon_str ##3 \exp_not:N \q_nil
- {
- \__fontspec_make_OT_feature:xxx
- { cv \exp_not:N \two at digits {##1} } { +cv \exp_not:N \two at digits {##1} = ##2 } {}
- }
- \keys_define:nn {fontspec-opentype}
- {
- CharacterVariant / unknown .code:n =
- {
- \clist_map_inline:nn {##1}
- {
- \exp_not:N \fontspec_parse_cv:w
- ####1 \c_colon_str 0 \c_colon_str \exp_not:N \q_nil
- }
- }
- }
- }
+ {
+ \cs_new:Npn \exp_not:N \fontspec_parse_cv:w
+ ##1 \c_colon_str ##2 \c_colon_str ##3 \exp_not:N \q_nil
+ {
+ \__fontspec_make_OT_feature:xxx
+ { cv \exp_not:N \two at digits {##1} }
+ { +cv \exp_not:N \two at digits {##1} = ##2 } {}
+ }
+ \keys_define:nn {fontspec-opentype}
+ {
+ CharacterVariant / unknown .code:n =
+ {
+ \clist_map_inline:nn {##1}
+ {
+ \exp_not:N \fontspec_parse_cv:w
+ ####1 \c_colon_str 0 \c_colon_str \exp_not:N \q_nil
+ }
+ }
+ }
+ }
\__fontspec_define_opentype_feature_group:n {Annotation}
\keys_define:nn {fontspec-opentype}
- {
- Annotation .default:n = {0} ,
- Annotation / unknown .code:n =
- {
- \__fontspec_make_OT_feature:nnn {nalt} {+nalt=#1} {}
- }
- }
+ {
+ Annotation .default:n = {0} ,
+ Annotation / unknown .code:n =
+ {
+ \__fontspec_make_OT_feature:nnn {nalt} {+nalt=#1} {}
+ }
+ }
\__fontspec_define_opentype_feature_group:n {Ornament}
\keys_define:nn {fontspec-opentype}
- {
- Ornament .default:n = {0} ,
- Ornament / unknown .code:n =
- {
- \__fontspec_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
- }
- }
+ {
+ Ornament .default:n = {0} ,
+ Ornament / unknown .code:n =
+ {
+ \__fontspec_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
+ }
+ }
\keys_define:nn { fontspec-opentype } { Script .choice: }
\cs_new:Nn \fontspec_new_script:nn
- {
- \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
- \bool_set_false:N \l__fontspec_script_exist_bool
- \clist_map_inline:nn {#2}
- {
- \__fontspec_check_script:NnTF \l_fontspec_font {####1}
- {
- \tl_set:Nn \l_fontspec_script_tl {####1}
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
- \bool_set_true:N \l__fontspec_script_exist_bool
- \tl_gset:Nx \g__fontspec_single_feat_tl { script=####1 }
- \clist_map_break:
- }
- { }
- }
- \bool_if:NF \l__fontspec_script_exist_bool
- {
- \str_if_eq:nnTF {#1} {Latin}
- {
- \__fontspec_warning:nx {script-not-exist} {#1}
- }
- {
- \__fontspec_check_script:NnTF \l_fontspec_font {latn}
- {
- \__fontspec_warning:nx {script-not-exist-latn} {#1}
- \tl_set:Nn \l_fontspec_script_tl {latn}
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
- }
- {
- \__fontspec_warning:nx {script-not-exist} {#1}
- }
- }
- }
- }
- }
+ {
+ \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
+ \bool_set_false:N \l__fontspec_script_exist_bool
+ \clist_map_inline:nn {#2}
+ {
+ \__fontspec_check_script:NnTF \l_fontspec_font {####1}
+ {
+ \tl_set:Nn \l_fontspec_script_tl {####1}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
+ \bool_set_true:N \l__fontspec_script_exist_bool
+ \tl_gset:Nx \g__fontspec_single_feat_tl { script=####1 }
+ \clist_map_break:
+ }
+ { }
+ }
+ \bool_if:NF \l__fontspec_script_exist_bool
+ {
+ \str_if_eq:nnTF {#1} {Latin}
+ {
+ \__fontspec_warning:nx {script-not-exist} {#1}
+ }
+ {
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
+ {
+ \__fontspec_warning:nx {script-not-exist-latn} {#1}
+ \tl_set:Nn \l_fontspec_script_tl {latn}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
+ }
+ {
+ \__fontspec_warning:nx {script-not-exist} {#1}
+ }
+ }
+ }
+ }
+ }
\keys_define:nn { fontspec-opentype } { Language .choice: }
\cs_new:Nn \fontspec_new_lang:nn
- {
- \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
- \__fontspec_check_lang:NnTF \l_fontspec_font {#2}
- {
- \tl_set:Nn \l_fontspec_lang_tl {#2}
- \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
- \tl_gset:Nx \g__fontspec_single_feat_tl { language=#2 }
- }
- {
- \__fontspec_warning:nx {language-not-exist} {#1}
- \keys_set:nn { fontspec-opentype } { Language = Default }
- }
+ {
+ \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
+ \__fontspec_check_lang:NnTF \l_fontspec_font {#2}
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {#2}
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_gset:Nx \g__fontspec_single_feat_tl { language=#2 }
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {#1}
+ \keys_set:nn { fontspec-opentype } { Language = Default }
+ }
+ }
}
- }
\__fontspec_keys_define_code:nnn {fontspec-opentype}{ Language / Default }
- {
- \tl_set:Nn \l_fontspec_lang_tl {DFLT}
- \int_zero:N \l__fontspec_language_int
- \tl_gset:Nn \g__fontspec_single_feat_tl { language=DFLT }
- }
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {DFLT}
+ \int_zero:N \l__fontspec_language_int
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=DFLT }
+ }
\keys_define:nn {fontspec-opentype}
- {
- Language / Turkish .code:n =
- {
- \__fontspec_check_lang:NnTF \l_fontspec_font {TRK}
- {
- \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TRK}
- \tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
- }
- {
- \__fontspec_check_lang:NnTF \l_fontspec_font {TUR}
- {
- \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TUR}
- \tl_gset:Nn \g__fontspec_single_feat_tl { language=TUR }
- }
- {
- \__fontspec_warning:nx {language-not-exist} {Turkish}
- \keys_set:nn {fontspec-opentype} {Language=Default}
- }
- }
- }
- }
+ {
+ Language / Turkish .code:n =
+ {
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TRK}
+ {
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TRK}
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
+ }
+ {
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TUR}
+ {
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TUR}
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=TUR }
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {Turkish}
+ \keys_set:nn {fontspec-opentype} {Language=Default}
+ }
+ }
+ }
+ }
\cs_new:Nn \__fontspec_ot_compat:nn
{
\aliasfontfeatureoption {#1} {#2Off} {No#2}
@@ -2837,7 +2855,7 @@
\__fontspec_ot_compat:nn {Diacritics} {AboveBase}
\__fontspec_ot_compat:nn {Diacritics} {BelowBase}
-%%^^A%% fontspec-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
\newfontscript{Adlam}{adlm}
\newfontscript{Ahom}{ahom}
@@ -2984,7 +3002,7 @@
\newfontscript{N'ko}{nko~}
\newfontscript{Oriya}{ory2,orya}
-%%^^A%% fontspec-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
\newfontlanguage{Abaza}{ABA}
\newfontlanguage{Abkhazian}{ABK}
@@ -3369,10 +3387,10 @@
\newfontlanguage{Zande}{ZND}
\newfontlanguage{Zulu}{ZUL}
-%%^^A%% fontspec-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%%^^A%% fontspec-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
\providecommand\UnicodeFontName[2]{"#1:#2"}
@@ -3462,7 +3480,7 @@
{ \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
}
-%%^^A%% fontspec-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
\@ifpackageloaded{euler}
{ \bool_gset_true:N \g__fontspec_pkg_euler_loaded_bool }
{ \bool_gset_false:N \g__fontspec_pkg_euler_loaded_bool }
@@ -3533,6 +3551,7 @@
\DeclareMathDelimiter{]}{\mathclose}{legacymaths}{93}{largesymbols}{3}
\DeclareMathDelimiter{/}{\mathord}{legacymaths}{47}{largesymbols}{14}
\DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{36}
+ \renewcommand{\hbar}{{\mathchar"AF\mkern-9mu h}}% TODO: test with other fonts
}
}
\DeclareSymbolFont{operators}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault
@@ -3595,23 +3614,23 @@
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
-%%^^A%% fontspec-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_if:NT \g__fontspec_cfg_bool
- {
- \InputIfFileExists{fontspec.cfg}
- {}
- {\typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.}}
- }
+ {
+ \InputIfFileExists{fontspec.cfg}
+ {}
+ { \typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.} }
+ }
-%%^^A%% fontspec-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
\providecommand*\itscdefault{\itdefault\scdefault}
\providecommand*\slscdefault{\sldefault\scdefault}
\DeclareRobustCommand{\sishape}
- {
- \not at math@alphabet\sishape\relax
- \fontshape{\itscdefault}\selectfont
- }
+ {
+ \not at math@alphabet\sishape\relax
+ \fontshape{\itscdefault}\selectfont
+ }
\DeclareTextFontCommand{\textsi}{\sishape}
\cs_new:Nn \__fontspec_shape_merge:nn { c__fontspec_shape_#1_#2_tl }
\tl_const:cn { \__fontspec_shape_merge:nn \itdefault \scdefault } {\itscdefault}
@@ -3642,25 +3661,25 @@
\prg_return_true: \prg_return_false:
}
\DeclareRobustCommand \itshape
- {
- \not at math@alphabet\itshape\mathit
- \fontspec_merge_shape:n\itdefault
- }
+ {
+ \not at math@alphabet\itshape\mathit
+ \fontspec_merge_shape:n\itdefault
+ }
\DeclareRobustCommand \slshape
- {
- \not at math@alphabet\slshape\relax
- \fontspec_merge_shape:n\sldefault
- }
+ {
+ \not at math@alphabet\slshape\relax
+ \fontspec_merge_shape:n\sldefault
+ }
\DeclareRobustCommand \scshape
- {
- \not at math@alphabet\scshape\relax
- \fontspec_merge_shape:n\scdefault
- }
+ {
+ \not at math@alphabet\scshape\relax
+ \fontspec_merge_shape:n\scdefault
+ }
\DeclareRobustCommand \upshape
- {
- \not at math@alphabet\upshape\relax
- \fontspec_merge_shape:n\updefault
- }
+ {
+ \not at math@alphabet\upshape\relax
+ \fontspec_merge_shape:n\updefault
+ }
\cs_new_protected:Npn \emfontdeclare #1
{
\prop_gclear:N \g__fontspec_em_prop
@@ -3763,33 +3782,33 @@
\strongfontdeclare{ \bfseries }
\emfontdeclare{ \emshape, \eminnershape }
-%%^^A%% fontspec-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
\DeclareRobustCommand{\-}
- {
- \discretionary
- {
- \char\ifnum\hyphenchar\font<\z@
- \xlx at defaulthyphenchar
- \else
- \hyphenchar\font
- \fi
- }{}{}
- }
+ {
+ \discretionary
+ {
+ \char\ifnum\hyphenchar\font<\z@
+ \xlx at defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}
+ }
\def\xlx at defaulthyphenchar{`\-}
\cs_new:Nn \fontspec_visible_space:
- {
- \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
- { \char"2423\scan_stop: }
- { \fontspec_visible_space_fallback: }
- }
+ {
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
+ { \char"2423\scan_stop: }
+ { \fontspec_visible_space_fallback: }
+ }
\cs_new:Nn \fontspec_visible_space_fallback:
- {
{
- \usefont{\g_fontspec_encoding_tl}{lmtt}{\f at series}{\f at shape}
- \textvisiblespace
+ {
+ \usefont{\g_fontspec_encoding_tl}{lmtt}{\f at series}{\f at shape}
+ \textvisiblespace
+ }
}
- }
\group_begin:
\char_set_catcode_active:n{"20}%
\cs_gset:Npn\fontspec_print_visible_spaces:{%
@@ -3798,71 +3817,72 @@
}%
\group_end:
\def\verb
- {
- \relax\ifmmode\hbox\else\leavevmode\null\fi
- \bgroup
- \verb at eol@error \let\do\@makeother \dospecials
- \verbatim at font\@noligs
- \@ifstar\__fontspecsverb\@verb
- }
+ {
+ \relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \verb at eol@error \let\do\@makeother \dospecials
+ \verbatim at font\@noligs
+ \@ifstar\__fontspecsverb\@verb
+ }
\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
\AtBeginDocument
- {
- \fontspec_patch_verbatim:
- \fontspec_patch_moreverb:
- \fontspec_patch_fancyvrb:
- \fontspec_patch_listings:
- }
+ {
+ \fontspec_patch_verbatim:
+ \fontspec_patch_moreverb:
+ \fontspec_patch_fancyvrb:
+ \fontspec_patch_listings:
+ }
\cs_set:Npn \fontspec_patch_verbatim:
- {
- \@ifpackageloaded{verbatim}
- {
- \cs_set:cpn {verbatim*}
- {
- \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim at start
- }
- }
- {
- \cs_set:cpn {verbatim*}
- {
- \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
- }
- }
+ {
+ \@ifpackageloaded{verbatim}
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim at start
+ }
+ }
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
+ }
+ }
}
\cs_set:Npn \fontspec_patch_moreverb:
- {
- \@ifpackageloaded{moreverb}{
- \cs_set:cpn {listingcont*}
- {
- \cs_set:Npn \verbatim at processline
- {
- \thelisting at line \global\advance\listing at line\c_one
- \the\verbatim at line\par
- }
- \@verbatim \fontspec_print_visible_spaces: \verbatim at start
- }
- }{}
- }
+ {
+ \@ifpackageloaded{moreverb}
+ {
+ \cs_set:cpn {listingcont*}
+ {
+ \cs_set:Npn \verbatim at processline
+ {
+ \thelisting at line \global\advance\listing at line1\relax
+ \the\verbatim at line\par
+ }
+ \@verbatim \fontspec_print_visible_spaces: \verbatim at start
+ }
+ }{}
+ }
\cs_set:Npn \fontspec_patch_fancyvrb:
- {
- \@ifpackageloaded{fancyvrb}
- {
- \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
- }{}
- }
+ {
+ \@ifpackageloaded{fancyvrb}
+ {
+ \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
+ }{}
+ }
\cs_set:Npn \fontspec_patch_listings:
- {
- \@ifpackageloaded{listings}
- {
- \cs_set_eq:NN \lst at visiblespace \fontspec_visible_space:
- }{}
- }
+ {
+ \@ifpackageloaded{listings}
+ {
+ \cs_set_eq:NN \lst at visiblespace \fontspec_visible_space:
+ }{}
+ }
\RenewDocumentCommand \oldstylenums {m}
- {
- { \addfontfeature{Numbers=OldStyle} #1 }
- }
+ {
+ { \addfontfeature{Numbers=OldStyle} #1 }
+ }
\NewDocumentCommand \liningnums {m}
- {
- { \addfontfeature{Numbers=Lining} #1 }
- }
+ {
+ { \addfontfeature{Numbers=Lining} #1 }
+ }
Modified: trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty 2019-01-09 22:44:11 UTC (rev 49650)
@@ -6,26 +6,26 @@
%%
%% fontspec.dtx (with options: `fontspec,XE')
%% fontspec-code-load.dtx (with options: `fontspec,XE')
-%% fontspec-vars.dtx (with options: `fontspec,XE')
-%% fontspec-msg.dtx (with options: `fontspec,XE')
-%% fontspec-opening.dtx (with options: `fontspec,XE')
-%% fontspec-fontload.dtx (with options: `fontspec,XE')
-%% fontspec-interfaces.dtx (with options: `fontspec,XE')
-%% fontspec-user.dtx (with options: `fontspec,XE')
-%% fontspec-api.dtx (with options: `fontspec,XE')
-%% fontspec-internal.dtx (with options: `fontspec,XE')
-%% fontspec-opentype.dtx (with options: `fontspec,XE')
-%% fontspec-graphite.dtx (with options: `fontspec,XE')
-%% fontspec-keyval.dtx (with options: `fontspec,XE')
-%% fontspec-feat-opentype.dtx (with options: `fontspec,XE')
-%% fontspec-scripts.dtx (with options: `fontspec,XE')
-%% fontspec-lang.dtx (with options: `fontspec,XE')
-%% fontspec-feat-aat.dtx (with options: `fontspec,XE')
-%% fontspec-enc.dtx (with options: `fontspec,XE')
-%% fontspec-math.dtx (with options: `fontspec,XE')
-%% fontspec-closing.dtx (with options: `fontspec,XE')
-%% fontspec-xfss.dtx (with options: `fontspec,XE')
-%% fontspec-patches.dtx (with options: `fontspec,XE')
+%% fontspec-code-vars.dtx (with options: `fontspec,XE')
+%% fontspec-code-msg.dtx (with options: `fontspec,XE')
+%% fontspec-code-opening.dtx (with options: `fontspec,XE')
+%% fontspec-code-fontload.dtx (with options: `fontspec,XE')
+%% fontspec-code-interfaces.dtx (with options: `fontspec,XE')
+%% fontspec-code-user.dtx (with options: `fontspec,XE')
+%% fontspec-code-api.dtx (with options: `fontspec,XE')
+%% fontspec-code-internal.dtx (with options: `fontspec,XE')
+%% fontspec-code-opentype.dtx (with options: `fontspec,XE')
+%% fontspec-code-graphite.dtx (with options: `fontspec,XE')
+%% fontspec-code-keyval.dtx (with options: `fontspec,XE')
+%% fontspec-code-feat-opentype.dtx (with options: `fontspec,XE')
+%% fontspec-code-scripts.dtx (with options: `fontspec,XE')
+%% fontspec-code-lang.dtx (with options: `fontspec,XE')
+%% fontspec-code-feat-aat.dtx (with options: `fontspec,XE')
+%% fontspec-code-enc.dtx (with options: `fontspec,XE')
+%% fontspec-code-math.dtx (with options: `fontspec,XE')
+%% fontspec-code-closing.dtx (with options: `fontspec,XE')
+%% fontspec-code-xfss.dtx (with options: `fontspec,XE')
+%% fontspec-code-patches.dtx (with options: `fontspec,XE')
%% ------------------------------------------------
%% The FONTSPEC package <wspr.io/fontspec>
%% ------------------------------------------------
@@ -41,10 +41,10 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2018/07/30}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
+ {2019/01/10}{2.6j}{Font selection for XeLaTeX and LuaLaTeX}
%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
-%%^^A%% fontspec-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-vars.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_new:N \l__fontspec_firsttime_bool
\bool_new:N \l__fontspec_nobf_bool
\bool_new:N \l__fontspec_noit_bool
@@ -67,12 +67,12 @@
\bool_new:N \l__fontspec_disable_defaults_bool
\bool_new:N \l__fontspec_alias_bool
\bool_new:N \l__fontspec_external_bool
-\bool_new:N \l__fontspec_never_check_bool
\bool_new:N \l__fontspec_defining_encoding_bool
\bool_new:N \l__fontspec_script_exist_bool
\bool_new:N \g__fontspec_em_normalise_slant_bool
\bool_new:N \l__fontspec_proceed_bool
\bool_new:N \l__fontspec_check_feat_bool
+\bool_new:N \l__fontspec_never_check_bool
\int_new:N \l__fontspec_script_int
\int_new:N \l__fontspec_language_int
\int_new:N \l__fontspec_strnum_int
@@ -158,6 +158,10 @@
\tl_new:N \l__fontspec_emshape_query_tl
\tl_new:N \l__fontspec_em_switch_tl
\tl_new:N \l__fontspec_em_tmp_tl
+\tl_new:N \l__fontspec_strong_tmp_tl
+\tl_new:N \l__fontspec_strong_switch_tl
+\tl_new:N \l__fontspec_hyphenchar_tl
+\tl_new:N \l__fontspec_smcp_shape_tl
\tl_new:N \g__fontspec_mathrm_tl
\tl_new:N \g__fontspec_bfmathrm_tl
\tl_new:N \g__fontspec_mathsf_tl
@@ -192,7 +196,7 @@
\tl_new:N \l__fontspec_sffamily_family_tl
\tl_new:N \l__fontspec_ttfamily_family_tl
-%%^^A%% fontspec-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-msg.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Npn \__fontspec_error:n { \msg_error:nn {fontspec} }
\cs_new:Npn \__fontspec_error:nn { \msg_error:nnn {fontspec} }
\cs_new:Npn \__fontspec_error:nx { \msg_error:nnx {fontspec} }
@@ -300,6 +304,10 @@
{
Option '#2' of font feature '#1' overwritten.
}
+\__fontspec_msg_new:nnn {fontspec} {ot-tag-too-long}
+ {
+ OpenType tag '#1' is too long; script, language, and feature tags must be four characters or fewer.
+ }
\__fontspec_msg_new:nnn {fontspec} {script-not-exist-latn}
{
Font '\l_fontspec_fontname_tl' does not contain script '#1'.\\
@@ -420,7 +428,7 @@
}
\char_set_catcode_ignore:n {32}
-%%^^A%% fontspec-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-opening.dtx -- part of FONTSPEC <wspr.io/fontspec>
\DeclareOption{cm-default}
{
\__fontspec_warning:n {cm-default-obsolete}
@@ -473,10 +481,10 @@
\tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
\tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
\AtBeginDocument
- {
- \tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
- \tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
- }
+ {
+ \tl_set_eq:NN \cyrillicencoding \g_fontspec_encoding_tl
+ \tl_set_eq:NN \latinencoding \g_fontspec_encoding_tl
+ }
\bool_if:NT \g__fontspec_euenc_bool
{
\RequirePackage{xunicode}
@@ -508,7 +516,7 @@
\cs_generate_variant:Nn \tl_if_eq:nnT {ox}
\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
-%%^^A%% fontspec-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-fontload.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
{
@@ -520,7 +528,7 @@
}
\cs_set:Npn \__fontspec_font_suppress_not_found_error:
{
- \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
+ \int_set:Nn \suppressfontnotfounderror {1}
}
\prg_set_conditional:Nnn \__fontspec_primitive_font_if_null:N {p,TF,T,F}
{
@@ -541,7 +549,7 @@
}
\prg_new_conditional:Nnn \__fontspec_primitive_font_glyph_if_exist:Nn {p,TF,T,F}
{
- \etex_iffontchar:D #1 #2 \scan_stop:
+ \tex_iffontchar:D #1 #2 \scan_stop:
\prg_return_true:
\else:
\prg_return_false:
@@ -552,7 +560,7 @@
\tex_hyphenchar:D #1 = #2 \scan_stop:
}
-%%^^A%% fontspec-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-interfaces.dtx -- part of FONTSPEC <wspr.io/fontspec>
\NewDocumentCommand \fontspec { O{} m O{} }
{
@@ -666,7 +674,7 @@
\__fontspec_main_IfFontFeatureActiveTF:nnn {#1} {#2} {#3}
}
-%%^^A%% fontspec-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-user.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Nn \__fontspec_main_fontspec:nn
{
@@ -687,7 +695,7 @@
\exp_not:N \selectfont
}
}
- \str_if_eq_x:nnT {\familydefault} {\rmdefault}
+ \str_if_eq:eeT {\familydefault} {\rmdefault}
{ \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
\__fontspec_setmainfont_hook:nn {#1} {#2}
\normalfont
@@ -705,7 +713,7 @@
\exp_not:N \selectfont
}
}
- \str_if_eq_x:nnT {\familydefault} {\sfdefault}
+ \str_if_eq:eeT {\familydefault} {\sfdefault}
{ \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
\__fontspec_setsansfont_hook:nn {#1} {#2}
\normalfont
@@ -723,7 +731,7 @@
\exp_not:N \selectfont
}
}
- \str_if_eq_x:nnT {\familydefault} {\ttdefault}
+ \str_if_eq:eeT {\familydefault} {\ttdefault}
{ \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
\__fontspec_setmonofont_hook:nn {#1} {#2}
\normalfont
@@ -937,7 +945,7 @@
}
}
-%%^^A%% fontspec-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-api.dtx -- part of FONTSPEC <wspr.io/fontspec>
\prg_new_conditional:Nnn \fontspec_if_fontspec_font: {TF,T,F}
{
@@ -999,99 +1007,96 @@
}
}
\prg_new_conditional:Nnn \fontspec_if_feature:nnn {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
- \__fontspec_iv_str_to_num:Nn \l__fontspec_language_int {#2}
- \__fontspec_check_ot_feat:NnTF \font {#3} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \__fontspec_check_ot_feat:NnnnTF \font {#3} {#2} {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_script:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \__fontspec_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \__fontspec_check_script:NnTF \font {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_language:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-num} \l__fontspec_tmp_tl
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
- \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-tag} \l_fontspec_script_tl
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-num} \l__fontspec_tmp_tl
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmp_tl}
+ \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-tag} \l_fontspec_script_tl
- \__fontspec_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ \__fontspec_check_lang:NnTF \font {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_language:nn {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \tl_set:Nn \l_fontspec_script_tl {#1}
- \__fontspec_iv_str_to_num:Nn \l__fontspec_script_int {#1}
- \__fontspec_check_lang:NnTF \font {#2} \prg_return_true: \prg_return_false:
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \__fontspec_check_lang:NnnTF \font {#2} {#1} \prg_return_true: \prg_return_false:
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_current_script:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-tag} \l__fontspec_tmp_tl
- \str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
- {\prg_return_true:} {\prg_return_false:}
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {script-tag} \l__fontspec_tmp_tl
+ \str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
+ {\prg_return_true:} {\prg_return_false:}
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\prg_new_conditional:Nnn \fontspec_if_current_language:n {TF,T,F}
- {
- \fontspec_if_fontspec_font:TF
- {
- \__fontspec_set_font_type:N \font
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {lang-tag} \l__fontspec_tmp_tl
- \str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
- {\prg_return_true:} {\prg_return_false:}
- }
- { \prg_return_false: }
- }
- { \prg_return_false: }
- }
+ {
+ \fontspec_if_fontspec_font:TF
+ {
+ \__fontspec_set_font_type:N \font
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \prop_get:cnN {g__fontspec_fontinfo_ \f at family _prop} {lang-tag} \l__fontspec_tmp_tl
+ \str_if_eq:nVTF {#1} \l__fontspec_tmp_tl
+ {\prg_return_true:} {\prg_return_false:}
+ }
+ { \prg_return_false: }
+ }
+ { \prg_return_false: }
+ }
\cs_new:Nn \fontspec_set_family:Nnn
{
\tl_set:Nn \l__fontspec_family_label_tl {#1}
\__fontspec_select_font_family:nn {#2} {#3}
+ \tl_clear_new:N #1
\tl_set_eq:NN #1 \l_fontspec_family_tl
}
\cs_generate_variant:Nn \fontspec_set_family:Nnn {c}
@@ -1140,80 +1145,80 @@
{ \prg_return_false: }
}
-%%^^A%% fontspec-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-internal.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new_protected:Nn \__fontspec_select_font_family:nn
- {
- \group_begin:
- \__fontspec_font_suppress_not_found_error:
- \__fontspec_init:
+ {
+ \group_begin:
+ \__fontspec_font_suppress_not_found_error:
+ \__fontspec_init:
- \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
- \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl {#2}
- \__fontspec_sanitise_fontname:Nn \l__fontspec_basename_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_up_tl {#2}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_basename_tl {#2}
- \__fontspec_if_detect_external:nT {#2}
- { \keys_set:nn {fontspec-preparse-external} {Path} }
+ \__fontspec_if_detect_external:nT {#2}
+ { \keys_set:nn {fontspec-preparse-external} {Path} }
- \keys_set_known:nn {fontspec-preparse-cfg} {#1}
+ \keys_set_known:nn {fontspec-preparse-cfg} {#1}
- \__fontspec_init_ttc:n {#2}
- \__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
+ \__fontspec_init_ttc:n {#2}
+ \__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
- \__fontspec_extract_all_features:n {#1}
- \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
+ \__fontspec_extract_all_features:n {#1}
+ \tl_set:Nx \l__fontspec_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l__fontspec_all_features_clist }
- \__fontspec_preparse_features:
- \__fontspec_load_font:
- \__fontspec_set_scriptlang:
- \__fontspec_get_features:n {}
- \bool_set_false:N \l__fontspec_firsttime_bool
+ \__fontspec_preparse_features:
+ \__fontspec_load_font:
+ \__fontspec_set_scriptlang:
+ \__fontspec_get_features:n {}
+ \bool_set_false:N \l__fontspec_firsttime_bool
- \__fontspec_save_family_needed:nTF {#2}
- {
- \__fontspec_save_family:nn {#1} {#2}
- }
- {
- }
- \group_end:
+ \__fontspec_save_family_needed:nTF {#2}
+ {
+ \__fontspec_save_family:nn {#1} {#2}
+ }
+ {
+ }
+ \group_end:
- \tl_set_eq:NN \l_fontspec_family_tl \g__fontspec_nfss_family_tl
- }
+ \tl_set_eq:NN \l_fontspec_family_tl \g__fontspec_nfss_family_tl
+ }
\cs_set_eq:NN \fontspec_select:nn \__fontspec_select_font_family:nn %% deprecated, for compatibility only
\cs_new:Nn \__fontspec_sanitise_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
- \clist_map_inline:Nn \l__fontspec_extensions_clist
- {
- \tl_if_in:NnT #1 {##1}
- {
- \tl_remove_once:Nn #1 {##1}
- \tl_set:Nn \l__fontspec_extension_tl {##1}
- \clist_map_break:
- }
- }
- }
+ {
+ \tl_set:Nx #1 {#2}
+ \clist_map_inline:Nn \l__fontspec_extensions_clist
+ {
+ \tl_if_in:NnT #1 {##1}
+ {
+ \tl_remove_once:Nn #1 {##1}
+ \tl_set:Nn \l__fontspec_extension_tl {##1}
+ \clist_map_break:
+ }
+ }
+ }
\prg_new_conditional:Nnn \__fontspec_if_detect_external:n {T}
- {
- \clist_map_inline:Nn \l__fontspec_extensions_clist
- {
- \bool_set_false:N \l__fontspec_tmpa_bool
- \exp_args:Nx % <- this should be handled earlier
- \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
- { \bool_set_true:N \l__fontspec_tmpa_bool \clist_map_break: }
- }
- \bool_if:NTF \l__fontspec_tmpa_bool \prg_return_true: \prg_return_false:
- }
+ {
+ \clist_map_inline:Nn \l__fontspec_extensions_clist
+ {
+ \bool_set_false:N \l__fontspec_tmpa_bool
+ \exp_args:Nx % <- this should be handled earlier
+ \tl_if_in:nnT {#1 <= end_of_string} {##1 <= end_of_string}
+ { \bool_set_true:N \l__fontspec_tmpa_bool \clist_map_break: }
+ }
+ \bool_if:NTF \l__fontspec_tmpa_bool \prg_return_true: \prg_return_false:
+ }
\cs_new:Nn \__fontspec_init_ttc:n
- {
- \str_if_eq_x:nnT { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
- {
- \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_it_tl {#1}
- \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bf_tl {#1}
- \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
- }
- }
+ {
+ \str_if_eq:eeT { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
+ {
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_it_tl {#1}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bf_tl {#1}
+ \__fontspec_sanitise_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
+ }
+ }
\cs_new:Nn \__fontspec_load_external_fontoptions:Nn
{
\bool_if:NT \l__fontspec_fontcfg_bool
@@ -1229,67 +1234,67 @@
}
}
\cs_new:Nn \__fontspec_extract_all_features:n
- {
- \bool_if:NTF \l__fontspec_disable_defaults_bool
- {
- \clist_set:Nx \l__fontspec_all_features_clist {#1}
- }
- {
- \prop_get:NVNF \g__fontspec_fontopts_prop \l_fontspec_fontname_tl \l__fontspec_fontopts_clist
- { \clist_clear:N \l__fontspec_fontopts_clist }
+ {
+ \bool_if:NTF \l__fontspec_disable_defaults_bool
+ {
+ \clist_set:Nx \l__fontspec_all_features_clist {#1}
+ }
+ {
+ \prop_get:NVNF \g__fontspec_fontopts_prop \l_fontspec_fontname_tl \l__fontspec_fontopts_clist
+ { \clist_clear:N \l__fontspec_fontopts_clist }
- \prop_get:NVNF \g__fontspec_fontopts_prop \l__fontspec_family_label_tl \l__fontspec_family_fontopts_clist
- { \clist_clear:N \l__fontspec_family_fontopts_clist }
- \tl_clear:N \l__fontspec_family_label_tl
+ \prop_get:NVNF \g__fontspec_fontopts_prop \l__fontspec_family_label_tl \l__fontspec_family_fontopts_clist
+ { \clist_clear:N \l__fontspec_family_fontopts_clist }
+ \tl_clear:N \l__fontspec_family_label_tl
- \clist_set:Nx \l__fontspec_all_features_clist
- {
- \g__fontspec_default_fontopts_clist,
- \l__fontspec_family_fontopts_clist,
- \l__fontspec_fontopts_clist,
- #1
- }
- }
- }
+ \clist_set:Nx \l__fontspec_all_features_clist
+ {
+ \g__fontspec_default_fontopts_clist,
+ \l__fontspec_family_fontopts_clist,
+ \l__fontspec_fontopts_clist,
+ #1
+ }
+ }
+ }
\cs_new:Nn \__fontspec_preparse_features:
- {
+ {
- \__fontspec_keys_set_known:nxN {fontspec-preparse-external}
- { \l__fontspec_all_features_clist }
- \l__fontspec_keys_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec-preparse-external}
+ { \l__fontspec_all_features_clist }
+ \l__fontspec_keys_leftover_clist
- \tl_set_eq:NN \l_fontspec_fontname_tl \l__fontspec_fontname_up_tl
- \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_keys_leftover_clist}
- \l__fontspec_keys_leftover_clist
- \__fontspec_keys_set_known:nxN {fontspec-preparse} {\l__fontspec_keys_leftover_clist}
- \l__fontspec_fontfeat_clist
- }
+ \tl_set_eq:NN \l_fontspec_fontname_tl \l__fontspec_fontname_up_tl
+ \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_keys_leftover_clist}
+ \l__fontspec_keys_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec-preparse} {\l__fontspec_keys_leftover_clist}
+ \l__fontspec_fontfeat_clist
+ }
\cs_new:Nn \__fontspec_load_font:
- {
- \__fontspec_primitive_font_set:Nnn \l_fontspec_font
- { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f at size pt}
- \__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
- \__fontspec_set_font_type:N \l_fontspec_font
- \__fontspec_primitive_font_gset:Nnn \l_fontspec_font
- { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f at size pt}
- \l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
- }
+ {
+ \__fontspec_primitive_font_set:Nnn \l_fontspec_font
+ { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f at size pt}
+ \__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {\l__fontspec_fontname_up_tl} }
+ \__fontspec_set_font_type:N \l_fontspec_font
+ \__fontspec_primitive_font_gset:Nnn \l_fontspec_font
+ { \__fontspec_construct_font_call:nn { \l__fontspec_fontname_up_tl } {} } {\f at size pt}
+ \l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
+ }
\cs_new:Nn \__fontspec_construct_font_call:nnnnnn
- {
+ {
" \__fontspec_fontname_wrap:n { #1 #2 #3 }
#4 #5
- \str_if_eq_x:nnF {#6}{} {:#6} "
- }
+ \str_if_eq:eeF {#6}{} {:#6} "
+ }
\cs_new:Nn \__fontspec_construct_font_call:nn
- {
- \__fontspec_construct_font_call:nnnnnn
- {#1}
- \l__fontspec_extension_tl
- \l__fontspec_ttc_index_tl
- \l_fontspec_renderer_tl
- \l__fontspec_optical_size_tl
- {#2}
- }
+ {
+ \__fontspec_construct_font_call:nnnnnn
+ {#1}
+ \l__fontspec_extension_tl
+ \l__fontspec_ttc_index_tl
+ \l_fontspec_renderer_tl
+ \l__fontspec_optical_size_tl
+ {#2}
+ }
\cs_new:Nn \__fontspec_font_is_name:
{
\cs_set_eq:NN \__fontspec_fontname_wrap:n \use:n
@@ -1299,59 +1304,58 @@
\cs_set:Npn \__fontspec_fontname_wrap:n ##1 { [ \l__fontspec_font_path_tl ##1 ] }
}
\cs_new:Nn \__fontspec_set_scriptlang:
- {
- \bool_if:NT \l__fontspec_firsttime_bool
- {
- \tl_if_empty:NTF \l__fontspec_script_name_tl
- {
- \__fontspec_check_script:NnTF \l_fontspec_font {latn}
- {
- \tl_set:Nn \l__fontspec_script_name_tl {Latin}
- \tl_if_empty:NT \l__fontspec_lang_name_tl
- {
- \tl_set:Nn \l__fontspec_lang_name_tl {Default}
- }
- \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
- \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
- }
- {
- \__fontspec_info:n {no-scripts}
- }
- }
- {
- \tl_if_empty:NT \l__fontspec_lang_name_tl
- {
- \tl_set:Nn \l__fontspec_lang_name_tl {Default}
- }
- \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
- \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
- }
- }
- }
+ {
+ \bool_if:NT \l__fontspec_firsttime_bool
+ {
+ \tl_if_empty:NTF \l__fontspec_script_name_tl
+ {
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
+ {
+ \tl_set:Nn \l__fontspec_script_name_tl {Latin}
+ \tl_if_empty:NT \l__fontspec_lang_name_tl
+ {
+ \tl_set:Nn \l__fontspec_lang_name_tl {Default}
+ }
+ \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
+ }
+ {
+ \__fontspec_info:n {no-scripts}
+ \bool_set_true:N \l__fontspec_never_check_bool
+ }
+ }
+ {
+ \tl_if_empty:NT \l__fontspec_lang_name_tl
+ {
+ \tl_set:Nn \l__fontspec_lang_name_tl {Default}
+ }
+ \keys_set:nx {fontspec-opentype} {Script=\l__fontspec_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l__fontspec_lang_name_tl}
+ }
+ }
+ }
\cs_new:Nn \__fontspec_get_features:n
- {
- \__fontspec_init_fontface:
- \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_fontfeat_clist,#1}
- \l__fontspec_keys_leftover_clist
- \__fontspec_keys_set_known:nxN {fontspec} {\l__fontspec_keys_leftover_clist} \l__fontspec_keys_leftover_clist
- \bool_if:NTF \l__fontspec_ot_bool
- {
- % \tracingall
- \keys_set:nV {fontspec-opentype} \l__fontspec_keys_leftover_clist
- % \EROROR
- }
- {
- \bool_if:nT { \l__fontspec_atsui_bool || \l__fontspec_graphite_bool }
- { \keys_set:nV {fontspec-aat} \l__fontspec_keys_leftover_clist }
- }
+ {
+ \__fontspec_init_fontface:
+ \__fontspec_keys_set_known:nxN {fontspec-renderer} {\l__fontspec_fontfeat_clist,#1}
+ \l__fontspec_keys_leftover_clist
+ \__fontspec_keys_set_known:nxN {fontspec} {\l__fontspec_keys_leftover_clist} \l__fontspec_keys_leftover_clist
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \keys_set:nV {fontspec-opentype} \l__fontspec_keys_leftover_clist
+ }
+ {
+ \bool_if:nT { \l__fontspec_atsui_bool || \l__fontspec_graphite_bool }
+ { \keys_set:nV {fontspec-aat} \l__fontspec_keys_leftover_clist }
+ }
- \tl_if_empty:NF \l__fontspec_mapping_tl
- { \__fontspec_update_featstr:n { mapping = \l__fontspec_mapping_tl } }
+ \tl_if_empty:NF \l__fontspec_mapping_tl
+ { \__fontspec_update_featstr:n { mapping = \l__fontspec_mapping_tl } }
- \str_if_eq_x:nnF { \l__fontspec_hexcol_tl \l__fontspec_opacity_tl }
- { \c__fontspec_hexcol_tl \c__fontspec_opacity_tl }
- { \__fontspec_update_featstr:n { color = \l__fontspec_hexcol_tl\l__fontspec_opacity_tl } }
- }
+ \str_if_eq:eeF { \l__fontspec_hexcol_tl \l__fontspec_opacity_tl }
+ { \c__fontspec_hexcol_tl \c__fontspec_opacity_tl }
+ { \__fontspec_update_featstr:n { color = \l__fontspec_hexcol_tl\l__fontspec_opacity_tl } }
+ }
\prg_new_conditional:Nnn \__fontspec_save_family_needed:n { TF }
{
@@ -1398,141 +1402,139 @@
\__fontspec_info:nxx {defining-font} {#1} {#2}
}
\cs_new:Nn \__fontspec_save_fontinfo:n
- {
- \prop_new:c {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop}
- \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {fontname} { #1 }
- \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {options} { \l__fontspec_all_features_clist }
- \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {fontdef}
- {
- \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
- { \l__fontspec_pre_feat_sclist \g__fontspec_rawfeatures_sclist }
- }
- \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {script-num} \l__fontspec_script_int
- \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {lang-num} \l__fontspec_language_int
- \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {script-tag} \l_fontspec_script_tl
- \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
- }
+ {
+ \prop_new:c {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop}
+ \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {fontname} { #1 }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {options} { \l__fontspec_all_features_clist }
+ \prop_gput:cnx {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {fontdef}
+ {
+ \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl}
+ { \l__fontspec_pre_feat_sclist \g__fontspec_rawfeatures_sclist }
+ }
+ \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {script-num} \l__fontspec_script_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {lang-num} \l__fontspec_language_int
+ \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {script-tag} \l_fontspec_script_tl
+ \prop_gput:cnV {g__fontspec_fontinfo_ \g__fontspec_nfss_family_tl _prop} {lang-tag} \l_fontspec_lang_tl
+ }
\cs_new:Nn \__fontspec_find_autofonts:
- {
- \bool_if:nF {\l__fontspec_noit_bool || \l__fontspec_nobf_bool}
- {
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_it_tl} {/B}
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_bf_tl} {/I}
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
- }
+ {
+ \bool_if:nF {\l__fontspec_noit_bool || \l__fontspec_nobf_bool}
+ {
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_it_tl} {/B}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l__fontspec_fontname_bf_tl} {/I}
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfit_tl {\l_fontspec_fontname_tl} {/BI}
+ }
- \bool_if:NF \l__fontspec_nobf_bool
- {
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
- }
+ \bool_if:NF \l__fontspec_nobf_bool
+ {
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
+ }
- \bool_if:NF \l__fontspec_noit_bool
- {
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
- }
+ \bool_if:NF \l__fontspec_noit_bool
+ {
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
+ }
- \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfsl_tl {\l__fontspec_fontname_sl_tl} {/B}
- }
+ \__fontspec_set_autofont:Nnn \l__fontspec_fontname_bfsl_tl {\l__fontspec_fontname_sl_tl} {/B}
+ }
\cs_new:Nn \__fontspec_set_faces:
- {
- \__fontspec_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l__fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
- \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l__fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
- \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l__fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l__fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
- \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l__fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
+ {
+ \__fontspec_add_nfssfont:nnnn \mddefault \updefault \l_fontspec_fontname_tl \l__fontspec_fontfeat_up_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \updefault \l__fontspec_fontname_bf_tl \l__fontspec_fontfeat_bf_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \itdefault \l__fontspec_fontname_it_tl \l__fontspec_fontfeat_it_clist
+ \__fontspec_add_nfssfont:nnnn \mddefault \sldefault \l__fontspec_fontname_sl_tl \l__fontspec_fontfeat_sl_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \itdefault \l__fontspec_fontname_bfit_tl \l__fontspec_fontfeat_bfit_clist
+ \__fontspec_add_nfssfont:nnnn \bfdefault \sldefault \l__fontspec_fontname_bfsl_tl \l__fontspec_fontfeat_bfsl_clist
- \prop_map_inline:Nn \l__fontspec_nfssfont_prop { \__fontspec_set_faces_aux:nnnnn ##2 }
- }
+ \prop_map_inline:Nn \l__fontspec_nfssfont_prop { \__fontspec_set_faces_aux:nnnnn ##2 }
+ }
\cs_new:Nn \__fontspec_set_faces_aux:nnnnn
- {
- \fontspec_complete_fontname:Nn \l__fontspec_curr_fontname_tl {#3}
- \__fontspec_make_font_shapes:Nnnnn \l__fontspec_curr_fontname_tl {#1} {#2} {#4} {#5}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_curr_fontname_tl {#3}
+ \__fontspec_make_font_shapes:Nnnnn \l__fontspec_curr_fontname_tl {#1} {#2} {#4} {#5}
+ }
\cs_new:Nn \fontspec_complete_fontname:Nn
- {
- \tl_set:Nx #1 {#2}
- \tl_replace_all:Nnx #1 {*} {\l__fontspec_basename_tl}
- }
+ {
+ \tl_set:Nx #1 {#2}
+ \tl_replace_all:Nnx #1 {*} {\l__fontspec_basename_tl}
+ }
\cs_new:Nn \__fontspec_add_nfssfont:nnnn
- {
- \tl_set:Nx \l__fontspec_this_font_tl {#3}
+ {
+ \tl_set:Nx \l__fontspec_this_font_tl {#3}
- \tl_if_empty:xTF {#4}
- { \clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}} }
- { \__fontspec_keys_set_known:nxN {fontspec-preparse-nested} {#4} \l__fontspec_tmp_tl }
+ \tl_if_empty:xTF {#4}
+ { \clist_set:Nn \l__fontspec_sizefeat_clist {Size={-}} }
+ { \__fontspec_keys_set_known:nxN {fontspec-preparse-nested} {#4} \l__fontspec_tmp_tl }
- \tl_if_empty:NF \l__fontspec_this_font_tl
- {
- \prop_put:Nxx \l__fontspec_nfssfont_prop {#1/#2}
- { {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
- }
- }
+ \tl_if_empty:NF \l__fontspec_this_font_tl
+ {
+ \prop_put:Nxx \l__fontspec_nfssfont_prop {#1/#2}
+ { {#1}{#2}{\l__fontspec_this_font_tl}{#4}{\l__fontspec_sizefeat_clist} }
+ }
+ }
\cs_new:Nn \__fontspec_set_font_type:N
- {
- \bool_set_false:N \l__fontspec_tfm_bool
- \bool_set_false:N \l__fontspec_atsui_bool
- \bool_set_false:N \l__fontspec_ot_bool
- \bool_set_false:N \l__fontspec_mm_bool
- \bool_set_false:N \l__fontspec_graphite_bool
- \ifcase\XeTeXfonttype #1
- \bool_set_true:N \l__fontspec_tfm_bool
- \or
- \bool_set_true:N \l__fontspec_atsui_bool
- \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
- \ifnum\XeTeXcountvariations #1 > \c_zero
- \bool_set_true:N \l__fontspec_mm_bool
- \fi
- \or
- \bool_set_true:N \l__fontspec_ot_bool
- \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
- \or
- \bool_set_true:N \l__fontspec_graphite_bool
- \tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/GR} }
- \fi
- }
+ {
+\bool_set_false:N \l__fontspec_tfm_bool
+\bool_set_false:N \l__fontspec_atsui_bool
+\bool_set_false:N \l__fontspec_ot_bool
+\bool_set_false:N \l__fontspec_mm_bool
+\bool_set_false:N \l__fontspec_graphite_bool
+\ifcase\XeTeXfonttype #1
+\bool_set_true:N \l__fontspec_tfm_bool
+\or
+\bool_set_true:N \l__fontspec_atsui_bool
+\tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/AAT} }
+\ifnum\XeTeXcountvariations #1 > 0\relax
+\bool_set_true:N \l__fontspec_mm_bool
+\fi
+\or
+\bool_set_true:N \l__fontspec_ot_bool
+\tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/OT} }
+\or
+\bool_set_true:N \l__fontspec_graphite_bool
+\tl_if_empty:NT \l_fontspec_renderer_tl { \tl_set:Nn \l_fontspec_renderer_tl {/GR} }
+\fi
+ }
\cs_new:Nn \__fontspec_set_autofont:Nnn
- {
- \bool_if:NF \l__fontspec_external_bool
- {
- \tl_if_empty:xF {#2}
- {
- \tl_if_empty:NT #1
- {
- \__fontspec_if_autofont:nnTF {#2} {#3}
- { \tl_set:Nx #1 {#2#3} }
- { \__fontspec_info:nx {no-font-shape} {#2#3} }
- }
- }
- }
- }
-
+ {
+ \bool_if:NF \l__fontspec_external_bool
+ {
+ \tl_if_empty:xF {#2}
+ {
+ \tl_if_empty:NT #1
+ {
+ \__fontspec_if_autofont:nnTF {#2} {#3}
+ { \tl_set:Nx #1 {#2#3} }
+ { \__fontspec_info:nx {no-font-shape} {#2#3} }
+ }
+ }
+ }
+ }
\prg_new_conditional:Nnn \__fontspec_if_autofont:nn {T,TF}
- {
- \__fontspec_primitive_font_set:Nnn \l_tmpa_font { \__fontspec_construct_font_call:nn {#1} {} } {\f at size pt}
- \__fontspec_primitive_font_set:Nnn \l_tmpb_font { \__fontspec_construct_font_call:nn {#1#2} {} } {\f at size pt}
- \str_if_eq_x:nnTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
- { \prg_return_false: }
- { \prg_return_true: }
- }
+ {
+ \__fontspec_primitive_font_set:Nnn \l_tmpa_font { \__fontspec_construct_font_call:nn {#1} {} } {\f at size pt}
+ \__fontspec_primitive_font_set:Nnn \l_tmpb_font { \__fontspec_construct_font_call:nn {#1#2} {} } {\f at size pt}
+ \str_if_eq:eeTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
+ { \prg_return_false: }
+ { \prg_return_true: }
+ }
\cs_new:Nn \__fontspec_make_font_shapes:Nnnnn
- {
- \group_begin:
- \__fontspec_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l__fontspec_leftover_clist
- \__fontspec_load_fontname:n {#1}
- \__fontspec_declare_shape:nnxx {#2} {#3} { \l__fontspec_fontopts_clist, \l__fontspec_leftover_clist } {#5}
- \group_end:
- }
-
+ {
+ \group_begin:
+ \__fontspec_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l__fontspec_leftover_clist
+ \__fontspec_load_fontname:n {#1}
+ \__fontspec_declare_shape:nnxx {#2} {#3} { \l__fontspec_fontopts_clist, \l__fontspec_leftover_clist } {#5}
+ \group_end:
+ }
\cs_new:Nn \__fontspec_load_fontname:n
- {
+ {
\__fontspec_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#1}
\prop_get:NVNF \g__fontspec_fontopts_prop \l_fontspec_fontname_tl \l__fontspec_fontopts_clist
- { \clist_clear:N \l__fontspec_fontopts_clist }
+ { \clist_clear:N \l__fontspec_fontopts_clist }
\keys_set_groups:nnV {fontspec/fontname} {getfontname} \l__fontspec_fontopts_clist
\__fontspec_primitive_font_set:Nnn \l_fontspec_font { \__fontspec_construct_font_call:nn {\l_fontspec_fontname_tl} {} } {\f at size pt}
\__fontspec_primitive_font_if_null:NT \l_fontspec_font { \__fontspec_error:nx {font-not-found} {#1} }
- }
+ }
\keys_define:nn {fontspec/fontname}
{
Font .tl_set:N = \l_fontspec_fontname_tl ,
@@ -1539,18 +1541,18 @@
Font .groups:n = {getfontname} ,
}
\cs_new:Nn \__fontspec_declare_shape:nnnn
- {
- \tl_clear:N \l__fontspec_nfss_tl
- \tl_clear:N \l__fontspec_nfss_sc_tl
- \tl_set_eq:NN \l__fontspec_saved_fontname_tl \l_fontspec_fontname_tl
+ {
+ \tl_clear:N \l__fontspec_nfss_tl
+ \tl_clear:N \l__fontspec_nfss_sc_tl
+ \tl_set_eq:NN \l__fontspec_saved_fontname_tl \l_fontspec_fontname_tl
- \exp_args:Nx \clist_map_inline:nn {#4} { \__fontspec_setup_single_size:nn {#3} {##1} }
+ \exp_args:Nx \clist_map_inline:nn {#4} { \__fontspec_setup_single_size:nn {#3} {##1} }
- \__fontspec_declare_shapes_normal:nn {#1} {#2}
- \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
- \__fontspec_declare_shape_slanted:nn {#1} {#2}
- \__fontspec_declare_shape_loginfo:nn {#1} {#2}
- }
+ \__fontspec_declare_shapes_normal:nn {#1} {#2}
+ \__fontspec_declare_shapes_smcaps:nn {#1} {#2}
+ \__fontspec_declare_shape_slanted:nn {#1} {#2}
+ \__fontspec_declare_shape_loginfo:nn {#1} {#2}
+ }
\cs_generate_variant:Nn \__fontspec_declare_shape:nnnn {nnxx}
\cs_new:Nn \__fontspec_setup_single_size:nn
{
@@ -1569,38 +1571,38 @@
\clist_set_eq:NN \l__fontspec_fontfeat_curr_clist \l__fontspec_fontfeat_sc_clist
\bool_if:NF \l__fontspec_nosc_bool
- {
- \tl_if_empty:NTF \l__fontspec_fontname_sc_tl
- {
- \__fontspec_make_smallcaps:TF
- {
- \clist_put_left:Nn \l__fontspec_fontfeat_curr_clist {Letters=SmallCaps}
- }
- {
- \bool_set_true:N \l__fontspec_nosc_bool
- }
- }
- { \__fontspec_load_fontname:n {\l__fontspec_fontname_sc_tl} }% local for each size
- }
+ {
+ \tl_if_empty:NTF \l__fontspec_fontname_sc_tl
+ {
+ \__fontspec_make_smallcaps:TF
+ {
+ \clist_put_left:Nn \l__fontspec_fontfeat_curr_clist {Letters=SmallCaps}
+ }
+ {
+ \bool_set_true:N \l__fontspec_nosc_bool
+ }
+ }
+ { \__fontspec_load_fontname:n {\l__fontspec_fontname_sc_tl} }% local for each size
+ }
\bool_if:NF \l__fontspec_nosc_bool
- {
- \__fontspec_setup_nfss:Nnnn \l__fontspec_nfss_sc_tl
- {#1} {\l__fontspec_sizing_leftover_clist} {\l__fontspec_fontfeat_curr_clist}
- }
+ {
+ \__fontspec_setup_nfss:Nnnn \l__fontspec_nfss_sc_tl
+ {#1} {\l__fontspec_sizing_leftover_clist} {\l__fontspec_fontfeat_curr_clist}
+ }
}
\cs_new:Nn \__fontspec_setup_nfss:Nnnn
- {
+ {
- \__fontspec_get_features:n { #2 , #3 , #4 }
+ \__fontspec_get_features:n { #2 , #3 , #4 }
- \tl_put_right:Nx #1
- {
- <\l__fontspec_size_tl> \l__fontspec_scale_tl
- \__fontspec_construct_font_call:nn { \l_fontspec_fontname_tl }
- { \l__fontspec_pre_feat_sclist \g__fontspec_rawfeatures_sclist }
- }
- }
+ \tl_put_right:Nx #1
+ {
+ <\l__fontspec_size_tl> \l__fontspec_scale_tl
+ \__fontspec_construct_font_call:nn { \l_fontspec_fontname_tl }
+ { \l__fontspec_pre_feat_sclist \g__fontspec_rawfeatures_sclist }
+ }
+ }
\cs_new:Nn \__fontspec_declare_shapes_normal:nn
{
\__fontspec_DeclareFontShape:xxxxxx {\g__fontspec_nfss_enc_tl} {\g__fontspec_nfss_family_tl}
@@ -1614,7 +1616,6 @@
{ \__fontspec_combo_sc_shape:n {#2} } {\l__fontspec_nfss_sc_tl} {\l__fontspec_postadjust_tl}
}
}
-
\cs_new:Nn \__fontspec_combo_sc_shape:n
{
\tl_if_exist:cTF { \__fontspec_shape_merge:nn {#1} {\scdefault} }
@@ -1622,84 +1623,85 @@
{ \scdefault }
}
\cs_new:Nn \__fontspec_DeclareFontShape:nnnnnn
- {
- \group_begin:
- \normalsize
- \cs_undefine:c {#1/#2/#3/#4/\f at size}
- \group_end:
- \DeclareFontShape{#1}{#2}{#3}{#4}{#5}{#6}
- }
+ {
+\group_begin:
+\normalsize
+\cs_undefine:c {#1/#2/#3/#4/\f at size}
+\group_end:
+\DeclareFontShape{#1}{#2}{#3}{#4}{#5}{#6}
+ }
\cs_generate_variant:Nn \__fontspec_DeclareFontShape:nnnnnn {xxxxxx}
\cs_new:Nn \__fontspec_declare_shape_slanted:nn
- {
- \bool_if:nT
- {
- \str_if_eq_x_p:nn {#2} {\itdefault} &&
- !(\str_if_eq_x_p:nn {\itdefault} {\sldefault})
- }
- {
- \__fontspec_DeclareFontShape:xxxxxx {\g__fontspec_nfss_enc_tl}{\g__fontspec_nfss_family_tl}{#1}{\sldefault}
- {<->ssub*\g__fontspec_nfss_family_tl/#1/\itdefault}{\l__fontspec_postadjust_tl}
- }
- }
+ {
+ \bool_if:nT
+ {
+ \str_if_eq_p:ee {#2} {\itdefault} &&
+ !(\str_if_eq_p:ee {\itdefault} {\sldefault})
+ }
+ {
+ \__fontspec_DeclareFontShape:xxxxxx {\g__fontspec_nfss_enc_tl}{\g__fontspec_nfss_family_tl}{#1}{\sldefault}
+ {<->ssub*\g__fontspec_nfss_family_tl/#1/\itdefault}{\l__fontspec_postadjust_tl}
+ }
+ }
\cs_new:Nn \__fontspec_declare_shape_loginfo:nn
- {
- \tl_gput_right:Nx \g__fontspec_defined_shapes_tl
- {
- \exp_not:n { \\ }
- -~ \exp_not:N \str_case:nn {#1/#2}
- {
- {\mddefault/\updefault} {'normal'~}
- {\bfdefault/\updefault} {'bold'~}
- {\mddefault/\itdefault} {'italic'~}
- {\mddefault/\sldefault} {'slanted'~}
- {\bfdefault/\itdefault} {'bold~ italic'~}
- {\bfdefault/\sldefault} {'bold~ slanted'~}
- } (#1/#2)~
- with~ NFSS~ spec.:~
- \l__fontspec_nfss_tl
- \exp_not:n { \\ }
- -~ \exp_not:N \str_case:nn { #1 / \__fontspec_combo_sc_shape:n {#2} }
- {
- {\mddefault/\scdefault} {'small~ caps'~}
- {\bfdefault/\scdefault} {'bold~ small~ caps'~}
- {\mddefault/\itscdefault} {'italic~ small~ caps'~}
- {\bfdefault/\itscdefault} {'bold~ italic~ small~ caps'~}
- {\mddefault/\slscdefault} {'slanted~ small~ caps'~}
- {\bfdefault/\slscdefault} {'bold~ slanted~ small~ caps'~}
- }~( #1 / \__fontspec_combo_sc_shape:n {#2} )~
- with~ NFSS~ spec.:~
- \l__fontspec_nfss_sc_tl
- \tl_if_empty:fF {\l__fontspec_postadjust_tl}
- {
- \exp_not:N \\ and~ font~ adjustment~ code: \exp_not:N \\ \l__fontspec_postadjust_tl
- }
- }
- }
+ {
+ \tl_gput_right:Nx \g__fontspec_defined_shapes_tl
+ {
+ \exp_not:n { \\ }
+ -~ \exp_not:N \str_case:nn {#1/#2}
+ {
+ {\mddefault/\updefault} {'normal'~}
+ {\bfdefault/\updefault} {'bold'~}
+ {\mddefault/\itdefault} {'italic'~}
+ {\mddefault/\sldefault} {'slanted'~}
+ {\bfdefault/\itdefault} {'bold~ italic'~}
+ {\bfdefault/\sldefault} {'bold~ slanted'~}
+ } (#1/#2)~
+ with~ NFSS~ spec.:~
+ \l__fontspec_nfss_tl
+ \exp_not:n { \\ }
+ -~ \exp_not:N \str_case:nn { #1 / \__fontspec_combo_sc_shape:n {#2} }
+ {
+ {\mddefault/\scdefault} {'small~ caps'~}
+ {\bfdefault/\scdefault} {'bold~ small~ caps'~}
+ {\mddefault/\itscdefault} {'italic~ small~ caps'~}
+ {\bfdefault/\itscdefault} {'bold~ italic~ small~ caps'~}
+ {\mddefault/\slscdefault} {'slanted~ small~ caps'~}
+ {\bfdefault/\slscdefault} {'bold~ slanted~ small~ caps'~}
+ }~( #1 / \__fontspec_combo_sc_shape:n {#2} )~
+ with~ NFSS~ spec.:~
+ \l__fontspec_nfss_sc_tl
+ \tl_if_empty:fF {\l__fontspec_postadjust_tl}
+ {
+ \exp_not:N \\ and~ font~ adjustment~ code:
+ \exp_not:N \\ \l__fontspec_postadjust_tl
+ }
+ }
+ }
\tl_set:Nn \l__fontspec_pre_feat_sclist
- {
- \bool_if:NT \l__fontspec_ot_bool
- {
- \tl_if_empty:NF \l_fontspec_script_tl
- {
- script = \l_fontspec_script_tl ;
- language = \l_fontspec_lang_tl ;
- }
- }
- }
+ {
+ \bool_if:NT \l__fontspec_ot_bool
+ {
+ \tl_if_empty:NF \l_fontspec_script_tl
+ {
+ script = \l_fontspec_script_tl ;
+ language = \l_fontspec_lang_tl ;
+ }
+ }
+ }
\cs_new:Nn \__fontspec_make_ot_smallcaps:TF
- {
- \__fontspec_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
- }
+ {
+ \__fontspec_check_ot_feat:NnTF \l_fontspec_font {smcp} {#1} {#2}
+ }
\cs_new:Nn \__fontspec_make_smallcaps:TF
- {
- \bool_if:NTF \l__fontspec_ot_bool
- { \__fontspec_make_ot_smallcaps:TF {#1} {#2} }
- {
- \bool_if:NT \l__fontspec_atsui_bool
- { \__fontspec_make_AAT_feature_string:NnnTF \l_fontspec_font {3}{3} {#1} {#2} }
- }
- }
+ {
+ \bool_if:NTF \l__fontspec_ot_bool
+ { \__fontspec_make_ot_smallcaps:TF {#1} {#2} }
+ {
+ \bool_if:NT \l__fontspec_atsui_bool
+ { \__fontspec_make_AAT_feature_string:NnnTF \l_fontspec_font {3}{3} {#1} {#2} }
+ }
+ }
\cs_new:Nn \__fontspec_update_featstr:n
{
\bool_if:NF \l__fontspec_firsttime_bool
@@ -1716,18 +1718,18 @@
}
}
\cs_set:Npn \__fontspec_init:
- {
- \bool_set_false:N \l__fontspec_ot_bool
- \bool_set_true:N \l__fontspec_firsttime_bool
- \__fontspec_font_is_name:
- \tl_clear:N \l__fontspec_font_path_tl
- \tl_clear:N \l__fontspec_optical_size_tl
- \tl_clear:N \l__fontspec_ttc_index_tl
- \tl_clear:N \l_fontspec_renderer_tl
- \tl_gclear:N \g__fontspec_defined_shapes_tl
- \tl_gclear:N \g__fontspec_curr_series_tl
- \tl_gset_eq:NN \g__fontspec_nfss_enc_tl \g_fontspec_encoding_tl
- }
+ {
+ \bool_set_false:N \l__fontspec_ot_bool
+ \bool_set_true:N \l__fontspec_firsttime_bool
+ \__fontspec_font_is_name:
+ \tl_clear:N \l__fontspec_font_path_tl
+ \tl_clear:N \l__fontspec_optical_size_tl
+ \tl_clear:N \l__fontspec_ttc_index_tl
+ \tl_clear:N \l_fontspec_renderer_tl
+ \tl_gclear:N \g__fontspec_defined_shapes_tl
+ \tl_gclear:N \g__fontspec_curr_series_tl
+ \tl_gset_eq:NN \g__fontspec_nfss_enc_tl \g_fontspec_encoding_tl
+ }
\cs_new:Nn \__fontspec_init_fontface:
{
\tl_gclear:N \g__fontspec_rawfeatures_sclist
@@ -1742,6 +1744,7 @@
{
\__fontspec_strip_leading_sign:Nw #1#2 \q_nil
}
+\cs_generate_variant:Nn \__fontspec_iv_str_to_num:Nn {Nx}
\cs_set:Npn \__fontspec_strip_leading_sign:Nw #1#2#3 \q_nil
{
\bool_if:nTF { \str_if_eq_p:nn {#2} {+} || \str_if_eq_p:nn {#2} {-} }
@@ -1749,18 +1752,28 @@
{ \__fontspec_iv_str_to_num:w #1 \q_nil #2#3 \c_empty_tl \c_empty_tl \q_nil }
}
\cs_set:Npn \__fontspec_iv_str_to_num:w #1 \q_nil #2#3#4#5#6 \q_nil
- {
- \int_set:Nn #1
- {
- `#2 * "1000000
- + `#3 * "10000
- + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100
- + \ifx \c_empty_tl #5 32 \else `#5 \fi
- }
- }
+ {
+ \int_compare:nT { \tl_count:n {#6} > 2 }
+ { \__fontspec_error:nx {ot-tag-too-long} {#2#3#4#5#6} }
+
+ \str_if_eq:eeTF {#2#3#4#5#6} {DFLT}
+ {
+ \int_set:Nn #1 {0}
+ }
+ {
+
+ \int_set:Nn #1
+ {
+ `#2 * "1000000
+ + `#3 * "10000
+ + \ifx \c_empty_tl #4 32 \else `#4 \fi * "100
+ + \ifx \c_empty_tl #5 32 \else `#5 \fi
+ }
+ }
+ }
\cs_generate_variant:Nn \__fontspec_iv_str_to_num:Nn {No}
-%%^^A%% fontspec-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Nn \__fontspec_define_opentype_feature_group:n
{
@@ -1800,16 +1813,16 @@
\cs_new:Nn \__fontspec_feat_off:n {#1Off}
\cs_new:Nn \__fontspec_feat_reset:n {#1Reset}
\cs_new:Nn \__fontspec_define_opentype_onoffreset:nnnnn
- {
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {+#4} {#5}
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_off:n {#2} } {#3} {-#4} {}
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {+#4,-#4}
- }
+ {
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {+#4} {#5}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_off:n {#2} } {#3} {-#4} {}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {+#4,-#4}
+ }
\cs_new:Nn \__fontspec_define_opentype_onreset:nnnnn
- {
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {#4} {#5}
- \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {#4}
- }
+ {
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} {#2} {#3} {#4} {#5}
+ \exp_args:Nnx \__fontspec_define_opentype_feature:nnnnn {#1} { \__fontspec_feat_reset:n {#2} } {} {} {#4}
+ }
\cs_new:Nn \__fontspec_make_OT_feature:nnn
{
@@ -1842,71 +1855,83 @@
{
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
- \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts #1 }
- \int_zero:N \l_tmpa_int
- \bool_set_false:N \l__fontspec_check_bool
- \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
- {
- \ifnum \XeTeXOTscripttag #1 \l_tmpa_int = \l__fontspec_strnum_int
- \bool_set_true:N \l__fontspec_check_bool
- \int_set:Nn \l_tmpa_int {\l_tmpb_int}
- \else
- \int_incr:N \l_tmpa_int
- \fi
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
- }
+ {
+ \__fontspec_iv_str_to_num:Nx \l__fontspec_strnum_int {#2}
+ \int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts #1 }
+ \int_zero:N \l_tmpa_int
+ \bool_set_false:N \l__fontspec_check_bool
+ \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
+ {
+ \ifnum \XeTeXOTscripttag #1 \l_tmpa_int = \l__fontspec_strnum_int
+ \bool_set_true:N \l__fontspec_check_bool
+ \int_set:Nn \l_tmpa_int {\l_tmpb_int}
+ \else
+ \int_incr:N \l_tmpa_int
+ \fi
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
+ }
\prg_new_conditional:Nnn \__fontspec_check_lang:Nn {TF}
{
+ \__fontspec_check_lang:NnnTF #1 {#2} {\l_fontspec_script_tl} {\prg_return_true:} {\prg_return_false:}
+ }
+\prg_new_conditional:Nnn \__fontspec_check_lang:Nnn {TF}
+ {
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
- \int_set:Nn \l_tmpb_int
- { \XeTeXOTcountlanguages #1 \l__fontspec_script_int }
- \int_zero:N \l_tmpa_int
- \bool_set_false:N \l__fontspec_check_bool
- \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
- {
- \ifnum\XeTeXOTlanguagetag #1 \l__fontspec_script_int \l_tmpa_int = \l__fontspec_strnum_int
- \bool_set_true:N \l__fontspec_check_bool
- \int_set:Nn \l_tmpa_int {\l_tmpb_int}
- \else
- \int_incr:N \l_tmpa_int
- \fi
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
+ {
+ \__fontspec_iv_str_to_num:Nx \l__fontspec_strnum_int {#2}
+ \__fontspec_iv_str_to_num:Nx \l__fontspec_script_int {#3}
+ \int_set:Nn \l_tmpb_int
+ { \XeTeXOTcountlanguages #1 \l__fontspec_script_int }
+ \int_zero:N \l_tmpa_int
+ \bool_set_false:N \l__fontspec_check_bool
+ \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
+ {
+ \ifnum\XeTeXOTlanguagetag #1 \l__fontspec_script_int \l_tmpa_int = \l__fontspec_strnum_int
+ \bool_set_true:N \l__fontspec_check_bool
+ \int_set:Nn \l_tmpa_int {\l_tmpb_int}
+ \else
+ \int_incr:N \l_tmpa_int
+ \fi
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
}
\prg_new_conditional:Nnn \__fontspec_check_ot_feat:Nn {TF,F}
{
+ \__fontspec_check_ot_feat:NnnnTF #1 {#2} {\l_fontspec_lang_tl} {\l_fontspec_script_tl}
+ {\prg_return_true:} {\prg_return_false:}
+ }
+\prg_new_conditional:Nnn \__fontspec_check_ot_feat:Nnnn {TF,F}
+ {
\bool_if:NTF \l__fontspec_never_check_bool
{ \prg_return_true: }
- {
- \int_set:Nn \l_tmpb_int
- {
- \XeTeXOTcountfeatures #1
- \l__fontspec_script_int
- \l__fontspec_language_int
- }
- \__fontspec_iv_str_to_num:Nn \l__fontspec_strnum_int {#2}
- \int_zero:N \l_tmpa_int
- \bool_set_false:N \l__fontspec_check_bool
- \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
- {
- \ifnum\XeTeXOTfeaturetag #1 \l__fontspec_script_int \l__fontspec_language_int
- \l_tmpa_int =\l__fontspec_strnum_int
- \bool_set_true:N \l__fontspec_check_bool
- \int_set:Nn \l_tmpa_int {\l_tmpb_int}
- \else
- \int_incr:N \l_tmpa_int
- \fi
- }
- \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
- }
+ {
+ \__fontspec_iv_str_to_num:Nx \l__fontspec_strnum_int {#2}
+ \__fontspec_iv_str_to_num:Nx \l__fontspec_language_int {#3}
+ \__fontspec_iv_str_to_num:Nx \l__fontspec_script_int {#4}
+ \int_set:Nn \l_tmpb_int
+ {
+ \XeTeXOTcountfeatures #1
+ \l__fontspec_script_int
+ \l__fontspec_language_int
+ }
+ \int_zero:N \l_tmpa_int
+ \bool_set_false:N \l__fontspec_check_bool
+ \bool_until_do:nn { \int_compare_p:nNn \l_tmpa_int = \l_tmpb_int }
+ {
+ \ifnum\XeTeXOTfeaturetag #1 \l__fontspec_script_int \l__fontspec_language_int
+ \l_tmpa_int =\l__fontspec_strnum_int
+ \bool_set_true:N \l__fontspec_check_bool
+ \int_set:Nn \l_tmpa_int {\l_tmpb_int}
+ \else
+ \int_incr:N \l_tmpa_int
+ \fi
+ }
+ \bool_if:NTF \l__fontspec_check_bool \prg_return_true: \prg_return_false:
+ }
}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {aalt}{Access~All~Alternates}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {abvf}{Above-base~Forms}
@@ -2031,64 +2056,69 @@
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {vrtr}{Vertical~Alternates~for~Rotation}
\prop_gput:Nnn \g__fontspec_all_opentype_feature_names_prop {zero}{Slashed~Zero}
-%%^^A%% fontspec-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-graphite.dtx -- part of FONTSPEC <wspr.io/fontspec>
\cs_new:Nn \__fontspec_define_aat_feature_group:n
- { \keys_define:nn {fontspec-aat} { #1 .multichoice: } }
+ {
+ \keys_define:nn {fontspec-aat} { #1 .multichoice: }
+ }
\cs_new:Nn \__fontspec_define_aat_feature:nnnn
- {
- \keys_define:nn {fontspec-aat}
- {
- #1/#2 .code:n = { \__fontspec_make_AAT_feature:nn {#3}{#4} }
- }
- }
+ {
+ \keys_define:nn {fontspec-aat}
+ {
+ #1/#2 .code:n = { \__fontspec_make_AAT_feature:nn {#3}{#4} }
+ }
+ }
\cs_new:Nn \__fontspec_make_AAT_feature:nn
- {
- \tl_if_empty:nTF {#1}
- { \__fontspec_warning:n {aat-feature-not-exist} }
- {
- \__fontspec_make_AAT_feature_string:NnnTF \l_fontspec_font {#1}{#2}
+ {
+ \tl_if_empty:nTF {#1}
+ { \__fontspec_warning:n {aat-feature-not-exist} }
{
- \__fontspec_update_featstr:n {\l_fontspec_feature_string_tl}
- }
- { \__fontspec_warning:nx {aat-feature-not-exist-in-font} {#1,#2} }
- }
- }
+ \__fontspec_make_AAT_feature_string:NnnTF \l_fontspec_font {#1}{#2}
+ {
+ \__fontspec_update_featstr:n {\l_fontspec_feature_string_tl}
+ }
+ {
+ \__fontspec_warning:nx {aat-feature-not-exist-in-font} {#1,#2}
+ }
+ }
+ }
\prg_new_conditional:Nnn \__fontspec_make_AAT_feature_string:Nnn {TF,T,F}
- {
- \tl_set:Nx \l__fontspec_tmpa_tl { \XeTeXfeaturename #1 #2 }
- \tl_if_empty:NTF \l__fontspec_tmpa_tl
- { \prg_return_false: }
- {
- \int_compare:nTF { \XeTeXisexclusivefeature #1 #2 > 0 }
- {
- \tl_set:Nx \l__fontspec_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
+ {
+ \tl_set:Nx \l__fontspec_tmpa_tl { \XeTeXfeaturename #1 #2 }
+ \tl_if_empty:NTF \l__fontspec_tmpa_tl
+ { \prg_return_false: }
+ {
+ \int_compare:nTF { \XeTeXisexclusivefeature #1 #2 > 0 }
+ {
+ \tl_set:Nx \l__fontspec_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
+ }
+ {
+ \int_if_even:nTF {#3}
+ {
+ \tl_set:Nx \l__fontspec_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
+ }
+ {
+ \tl_set:Nx \l__fontspec_tmpb_tl
+ {
+ \XeTeXselectorname #1 #2\space \numexpr#3-1\relax
+ }
+ \tl_if_empty:NF \l__fontspec_tmpb_tl { \tl_put_left:Nn \l__fontspec_tmpb_tl {!} }
+ }
+ }
+
+ \tl_if_empty:NTF \l__fontspec_tmpb_tl
+ { \prg_return_false: }
+ {
+ \tl_set:Nx \l_fontspec_feature_string_tl { \l__fontspec_tmpa_tl = \l__fontspec_tmpb_tl }
+ \prg_return_true:
+ }
}
- {
- \int_if_even:nTF {#3}
- {
- \tl_set:Nx \l__fontspec_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
- }
- {
- \tl_set:Nx \l__fontspec_tmpb_tl
- {
- \XeTeXselectorname #1 #2\space \numexpr#3-1\relax
- }
- \tl_if_empty:NF \l__fontspec_tmpb_tl { \tl_put_left:Nn \l__fontspec_tmpb_tl {!} }
- }
- }
- \tl_if_empty:NTF \l__fontspec_tmpb_tl
- { \prg_return_false: }
- {
- \tl_set:Nx \l_fontspec_feature_string_tl { \l__fontspec_tmpa_tl = \l__fontspec_tmpb_tl }
- \prg_return_true:
- }
- }
- }
+ }
-%%^^A%% fontspec-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-keyval.dtx -- part of FONTSPEC <wspr.io/fontspec>
\clist_gset:Nn \g__fontspec_all_keyval_modules_clist
{
@@ -2114,63 +2144,64 @@
\bool_set_false:N \l__fontspec_fontcfg_bool
}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Path}
- {
- \bool_set_true:N \l__fontspec_nobf_bool
- \bool_set_true:N \l__fontspec_noit_bool
- \bool_set_true:N \l__fontspec_external_bool
- \tl_set:Nn \l__fontspec_font_path_tl {#1}
- \__fontspec_font_is_file:
- \keys_set:nn {fontspec-renderer} {Renderer=OpenType}
- }
+ {
+ \bool_set_true:N \l__fontspec_nobf_bool
+ \bool_set_true:N \l__fontspec_noit_bool
+ \bool_set_true:N \l__fontspec_external_bool
+ \tl_set:Nn \l__fontspec_font_path_tl {#1}
+ \__fontspec_font_is_file:
+ \keys_set:nn {fontspec-renderer} {Renderer=OpenType}
+ }
\aliasfontfeature{Path}{ExternalLocation}
\__fontspec_keys_define_code:nnn {fontspec} {Path} {}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Extension}
- {
- \tl_set:Nn \l__fontspec_extension_tl {#1}
- \bool_if:NF \l__fontspec_external_bool
- {
- \keys_set:nn {fontspec-preparse-external} {Path}
- }
- }
+ {
+ \tl_set:Nn \l__fontspec_extension_tl {#1}
+ \bool_if:NF \l__fontspec_external_bool
+ {
+ \keys_set:nn {fontspec-preparse-external} {Path}
+ }
+ }
\tl_clear:N \l__fontspec_extension_tl
\__fontspec_keys_define_code:nnn {fontspec} {Extension} {}
\keys_define:nn {fontspec-renderer}
- {
- Renderer .choices:nn =
- {AAT,ICU,OpenType,Graphite,Full,Basic}
- {
- \int_compare:nTF {\l_keys_choice_int <= 4} {
- \tl_set:Nx \l_fontspec_renderer_tl
- {
- \int_case:nn \l_keys_choice_int { 1 {/AAT} 2 {/OT} 3 {/OT} 4 {/GR} }
- }
- \tl_gset:Nx \g__fontspec_single_feat_tl { \l_fontspec_renderer_tl }
- }
- {
- \__fontspec_warning:nx {only-luatex-feature} {Renderer=Full/Basic}
- }
- }
- }
+ {
+ Renderer .choices:nn =
+ {AAT,ICU,OpenType,Graphite,Full,Basic}
+ {
+ \int_compare:nTF {\l_keys_choice_int <= 4}
+ {
+ \tl_set:Nx \l_fontspec_renderer_tl
+ {
+ \int_case:nn \l_keys_choice_int { 1 {/AAT} 2 {/OT} 3 {/OT} 4 {/GR} }
+ }
+ \tl_gset:Nx \g__fontspec_single_feat_tl { \l_fontspec_renderer_tl }
+ }
+ {
+ \__fontspec_warning:nx {only-luatex-feature} {Renderer=Full/Basic}
+ }
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {Script}
- {
+ {
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
- \tl_set:Nn \l__fontspec_script_name_tl {#1}
- }
+ \tl_set:Nn \l__fontspec_script_name_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {Language}
- {
+ {
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
- \tl_set:Nn \l__fontspec_lang_name_tl {#1}
- }
+ \tl_set:Nn \l__fontspec_lang_name_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {FontIndex}
- {
- \str_if_eq_x:nnF { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
- { \__fontspec_warning:n {font-index-needs-ttc} }
+ {
+ \str_if_eq:eeF { \str_lower_case:f {\l__fontspec_extension_tl} } {.ttc}
+ { \__fontspec_warning:n {font-index-needs-ttc} }
\tl_set:Nn \l__fontspec_ttc_index_tl {:#1}
- }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {FontIndex}
- {
+ {
\tl_set:Nn \l__fontspec_ttc_index_tl {:#1}
- }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {UprightFont}
{
\fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
@@ -2236,76 +2267,76 @@
}
}
\__fontspec_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_up_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_up_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {BoldFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_bf_clist {#1}
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_bf_clist {#1}
- }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {ItalicFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_it_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_it_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {BoldItalicFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_bfit_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_bfit_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {SlantedFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_sl_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_sl_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {BoldSlantedFeatures}
- {
- \clist_set:Nn \l__fontspec_fontfeat_bfsl_clist {#1}
- }
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_bfsl_clist {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {SmallCapsFeatures}
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- {
- \clist_set:Nn \l__fontspec_fontfeat_sc_clist {#1}
- }
- }
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ {
+ \clist_set:Nn \l__fontspec_fontfeat_sc_clist {#1}
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {SizeFeatures}
- {
- \clist_set:Nn \l__fontspec_sizefeat_clist {#1}
- \clist_put_right:Nn \l__fontspec_fontfeat_up_clist { SizeFeatures = {#1} }
- }
+ {
+ \clist_set:Nn \l__fontspec_sizefeat_clist {#1}
+ \clist_put_right:Nn \l__fontspec_fontfeat_up_clist { SizeFeatures = {#1} }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-nested} {SizeFeatures}
- {
- \clist_set:Nn \l__fontspec_sizefeat_clist {#1}
- \tl_if_empty:NT \l__fontspec_this_font_tl
- { \tl_set:Nn \l__fontspec_this_font_tl { -- } } % needs to be non-empty as a flag
- }
+ {
+ \clist_set:Nn \l__fontspec_sizefeat_clist {#1}
+ \tl_if_empty:NT \l__fontspec_this_font_tl
+ { \tl_set:Nn \l__fontspec_this_font_tl { -- } } % needs to be non-empty as a flag
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-nested} {Font}
- {
- \tl_set:Nn \l__fontspec_this_font_tl {#1}
- }
+ {
+ \tl_set:Nn \l__fontspec_this_font_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {SizeFeatures}
- {
- % dummy
- }
+ {
+ % dummy
+ }
\__fontspec_keys_define_code:nnn {fontspec} {Font}
- {
- % dummy
- }
+ {
+ % dummy
+ }
\__fontspec_keys_define_code:nnn {fontspec-sizing} {Size}
- {
- \tl_set:Nn \l__fontspec_size_tl {#1}
- }
+ {
+ \tl_set:Nn \l__fontspec_size_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-sizing} {Font}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_sizedfont_tl {#1}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_sizedfont_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {NFSSEncoding}
- {
- \tl_gset:Nx \g__fontspec_nfss_enc_tl { #1 }
- }
+ {
+ \tl_gset:Nx \g__fontspec_nfss_enc_tl { #1 }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {NFSSFamily}
- {
- \tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
- }
+ {
+ \tl_set:Nx \l__fontspec_nfss_fam_tl { #1 }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
\tl_clear:N \l__fontspec_this_font_tl
@@ -2324,175 +2355,177 @@
{\use_i:nnn #1} {\use_ii:nnn #1} {\l__fontspec_this_font_tl} {\l__fontspec_this_feat_clist}
}
\__fontspec_keys_define_code:nnn {fontspec} {Scale}
- {
- \str_case:nnF {#1}
- {
- {MatchLowercase} { \__fontspec_calc_scale:n {5} }
- {MatchUppercase} { \__fontspec_calc_scale:n {8} }
- }
- { \tl_set:Nx \l__fontspec_scale_tl {#1} }
- \tl_set:Nx \l__fontspec_scale_tl { s*[\l__fontspec_scale_tl] }
- }
+ {
+ \str_case:nnF {#1}
+ {
+ {MatchLowercase} { \__fontspec_calc_scale:n {5} }
+ {MatchUppercase} { \__fontspec_calc_scale:n {8} }
+ }
+ { \tl_set:Nx \l__fontspec_scale_tl {#1} }
+ \tl_set:Nx \l__fontspec_scale_tl { s*[\l__fontspec_scale_tl] }
+ }
\cs_new:Nn \__fontspec_calc_scale:n
- {
- \group_begin:
+ {
+ \group_begin:
- \fontencoding { \encodingdefault }
- \fontfamily { \rmdefault }
- \selectfont
+ \fontencoding { \encodingdefault }
+ \fontfamily { \rmdefault }
+ \selectfont
- \__fontspec_set_font_dimen:NnN \l__fontspec_tmpa_dim {#1} \font
- \__fontspec_set_font_dimen:NnN \l__fontspec_tmpb_dim {#1} \l_fontspec_font
+ \__fontspec_set_font_dimen:NnN \l__fontspec_tmpa_dim {#1} \font
+ \__fontspec_set_font_dimen:NnN \l__fontspec_tmpb_dim {#1} \l_fontspec_font
- \tl_gset:Nx \l__fontspec_scale_tl
+ \tl_set:Nx \l__fontspec_scale_tl
+ {
+ \fp_eval:n { \dim_to_fp:n {\l__fontspec_tmpa_dim} /
+ \dim_to_fp:n {\l__fontspec_tmpb_dim} }
+ }
+
+ \__fontspec_info:n {set-scale}
+ \exp_args:NNNx
+ \group_end:
+ \tl_set:Nx \l__fontspec_scale_tl { \l__fontspec_scale_tl }
+ }
+\cs_new:Nn \__fontspec_set_font_dimen:NnN
+ {
+ \dim_set:Nn #1 { \fontdimen #2 #3 }
+ \dim_compare:nNnT #1 = {0pt}
{
- \fp_eval:n { \dim_to_fp:n {\l__fontspec_tmpa_dim} /
- \dim_to_fp:n {\l__fontspec_tmpb_dim} }
+ \settoheight #1
+ {
+ \str_if_eq:nnTF {#3} {\font} \rmfamily #3
+ \int_case:nnF #2
+ {
+ {5} {x} % x-height
+ {8} {X} % cap-height
+ } {?} % "else" clause; never reached.
+ }
}
-
- \__fontspec_info:n {set-scale}
- \group_end:
- }
-\cs_new:Nn \__fontspec_set_font_dimen:NnN
- {
- \dim_set:Nn #1 { \fontdimen #2 #3 }
- \dim_compare:nNnT #1 = {0pt}
- {
- \settoheight #1
- {
- \str_if_eq:nnTF {#3} {\font} \rmfamily #3
- \int_case:nnF #2
- {
- {5} {x} % x-height
- {8} {X} % cap-height
- } {?} % "else" clause; never reached.
- }
- }
- }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {WordSpace}
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- { \_fontspec_parse_wordspace:w #1,,,\q_stop }
- }
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ { \_fontspec_parse_wordspace:w #1,,,\q_stop }
+ }
\__fontspec_aff_error:n {WordSpace}
\cs_set:Npn \_fontspec_parse_wordspace:w #1,#2,#3,#4 \q_stop
- {
- \tl_if_empty:nTF {#4}
- {
- \tl_set:Nn \l__fontspec_wordspace_adjust_tl
- {
- \fontdimen 2 \font = #1 \fontdimen 2 \font
- \fontdimen 3 \font = #1 \fontdimen 3 \font
- \fontdimen 4 \font = #1 \fontdimen 4 \font
- }
- }
- {
- \tl_set:Nn \l__fontspec_wordspace_adjust_tl
- {
- \fontdimen 2 \font = #1 \fontdimen 2 \font
- \fontdimen 3 \font = #2 \fontdimen 3 \font
- \fontdimen 4 \font = #3 \fontdimen 4 \font
- }
- }
- }
+ {
+ \tl_if_empty:nTF {#4}
+ {
+ \tl_set:Nn \l__fontspec_wordspace_adjust_tl
+ {
+ \fontdimen 2 \font = #1 \fontdimen 2 \font
+ \fontdimen 3 \font = #1 \fontdimen 3 \font
+ \fontdimen 4 \font = #1 \fontdimen 4 \font
+ }
+ }
+ {
+ \tl_set:Nn \l__fontspec_wordspace_adjust_tl
+ {
+ \fontdimen 2 \font = #1 \fontdimen 2 \font
+ \fontdimen 3 \font = #2 \fontdimen 3 \font
+ \fontdimen 4 \font = #3 \fontdimen 4 \font
+ }
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec} {PunctuationSpace}
- {
- \str_case_x:nnF {#1}
- {
- {WordSpace}
- {
- \tl_set:Nn \l__fontspec_punctspace_adjust_tl
- { \fontdimen 7 \font = 0 \fontdimen 2 \font }
- }
- {TwiceWordSpace}
- {
- \tl_set:Nn \l__fontspec_punctspace_adjust_tl
- { \fontdimen 7 \font = 1 \fontdimen 2 \font }
- }
- }
- {
- \tl_set:Nn \l__fontspec_punctspace_adjust_tl
- { \fontdimen 7 \font = #1 \fontdimen 7 \font }
- }
- }
+ {
+ \str_case_e:nnF {#1}
+ {
+ {WordSpace}
+ {
+ \tl_set:Nn \l__fontspec_punctspace_adjust_tl
+ { \fontdimen 7 \font = 0 \fontdimen 2 \font }
+ }
+ {TwiceWordSpace}
+ {
+ \tl_set:Nn \l__fontspec_punctspace_adjust_tl
+ { \fontdimen 7 \font = 1 \fontdimen 2 \font }
+ }
+ }
+ {
+ \tl_set:Nn \l__fontspec_punctspace_adjust_tl
+ { \fontdimen 7 \font = #1 \fontdimen 7 \font }
+ }
+ }
\__fontspec_aff_error:n {PunctuationSpace}
\__fontspec_keys_define_code:nnn {fontspec} {FontAdjustment}
- {
- \tl_put_right:Nx \l__fontspec_postadjust_tl {#1}
- }
+ {
+ \tl_put_right:Nx \l__fontspec_postadjust_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {LetterSpace}
- {
- \__fontspec_update_featstr:n {letterspace=#1}
- }
+ {
+ \__fontspec_update_featstr:n {letterspace=#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {HyphenChar}
- {
- \str_if_eq:nnTF {#1} {None}
- {
- \tl_put_right:Nn \l__fontspec_postadjust_tl
- { \__fontspec_primitive_font_set_hyphenchar:Nn \font {-1} }
- }
- {
- \__fontspec_warning:nx {only-xetex-feature} {HyphenChar}
+ {
+ \str_if_eq:nnTF {#1} {None}
+ {
+ \tl_put_right:Nn \l__fontspec_postadjust_tl
+ { \__fontspec_primitive_font_set_hyphenchar:Nn \font {-1} }
+ }
+ {
+ \__fontspec_warning:nx {only-xetex-feature} {HyphenChar}
- \tl_if_single:nTF {#1}
- { \tl_set:Nn \l_fontspec_hyphenchar_tl {`#1} }
- { \tl_set:Nn \l_fontspec_hyphenchar_tl { #1} }
+ \tl_if_single:nTF {#1}
+ { \tl_set:Nn \l__fontspec_hyphenchar_tl {`#1} }
+ { \tl_set:Nn \l__fontspec_hyphenchar_tl { #1} }
- \__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l_fontspec_hyphenchar_tl}
- {
- \tl_put_right:Nn \l__fontspec_postadjust_tl
- { \__fontspec_primitive_font_set_hyphenchar:Nn \font { \l_fontspec_hyphenchar_tl } }
- }
- { \__fontspec_error:nx {no-glyph}{#1} }
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \l_fontspec_font {\l__fontspec_hyphenchar_tl}
+ {
+ \tl_put_right:Nn \l__fontspec_postadjust_tl
+ { \__fontspec_primitive_font_set_hyphenchar:Nn \font { \l__fontspec_hyphenchar_tl } }
+ }
+ { \__fontspec_error:nx {no-glyph}{#1} }
- }
- }
+ }
+ }
\__fontspec_aff_error:n {HyphenChar}
\__fontspec_keys_define_code:nnn {fontspec} {Color}
- {
- \cs_if_exist:cTF { \token_to_str:N \color@ #1 }
- {
- \convertcolorspec{named}{#1}{HTML}\l__fontspec_hexcol_tl
- }
- {
- \int_compare:nTF { \tl_count:n {#1} == 6 }
- { \tl_set:Nn \l__fontspec_hexcol_tl {#1} }
- {
- \int_compare:nTF { \tl_count:n {#1} == 8 }
- { \fontspec_parse_colour:viii #1 }
- {
+ {
+ \cs_if_exist:cTF { \token_to_str:N \color@ #1 }
+ {
+ \convertcolorspec{named}{#1}{HTML}\l__fontspec_hexcol_tl
+ }
+ {
+ \int_compare:nTF { \tl_count:n {#1} == 6 }
+ { \tl_set:Nn \l__fontspec_hexcol_tl {#1} }
+ {
+ \int_compare:nTF { \tl_count:n {#1} == 8 }
+ { \fontspec_parse_colour:viii #1 }
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ { \__fontspec_warning:nx {bad-colour} {#1} }
+ }
+ }
+ }
+ }
+\cs_set:Npn \fontspec_parse_colour:viii #1#2#3#4#5#6#7#8
+ {
+ \tl_set:Nn \l__fontspec_hexcol_tl {#1#2#3#4#5#6}
+ \tl_if_eq:NNF \l__fontspec_opacity_tl \c__fontspec_opacity_tl
+ {
\bool_if:NF \l__fontspec_firsttime_bool
- { \__fontspec_warning:nx {bad-colour} {#1} }
- }
- }
- }
- }
-\cs_set:Npn \fontspec_parse_colour:viii #1#2#3#4#5#6#7#8
- {
- \tl_set:Nn \l__fontspec_hexcol_tl {#1#2#3#4#5#6}
- \tl_if_eq:NNF \l__fontspec_opacity_tl \c__fontspec_opacity_tl
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- { \__fontspec_warning:nx {opa-twice-col} {#7#8} }
- }
- \tl_set:Nn \l__fontspec_opacity_tl {#7#8}
- }
+ { \__fontspec_warning:nx {opa-twice-col} {#7#8} }
+ }
+ \tl_set:Nn \l__fontspec_opacity_tl {#7#8}
+ }
\aliasfontfeature{Color}{Colour}
\__fontspec_keys_define_code:nnn {fontspec} {Opacity}
- {
- \int_set:Nn \l__fontspec_tmp_int {255}
- \__fontspec_int_mult_truncate:Nn \l__fontspec_tmp_int { #1 }
- \tl_if_eq:NNF \l__fontspec_opacity_tl \c__fontspec_opacity_tl
- {
- \bool_if:NF \l__fontspec_firsttime_bool
- { \__fontspec_warning:nx {opa-twice} {#1} }
- }
- \tl_set:Nx \l__fontspec_opacity_tl
- {
- \int_compare:nT { \l__fontspec_tmp_int <= "F } {0} % zero pad
- \int_to_hex:n { \l__fontspec_tmp_int }
- }
- }
+ {
+ \int_set:Nn \l__fontspec_tmp_int {255}
+ \__fontspec_int_mult_truncate:Nn \l__fontspec_tmp_int { #1 }
+ \tl_if_eq:NNF \l__fontspec_opacity_tl \c__fontspec_opacity_tl
+ {
+ \bool_if:NF \l__fontspec_firsttime_bool
+ { \__fontspec_warning:nx {opa-twice} {#1} }
+ }
+ \tl_set:Nx \l__fontspec_opacity_tl
+ {
+ \int_compare:nT { \l__fontspec_tmp_int <= "F } {0} % zero pad
+ \int_to_hex:n { \l__fontspec_tmp_int }
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-aat} {Mapping}
{
\tl_set:Nn \l__fontspec_mapping_tl { #1 }
@@ -2502,109 +2535,109 @@
\tl_set:Nn \l__fontspec_mapping_tl { #1 }
}
\__fontspec_keys_define_code:nnn {fontspec} {Weight}
- {
- \__fontspec_update_featstr:n{weight=#1}
- }
+ {
+ \__fontspec_update_featstr:n{weight=#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {Width}
- {
- \__fontspec_update_featstr:n{width=#1}
- }
+ {
+ \__fontspec_update_featstr:n{width=#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {OpticalSize}
- {
- \bool_if:NTF \l__fontspec_ot_bool
- {
- \tl_set:Nn \l__fontspec_optical_size_tl {/ S = #1}
- }
- {
- \bool_if:NT \l__fontspec_mm_bool
- {
- \__fontspec_update_featstr:n { optical size = #1 }
- }
- }
- \bool_if:nT { !\l__fontspec_ot_bool && !\l__fontspec_mm_bool }
- {
- \bool_if:NT \l__fontspec_firsttime_bool
- { \__fontspec_warning:n {no-opticals} }
- }
+ {
+ \bool_if:NTF \l__fontspec_ot_bool
+ {
+ \tl_set:Nn \l__fontspec_optical_size_tl {/ S = #1}
+ }
+ {
+ \bool_if:NT \l__fontspec_mm_bool
+ {
+ \__fontspec_update_featstr:n { optical size = #1 }
+ }
+ }
+ \bool_if:nT { !\l__fontspec_ot_bool && !\l__fontspec_mm_bool }
+ {
+ \bool_if:NT \l__fontspec_firsttime_bool
+ { \__fontspec_warning:n {no-opticals} }
+ }
+ }
+\keys_define:nn {fontspec}
+ {
+ FakeSlant .code:n =
+ {
+ \__fontspec_update_featstr:n {slant=#1}
+ },
+ FakeSlant .default:n = {0.2}
}
\keys_define:nn {fontspec}
- {
- FakeSlant .code:n =
- {
- \__fontspec_update_featstr:n{slant=#1}
- },
- FakeSlant .default:n = {0.2}
-}
+ {
+ FakeStretch .code:n =
+ {
+ \__fontspec_update_featstr:n {extend=#1}
+ },
+ FakeStretch .default:n = {1.2}
+ }
\keys_define:nn {fontspec}
- {
- FakeStretch .code:n =
- {
- \__fontspec_update_featstr:n{extend=#1}
- },
- FakeStretch .default:n = {1.2}
-}
+ {
+ FakeBold .code:n =
+ {
+ \__fontspec_update_featstr:n {embolden=#1}
+ },
+ FakeBold .default:n = {1.5}
+ }
\keys_define:nn {fontspec}
- {
- FakeBold .code:n =
- {
- \__fontspec_update_featstr:n {embolden=#1}
- },
- FakeBold .default:n = {1.5}
- }
-\keys_define:nn {fontspec}
- {
- AutoFakeSlant .code:n =
- {
- \bool_if:NT \l__fontspec_firsttime_bool
- {
- \tl_set:Nn \l__fontspec_fake_slant_tl {#1}
- \clist_put_right:Nn \l__fontspec_fontfeat_it_clist {FakeSlant=#1}
- \tl_set_eq:NN \l__fontspec_fontname_it_tl \l_fontspec_fontname_tl
- \bool_set_false:N \l__fontspec_noit_bool
+ {
+ AutoFakeSlant .code:n =
+ {
+ \bool_if:NT \l__fontspec_firsttime_bool
+ {
+ \tl_set:Nn \l__fontspec_fake_slant_tl {#1}
+ \clist_put_right:Nn \l__fontspec_fontfeat_it_clist {FakeSlant=#1}
+ \tl_set_eq:NN \l__fontspec_fontname_it_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l__fontspec_noit_bool
- \tl_if_empty:NF \l__fontspec_fake_embolden_tl
- {
- \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
- {FakeBold=\l__fontspec_fake_embolden_tl}
- \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeSlant=#1}
- \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
- }
- }
- },
- AutoFakeSlant .default:n = {0.2}
-}
+ \tl_if_empty:NF \l__fontspec_fake_embolden_tl
+ {
+ \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
+ {FakeBold=\l__fontspec_fake_embolden_tl}
+ \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeSlant=#1}
+ \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
+ }
+ }
+ },
+ AutoFakeSlant .default:n = {0.2}
+ }
\keys_define:nn {fontspec}
- {
- AutoFakeBold .code:n =
- {
- \bool_if:NT \l__fontspec_firsttime_bool
- {
- \tl_set:Nn \l__fontspec_fake_embolden_tl {#1}
- \clist_put_right:Nn \l__fontspec_fontfeat_bf_clist {FakeBold=#1}
- \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l_fontspec_fontname_tl
- \bool_set_false:N \l__fontspec_nobf_bool
+ {
+ AutoFakeBold .code:n =
+ {
+ \bool_if:NT \l__fontspec_firsttime_bool
+ {
+ \tl_set:Nn \l__fontspec_fake_embolden_tl {#1}
+ \clist_put_right:Nn \l__fontspec_fontfeat_bf_clist {FakeBold=#1}
+ \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l__fontspec_nobf_bool
- \tl_if_empty:NF \l__fontspec_fake_slant_tl
- {
- \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
- {FakeSlant=\l__fontspec_fake_slant_tl}
- \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeBold=#1}
- \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
- }
- }
- },
- AutoFakeBold .default:n = {1.5}
-}
+ \tl_if_empty:NF \l__fontspec_fake_slant_tl
+ {
+ \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist
+ {FakeSlant=\l__fontspec_fake_slant_tl}
+ \clist_put_right:Nx \l__fontspec_fontfeat_bfit_clist {FakeBold=#1}
+ \tl_set_eq:NN \l__fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
+ }
+ }
+ },
+ AutoFakeBold .default:n = {1.5}
+ }
\__fontspec_keys_define_code:nnn {fontspec-opentype} {RawFeature}
- {
- \__fontspec_update_featstr:n {#1}
- }
+ {
+ \__fontspec_update_featstr:n {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-aat} {RawFeature}
- {
- \__fontspec_update_featstr:n {#1}
- }
+ {
+ \__fontspec_update_featstr:n {#1}
+ }
-%%^^A%% fontspec-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-feat-opentype.dtx -- part of FONTSPEC <wspr.io/fontspec>
\__fontspec_feat_prop_add:nn {salt} { Alternate\,=\,$N$ }
\__fontspec_feat_prop_add:nn {nalt} { Annotation\,=\,$N$ }
@@ -2799,150 +2832,151 @@
\__fontspec_define_opentype_onoffreset:nnnnn {Vertical} {ProportionalMetrics} {vpal} {vpal} {+valt,+vhal}
\__fontspec_define_opentype_feature_group:n {Alternate}
\keys_define:nn {fontspec-opentype}
- {
- Alternate .default:n = {0} ,
- Alternate / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
- { \__fontspec_make_OT_feature:nnn {salt}{ +salt = ##1 }{} }
- }
- }
+ {
+ Alternate .default:n = {0} ,
+ Alternate / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ { \__fontspec_make_OT_feature:nnn {salt}{ +salt = ##1 }{} }
+ }
+ }
\aliasfontfeature{Alternate}{StylisticAlternates}
\__fontspec_define_opentype_feature_group:n {Variant}
\keys_define:nn {fontspec-opentype}
- {
- Variant .default:n = {0} ,
- Variant / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
+ {
+ Variant .default:n = {0} ,
+ Variant / unknown .code:n =
{
- \__fontspec_make_OT_feature:xxx { ss \two at digits {##1} } { +ss \two at digits {##1} } {}
+ \clist_map_inline:nn {#1}
+ {
+ \__fontspec_make_OT_feature:xxx { ss \two at digits {##1} } { +ss \two at digits {##1} } {}
+ }
}
- }
- }
+ }
\aliasfontfeature{Variant}{StylisticSet}
\__fontspec_define_opentype_feature_group:n {CharacterVariant}
\use:x
- {
- \cs_new:Npn \exp_not:N \fontspec_parse_cv:w
- ##1 \c_colon_str ##2 \c_colon_str ##3 \exp_not:N \q_nil
- {
- \__fontspec_make_OT_feature:xxx
- { cv \exp_not:N \two at digits {##1} } { +cv \exp_not:N \two at digits {##1} = ##2 } {}
- }
- \keys_define:nn {fontspec-opentype}
- {
- CharacterVariant / unknown .code:n =
- {
- \clist_map_inline:nn {##1}
- {
- \exp_not:N \fontspec_parse_cv:w
- ####1 \c_colon_str 0 \c_colon_str \exp_not:N \q_nil
- }
- }
- }
- }
+ {
+ \cs_new:Npn \exp_not:N \fontspec_parse_cv:w
+ ##1 \c_colon_str ##2 \c_colon_str ##3 \exp_not:N \q_nil
+ {
+ \__fontspec_make_OT_feature:xxx
+ { cv \exp_not:N \two at digits {##1} }
+ { +cv \exp_not:N \two at digits {##1} = ##2 } {}
+ }
+ \keys_define:nn {fontspec-opentype}
+ {
+ CharacterVariant / unknown .code:n =
+ {
+ \clist_map_inline:nn {##1}
+ {
+ \exp_not:N \fontspec_parse_cv:w
+ ####1 \c_colon_str 0 \c_colon_str \exp_not:N \q_nil
+ }
+ }
+ }
+ }
\__fontspec_define_opentype_feature_group:n {Annotation}
\keys_define:nn {fontspec-opentype}
- {
- Annotation .default:n = {0} ,
- Annotation / unknown .code:n =
- {
- \__fontspec_make_OT_feature:nnn {nalt} {+nalt=#1} {}
- }
- }
+ {
+ Annotation .default:n = {0} ,
+ Annotation / unknown .code:n =
+ {
+ \__fontspec_make_OT_feature:nnn {nalt} {+nalt=#1} {}
+ }
+ }
\__fontspec_define_opentype_feature_group:n {Ornament}
\keys_define:nn {fontspec-opentype}
- {
- Ornament .default:n = {0} ,
- Ornament / unknown .code:n =
- {
- \__fontspec_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
- }
- }
+ {
+ Ornament .default:n = {0} ,
+ Ornament / unknown .code:n =
+ {
+ \__fontspec_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
+ }
+ }
\keys_define:nn { fontspec-opentype } { Script .choice: }
\cs_new:Nn \fontspec_new_script:nn
- {
- \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
- \bool_set_false:N \l__fontspec_script_exist_bool
- \clist_map_inline:nn {#2}
- {
- \__fontspec_check_script:NnTF \l_fontspec_font {####1}
- {
- \tl_set:Nn \l_fontspec_script_tl {####1}
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
- \bool_set_true:N \l__fontspec_script_exist_bool
- \tl_gset:Nx \g__fontspec_single_feat_tl { script=####1 }
- \clist_map_break:
- }
- { }
- }
- \bool_if:NF \l__fontspec_script_exist_bool
- {
- \str_if_eq:nnTF {#1} {Latin}
- {
- \__fontspec_warning:nx {script-not-exist} {#1}
- }
- {
- \__fontspec_check_script:NnTF \l_fontspec_font {latn}
- {
- \__fontspec_warning:nx {script-not-exist-latn} {#1}
- \tl_set:Nn \l_fontspec_script_tl {latn}
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
- }
- {
- \__fontspec_warning:nx {script-not-exist} {#1}
- }
- }
- }
- }
- }
+ {
+ \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
+ \bool_set_false:N \l__fontspec_script_exist_bool
+ \clist_map_inline:nn {#2}
+ {
+ \__fontspec_check_script:NnTF \l_fontspec_font {####1}
+ {
+ \tl_set:Nn \l_fontspec_script_tl {####1}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
+ \bool_set_true:N \l__fontspec_script_exist_bool
+ \tl_gset:Nx \g__fontspec_single_feat_tl { script=####1 }
+ \clist_map_break:
+ }
+ { }
+ }
+ \bool_if:NF \l__fontspec_script_exist_bool
+ {
+ \str_if_eq:nnTF {#1} {Latin}
+ {
+ \__fontspec_warning:nx {script-not-exist} {#1}
+ }
+ {
+ \__fontspec_check_script:NnTF \l_fontspec_font {latn}
+ {
+ \__fontspec_warning:nx {script-not-exist-latn} {#1}
+ \tl_set:Nn \l_fontspec_script_tl {latn}
+ \int_set:Nn \l__fontspec_script_int {\l__fontspec_strnum_int}
+ }
+ {
+ \__fontspec_warning:nx {script-not-exist} {#1}
+ }
+ }
+ }
+ }
+ }
\keys_define:nn { fontspec-opentype } { Language .choice: }
\cs_new:Nn \fontspec_new_lang:nn
- {
- \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
- \__fontspec_check_lang:NnTF \l_fontspec_font {#2}
- {
- \tl_set:Nn \l_fontspec_lang_tl {#2}
- \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
- \tl_gset:Nx \g__fontspec_single_feat_tl { language=#2 }
- }
- {
- \__fontspec_warning:nx {language-not-exist} {#1}
- \keys_set:nn { fontspec-opentype } { Language = Default }
- }
+ {
+ \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
+ \__fontspec_check_lang:NnTF \l_fontspec_font {#2}
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {#2}
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_gset:Nx \g__fontspec_single_feat_tl { language=#2 }
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {#1}
+ \keys_set:nn { fontspec-opentype } { Language = Default }
+ }
+ }
}
- }
\__fontspec_keys_define_code:nnn {fontspec-opentype}{ Language / Default }
- {
- \tl_set:Nn \l_fontspec_lang_tl {DFLT}
- \int_zero:N \l__fontspec_language_int
- \tl_gset:Nn \g__fontspec_single_feat_tl { language=DFLT }
- }
+ {
+ \tl_set:Nn \l_fontspec_lang_tl {DFLT}
+ \int_zero:N \l__fontspec_language_int
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=DFLT }
+ }
\keys_define:nn {fontspec-opentype}
- {
- Language / Turkish .code:n =
- {
- \__fontspec_check_lang:NnTF \l_fontspec_font {TRK}
- {
- \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TRK}
- \tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
- }
- {
- \__fontspec_check_lang:NnTF \l_fontspec_font {TUR}
- {
- \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
- \tl_set:Nn \l_fontspec_lang_tl {TUR}
- \tl_gset:Nn \g__fontspec_single_feat_tl { language=TUR }
- }
- {
- \__fontspec_warning:nx {language-not-exist} {Turkish}
- \keys_set:nn {fontspec-opentype} {Language=Default}
- }
- }
- }
- }
+ {
+ Language / Turkish .code:n =
+ {
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TRK}
+ {
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TRK}
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=TRK }
+ }
+ {
+ \__fontspec_check_lang:NnTF \l_fontspec_font {TUR}
+ {
+ \int_set:Nn \l__fontspec_language_int {\l__fontspec_strnum_int}
+ \tl_set:Nn \l_fontspec_lang_tl {TUR}
+ \tl_gset:Nn \g__fontspec_single_feat_tl { language=TUR }
+ }
+ {
+ \__fontspec_warning:nx {language-not-exist} {Turkish}
+ \keys_set:nn {fontspec-opentype} {Language=Default}
+ }
+ }
+ }
+ }
\cs_new:Nn \__fontspec_ot_compat:nn
{
\aliasfontfeatureoption {#1} {#2Off} {No#2}
@@ -2965,7 +2999,7 @@
\__fontspec_ot_compat:nn {Diacritics} {AboveBase}
\__fontspec_ot_compat:nn {Diacritics} {BelowBase}
-%%^^A%% fontspec-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-scripts.dtx -- part of FONTSPEC <wspr.io/fontspec>
\newfontscript{Adlam}{adlm}
\newfontscript{Ahom}{ahom}
@@ -3112,7 +3146,7 @@
\newfontscript{N'ko}{nko~}
\newfontscript{Oriya}{ory2,orya}
-%%^^A%% fontspec-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-lang.dtx -- part of FONTSPEC <wspr.io/fontspec>
\newfontlanguage{Abaza}{ABA}
\newfontlanguage{Abkhazian}{ABK}
@@ -3497,7 +3531,7 @@
\newfontlanguage{Zande}{ZND}
\newfontlanguage{Zulu}{ZUL}
-%%^^A%% fontspec-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-feat-aat.dtx -- part of FONTSPEC <wspr.io/fontspec>
\__fontspec_define_aat_feature_group:n {Ligatures}
@@ -3569,37 +3603,36 @@
\__fontspec_define_aat_feature:nnnn {Fractions} {Diagonal} {11} {2}
\__fontspec_define_aat_feature_group:n { Alternate }
\keys_define:nn {fontspec-aat}
- {
- Alternate .default:n = {0} ,
- Alternate / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
+ {
+ Alternate .default:n = {0} ,
+ Alternate / unknown .code:n =
{
- \__fontspec_make_AAT_feature:nn {17}{##1}
+ \clist_map_inline:nn {#1}
+ {
+ \__fontspec_make_AAT_feature:nn {17}{##1}
+ }
}
- }
- }
+ }
\__fontspec_define_aat_feature_group:n {Variant}
\keys_define:nn {fontspec-aat}
- {
- Variant .default:n = {0} ,
- Variant / unknown .code:n =
- {
- \clist_map_inline:nn {#1}
- { \__fontspec_make_AAT_feature:nn {18}{##1} }
- }
- }
+ {
+ Variant .default:n = {0} ,
+ Variant / unknown .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ { \__fontspec_make_AAT_feature:nn {18}{##1} }
+ }
+ }
\aliasfontfeature{Variant}{StylisticSet}
\__fontspec_define_aat_feature_group:n {Vertical}
\keys_define:nn {fontspec-aat}
- {
- Vertical .choice: ,
- Vertical / RotatedGlyphs .code:n =
- {
- \__fontspec_update_featstr:n {vertical}
- }
- }
-
+ {
+ Vertical .choice: ,
+ Vertical / RotatedGlyphs .code:n =
+ {
+ \__fontspec_update_featstr:n {vertical}
+ }
+ }
\__fontspec_define_aat_feature_group:n {Style}
\__fontspec_define_aat_feature:nnnn {Style} {Italic} {32} {2}
\__fontspec_define_aat_feature:nnnn {Style} {Ruby} {28} {2}
@@ -3638,7 +3671,7 @@
\__fontspec_define_aat_feature:nnnn {Annotation} {BlackRoundSquare} {24} {10}
\__fontspec_define_aat_feature:nnnn {Annotation} {DoubleCircle} {24} {11}
-%%^^A%% fontspec-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-enc.dtx -- part of FONTSPEC <wspr.io/fontspec>
\providecommand\UnicodeFontFile[2]{"[#1]:#2"}
\providecommand\UnicodeFontName[2]{"#1:#2"}
@@ -3728,7 +3761,7 @@
{ \c_backslash_str \UnicodeEncodingName \token_to_str:N #1 - \tl_to_str:n {#2} }
}
-%%^^A%% fontspec-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-math.dtx -- part of FONTSPEC <wspr.io/fontspec>
\@ifpackageloaded{euler}
{ \bool_gset_true:N \g__fontspec_pkg_euler_loaded_bool }
{ \bool_gset_false:N \g__fontspec_pkg_euler_loaded_bool }
@@ -3799,6 +3832,7 @@
\DeclareMathDelimiter{]}{\mathclose}{legacymaths}{93}{largesymbols}{3}
\DeclareMathDelimiter{/}{\mathord}{legacymaths}{47}{largesymbols}{14}
\DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{36}
+ \renewcommand{\hbar}{{\mathchar"AF\mkern-9mu h}}% TODO: test with other fonts
}
}
\DeclareSymbolFont{operators}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault
@@ -3861,23 +3895,23 @@
}
\AtBeginDocument{\fontspec_maybe_setup_maths:}
-%%^^A%% fontspec-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-closing.dtx -- part of FONTSPEC <wspr.io/fontspec>
\bool_if:NT \g__fontspec_cfg_bool
- {
- \InputIfFileExists{fontspec.cfg}
- {}
- {\typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.}}
- }
+ {
+ \InputIfFileExists{fontspec.cfg}
+ {}
+ { \typeout{No~ fontspec.cfg~ file~ found;~ no~ configuration~ loaded.} }
+ }
-%%^^A%% fontspec-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-xfss.dtx -- part of FONTSPEC <wspr.io/fontspec>
\providecommand*\itscdefault{\itdefault\scdefault}
\providecommand*\slscdefault{\sldefault\scdefault}
\DeclareRobustCommand{\sishape}
- {
- \not at math@alphabet\sishape\relax
- \fontshape{\itscdefault}\selectfont
- }
+ {
+ \not at math@alphabet\sishape\relax
+ \fontshape{\itscdefault}\selectfont
+ }
\DeclareTextFontCommand{\textsi}{\sishape}
\cs_new:Nn \__fontspec_shape_merge:nn { c__fontspec_shape_#1_#2_tl }
\tl_const:cn { \__fontspec_shape_merge:nn \itdefault \scdefault } {\itscdefault}
@@ -3908,25 +3942,25 @@
\prg_return_true: \prg_return_false:
}
\DeclareRobustCommand \itshape
- {
- \not at math@alphabet\itshape\mathit
- \fontspec_merge_shape:n\itdefault
- }
+ {
+ \not at math@alphabet\itshape\mathit
+ \fontspec_merge_shape:n\itdefault
+ }
\DeclareRobustCommand \slshape
- {
- \not at math@alphabet\slshape\relax
- \fontspec_merge_shape:n\sldefault
- }
+ {
+ \not at math@alphabet\slshape\relax
+ \fontspec_merge_shape:n\sldefault
+ }
\DeclareRobustCommand \scshape
- {
- \not at math@alphabet\scshape\relax
- \fontspec_merge_shape:n\scdefault
- }
+ {
+ \not at math@alphabet\scshape\relax
+ \fontspec_merge_shape:n\scdefault
+ }
\DeclareRobustCommand \upshape
- {
- \not at math@alphabet\upshape\relax
- \fontspec_merge_shape:n\updefault
- }
+ {
+ \not at math@alphabet\upshape\relax
+ \fontspec_merge_shape:n\updefault
+ }
\cs_new_protected:Npn \emfontdeclare #1
{
\prop_gclear:N \g__fontspec_em_prop
@@ -4029,33 +4063,33 @@
\strongfontdeclare{ \bfseries }
\emfontdeclare{ \emshape, \eminnershape }
-%%^^A%% fontspec-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
+%%^^A%% fontspec-code-patches.dtx -- part of FONTSPEC <wspr.io/fontspec>
\DeclareRobustCommand{\-}
- {
- \discretionary
- {
- \char\ifnum\hyphenchar\font<\z@
- \xlx at defaulthyphenchar
- \else
- \hyphenchar\font
- \fi
- }{}{}
- }
+ {
+ \discretionary
+ {
+ \char\ifnum\hyphenchar\font<\z@
+ \xlx at defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}
+ }
\def\xlx at defaulthyphenchar{`\-}
\cs_new:Nn \fontspec_visible_space:
- {
- \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
- { \char"2423\scan_stop: }
- { \fontspec_visible_space_fallback: }
- }
+ {
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
+ { \char"2423\scan_stop: }
+ { \fontspec_visible_space_fallback: }
+ }
\cs_new:Nn \fontspec_visible_space_fallback:
- {
{
- \usefont{\g_fontspec_encoding_tl}{lmtt}{\f at series}{\f at shape}
- \textvisiblespace
+ {
+ \usefont{\g_fontspec_encoding_tl}{lmtt}{\f at series}{\f at shape}
+ \textvisiblespace
+ }
}
- }
\group_begin:
\char_set_catcode_active:n{"20}%
\cs_gset:Npn\fontspec_print_visible_spaces:{%
@@ -4064,71 +4098,72 @@
}%
\group_end:
\def\verb
- {
- \relax\ifmmode\hbox\else\leavevmode\null\fi
- \bgroup
- \verb at eol@error \let\do\@makeother \dospecials
- \verbatim at font\@noligs
- \@ifstar\__fontspecsverb\@verb
- }
+ {
+ \relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \verb at eol@error \let\do\@makeother \dospecials
+ \verbatim at font\@noligs
+ \@ifstar\__fontspecsverb\@verb
+ }
\def\__fontspecsverb{\fontspec_print_visible_spaces:\@sverb}
\AtBeginDocument
- {
- \fontspec_patch_verbatim:
- \fontspec_patch_moreverb:
- \fontspec_patch_fancyvrb:
- \fontspec_patch_listings:
- }
+ {
+ \fontspec_patch_verbatim:
+ \fontspec_patch_moreverb:
+ \fontspec_patch_fancyvrb:
+ \fontspec_patch_listings:
+ }
\cs_set:Npn \fontspec_patch_verbatim:
- {
- \@ifpackageloaded{verbatim}
- {
- \cs_set:cpn {verbatim*}
- {
- \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim at start
- }
- }
- {
- \cs_set:cpn {verbatim*}
- {
- \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
- }
- }
+ {
+ \@ifpackageloaded{verbatim}
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \group_begin: \@verbatim \fontspec_print_visible_spaces: \verbatim at start
+ }
+ }
+ {
+ \cs_set:cpn {verbatim*}
+ {
+ \@verbatim \fontspec_print_visible_spaces: \@sxverbatim
+ }
+ }
}
\cs_set:Npn \fontspec_patch_moreverb:
- {
- \@ifpackageloaded{moreverb}{
- \cs_set:cpn {listingcont*}
- {
- \cs_set:Npn \verbatim at processline
- {
- \thelisting at line \global\advance\listing at line\c_one
- \the\verbatim at line\par
- }
- \@verbatim \fontspec_print_visible_spaces: \verbatim at start
- }
- }{}
- }
+ {
+ \@ifpackageloaded{moreverb}
+ {
+ \cs_set:cpn {listingcont*}
+ {
+ \cs_set:Npn \verbatim at processline
+ {
+ \thelisting at line \global\advance\listing at line1\relax
+ \the\verbatim at line\par
+ }
+ \@verbatim \fontspec_print_visible_spaces: \verbatim at start
+ }
+ }{}
+ }
\cs_set:Npn \fontspec_patch_fancyvrb:
- {
- \@ifpackageloaded{fancyvrb}
- {
- \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
- }{}
- }
+ {
+ \@ifpackageloaded{fancyvrb}
+ {
+ \cs_set_eq:NN \FancyVerbSpace \fontspec_visible_space:
+ }{}
+ }
\cs_set:Npn \fontspec_patch_listings:
- {
- \@ifpackageloaded{listings}
- {
- \cs_set_eq:NN \lst at visiblespace \fontspec_visible_space:
- }{}
- }
+ {
+ \@ifpackageloaded{listings}
+ {
+ \cs_set_eq:NN \lst at visiblespace \fontspec_visible_space:
+ }{}
+ }
\RenewDocumentCommand \oldstylenums {m}
- {
- { \addfontfeature{Numbers=OldStyle} #1 }
- }
+ {
+ { \addfontfeature{Numbers=OldStyle} #1 }
+ }
\NewDocumentCommand \liningnums {m}
- {
- { \addfontfeature{Numbers=Lining} #1 }
- }
+ {
+ { \addfontfeature{Numbers=Lining} #1 }
+ }
Modified: trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.lua 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.lua 2019-01-09 22:44:11 UTC (rev 49650)
@@ -23,8 +23,8 @@
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = "v2.6h",
- date = "2018/07/30",
+ version = "2.6j",
+ date = "2019/01/10",
description = "Font selection for XeLaTeX and LuaLaTeX",
author = "Khaled Hosny, Philipp Gesang, Will Robertson",
copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
Modified: trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.sty 2019-01-09 21:31:58 UTC (rev 49649)
+++ trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.sty 2019-01-09 22:44:11 UTC (rev 49650)
@@ -21,7 +21,7 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec}%
- {2018/07/30}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
+ {2019/01/10}{2.6j}{Font selection for XeLaTeX and LuaLaTeX}
%%^^A%% fontspec-code-load.dtx -- part of FONTSPEC <wspr.io/fontspec>
\sys_if_engine_luatex:T
More information about the tex-live-commits
mailing list