texlive[48320] Master/texmf-dist: fontspec (31jul18)
commits+karl at tug.org
commits+karl at tug.org
Tue Jul 31 22:54:05 CEST 2018
Revision: 48320
http://tug.org/svn/texlive?view=revision&revision=48320
Author: karl
Date: 2018-07-31 22:54:05 +0200 (Tue, 31 Jul 2018)
Log Message:
-----------
fontspec (31jul18)
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-api.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
trunk/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.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-vars.dtx
trunk/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
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
Modified: trunk/Master/texmf-dist/doc/latex/fontspec/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontspec/CHANGES.md 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/doc/latex/fontspec/CHANGES.md 2018-07-31 20:54:05 UTC (rev 48320)
@@ -1,8 +1,16 @@
Change history
==============
-## v2.6h (2018/07/29)
+## v2.6i (2018/07/30)
+ * 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
+ `Font=` to specify the filename.
+
+
+## v2.6h (2018/07/30)
+
* `expl3` internals updated so loading `expl3` with the `check-declarations` option will run without error.
* Fix bug with `FontFace` in which spaces weren't being ignored.
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)
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-api.dtx 2018-07-31 20:54:05 UTC (rev 48320)
@@ -173,8 +173,8 @@
\@@_set_font_type:N \font
\bool_if:NTF \l_@@_ot_bool
{
- \prop_get:cnN {g_@@_fontinfo_ \f at family _prop} {script-num} \l_@@_tmpf_tl
- \int_set:Nn \l_@@_script_int {\l_@@_tmpf_tl}
+ \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:
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-doc-fontsel.tex 2018-07-31 20:54:05 UTC (rev 48320)
@@ -88,6 +88,8 @@
`Known to' in this case generally means `exists in a standard fonts location'
such as |~/Library/Fonts| on \MacOSX, or |C:\Windows\Fonts| on Windows.
In \LuaTeX, fonts found in the \textsc{texmf} tree can also be loaded by name.
+In \XeTeX, fonts found in the \textsc{texmf} tree can be loaded in Windows and Linux,
+but not on \MacOSX.
The simplest example might be something like
\begin{Verbatim}
@@ -100,9 +102,13 @@
The `font name' can be found in various ways, such as by looking in the name listed in a application like \emph{Font Book} on Mac~OS~X.
Alternatively, \TeX{}Live contains the \texttt{otfinfo} command line program, which can query this information; for example:
\begin{Verbatim}
- otfinfo -a `kpsewhich lmroman10-regular.otf`
+ otfinfo -i `kpsewhich lmroman10-regular.otf`
\end{Verbatim}
-results in `\texttt{LM Roman 10}'.
+results in a line that reads:
+\begin{Verbatim}
+ Preferred family: Latin Modern Roman
+\end{Verbatim}
+(The `preferred family' name is usually better than the `family' name.)
\paragraph{\LuaTeX\ users only}
In order to load fonts by their name rather than by their filename (\eg,
@@ -201,7 +207,7 @@
This mechanism can be used to define custom names or aliases for your font collections.
The syntax within this file follows from the \cs{defaultfontfeatures}, defined in more detail later but mirroring the standard \pkg{fontspec} font loading syntax.
As an example, suppose we're defining a font family to be loaded with \verb|\setmainfont{My Charis}|.
-The corresponding \texttt{MyCharis.fontspec} file would containing, say,
+The corresponding \texttt{MyCharis.fontspec} file would contain, say,
\begin{Verbatim}
\defaultfontfeatures[My Charis]
{
@@ -221,10 +227,30 @@
\defaultfontfeatures[CharisSILR]{Color=blue}
\defaultfontfeatures[CharisSILB]{Color=red}
\end{Verbatim}
-Such configuration lines could be stored either inline inside \texttt{My Charis.fontspec} or within their own \texttt{.fontspec} files; in this way, \pkg{fontspec} is designed to handle `nested' configuration options.
+Such configuration lines could be stored either inline inside \texttt{My Charis.fontspec}
+or within their own \texttt{.fontspec} files; in this way, \pkg{fontspec} is designed to
+handle `nested' configuration options.
+Where \cs{defaultfontfeatures} is being used to specify font faces by a custom name,
+the \feat{Font} feature is used to set the filename of the font face. For example:
+\begin{Verbatim}
+ \defaultfontfeatures[charis]
+ {
+ UprightFont = charis-regular,
+ % <other desired options for all font faces in the family>
+ }
+ \defaultfontfeatures[charis-regular]
+ {
+ Font = CharisSILR
+ % <other desired options just for the `upright' font>
+ }
+\end{Verbatim}
+The \pkg{fontspec} interface here is designed to be flexible to accomodate a variety
+of use cases; there is more than one way to achieve the same outcome when font faces are
+collected together into a larger font family.
+
\subsection{Querying whether a font `exists'}
\cmdbox{
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-graphite.dtx 2018-07-31 20:54:05 UTC (rev 48320)
@@ -66,31 +66,31 @@
% \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
+ \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}
+ \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 #3}
}
{
- \tl_set:Nx \l_tmpb_tl
+ \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:NF \l_@@_tmpb_tl { \tl_put_left:Nn \l_@@_tmpb_tl {!} }
}
}
- \tl_if_empty:NTF \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 }
+ \tl_set:Nx \l_fontspec_feature_string_tl { \l_@@_tmpa_tl = \l_@@_tmpb_tl }
\prg_return_true:
}
}
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-internal.dtx 2018-07-31 20:54:05 UTC (rev 48320)
@@ -676,10 +676,19 @@
\@@_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}
@@ -995,7 +1004,6 @@
\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
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-keyval.dtx 2018-07-31 20:54:05 UTC (rev 48320)
@@ -2,9 +2,6 @@
% \section{Font loading (\pkg{keyval}) definitions}
%
-% This is the tedious section where we correlate all possible
-% (eventually) font feature requests with their \XeTeX\ representations.
-%
% \iffalse
% \begin{macrocode}
%<*fontspec>
@@ -11,7 +8,8 @@
% \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
{
@@ -21,6 +19,7 @@
}
% \end{macrocode}
%
+% Wrapper function to save some characters in the source:
% \begin{macrocode}
\cs_new:Nn \@@_keys_define_code:nnn
{
@@ -37,7 +36,7 @@
}
% \end{macrocode}
%
-% \subsubsection{Pre-parsing naming information}
+% \subsection{Pre-pre-parsing stages}
%
% These features are extracted from the font feature list before all others.
%
@@ -90,12 +89,7 @@
\@@_keys_define_code:nnn {fontspec} {Extension} {}
% \end{macrocode}
%
-% \subsubsection{Pre-parsed features}
%
-% After the font name(s) have been sorted out, now need to extract any
-% renderer/font configuration features that need to be processed before
-% all other font features.
-%
% \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}
@@ -132,6 +126,8 @@
}
% \end{macrocode}
%
+% \subsection{Pre-parsed features}
+%
% \paragraph{OpenType script/language}
% See later for the resolutions from \pkg{fontspec} features to OpenType definitions.
% \begin{macrocode}
@@ -150,6 +146,7 @@
}
% \end{macrocode}
%
+%
% \paragraph{TTC font index}
% \begin{macrocode}
\@@_keys_define_code:nnn {fontspec-preparse} {FontIndex}
@@ -166,109 +163,115 @@
}
% \end{macrocode}
%
-% \subsubsection{Bold/italic choosing options}
+% \subsection{Font faces}
%
-% The \feat{Bold}, \feat{Italic}, and \feat{BoldItalic}
-% features are for defining explicitly the bold and italic fonts used
-% in a font family.
+% \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.
+% 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_gput_right:Nx \g_@@_bf_series_seq { #1 }
- }
+%\@@_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{Fonts}
-% Upright:
+% \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} {UprightFont}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_up_tl {#1}
- }
-\@@_keys_define_code:nnn {fontspec-preparse-external} {FontName}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_up_tl {#1}
- }
-% \end{macrocode}
-% Bold:
-% \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}
+ {
+ \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 \g_@@_bf_series_seq
- {
- \tl_gset:Nx \g_@@_curr_series_tl {\bfdefault}
- \seq_gput_right:Nx \g_@@_bf_series_seq {\bfdefault}
- }
- \tl_if_eq:oxT \g_@@_curr_series_tl {\bfdefault}
- { \tl_set_eq:NN \l_@@_fontname_bf_tl \l_@@_curr_bfname_tl }
+ \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"}
- \prop_put:NxV \l_@@_nfss_prop
- {BoldFont-\g_@@_curr_series_tl} \l_@@_curr_bfname_tl
-
- }
- }
+ }
+ }
% \end{macrocode}
-% Same for italic:
+%
+% \paragraph{Bold italic/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}
- }
- }
+\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldItalicFont}
+ {
+ \fontspec_complete_fontname:Nn \l_@@_fontname_bfit_tl {#1}
+ }
% \end{macrocode}
-% Simpler for bold+italic \& slanted:
+%
% \begin{macrocode}
-\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldItalicFont}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_bfit_tl {#1}
- }
-\@@_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_sl_tl {#1}
- }
\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldSlantedFont}
- {
- \fontspec_complete_fontname:Nn \l_@@_fontname_bfsl_tl {#1}
- }
+ {
+ \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}
- }
- }
+ {
+ \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}
%
%
-% \paragraph{Features}
+% \subsubsection{Preparsed font features}
%
% \begin{macrocode}
\@@_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
@@ -310,7 +313,7 @@
}
% \end{macrocode}
%
-% paragraph{Features varying by size}
+% \paragraph{Features varying by size}
% \begin{macrocode}
\@@_keys_define_code:nnn {fontspec-preparse} {SizeFeatures}
{
@@ -348,8 +351,10 @@
}
% \end{macrocode}
%
-% \subsubsection{Font-independent features}
%
+%
+% \subsection{General font-independent features}
+%
% These features can be applied to any font.
%
% \paragraph{NFSS encoding}
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec-vars.dtx 2018-07-31 20:54:05 UTC (rev 48320)
@@ -94,7 +94,7 @@
%
% \paragraph{Sequences}
% \begin{macrocode}
-\seq_new:N \g_@@_bf_series_seq
+\seq_new:N \l_@@_bf_series_seq
% \end{macrocode}
%
% \paragraph{Comma-lists}
@@ -181,7 +181,12 @@
\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}
Modified: trunk/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontspec/fontspec.dtx 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/source/latex/fontspec/fontspec.dtx 2018-07-31 20:54:05 UTC (rev 48320)
@@ -71,7 +71,7 @@
\ProvidesExplFile{fontspec.dtx}
%</dtx>
%<*fontspec>
- {2018/07/29}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
+ {2018/07/30}{v2.6h}{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.6g",
-%<lua> date = "2017/11/09",
+%<lua> version = "v2.6h",
+%<lua> date = "2018/07/30",
%<lua> description = "Font selection for XeLaTeX and LuaLaTeX",
%<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
Modified: trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty 2018-07-31 20:54:05 UTC (rev 48320)
@@ -41,7 +41,7 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-luatex}%
- {2018/07/29}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
+ {2018/07/30}{v2.6h}{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>
@@ -86,7 +86,7 @@
\dim_new:N \l__fontspec_tmpa_dim
\dim_new:N \l__fontspec_tmpb_dim
\dim_new:N \l__fontspec_tmpc_dim
-\seq_new:N \g__fontspec_bf_series_seq
+\seq_new:N \l__fontspec_bf_series_seq
\clist_new:N \g__fontspec_default_fontopts_clist
\clist_new:N \g__fontspec_all_keyval_modules_clist
\clist_new:N \l__fontspec_sizefeat_clist
@@ -152,7 +152,12 @@
\tl_new:N \l__fontspec_sizedfont_tl
\tl_new:N \l__fontspec_this_font_tl
\tl_new:N \l__fontspec_tmp_tl
+\tl_new:N \l__fontspec_tmpa_tl
+\tl_new:N \l__fontspec_tmpb_tl
\tl_new:N \l__fontspec_ttc_index_tl
+\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 \g__fontspec_mathrm_tl
\tl_new:N \g__fontspec_bfmathrm_tl
\tl_new:N \g__fontspec_mathsf_tl
@@ -1031,8 +1036,8 @@
\__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_tmpf_tl
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmpf_tl}
+ \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:
@@ -1501,9 +1506,15 @@
\__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 }
+ \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 ,
+ Font .groups:n = {getfontname} ,
+ }
\cs_new:Nn \__fontspec_declare_shape:nnnn
{
\tl_clear:N \l__fontspec_nfss_tl
@@ -1682,7 +1693,6 @@
\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
@@ -2050,77 +2060,70 @@
{
\tl_set:Nn \l__fontspec_ttc_index_tl {(#1)}
}
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldSeries}
- {
- \tl_gset:Nx \g__fontspec_curr_series_tl { #1 }
- \seq_gput_right:Nx \g__fontspec_bf_series_seq { #1 }
- }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {UprightFont}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
- }
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {FontName}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
+ }
+\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ItalicFont}
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l__fontspec_noit_bool
+ }
+ {
+ \bool_set_false:N \l__fontspec_noit_bool
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_it_tl {#1}
+ }
+ }
+\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_sl_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l__fontspec_nobf_bool
- }
- {
- \bool_set_false:N \l__fontspec_nobf_bool
- \fontspec_complete_fontname:Nn \l__fontspec_curr_bfname_tl {#1}
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l__fontspec_nobf_bool
+ }
+ {
+ \bool_set_false:N \l__fontspec_nobf_bool
+ \fontspec_complete_fontname:Nn \l__fontspec_curr_bfname_tl {#1}
- \seq_if_empty:NT \g__fontspec_bf_series_seq
- {
- \tl_gset:Nx \g__fontspec_curr_series_tl {\bfdefault}
- \seq_gput_right:Nx \g__fontspec_bf_series_seq {\bfdefault}
- }
- \tl_if_eq:oxT \g__fontspec_curr_series_tl {\bfdefault}
- { \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l__fontspec_curr_bfname_tl }
+ \seq_if_empty:NT \l__fontspec_bf_series_seq
+ {
+ \tl_gset:Nx \g__fontspec_curr_series_tl {\bfdefault}
+ \seq_put_right:Nx \l__fontspec_bf_series_seq {\bfdefault}
+ }
+ \tl_if_eq:oxT \g__fontspec_curr_series_tl {\bfdefault}
+ {
+ \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l__fontspec_curr_bfname_tl
+ }
- \prop_put:NxV \l__fontspec_nfss_prop
- {BoldFont-\g__fontspec_curr_series_tl} \l__fontspec_curr_bfname_tl
+ \prop_put:NxV \l__fontspec_nfss_prop {BoldFont-\g__fontspec_curr_series_tl} \l__fontspec_curr_bfname_tl
- }
- }
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ItalicFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l__fontspec_noit_bool
- }
- {
- \bool_set_false:N \l__fontspec_noit_bool
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_it_tl {#1}
- }
- }
+
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldItalicFont}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
- }
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_sl_tl {#1}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldSlantedFont}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfsl_tl {#1}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfsl_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {SmallCapsFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l__fontspec_nosc_bool
- }
- {
- \bool_set_false:N \l__fontspec_nosc_bool
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_sc_tl {#1}
- }
- }
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l__fontspec_nosc_bool
+ }
+ {
+ \bool_set_false:N \l__fontspec_nosc_bool
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_sc_tl {#1}
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
{
\clist_set:Nn \l__fontspec_fontfeat_up_clist {#1}
Modified: trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty 2018-07-31 20:54:05 UTC (rev 48320)
@@ -41,7 +41,7 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec-xetex}%
- {2018/07/29}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
+ {2018/07/30}{v2.6h}{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>
@@ -86,7 +86,7 @@
\dim_new:N \l__fontspec_tmpa_dim
\dim_new:N \l__fontspec_tmpb_dim
\dim_new:N \l__fontspec_tmpc_dim
-\seq_new:N \g__fontspec_bf_series_seq
+\seq_new:N \l__fontspec_bf_series_seq
\clist_new:N \g__fontspec_default_fontopts_clist
\clist_new:N \g__fontspec_all_keyval_modules_clist
\clist_new:N \l__fontspec_sizefeat_clist
@@ -152,7 +152,12 @@
\tl_new:N \l__fontspec_sizedfont_tl
\tl_new:N \l__fontspec_this_font_tl
\tl_new:N \l__fontspec_tmp_tl
+\tl_new:N \l__fontspec_tmpa_tl
+\tl_new:N \l__fontspec_tmpb_tl
\tl_new:N \l__fontspec_ttc_index_tl
+\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 \g__fontspec_mathrm_tl
\tl_new:N \g__fontspec_bfmathrm_tl
\tl_new:N \g__fontspec_mathsf_tl
@@ -1028,8 +1033,8 @@
\__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_tmpf_tl
- \int_set:Nn \l__fontspec_script_int {\l__fontspec_tmpf_tl}
+ \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:
@@ -1524,9 +1529,15 @@
\__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 }
+ \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 ,
+ Font .groups:n = {getfontname} ,
+ }
\cs_new:Nn \__fontspec_declare_shape:nnnn
{
\tl_clear:N \l__fontspec_nfss_tl
@@ -1716,7 +1727,6 @@
\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:
{
@@ -2048,31 +2058,31 @@
}
\prg_new_conditional:Nnn \__fontspec_make_AAT_feature_string:Nnn {TF,T,F}
{
- \tl_set:Nx \l_tmpa_tl { \XeTeXfeaturename #1 #2 }
- \tl_if_empty:NTF \l_tmpa_tl
+ \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_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
+ \tl_set:Nx \l__fontspec_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__fontspec_tmpb_tl {\XeTeXselectorname #1 #2\space #3}
}
{
- \tl_set:Nx \l_tmpb_tl
+ \tl_set:Nx \l__fontspec_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:NF \l__fontspec_tmpb_tl { \tl_put_left:Nn \l__fontspec_tmpb_tl {!} }
}
}
- \tl_if_empty:NTF \l_tmpb_tl
+ \tl_if_empty:NTF \l__fontspec_tmpb_tl
{ \prg_return_false: }
{
- \tl_set:Nx \l_fontspec_feature_string_tl { \l_tmpa_tl = \l_tmpb_tl }
+ \tl_set:Nx \l_fontspec_feature_string_tl { \l__fontspec_tmpa_tl = \l__fontspec_tmpb_tl }
\prg_return_true:
}
}
@@ -2161,77 +2171,70 @@
{
\tl_set:Nn \l__fontspec_ttc_index_tl {:#1}
}
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldSeries}
- {
- \tl_gset:Nx \g__fontspec_curr_series_tl { #1 }
- \seq_gput_right:Nx \g__fontspec_bf_series_seq { #1 }
- }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {UprightFont}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
- }
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {FontName}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_up_tl {#1}
+ }
+\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ItalicFont}
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l__fontspec_noit_bool
+ }
+ {
+ \bool_set_false:N \l__fontspec_noit_bool
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_it_tl {#1}
+ }
+ }
+\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_sl_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l__fontspec_nobf_bool
- }
- {
- \bool_set_false:N \l__fontspec_nobf_bool
- \fontspec_complete_fontname:Nn \l__fontspec_curr_bfname_tl {#1}
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l__fontspec_nobf_bool
+ }
+ {
+ \bool_set_false:N \l__fontspec_nobf_bool
+ \fontspec_complete_fontname:Nn \l__fontspec_curr_bfname_tl {#1}
- \seq_if_empty:NT \g__fontspec_bf_series_seq
- {
- \tl_gset:Nx \g__fontspec_curr_series_tl {\bfdefault}
- \seq_gput_right:Nx \g__fontspec_bf_series_seq {\bfdefault}
- }
- \tl_if_eq:oxT \g__fontspec_curr_series_tl {\bfdefault}
- { \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l__fontspec_curr_bfname_tl }
+ \seq_if_empty:NT \l__fontspec_bf_series_seq
+ {
+ \tl_gset:Nx \g__fontspec_curr_series_tl {\bfdefault}
+ \seq_put_right:Nx \l__fontspec_bf_series_seq {\bfdefault}
+ }
+ \tl_if_eq:oxT \g__fontspec_curr_series_tl {\bfdefault}
+ {
+ \tl_set_eq:NN \l__fontspec_fontname_bf_tl \l__fontspec_curr_bfname_tl
+ }
- \prop_put:NxV \l__fontspec_nfss_prop
- {BoldFont-\g__fontspec_curr_series_tl} \l__fontspec_curr_bfname_tl
+ \prop_put:NxV \l__fontspec_nfss_prop {BoldFont-\g__fontspec_curr_series_tl} \l__fontspec_curr_bfname_tl
- }
- }
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {ItalicFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l__fontspec_noit_bool
- }
- {
- \bool_set_false:N \l__fontspec_noit_bool
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_it_tl {#1}
- }
- }
+
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldItalicFont}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
- }
-\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {SlantedFont}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_sl_tl {#1}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfit_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {BoldSlantedFont}
- {
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfsl_tl {#1}
- }
+ {
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_bfsl_tl {#1}
+ }
\__fontspec_keys_define_code:nnn {fontspec} {SmallCapsFont}
- {
- \tl_if_empty:nTF {#1}
- {
- \bool_set_true:N \l__fontspec_nosc_bool
- }
- {
- \bool_set_false:N \l__fontspec_nosc_bool
- \fontspec_complete_fontname:Nn \l__fontspec_fontname_sc_tl {#1}
- }
- }
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \bool_set_true:N \l__fontspec_nosc_bool
+ }
+ {
+ \bool_set_false:N \l__fontspec_nosc_bool
+ \fontspec_complete_fontname:Nn \l__fontspec_fontname_sc_tl {#1}
+ }
+ }
\__fontspec_keys_define_code:nnn {fontspec-preparse} {UprightFeatures}
{
\clist_set:Nn \l__fontspec_fontfeat_up_clist {#1}
Modified: trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.lua 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.lua 2018-07-31 20:54:05 UTC (rev 48320)
@@ -23,8 +23,8 @@
local fontspec = fontspec
fontspec.module = {
name = "fontspec",
- version = "2.6g",
- date = "2017/11/09",
+ version = "v2.6h",
+ date = "2018/07/30",
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 2018-07-31 20:53:48 UTC (rev 48319)
+++ trunk/Master/texmf-dist/tex/latex/fontspec/fontspec.sty 2018-07-31 20:54:05 UTC (rev 48320)
@@ -21,7 +21,7 @@
\RequirePackage{xparse}
\ProvidesExplPackage{fontspec}%
- {2018/07/29}{v2.6h}{Font selection for XeLaTeX and LuaLaTeX}
+ {2018/07/30}{v2.6h}{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