summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fontspec
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-24 22:12:49 +0000
committerKarl Berry <karl@freefriends.org>2019-01-24 22:12:49 +0000
commit28ce99e6ad7fc066bae92899fa880557fb85b35a (patch)
treec6057c4c24337762c24bb5e4cc36ea37d247ff68 /Master/texmf-dist/source/latex/fontspec
parent6ce7a289e11addd60648c7e43493ae946a1f2d73 (diff)
fontspec (24jan19)
git-svn-id: svn://tug.org/texlive/trunk@49809 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec')
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx17
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx87
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx37
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx2
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx22
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx113
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx21
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx21
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx1
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx45
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx19
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx1
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx31
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx10
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex26
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex7
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx6
17 files changed, 270 insertions, 196 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx
index f53477df080..7164cb47a88 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-api.dtx
@@ -267,10 +267,12 @@
% \begin{macrocode}
\cs_new:Nn \fontspec_set_family:Nnn
{
+ \tl_set:Nn \l_@@_fontface_cs_tl {\l_fontspec_font} % reset
\tl_set:Nn \l_@@_family_label_tl {#1}
\@@_select_font_family:nn {#2} {#3}
- \tl_clear_new:N #1
+ \tl_if_exist:NF #1 { \tl_new:N #1 }
\tl_set_eq:NN #1 \l_fontspec_family_tl
+ \tl_set:Nn \l_@@_fontface_cs_tl {\l_fontspec_font} % reset
}
% \end{macrocode}
%
@@ -285,12 +287,15 @@
% means that settings such as fontdimens will be lost.
% (Discovered in unicode-math.) Investigate!
% \begin{macrocode}
- \cs_new:Nn \fontspec_set_fontface:NNnn
+\tl_new:N \l_@@_fontface_cs_tl
+\tl_set:Nn \l_@@_fontface_cs_tl {\l_fontspec_font}
+\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:Nn \l_@@_fontface_cs_tl {#1}
+ \tl_set:Nn \l_@@_family_label_tl {#2}
+ \@@_select_font_family:nn {#3} {#4}
\tl_set_eq:NN #2 \l_fontspec_family_tl
+ \tl_set:Nn \l_@@_fontface_cs_tl {\l_fontspec_font} % reset
}
% \end{macrocode}
% \end{macro}
@@ -322,7 +327,7 @@
\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} }
+ { \@@_primitive_font_current_name: } { \tl_to_str:n {#1} }
{ \prg_return_true: } { \prg_return_false: }
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx
index dc3db933869..590d69f77f5 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-feat-opentype.dtx
@@ -44,7 +44,9 @@
\keys_define:nn {fontspec-opentype}
{
Ligatures / TeX .code:n = { \tl_set:Nn \l_@@_mapping_tl {tex-text} },
+ Ligatures / TeX .groups:n = {opentype},
Ligatures / TeXReset .code:n = { \tl_clear:N \l_@@_mapping_tl },
+ Ligatures / TeXReset .groups:n = {opentype},
}
%</XE>
%<LU>\@@_define_opentype_onreset:nnnnn {Ligatures} {TeX} {} { +tlig } {}
@@ -313,6 +315,7 @@
\keys_define:nn {fontspec-opentype}
{
Alternate .default:n = {0} ,
+ Alternate .groups:n = {opentype},
Alternate / unknown .code:n =
{
\clist_map_inline:nn {#1}
@@ -343,6 +346,7 @@
\keys_define:nn {fontspec-opentype}
{
Variant .default:n = {0} ,
+ Variant .groups:n = {opentype} ,
Variant / unknown .code:n =
{
\clist_map_inline:nn {#1}
@@ -391,6 +395,7 @@
\keys_define:nn {fontspec-opentype}
{
Annotation .default:n = {0} ,
+ Annotation .groups:n = {opentype},
Annotation / unknown .code:n =
{
\@@_make_OT_feature:nnn {nalt} {+nalt=#1} {}
@@ -405,6 +410,7 @@
\keys_define:nn {fontspec-opentype}
{
Ornament .default:n = {0} ,
+ Ornament .groups:n = {opentype},
Ornament / unknown .code:n =
{
\@@_make_OT_feature:nnn {ornm} { +ornm=#1 } {}
@@ -419,43 +425,46 @@
% \subsection{Script}
%
% \begin{macrocode}
-\keys_define:nn { fontspec-opentype } { Script .choice: }
+\keys_define:nn {fontspec-opentype}
+ {
+ Script .choice: ,
+ Script .groups:n = {opentype} ,
+ }
\cs_new:Nn \fontspec_new_script:nn
{
- \keys_define:nn { fontspec-opentype } { Script / #1 .code:n =
+ \keys_define:nn {fontspec-opentype} { Script / #1 .code:n =
{
- \bool_if:NF \l_@@_scripts_missing_bool
+%<debug>\typeout{Trying~[Script=#1]}
+ \bool_set_false:N \l_@@_scriptlang_exist_bool
+ \clist_map_inline:nn {#2}
+ {
+ \exp_args:No \@@_check_script:NnT \l_@@_fontface_cs_tl {####1}
+ {
+%<debug>\typeout{Script~tag~found:~####1}
+ \tl_set:Nn \l_@@_script_name_tl {#1}
+ \tl_set:Nn \l_fontspec_script_tl {####1}
+ \int_set:Nn \l_@@_script_int {\l_@@_strnum_int}
+ \bool_set_true:N \l_@@_scriptlang_exist_bool
+ \tl_gset:Nx \g_@@_single_feat_tl { script=####1 }
+ \clist_map_break:
+ }
+ }
+ \bool_if:NF \l_@@_scriptlang_exist_bool
{
- \bool_set_false:N \l_@@_scriptlang_exist_bool
- \clist_map_inline:nn {#2}
+ \bool_if:nF { \str_if_eq_p:ee {#1} {CustomDefault} }
{
- \@@_check_script:NnT \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_@@_scriptlang_exist_bool
- \tl_gset:Nx \g_@@_single_feat_tl { script=####1 }
- \clist_map_break:
- }
+ \tl_clear:N \l_@@_script_name_tl
+ \@@_warning:nx {no-script} {\l_fontspec_fontname_tl} {#1}
}
- \bool_if:NF \l_@@_scriptlang_exist_bool
+
+ \bool_if:nF
{
- \str_if_eq:eeTF {#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}
- \keys_set:nn {fontspec-opentype} { Script = Default }
- }
- }
+ \str_if_eq_p:ee {#1} {Default} ||
+ \str_if_eq_p:ee {#1} {Latin} ||
+ \str_if_eq_p:ee {#1} {CustomDefault}
+ }
+ {
+ \keys_set:nn {fontspec-opentype} { Script = CustomDefault }
}
}
}
@@ -467,15 +476,19 @@
% \subsection{Language}
%
% \begin{macrocode}
-\keys_define:nn {fontspec-opentype} { Language .choice: }
+\keys_define:nn {fontspec-opentype}
+ {
+ Language .choice: ,
+ Language .groups:n = {opentype} ,
+ }
\cs_new:Nn \fontspec_new_lang:nn
{
- \keys_define:nn { fontspec-opentype } { Language / #1 .code:n =
+ \keys_define:nn {fontspec-opentype} { Language / #1 .code:n =
{
\bool_set_false:N \l_@@_scriptlang_exist_bool
\clist_map_inline:nn {#2}
{
- \@@_check_lang:NnTF \l_fontspec_font {#2}
+ \exp_args:No \@@_check_lang:NnTF \l_@@_fontface_cs_tl {#2}
{
\tl_set:Nn \l_fontspec_lang_tl {#2}
\int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
@@ -494,9 +507,11 @@
}
% \end{macrocode}
%
-% \paragraph{Default}
-% I can't remember why this has to be special-cased. From memory, the OpenType default
-% language is hardcoded to have a zero value, although this might be some \XeTeX-specific thing.
+% \paragraph{Language=Default}
+% These are special-cased to avoid the additional logic above.
+% From memory, the OpenType default
+% language is hardcoded to have a zero value,
+% although this might be some \XeTeX-specific thing.
% \begin{macrocode}
\@@_keys_define_code:nnn {fontspec-opentype} { Language / Default }
{
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx
index be5155de476..88a107896f6 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx
@@ -12,13 +12,13 @@
% \begin{macrocode}
\cs_set:Npn \@@_primitive_font_set:Nnn #1#2#3
{
- \font #1 = #2 ~at~ #3 \scan_stop:
+ \font #1 = #2 ~at~ \dim_eval:n {#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:
+ \global \font #1 = #2 ~at~ \dim_eval:n {#3} \scan_stop:
}
% \end{macrocode}
% \end{macro}
@@ -45,13 +45,32 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[pTF]{\@@_primitive_font_set:NnnTF,\@@_primitive_font_gset:NnnTF}
+% \begin{macrocode}
+\prg_set_conditional:Nnn \@@_primitive_font_set:Nnn {TF,T,F}
+ {
+ \@@_primitive_font_set:Nnn #1 {#2} {#3}
+ \@@_primitive_font_if_null:NTF #1 {\prg_return_false:} {\prg_return_true:}
+ }
+\prg_set_conditional:Nnn \@@_primitive_font_gset:Nnn {TF,T,F}
+ {
+ \@@_primitive_font_gset:Nnn #1 {#2} {#3}
+ \@@_primitive_font_if_null:NTF #1 {\prg_return_false:} {\prg_return_true:}
+ }
+\cs_set:Npn \@@_primitive_font_set:Onn { \exp_last_unbraced:No \@@_primitive_font_set:Nnn }
+\cs_set:Npn \@@_primitive_font_set:OnnF { \exp_last_unbraced:No \@@_primitive_font_set:NnnF }
+\cs_set:Npn \@@_primitive_font_gset:Onn { \exp_last_unbraced:No \@@_primitive_font_gset:Nnn }
+\cs_set:Npn \@@_primitive_font_gset:OnnF { \exp_last_unbraced:No \@@_primitive_font_gset:NnnF }
+% \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_set:Nnn \l_@@_primitive_font {#1} { \f@size pt - 1sp }
\@@_primitive_font_if_null:NTF \l_@@_primitive_font
{ \group_end: \prg_return_false: }
{ \group_end: \prg_return_true: }
@@ -81,6 +100,18 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_primitive_font_get_name:N}
+% \begin{macro}{\@@_primitive_font_current_name:}
+% \begin{macrocode}
+\cs_new_eq:NN \@@_primitive_font_get_name:N \fontname
+\cs_new:Npn \@@_primitive_font_current_name:
+ {
+ \@@_primitive_font_get_name:N \tex_font:D
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \iffalse
% \begin{macrocode}
%</fontspec>
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx
index bb99c2a8870..a39cfe36aa1 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-graphite.dtx
@@ -38,7 +38,7 @@
\tl_if_empty:nTF {#1}
{ \@@_warning:n {aat-feature-not-exist} }
{
- \@@_make_AAT_feature_string:NnnTF \l_fontspec_font {#1}{#2}
+ \exp_args:No \@@_make_AAT_feature_string:NnnTF \l_@@_fontface_cs_tl {#1} {#2}
{
\@@_update_featstr:n {\l_fontspec_feature_string_tl}
}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx
index 58979626f38..57bae3bb4d7 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-interfaces.dtx
@@ -221,6 +221,28 @@
}
% \end{macrocode}
%
+% \begin{macro}{\oldstylenums}
+% This is performed only after the preamble to overwrite any redefinition by \pkg{textcomp}:
+% \begin{macrocode}
+\AtBeginDocument
+ {
+ \RenewDocumentCommand \oldstylenums {m}
+ {
+ \@@_main_oldstylenums:n {#1}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\liningnums}
+% \begin{macrocode}
+\NewDocumentCommand \liningnums {m}
+ {
+ \@@_main_liningnums:n {#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \iffalse
% \begin{macrocode}
%</fontspec>
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx
index d73f0f62b18..9dcea4f8e0e 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-internal.dtx
@@ -38,7 +38,7 @@
\@@_init:
\@@_sanitise_fontname:Nn \l_fontspec_fontname_tl {#2}
- \@@_sanitise_fontname:Nn \l_@@_fontname_up_tl {#2}
+ \@@_sanitise_fontname:Nn \l_@@_fontname_up_tl {#2}
\@@_sanitise_fontname:Nn \l_@@_basename_tl {#2}
\@@_if_detect_external:nT {#2}
@@ -230,24 +230,21 @@
\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@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
+ \@@_primitive_font_set:NnnF \l_@@_test_font
+ { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} }
+ { \f@size pt - 2sp }
+ { \@@_error:nx {font-not-found} {\l_@@_fontname_up_tl} }
+
%<debug>\typeout{Set~ base~ font~ properly: \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} }
- \@@_primitive_font_gset:Nnn \l_fontspec_font
- { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} } {\f@size pt}
- \l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
- \@@_check_script:NnTF \l_fontspec_font {DFLT}
- {
-%<debug>\typeout{Has~Opentype~scripts}
- \bool_set_false:N \l_@@_scripts_missing_bool
- }
- {
-%<debug>\typeout{No~Opentype~scripts}
- \bool_set_true:N \l_@@_scripts_missing_bool
- }
+ \@@_set_font_type:N \l_@@_test_font
+ \@@_primitive_font_gset:Onn \l_@@_fontface_cs_tl
+ { \@@_construct_font_call:nn { \l_@@_fontname_up_tl } {} }
+ { \f@size pt }
+
+ \l_@@_fontface_cs_tl % this is necessary for LuaLaTeX to check the scripts properly
+
}
% \end{macrocode}
% \end{macro}
@@ -313,42 +310,11 @@
%<debug> \typeout{:: _set_scriptlang:}
\bool_if:NT \l_@@_firsttime_bool
{
- \bool_if:NTF \l_@@_scripts_missing_bool
+ \tl_if_empty:NF \l_@@_script_name_tl
{
-%<debug> \typeout{:::: NADA}
- \@@_info:n {no-scripts}
- }
- {
- \tl_if_empty:NTF \l_@@_script_name_tl
- {
- \@@_check_script:NnTF \l_fontspec_font {latn}
- {
-%<debug> \typeout{:::: Defaulting to latn script}
- \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{:::: Default script only}
- \@@_info:n {dflt-script}
- \keys_set:nx {fontspec-opentype} {Script=Default}
- \keys_set:nx {fontspec-opentype} {Language=Default}
- }
- }
- {
- \tl_if_empty:NT \l_@@_lang_name_tl
- {
- \tl_set:Nn \l_@@_lang_name_tl {Default}
- }
-%<debug> \typeout{:::: Script=\l_@@_script_name_tl, Language=\l_@@_lang_name_tl}
- \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl}
- \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl}
- }
+ \keys_set:nx {fontspec-opentype} {Script=\l_@@_script_name_tl}
+ \keys_set:nx {fontspec-opentype} {Language=\l_@@_lang_name_tl}
}
}
}
@@ -595,7 +561,7 @@
% 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\
+% accordingly depending if the font in \cmd\l_fontspec_test_font\ is an \AAT\
% font or an OpenType font or a font with feature axes (either \AAT\ or
% Multiple Master), respectively.
% \begin{macrocode}
@@ -679,11 +645,12 @@
% \begin{macrocode}
\prg_new_conditional:Nnn \@@_if_autofont:nn {T,TF}
{
- \@@_primitive_font_set:Nnn \l_tmpa_font { \@@_construct_font_call:nn {#1} {} } {\f@size pt}
- \@@_primitive_font_set:Nnn \l_tmpb_font { \@@_construct_font_call:nn {#1#2} {} } {\f@size pt}
- \str_if_eq:eeTF { \fontname \l_tmpa_font } { \fontname \l_tmpb_font }
- { \prg_return_false: }
- { \prg_return_true: }
+ \group_begin:
+ \@@_primitive_font_set:Nnn \l_@@_tmpa_font { \@@_construct_font_call:nn {#1} {} } { \f@size pt + 1sp }
+ \@@_primitive_font_set:Nnn \l_@@_tmpb_font { \@@_construct_font_call:nn {#1#2} {} } { \f@size pt + 1sp }
+ \str_if_eq:eeTF { \@@_primitive_font_get_name:N \l_@@_tmpa_font } { \@@_primitive_font_get_name:N \l_@@_tmpb_font }
+ { \group_end: \prg_return_false: }
+ { \group_end: \prg_return_true: }
}
% \end{macrocode}
% \end{macro}
@@ -701,22 +668,23 @@
{
\group_begin:
\@@_keys_set_known:nxN {fontspec-preparse-external} { #4 } \l_@@_leftover_clist
- \@@_load_fontname:n {#1}
+ \@@_load_fontname:Nn \l_fontspec_fontname_tl {#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
+\cs_new:Nn \@@_load_fontname:Nn
{
-%<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
+%<debug> \typeout{:: @@_load_fontname:Nn \exp_not:N #1 (#1) {#2} }
+ \@@_load_external_fontoptions:Nn #1 {#2}
+ \prop_get:NVNF \g_@@_fontopts_prop #1 \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@size pt}
- \@@_primitive_font_if_null:NT \l_fontspec_font { \@@_error:nx {font-not-found} {#1} }
+ \@@_primitive_font_set:OnnF \l_@@_fontface_cs_tl
+ { \@@_construct_font_call:nn {#1} {} } { \f@size pt }
+ { \@@_error:nx {font-not-found} {#2} }
}
% \end{macrocode}
%
@@ -776,7 +744,7 @@
%<debug>\typeout{==~ size:~\l_@@_size_tl}
% "normal"
- \@@_load_fontname:n {\l_@@_sizedfont_tl}
+ \@@_load_fontname:Nn \l_fontspec_fontname_tl {\l_@@_sizedfont_tl}
\@@_setup_nfss:Nnnn \l_@@_nfss_tl {#1} {\l_@@_sizing_leftover_clist} {}
%<debug> \typeout{===~ sized~ font:~ \l_@@_sizedfont_tl}
@@ -797,7 +765,7 @@
\bool_set_true:N \l_@@_nosc_bool
}
}
- { \@@_load_fontname:n {\l_@@_fontname_sc_tl} }% local for each size
+ { \@@_load_fontname:Nn \l_fontspec_fontname_tl {\l_@@_fontname_sc_tl} }% local for each size
}
\bool_if:NF \l_@@_nosc_bool
@@ -818,6 +786,11 @@
\@@_get_features:n { #2 , #3 , #4 }
%<debug>\typeout{====~Gathered~features:~\g_@@_rawfeatures_sclist}
+ \tl_if_empty:NF \l_@@_scale_tl
+ {
+ \tl_set:Nx \l_@@_scale_tl { s*[\l_@@_scale_tl] }
+ }
+
\tl_put_right:Nx #1
{
<\l_@@_size_tl> \l_@@_scale_tl
@@ -979,7 +952,7 @@
%<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}
+ \exp_args:No \@@_check_ot_feat:NnTF \l_@@_fontface_cs_tl {smcp} {#1} {#2}
}
%<*XE>
\cs_new:Nn \@@_make_smallcaps:TF
@@ -988,7 +961,10 @@
{ \@@_make_ot_smallcaps:TF {#1} {#2} }
{
\bool_if:NT \l_@@_atsui_bool
- { \@@_make_AAT_feature_string:NnnTF \l_fontspec_font {3}{3} {#1} {#2} }
+ {
+ \exp_args:No \@@_make_AAT_feature_string:NnnTF
+ \l_@@_fontface_cs_tl {3} {3} {#1} {#2}
+ }
}
}
%</XE>
@@ -1126,6 +1102,7 @@
% \begin{macrocode}
\cs_new:Nn \@@_iv_str_to_num:Nn
{
+%<debug>\typeout{_iv_str_to_num:~#1~/~#2}
\@@_strip_leading_sign:Nw #1#2 \q_nil
}
\cs_generate_variant:Nn \@@_iv_str_to_num:Nn {Nx}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx
index 2aa33288fe4..3ed80ff740d 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-keyval.dtx
@@ -418,7 +418,16 @@
{MatchUppercase} { \@@_calc_scale:n {8} }
}
{ \tl_set:Nx \l_@@_scale_tl {#1} }
- \tl_set:Nx \l_@@_scale_tl { s*[\l_@@_scale_tl] }
+ }
+% \end{macrocode}
+%
+% \paragraph{ScaleAgain}
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec} {ScaleAgain}
+ {
+ \tl_if_empty:NT \l_@@_scale_tl { \tl_set:Nn \l_@@_scale_tl {1} }
+ \tl_set:Nx \l_@@_scale_tl { \fp_eval:n { #1 * \l_@@_scale_tl } }
+ \@@_info:n {set-scale}
}
% \end{macrocode}
%
@@ -447,12 +456,12 @@
\selectfont
\@@_set_font_dimen:NnN \l_@@_tmpa_dim {#1} \font
- \@@_set_font_dimen:NnN \l_@@_tmpb_dim {#1} \l_fontspec_font
+ \@@_set_font_dimen:NnN \l_@@_tmpb_dim {#1} \l_@@_fontface_cs_tl
\tl_set:Nx \l_@@_scale_tl
{
\fp_eval:n { \dim_to_fp:n {\l_@@_tmpa_dim} /
- \dim_to_fp:n {\l_@@_tmpb_dim} }
+ \dim_to_fp:n {\l_@@_tmpb_dim} }
}
\@@_info:n {set-scale}
@@ -597,12 +606,12 @@
{ \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}
+ \exp_args:No \@@_primitive_font_glyph_if_exist:NnTF \l_@@_fontface_cs_tl {\l_@@_hyphenchar_tl}
{
\tl_put_right:Nn \l_@@_postadjust_tl
{ \@@_primitive_font_set_hyphenchar:Nn \font { \l_@@_hyphenchar_tl } }
}
- { \@@_error:nx {no-glyph}{#1} }
+ { \@@_error:nx {no-glyph}{\l_fontspec_fontname_tl}{#1} }
}
}
@@ -719,7 +728,7 @@
\bool_if:nT { !\l_@@_ot_bool && !\l_@@_mm_bool }
{
\bool_if:NT \l_@@_firsttime_bool
- { \@@_warning:n {no-opticals} }
+ { \@@_warning:n {no-opticals} {\l_fontspec_fontname_tl} }
}
}
%</XE>
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx
index f80ea832584..7136249bdf3 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-msg.dtx
@@ -64,7 +64,7 @@
}
\@@_msg_new:nnn {fontspec} {no-glyph}
{
- '\l_fontspec_fontname_tl' does not contain glyph #1.
+ '#1' does not contain glyph #2.
}
\@@_msg_new:nnnn {fontspec} {euler-too-late}
{
@@ -135,15 +135,6 @@
{
OpenType tag '#1' is too long; script, language, and feature tags must be four characters or fewer.
}
-\@@_msg_new:nnn {fontspec} {script-not-exist}
- {
- Font '\l_fontspec_fontname_tl' does not contain script '#1'.
- }
-\@@_msg_new:nnn {fontspec} {script-not-exist-latn}
- {
- Font '\l_fontspec_fontname_tl' does not contain script '#1'.
- `Script=Latin` used instead.
- }
\@@_msg_new:nnn {fontspec} {aat-feature-not-exist}
{
'\l_keys_key_tl=\l_keys_value_tl' feature not supported
@@ -167,7 +158,7 @@
}
\@@_msg_new:nnn {fontspec} {no-opticals}
{
- '\l_fontspec_fontname_tl' doesn't appear to have an Optical Size axis.
+ '#1' doesn't appear to have an Optical Size axis.
}
\@@_msg_new:nnn {fontspec} {language-not-exist}
{
@@ -235,13 +226,9 @@
{
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} {dflt-script}
+\@@_msg_new:nnn {fontspec} {no-script}
{
- Font "\l_fontspec_fontname_tl" falling back to default (DFLT) script.
+ Font "#1" does not contain requested Script "#2".
}
\@@_msg_new:nnn {fontspec} {opa-twice}
{
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx
index b067c2ff7bd..b0b7655610c 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-opening.dtx
@@ -160,6 +160,7 @@
\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_p:n {e}
\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}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx
index 57087ce8a82..9508ca8c0db 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-opentype.dtx
@@ -14,7 +14,7 @@
% \begin{macrocode}
\cs_new:Nn \@@_define_opentype_feature_group:n
{
- \keys_define:nn {fontspec-opentype} { #1 .multichoice: }
+ \keys_define:nn {fontspec-opentype} { #1 .multichoice: , .groups:n = {opentype} }
}
% \end{macrocode}
% \end{macro}
@@ -44,7 +44,8 @@
\keys_define:nn {fontspec-opentype}
{
#1/#2 .code:n =
- { \@@_remove_clashing_featstr:n {#5} }
+ { \@@_remove_clashing_featstr:n {#5} } ,
+ #1/#2 .groups:n = {opentype}
}
}
{
@@ -54,7 +55,8 @@
{
%<debug> \typeout{::::::::fontspec-opentype~#1/#2~=~#3/#4/#5}
\@@_make_OT_feature:nnn {#3} {#4} {#5}
- }
+ } ,
+ #1/#2 .groups:n = {opentype}
}
}
}
@@ -116,7 +118,7 @@
\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}
+ \exp_args:No \@@_check_ot_feat:NnF \l_@@_fontface_cs_tl {#1}
{
\@@_warning:nx {icu-feature-not-exist-in-font} {#1}
\bool_set_false:N \l_@@_proceed_bool
@@ -149,11 +151,14 @@
% \begin{macrocode}
\prg_new_conditional:Nnn \@@_check_script:Nn {TF,T}
{
-%<debug>\typeout{:: _check_script:Nn}
+%<debug>\typeout{:: _check_script:Nn~#1~/~#2}
\bool_if:NTF \l_@@_never_check_bool
{ \prg_return_true: }
-%<*XE>
{
+ \bool_if:nTF { \tl_if_empty_p:e {#2} }
+ { \prg_return_false: }
+ {
+%<*XE>
%<debug>\typeout{::::~ checking~ script~ #2}
\@@_iv_str_to_num:Nx \l_@@_strnum_int {#2}
\int_set:Nn \l_tmpb_int { \XeTeXOTcountscripts #1 }
@@ -169,10 +174,8 @@
\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@fontshape/\f@size} }
@@ -188,8 +191,9 @@
%<debug>\typeout{::::::~ FALSE}
\prg_return_false:
}
- }
%</LU>
+ }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -211,10 +215,14 @@
% \begin{macrocode}
\prg_new_conditional:Nnn \@@_check_lang:Nnn {TF}
{
+%<debug>\typeout{:: _check_lang:Nn~#1~/~#2~/~#3~/}
\bool_if:NTF \l_@@_never_check_bool
{ \prg_return_true: }
-%<*XE>
{
+ \bool_if:nTF { \tl_if_empty_p:e {#3} }
+ { \prg_return_false: }
+ {
+%<*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
@@ -236,10 +244,8 @@
}
}
\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
@@ -250,8 +256,9 @@
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}
@@ -276,10 +283,13 @@
% \begin{macrocode}
\prg_new_conditional:Nnn \@@_check_ot_feat:Nnnn {TF,F}
{
- \bool_if:nTF {\l_@@_never_check_bool || \l_@@_scripts_missing_bool}
+ \bool_if:NTF \l_@@_never_check_bool
{ \prg_return_true: }
-%<*XE>
{
+ \bool_if:nTF { \tl_if_empty_p:e {#3} || \tl_if_empty_p:e {#4} }
+ { \prg_return_false: }
+ {
+%<*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}
@@ -304,10 +314,8 @@
\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}
@@ -320,8 +328,9 @@
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}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx
index 2df1d18f3fe..a191e39f423 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-patches.dtx
@@ -165,25 +165,6 @@
}
% \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}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx
index 57d32e5c485..3d5644dd2af 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-scripts.dtx
@@ -38,6 +38,7 @@
\newfontscript{Cypriot~Syllabary}{cprt}
\newfontscript{Cyrillic}{cyrl}
\newfontscript{Default}{DFLT}
+\newfontscript{CustomDefault}{latn,DFLT}
\newfontscript{Deseret}{dsrt}
\newfontscript{Devanagari}{dev2,deva}
\newfontscript{Duployan}{dupl}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx
index b17020e5f8c..b7ed105edcf 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-user.dtx
@@ -448,6 +448,9 @@
% \end{macro}
%
%
+% \subsection{High level conditionals}
+%
+%
% \begin{macro}{\IfFontFeatureActiveTF}
% \begin{macrocode}
\cs_new:Nn \@@_main_IfFontFeatureActiveTF:nnn
@@ -484,6 +487,34 @@
% \end{macrocode}
% \end{macro}
%
+%
+% \subsection{\cs{oldstylenums} and \cs{liningnums}}
+%
+% \begin{macro}{\oldstylenums}
+% \begin{macro}{\liningnums}
+% This command needs a redefinition.
+% And we may as well provide the reverse command.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_main_oldstylenums:n
+ {
+ \group_begin:
+ \addfontfeature{Numbers=OldStyle}
+ #1
+ \group_end:
+ }
+\cs_new_protected:Nn \@@_main_liningnums:n
+ {
+ \group_begin:
+ \addfontfeature{Numbers=Lining}
+ #1
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
% \iffalse
% \begin{macrocode}
%</fontspec>
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx
index db0223739ae..358acb36dca 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-vars.dtx
@@ -76,14 +76,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\l_@@_scripts_missing_bool}
-% True for a regular opentype font with at least the DFLT script.
-% False for a font lacking all script (and therefore language and feature) tags.
-% \begin{macrocode}
-\bool_new:N \l_@@_scripts_missing_bool
-% \end{macrocode}
-% \end{macro}
-%
% \paragraph{Counters}
% \begin{macrocode}
\int_new:N \l_@@_script_int
@@ -245,8 +237,10 @@
%
% \begin{macrocode}
\tl_new:N \l_@@_script_name_tl
+\tl_set:Nn \l_@@_script_name_tl {CustomDefault}
\tl_new:N \l_fontspec_script_tl
\tl_new:N \l_@@_lang_name_tl
+\tl_set:Nn \l_@@_lang_name_tl {Default}
\tl_new:N \l_fontspec_lang_tl
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
index 5e3cf7fee20..60e85ca925a 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-featset.tex
@@ -367,15 +367,13 @@ while defining opacity in this way, if you like.
In its explicit form, \feat{Scale} takes a single
numeric argument for linearly scaling the font, as demonstrated
in \exref{fontload}.
-It is now possible to
-measure the correct dimensions of the fonts loaded and
-calculate values to scale them automatically.
As well as a numerical argument, the \feat{Scale} feature
also accepts options \opt{MatchLowercase}
and \opt{MatchUppercase}, which will scale the font being selected to match
the current default roman font to either the height of the lowercase or
uppercase letters, respectively; these features are shown in \exref{scale}.
+The amount of scaling used in each instance is reported in the \texttt{.log} file.
\begin{Xexample}{scale}{Automatically calculated scale values.}
\setmainfont{Georgia}
@@ -385,21 +383,31 @@ uppercase letters, respectively; these features are shown in \exref{scale}.
L O G O \uc F O N T
\end{Xexample}
-The amount of scaling used in each instance is reported in the \texttt{.log} file.
-Since there is some subjectivity about the exact scaling to be used, these values
-should be used to fine-tune the results.
+Additional calls to the \feat{Scale} feature overwrite the settings of the former.
+If you want to accumulate scale factors (useful perhaps to fine-tune the settings of
+\opt{MatchLowercase}), the \feat{ScaleAgain} feature can be used as many times as
+necessary. For example:
+\begin{Verbatim}
+ [ Scale = 1.1 , Scale = 1.2 ] % -> scale of 1.2
+ [ Scale = 1.1 , ScaleAgain = 1.2 ] % -> scale of 1.32
+\end{Verbatim}
-Note that when |Scale=MatchLowercase| is used with |\setmainfont|, the new `main' font of the document will be scaled to match the old default.
-This may be undesirable in some cases, so to achieve `natural' scaling for the main font but automatically scale all other fonts selected, you may write
+Note that when |Scale=MatchLowercase| is used with |\setmainfont|, the new `main'
+font of the document will be scaled to match the old default.
+If you wish to automatically scale all fonts except have the main font use `natural'
+scaling, you may write
\begin{Verbatim}
\defaultfontfeatures{ Scale = MatchLowercase }
\defaultfontfeatures[\rmfamily]{ Scale = 1}
\end{Verbatim}
-One or both of these lines may be placed into a local |fontspec.cfg| file (see \vref{sec:config}) for this behaviour to be effected in your own documents automatically.
+One or both of these lines may be placed into a local |fontspec.cfg| file
+(see \vref{sec:config}) for this behaviour to be effected in your own documents
+automatically.
(Also see \vref{sec:defaults} for more information on setting font defaults.)
+
\subsection{Interword space}
While the space between words can be varied on an individual
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
index faf7fc3ff05..b290167279b 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
@@ -134,7 +134,9 @@ When selecting fonts by file name, any font that can be found in the default
search paths may be used directly (including in the current directory)
without having to explicitly define the location of the font file on disk.
-Fonts selected by filename must include bold and italic variants explicitly.
+Fonts selected by filename must include bold and italic variants explicitly,
+unless a \texttt{.fontspec} file is supplied for the font family (see section~\ref{sec:fontspecfile}).
+We'll give some first examples specifying everything explicitly:
\begin{Verbatim}
\setmainfont{texgyrepagella-regular.otf}[
BoldFont = texgyrepagella-bold.otf ,
@@ -187,7 +189,8 @@ My preference is to always be explicit and include the extension; this also allo
In previous versions of the package, the |Path| feature was also provided under the alias |ExternalLocation|, but this latter name is now deprecated and should not be used for new documents.
-\subsection{By custom file name}
+\subsection{By custom file name using a \texttt{.fontspec} file}
+\label{sec:fontspecfile}
When \pkg{fontspec} is first asked to load a font, a font settings file is searched
for with the name `\meta{fontname}\texttt{.fontspec}'.\footnote{Located in the current folder or within a standard \texttt{texmf} location.}
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
index 8f9606fc750..b18643561f4 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -71,7 +71,7 @@
\ProvidesExplFile{fontspec.dtx}
%</dtx>
%<*fontspec>
- {2019/01/18}{2.6l}{Font selection for XeLaTeX and LuaLaTeX}
+ {2019/01/24}{2.7}{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 = "2.6l",
-%<lua> date = "2019/01/18",
+%<lua> version = "2.7",
+%<lua> date = "2019/01/24",
%<lua> description = "Font selection for XeLaTeX and LuaLaTeX",
%<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",