summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/README5
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec.pdfbin1004365 -> 1003209 bytes
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx182
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty77
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty2
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty67
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua13
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty9
8 files changed, 174 insertions, 181 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/README b/Master/texmf-dist/doc/latex/fontspec/README
index b78f15fc935..2a5c6d33bdc 100644
--- a/Master/texmf-dist/doc/latex/fontspec/README
+++ b/Master/texmf-dist/doc/latex/fontspec/README
@@ -67,6 +67,11 @@ Features may be added to the font currently in use with
Change history
--------------
+- v2.4e (2015/09/24)
+
+ * Allow `[Path=...]` to be specified for individual font faces.
+ * Continue to normalise naming with expl3. (Ongoing.)
+
- v2.4d (2015/07/22)
* Rename an internal expl3 function or two.
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
index d974f949ed5..2d3b20167c3 100644
--- a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
index 172fdc6e71c..a6c502caed5 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -93,7 +93,7 @@ This work consists of this file fontspec.dtx
%<fontspec&luatex>\ProvidesPackage{fontspec-luatex}
%<patches>\ProvidesPackage{fontspec-patches}
%<*fontspec|patches>
- [2015/07/22 v2.4d Font selection for XeLaTeX and LuaLaTeX]
+ [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
%</fontspec|patches>
%
%<*driver>
@@ -235,8 +235,8 @@ This work consists of this file fontspec.dtx
% \emph{The \pkg{babel} package is not really supported!} Especially Vietnamese,
% Greek, and Hebrew at least might not work correctly, as far as I can tell.
% There's a better chance with Cyrillic and Latin-based languages,
-% however---\pkg{fontspec} ensures at least that fonts should load correctly.
-% The \pkg{polyglossia} package is recommended instead as a modern replacement
+% however---\pkg{fontspec} ensures at least that fonts should load correctly.
+% The \pkg{polyglossia} package is recommended instead as a modern replacement
% for \pkg{babel}.
%
%
@@ -328,8 +328,8 @@ This work consists of this file fontspec.dtx
%
% \subsection{By font name}
%
-% Fonts known to \LuaTeX\ or \XeTeX\ may be loaded by their standard names as
-% you'd speak them out loud, such as \emph{Times New Roman} or
+% Fonts known to \LuaTeX\ or \XeTeX\ may be loaded by their standard names as
+% you'd speak them out loud, such as \emph{Times New Roman} or
% \emph{Adobe Garamond}.
% `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.
@@ -647,7 +647,7 @@ This work consists of this file fontspec.dtx
% },
% },
% \end{Verbatim}
-% Note that if the first \feat{Font} feature is omitted then each size needs its own inner \feat{Font} declaration.
+% Note that if the first \feat{Font} feature is omitted then each size needs its own inner \feat{Font} declaration.
%
% \subsection{Math(s) fonts}
%
@@ -742,7 +742,7 @@ This work consists of this file fontspec.dtx
% \fontspec{myfont.otf}% \fontspec{myfont.otf}[
% [Color=red] Color=Red]
% \end{Verbatim}
-%
+%
% \end{enumerate}
%
% \paragraph{Spaces}
@@ -827,7 +827,7 @@ This work consists of this file fontspec.dtx
%
% \textbf{New in v2.4}.
% Using the |+| form of the command appends the \meta{font features} to any already-selected defaults.
-%
+%
%
% \subsection{Default settings from a file}
%
@@ -2735,7 +2735,7 @@ This work consists of this file fontspec.dtx
% \end{macrocode}
% But for now, this is the shared code.
% \begin{macrocode}
-\RequirePackage{expl3}[2011/09/05]
+\RequirePackage{expl3}[2015/06/26]
\RequirePackage{xparse}
\ExplSyntaxOn
% \end{macrocode}
@@ -2763,7 +2763,7 @@ This work consists of this file fontspec.dtx
\luatex_if_engine:TF
{
\RequirePackage{luaotfload}[2013/05/20]
- \RequireLuaModule{fontspec}
+ \directlua{require("fontspec")}
}
{
\msg_fatal:nn {fontspec} {cannot-use-pdftex}
@@ -2836,6 +2836,9 @@ This work consists of this file fontspec.dtx
\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 \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
% \end{macrocode}
%
% \begin{macro}{\@@_int_mult_truncate:Nn}
@@ -3363,7 +3366,7 @@ This work consists of this file fontspec.dtx
\tl_if_single:nTF {##1}
{ \tl_set:No \l_@@_tmp_tl { \cs:w g_@@_ \cs_to_str:N ##1 _family\cs_end: } }
{ \@@_sanitise_fontname:Nn \l_@@_tmp_tl {##1} }
-
+
\IfBooleanTF {#1}
{
\prop_get:NVNF \g_@@_fontopts_prop \l_@@_tmp_tl \l_@@_tmpb_tl
@@ -3374,7 +3377,7 @@ This work consists of this file fontspec.dtx
{
\tl_if_empty:nTF {#3}
{ \prop_gremove:NV \g_@@_fontopts_prop \l_@@_tmp_tl }
- { \prop_put:NVn \g_@@_fontopts_prop \l_@@_tmp_tl {#3,} }
+ { \prop_put:NVn \g_@@_fontopts_prop \l_@@_tmp_tl {#3,} }
}
}
}
@@ -3507,28 +3510,25 @@ This work consists of this file fontspec.dtx
% \begin{macro}{\aliasfontfeatureoption}
% User commands for renaming font features and font feature options.
% \begin{macrocode}
+\bool_new:N \l_@@_alias_bool
\DeclareDocumentCommand \aliasfontfeature {mm}
{
+ \bool_set_false:N \l_@@_alias_bool
+
\clist_map_inline:nn
{ fontspec, fontspec-preparse, fontspec-preparse-external,
fontspec-preparse-nested, fontspec-renderer }
{
+
\keys_if_exist:nnT {##1} {#1}
{
- \clist_map_break:n
- {
- \@@_alias_font_feature:nnn {##1} {#1} {#2}
- \use_none_delimit_by_q_nil:w
- }
+ \bool_set_true:N \l_@@_alias_bool
+ \@@_alias_font_feature:nnn {##1} {#1} {#2}
}
}
- % this executes if no match was found:
- \@@_warning:nx {rename-feature-not-exist} {#1}
-
- % jump to here if a match:
- \use_none:n
- \q_nil
+ \bool_if:NF \l_@@_alias_bool
+ { \@@_warning:nx {rename-feature-not-exist} {#1} }
}
\cs_set:Nn \@@_alias_font_feature:nnn
@@ -3717,10 +3717,10 @@ This work consists of this file fontspec.dtx
{
\prop_get:cnN {g_@@_ \f@family _prop} {script-num} \l_@@_tmp_tl
\int_set:Nn \l_fontspec_script_int {\l_@@_tmp_tl}
-
+
\prop_get:cnN {g_@@_ \f@family _prop} {lang-num} \l_@@_tmp_tl
\int_set:Nn \l_fontspec_language_int {\l_@@_tmp_tl}
-
+
\prop_get:cnN {g_@@_ \f@family _prop} {script-tag} \l_fontspec_script_tl
\prop_get:cnN {g_@@_ \f@family _prop} {lang-tag} \l_fontspec_lang_tl
@@ -3802,7 +3802,7 @@ This work consists of this file fontspec.dtx
\bool_if:NTF \l_@@_ot_bool
{
\prop_get:cnN {g_@@_ \f@family _prop} {script-num} \l_@@_tmp_tl
- \int_set:Nn \l_fontspec_script_int {\l_@@_tmp_tl}
+ \int_set:Nn \l_fontspec_script_int {\l_@@_tmp_tl}
\prop_get:cnN {g_@@_ \f@family _prop} {script-tag} \l_fontspec_script_tl
\fontspec_check_lang:nTF {#1} \prg_return_true: \prg_return_false:
@@ -3937,31 +3937,30 @@ This work consists of this file fontspec.dtx
\cs_set:Nn \@@_fontwrap:n { "#1" }
% \end{macrocode}
%
-% Beginnings of an `l3font', I guess:
% \begin{macrocode}
-\cs_if_free:NT \font_set_eq:NN
- {
- \cs_set_eq:NN \font_set_eq:NN \tex_let:D
- \cs_set:Npn \font_set:Nnn #1#2#3
- {
- \font #1 = #2 ~at~ #3\scan_stop:
- }
- \cs_set:Npn \font_gset:Nnn #1#2#3
- {
+\cs_set:Npn \@@_primitive_font_set:Nnn #1#2#3
+ {
+ \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+
+\cs_set:Npn \@@_primitive_font_gset:Nnn #1#2#3
+ {
\global \font #1 = #2 ~at~ #3 \scan_stop:
- }
- \cs_set:Npn \font_suppress_not_found_error:
-%<xetexx> {\suppressfontnotfounderror=1}
-%<luatex> {\luatexsuppressfontnotfounderror=1}
- \prg_set_conditional:Nnn \@@_font_if_null:N {p,TF,T,F}
- {
+ }
+
+\cs_set:Npn \@@_font_suppress_not_found_error:
+ {
+ \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
+ }
+
+\prg_set_conditional:Nnn \@@_font_if_null:N {p,TF,T,F}
+ {
\ifx #1 \nullfont
\prg_return_true:
\else
\prg_return_false:
\fi
- }
- }
+ }
% \end{macrocode}
%
%
@@ -3970,11 +3969,11 @@ This work consists of this file fontspec.dtx
% \begin{macrocode}
\cs_new:Nn \@@_font_set:Nnn
{
- \font_set:Nnn #1 {\@@_fontwrap:n {#2}} {#3}
+ \@@_primitive_font_set:Nnn #1 { \@@_fontwrap:n {#2} } {#3}
}
\cs_new:Nn \@@_font_gset:Nnn
{
- \font_gset:Nnn #1 {\@@_fontwrap:n {#2}} {#3}
+ \@@_primitive_font_gset:Nnn #1 { \@@_fontwrap:n {#2} } {#3}
}
% \end{macrocode}
% \end{macro}
@@ -4026,7 +4025,7 @@ This work consists of this file fontspec.dtx
\cs_set:Nn \fontspec_select:nn
{
\group_begin:
- \font_suppress_not_found_error:
+ \@@_font_suppress_not_found_error:
\@@_init:
\tl_set:Nx \l_fontspec_fontname_tl {#2}
@@ -4085,7 +4084,7 @@ This work consists of this file fontspec.dtx
% \begin{macro}{\@@_extract_features:}
% \begin{macrocode}
\cs_new:Nn \@@_extract_all_features:n
- {
+ {
\bool_if:NTF \l_@@_disable_defaults_bool
{
\clist_set:Nx \l_@@_all_features_clist {#1}
@@ -4103,7 +4102,7 @@ This work consists of this file fontspec.dtx
\g_@@_default_fontopts_clist,
\l_@@_family_fontopts_clist,
\l_@@_fontopts_clist,
- #1
+ #1
}
}
\tl_set:Nx \l_@@_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l_@@_all_features_clist }
@@ -4158,7 +4157,7 @@ This work consists of this file fontspec.dtx
{ \@@_fullname:n {\l_fontspec_fontname_up_tl} } {\f@size pt}
\@@_font_if_null:NT \l_fontspec_font { \@@_error:nx {font-not-found} {\l_fontspec_fontname_up_tl} }
\@@_set_font_type:
- \@@_font_gset:Nnn \l_fontspec_font
+ \@@_font_gset:Nnn \l_fontspec_font
{ \@@_fullname:n {\l_fontspec_fontname_up_tl} } {\f@size pt}
\l_fontspec_font % this is necessary for LuaLaTeX to check the scripts properly
}
@@ -4310,7 +4309,7 @@ This work consists of this file fontspec.dtx
% \begin{macro}{\@@_find_autofonts:}
% \begin{macrocode}
\cs_new:Nn \@@_find_autofonts:
- {
+ {
\bool_if:nF {\l_@@_noit_bool || \l_@@_nobf_bool}
{
\@@_set_autofont:Nnn \l_fontspec_fontname_bfit_tl {\l_fontspec_fontname_it_tl} {/B}
@@ -4322,7 +4321,7 @@ This work consists of this file fontspec.dtx
{
\@@_set_autofont:Nnn \l_fontspec_fontname_bf_tl {\l_fontspec_fontname_tl} {/B}
}
-
+
\bool_if:NF \l_@@_noit_bool
{
\@@_set_autofont:Nnn \l_fontspec_fontname_it_tl {\l_fontspec_fontname_tl} {/I}
@@ -4347,7 +4346,7 @@ This work consists of this file fontspec.dtx
\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}
}
@@ -4462,27 +4461,13 @@ This work consists of this file fontspec.dtx
% \darg{Size features}
% This macro eventually uses \cs{DeclareFontShape} to define the font shape in
% question.
-%
-% The optional first
-% argument is used when making the font shapes for bold, italic, and
-% bold italic fonts using \XeTeX's auto-recognition with |#2| as |/B|, |/I|,
-% and |/BI| font name suffixes. If no such font is found, it falls
-% back to the original font name, in which case this macro doesn't
-% proceed and the font shape is not created for the NFSS.
-%
-% Next, the small caps are defined. [...] is used to
-% define the appropriate string for activating small caps in the font,
-% if they exist. If we are defining small caps for the upright shape,
-% then the small caps shape default is used. For an \emph{italic}
-% font, however, the shape parameter is overloaded and we must call
-% italic small caps by their own identifier. See \vref{sec:sishape}
-% for the code that enables this usage.
% \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, #4 } {#5}
+ \@@_declare_shape:nnxx {#2} {#3} { \l_@@_fontopts_clist, \l_@@_leftover_clist } {#5}
\group_end:
}
@@ -4495,8 +4480,6 @@ This work consists of this file fontspec.dtx
\@@_font_if_null:NT \l_fontspec_font { \@@_error:nx {font-not-found} {#1} }
}
% \end{macrocode}
-% Note that the test for italics to choose the \cmd\sidefault\ shape
-% only works while \cmd\fontspec_select:nn\ passes single tokens to this macro\dots
% \end{macro}
%
% \begin{macro}{\@@_declare_shape:nnnn}
@@ -4522,16 +4505,16 @@ This work consists of this file fontspec.dtx
{
\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 ##1 }
\l_@@_sizing_leftover_clist
\tl_if_empty:NT \l_@@_size_tl { \@@_error:n {no-size-info} }
% "normal"
\@@_load_fontname:n {\l_@@_sizedfont_tl}
- \@@_setup_nfss:Nnn \l_@@_nfss_tl {#3} {}
-
- % small caps
+ \@@_setup_nfss:Nnn \l_@@_nfss_tl {#3} {}
+
+ % small caps
\clist_set_eq:NN \l_@@_fontfeat_curr_clist \l_@@_fontfeat_sc_clist
\bool_if:NF \l_@@_nosc_bool
@@ -4554,7 +4537,7 @@ This work consists of this file fontspec.dtx
\bool_if:NF \l_@@_nosc_bool
{
- \@@_setup_nfss:Nnn \l_@@_nfss_sc_tl {#3} {\l_@@_fontfeat_curr_clist}
+ \@@_setup_nfss:Nnn \l_@@_nfss_sc_tl {#3} {\l_@@_fontfeat_curr_clist}
}
}
@@ -4585,7 +4568,7 @@ This work consists of this file fontspec.dtx
{
\@@_DeclareFontShape:xxxxxx {\g_fontspec_encoding_tl} {\l_fontspec_family_tl}
{#1} {#2} {\l_@@_nfss_tl}{\l_@@_postadjust_tl}
-
+
\bool_if:NF \l_@@_nosc_bool
{
\@@_DeclareFontShape:xxxxxx {\g_fontspec_encoding_tl} {\l_fontspec_family_tl}
@@ -4726,7 +4709,7 @@ This work consists of this file fontspec.dtx
{
\@@_update_featstr:n { color = \l_@@_hexcol_tl\l_@@_opacity_tl }
}
-
+
\tl_set_eq:NN #1 \l_@@_rawfeatures_sclist
}
% \end{macrocode}
@@ -4789,10 +4772,10 @@ This work consists of this file fontspec.dtx
%<*luatex>
\tl_set:Nn \l_fontspec_mode_tl {node}
- \luatexprehyphenchar =`\- % fixme
- \luatexposthyphenchar = 0 % fixme
- \luatexpreexhyphenchar = 0 % fixme
- \luatexpostexhyphenchar= 0 % fixme
+ \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
%</luatex>
}
% \end{macrocode}
@@ -5175,7 +5158,7 @@ This work consists of this file fontspec.dtx
% \begin{macrocode}
\cs_new:Nn \@@_keys_define_code:nnn
{
- \keys_define:nn {#1} { #2 .code:n = {#3} }
+ \keys_define:nn {#1} { #2 .code:n = {#3} }
}
% \end{macrocode}
%
@@ -5194,7 +5177,7 @@ This work consists of this file fontspec.dtx
\bool_set_true:N \l_@@_nobf_bool
\bool_set_true:N \l_@@_noit_bool
\bool_set_true:N \l_@@_external_bool
- \cs_gset:Npn \@@_namewrap:n ##1 { [ #1 ##1 ] }
+ \cs_set:Npn \@@_namewrap:n ##1 { [ #1 ##1 ] }
%<*xetexx>
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
%</xetexx>
@@ -5320,7 +5303,7 @@ This work consists of this file fontspec.dtx
{
\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}
@@ -5407,7 +5390,7 @@ This work consists of this file fontspec.dtx
\@@_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
}
@@ -5497,7 +5480,6 @@ This work consists of this file fontspec.dtx
% \paragraph{NFSS series/shape}
% This option looks similar in name but has a very different function.
% \begin{macrocode}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
\prop_new:N \l_@@_nfssfont_prop
\@@_keys_define_code:nnn {fontspec} {FontFace}
{
@@ -5518,7 +5500,7 @@ This work consists of this file fontspec.dtx
\tl_clear:N \l_@@_this_feat_tl
}
}
-
+
\@@_add_nfssfont:oooo
{\use_i:nnn #1}{\use_ii:nnn #1}{\l_@@_this_font_tl}{\l_@@_this_feat_tl}
}
@@ -5538,7 +5520,7 @@ This work consists of this file fontspec.dtx
\tl_if_empty:xTF {#4}
{ \clist_set:Nn \l_@@_sizefeat_clist {Size={-}} }
{ \keys_set_known:noN {fontspec-preparse-nested} {#4} \l_@@_tmp_tl }
-
+
\tl_if_empty:NF \l_@@_this_font_tl
{
\prop_put:Nxx \l_@@_nfssfont_prop {#1/#2}
@@ -5547,7 +5529,6 @@ This work consists of this file fontspec.dtx
}
\cs_generate_variant:Nn \@@_add_nfssfont:nnnn {ooo}
\cs_generate_variant:Nn \@@_add_nfssfont:nnnn {oooo}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
% \end{macrocode}
% \end{macro}
%
@@ -5673,12 +5654,12 @@ This work consists of this file fontspec.dtx
{WordSpace}
{
\tl_set:Nn \l_@@_punctspace_adjust_tl
- { \fontdimen 7 \font = 0 \fontdimen 2 \font }
+ { \fontdimen 7 \font = 0 \fontdimen 2 \font }
}
{TwiceWordSpace}
{
\tl_set:Nn \l_@@_punctspace_adjust_tl
- { \fontdimen 7 \font = 1 \fontdimen 2 \font }
+ { \fontdimen 7 \font = 1 \fontdimen 2 \font }
}
}
{
@@ -5731,7 +5712,7 @@ This work consists of this file fontspec.dtx
%<*luatex>
{
\hyphenchar \font = \c_zero
- \luatexprehyphenchar = \l_fontspec_hyphenchar_tl \scan_stop:
+ \int_set:Nn \luatex_prehyphenchar:D { \l_fontspec_hyphenchar_tl }
}
%</luatex>
}
@@ -6926,12 +6907,17 @@ local err, warn, info, log = luatexbase.provides_module(fontspec.module)
% \end{macrocode}
% Some utility functions
% \begin{macrocode}
-fontspec.log = log
-fontspec.warning = warn
-fontspec.error = err
+fontspec.log = log or (function (s) luatexbase.module_info("fontspec", s) end)
+fontspec.warning = warn or (function (s) luatexbase.module_warning("fontspec", s) end)
+fontspec.error = err or (function (s) luatexbase.module_error("fontspec", s) end)
+if luatexbase.catcodetables == nil then
+ latexpackage_catcodetable=luatexbase.registernumber("catcodetable@atletter")
+else
+ latexpackage_catcodetable=luatexbase.catcodetables['latex-package']
+end
function fontspec.sprint (...)
- tex.sprint(luatexbase.catcodetables['latex-package'], ...)
+ tex.sprint(latexpackage_catcodetable, ...)
end
% \end{macrocode}
%
@@ -7263,7 +7249,7 @@ end
\defaultfontfeatures
[\rmfamily,\sffamily]
{Ligatures=TeX}
-
+
\defaultfontfeatures
[\ttfamily]
{WordSpace={1,0,0},
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index 4d0d4aee3a3..12154849c38 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -14,7 +14,7 @@
%%
%%
\ProvidesPackage{fontspec-luatex}
- [2015/07/22 v2.4d Font selection for XeLaTeX and LuaLaTeX]
+ [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
\ExplSyntaxOn
@@ -240,28 +240,25 @@
\__fontspec_define_feature_option:nnnnn {#1}{#2}{}{}{#3}
}
\cs_set_eq:NN \newICUfeature \newopentypefeature % deprecated
+\bool_new:N \l__fontspec_alias_bool
\DeclareDocumentCommand \aliasfontfeature {mm}
{
+ \bool_set_false:N \l__fontspec_alias_bool
+
\clist_map_inline:nn
{ fontspec, fontspec-preparse, fontspec-preparse-external,
fontspec-preparse-nested, fontspec-renderer }
{
+
\keys_if_exist:nnT {##1} {#1}
{
- \clist_map_break:n
- {
- \__fontspec_alias_font_feature:nnn {##1} {#1} {#2}
- \use_none_delimit_by_q_nil:w
- }
+ \bool_set_true:N \l__fontspec_alias_bool
+ \__fontspec_alias_font_feature:nnn {##1} {#1} {#2}
}
}
- % this executes if no match was found:
- \__fontspec_warning:nx {rename-feature-not-exist} {#1}
-
- % jump to here if a match:
- \use_none:n
- \q_nil
+ \bool_if:NF \l__fontspec_alias_bool
+ { \__fontspec_warning:nx {rename-feature-not-exist} {#1} }
}
\cs_set:Nn \__fontspec_alias_font_feature:nnn
@@ -505,35 +502,36 @@
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
\cs_set:Nn \__fontspec_fontwrap:n { "#1" }
-\cs_if_free:NT \font_set_eq:NN
- {
- \cs_set_eq:NN \font_set_eq:NN \tex_let:D
- \cs_set:Npn \font_set:Nnn #1#2#3
- {
- \font #1 = #2 ~at~ #3\scan_stop:
- }
- \cs_set:Npn \font_gset:Nnn #1#2#3
- {
+\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
+ {
+ \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+
+\cs_set:Npn \__fontspec_primitive_font_gset:Nnn #1#2#3
+ {
\global \font #1 = #2 ~at~ #3 \scan_stop:
- }
- \cs_set:Npn \font_suppress_not_found_error:
- {\luatexsuppressfontnotfounderror=1}
- \prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
- {
+ }
+
+\cs_set:Npn \__fontspec_font_suppress_not_found_error:
+ {
+ \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
+ }
+
+\prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
+ {
\ifx #1 \nullfont
\prg_return_true:
\else
\prg_return_false:
\fi
- }
- }
+ }
\cs_new:Nn \__fontspec_font_set:Nnn
{
- \font_set:Nnn #1 {\__fontspec_fontwrap:n {#2}} {#3}
+ \__fontspec_primitive_font_set:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
}
\cs_new:Nn \__fontspec_font_gset:Nnn
{
- \font_gset:Nnn #1 {\__fontspec_fontwrap:n {#2}} {#3}
+ \__fontspec_primitive_font_gset:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
}
\prg_new_conditional:Nnn \font_glyph_if_exist:Nn {p,TF,T,F}
{
@@ -546,7 +544,7 @@
\cs_set:Nn \fontspec_select:nn
{
\group_begin:
- \font_suppress_not_found_error:
+ \__fontspec_font_suppress_not_found_error:
\__fontspec_init:
\tl_set:Nx \l_fontspec_fontname_tl {#2}
@@ -790,8 +788,9 @@
\cs_new:Nn \__fontspec_make_font_shapes:Nnnnn
{
\group_begin:
+ \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, #4 } {#5}
+ \__fontspec_declare_shape:nnxx {#2} {#3} { \l__fontspec_fontopts_clist, \l__fontspec_leftover_clist } {#5}
\group_end:
}
@@ -1011,10 +1010,10 @@
}{}
\tl_set:Nn \l_fontspec_mode_tl {node}
- \luatexprehyphenchar =`\- % fixme
- \luatexposthyphenchar = 0 % fixme
- \luatexpreexhyphenchar = 0 % fixme
- \luatexpostexhyphenchar= 0 % fixme
+ \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
}
\cs_set:Nn \fontspec_make_ot_smallcaps:TF
{
@@ -1177,7 +1176,7 @@
\bool_set_true:N \l__fontspec_nobf_bool
\bool_set_true:N \l__fontspec_noit_bool
\bool_set_true:N \l__fontspec_external_bool
- \cs_gset:Npn \__fontspec_namewrap:n ##1 { [ #1 ##1 ] }
+ \cs_set:Npn \__fontspec_namewrap:n ##1 { [ #1 ##1 ] }
}
\aliasfontfeature{ExternalLocation}{Path}
\__fontspec_keys_define_code:nnn {fontspec-preparse-external} {Extension}
@@ -1369,7 +1368,6 @@
\tl_if_exist:NT \l_fontspec_family_tl
{ \cs_undefine:c {g__fontspec_ \l_fontspec_family_tl _prop} }
}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
\prop_new:N \l__fontspec_nfssfont_prop
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
@@ -1404,7 +1402,6 @@
}
\cs_generate_variant:Nn \__fontspec_add_nfssfont:nnnn {ooo}
\cs_generate_variant:Nn \__fontspec_add_nfssfont:nnnn {oooo}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
\__fontspec_keys_define_code:nnn {fontspec} {Scale}
{
\str_case:nnF {#1}
@@ -1514,7 +1511,7 @@
\tl_put_right:Nn \l__fontspec_postadjust_tl
{
\hyphenchar \font = \c_zero
- \luatexprehyphenchar = \l_fontspec_hyphenchar_tl \scan_stop:
+ \int_set:Nn \luatex_prehyphenchar:D { \l_fontspec_hyphenchar_tl }
}
}
{ \__fontspec_error:nx {no-glyph}{#1} }
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
index a7acbf1edf7..dc8ff1fe51d 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
@@ -14,7 +14,7 @@
%%
%%
\ProvidesPackage{fontspec-patches}
- [2015/07/22 v2.4d Font selection for XeLaTeX and LuaLaTeX]
+ [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
\ExplSyntaxOn
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index 623441ec477..f1815624afc 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -14,7 +14,7 @@
%%
%%
\ProvidesPackage{fontspec-xetex}
- [2015/07/22 v2.4d Font selection for XeLaTeX and LuaLaTeX]
+ [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
\ExplSyntaxOn
@@ -236,28 +236,25 @@
\__fontspec_define_feature_option:nnnnn {#1}{#2}{}{}{#3}
}
\cs_set_eq:NN \newICUfeature \newopentypefeature % deprecated
+\bool_new:N \l__fontspec_alias_bool
\DeclareDocumentCommand \aliasfontfeature {mm}
{
+ \bool_set_false:N \l__fontspec_alias_bool
+
\clist_map_inline:nn
{ fontspec, fontspec-preparse, fontspec-preparse-external,
fontspec-preparse-nested, fontspec-renderer }
{
+
\keys_if_exist:nnT {##1} {#1}
{
- \clist_map_break:n
- {
- \__fontspec_alias_font_feature:nnn {##1} {#1} {#2}
- \use_none_delimit_by_q_nil:w
- }
+ \bool_set_true:N \l__fontspec_alias_bool
+ \__fontspec_alias_font_feature:nnn {##1} {#1} {#2}
}
}
- % this executes if no match was found:
- \__fontspec_warning:nx {rename-feature-not-exist} {#1}
-
- % jump to here if a match:
- \use_none:n
- \q_nil
+ \bool_if:NF \l__fontspec_alias_bool
+ { \__fontspec_warning:nx {rename-feature-not-exist} {#1} }
}
\cs_set:Nn \__fontspec_alias_font_feature:nnn
@@ -501,35 +498,36 @@
\tl_set_eq:NN #2 \l_fontspec_family_tl
}
\cs_set:Nn \__fontspec_fontwrap:n { "#1" }
-\cs_if_free:NT \font_set_eq:NN
- {
- \cs_set_eq:NN \font_set_eq:NN \tex_let:D
- \cs_set:Npn \font_set:Nnn #1#2#3
- {
- \font #1 = #2 ~at~ #3\scan_stop:
- }
- \cs_set:Npn \font_gset:Nnn #1#2#3
- {
+\cs_set:Npn \__fontspec_primitive_font_set:Nnn #1#2#3
+ {
+ \font #1 = #2 ~at~ #3 \scan_stop:
+ }
+
+\cs_set:Npn \__fontspec_primitive_font_gset:Nnn #1#2#3
+ {
\global \font #1 = #2 ~at~ #3 \scan_stop:
- }
- \cs_set:Npn \font_suppress_not_found_error:
- {\suppressfontnotfounderror=1}
- \prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
- {
+ }
+
+\cs_set:Npn \__fontspec_font_suppress_not_found_error:
+ {
+ \int_set_eq:NN \xetex_suppressfontnotfounderror:D \c_one
+ }
+
+\prg_set_conditional:Nnn \__fontspec_font_if_null:N {p,TF,T,F}
+ {
\ifx #1 \nullfont
\prg_return_true:
\else
\prg_return_false:
\fi
- }
- }
+ }
\cs_new:Nn \__fontspec_font_set:Nnn
{
- \font_set:Nnn #1 {\__fontspec_fontwrap:n {#2}} {#3}
+ \__fontspec_primitive_font_set:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
}
\cs_new:Nn \__fontspec_font_gset:Nnn
{
- \font_gset:Nnn #1 {\__fontspec_fontwrap:n {#2}} {#3}
+ \__fontspec_primitive_font_gset:Nnn #1 { \__fontspec_fontwrap:n {#2} } {#3}
}
\prg_new_conditional:Nnn \font_glyph_if_exist:Nn {p,TF,T,F}
{
@@ -542,7 +540,7 @@
\cs_set:Nn \fontspec_select:nn
{
\group_begin:
- \font_suppress_not_found_error:
+ \__fontspec_font_suppress_not_found_error:
\__fontspec_init:
\tl_set:Nx \l_fontspec_fontname_tl {#2}
@@ -809,8 +807,9 @@
\cs_new:Nn \__fontspec_make_font_shapes:Nnnnn
{
\group_begin:
+ \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, #4 } {#5}
+ \__fontspec_declare_shape:nnxx {#2} {#3} { \l__fontspec_fontopts_clist, \l__fontspec_leftover_clist } {#5}
\group_end:
}
@@ -1242,7 +1241,7 @@
\bool_set_true:N \l__fontspec_nobf_bool
\bool_set_true:N \l__fontspec_noit_bool
\bool_set_true:N \l__fontspec_external_bool
- \cs_gset:Npn \__fontspec_namewrap:n ##1 { [ #1 ##1 ] }
+ \cs_set:Npn \__fontspec_namewrap:n ##1 { [ #1 ##1 ] }
\keys_set:nn {fontspec-renderer} {Renderer=OpenType}
}
\aliasfontfeature{ExternalLocation}{Path}
@@ -1436,7 +1435,6 @@
\tl_if_exist:NT \l_fontspec_family_tl
{ \cs_undefine:c {g__fontspec_ \l_fontspec_family_tl _prop} }
}
-\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
\prop_new:N \l__fontspec_nfssfont_prop
\__fontspec_keys_define_code:nnn {fontspec} {FontFace}
{
@@ -1471,7 +1469,6 @@
}
\cs_generate_variant:Nn \__fontspec_add_nfssfont:nnnn {ooo}
\cs_generate_variant:Nn \__fontspec_add_nfssfont:nnnn {oooo}
-\cs_generate_variant:Nn \tl_if_empty:nTF {x}
\__fontspec_keys_define_code:nnn {fontspec} {Scale}
{
\str_case:nnF {#1}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index ea7802ee184..f5c17fd02b5 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -29,12 +29,17 @@ fontspec.module = {
local err, warn, info, log = luatexbase.provides_module(fontspec.module)
-fontspec.log = log
-fontspec.warning = warn
-fontspec.error = err
+fontspec.log = log or (function (s) luatexbase.module_info("fontspec", s) end)
+fontspec.warning = warn or (function (s) luatexbase.module_warning("fontspec", s) end)
+fontspec.error = err or (function (s) luatexbase.module_error("fontspec", s) end)
+if luatexbase.catcodetables == nil then
+ latexpackage_catcodetable=luatexbase.registernumber("catcodetable@atletter")
+else
+ latexpackage_catcodetable=luatexbase.catcodetables['latex-package']
+end
function fontspec.sprint (...)
- tex.sprint(luatexbase.catcodetables['latex-package'], ...)
+ tex.sprint(latexpackage_catcodetable, ...)
end
local check_script = luaotfload.aux.provides_script
local check_language = luaotfload.aux.provides_language
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
index 26b78761823..8f7489564a4 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -14,10 +14,10 @@
%%
%%
\ProvidesPackage{fontspec}
- [2015/07/22 v2.4d Font selection for XeLaTeX and LuaLaTeX]
+ [2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX]
-\RequirePackage{expl3}[2011/09/05]
+\RequirePackage{expl3}[2015/06/26]
\RequirePackage{xparse}
\ExplSyntaxOn
\cs_if_exist:NF \lua_now_x:n
@@ -35,7 +35,7 @@
\luatex_if_engine:TF
{
\RequirePackage{luaotfload}[2013/05/20]
- \RequireLuaModule{fontspec}
+ \directlua{require("fontspec")}
}
{
\msg_fatal:nn {fontspec} {cannot-use-pdftex}
@@ -70,6 +70,9 @@
\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 \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \tl_if_empty:nTF {x}
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
\cs_new:Nn \__fontspec_int_mult_truncate:Nn
{
\int_set:Nn #1 { \__dim_eval:w #2 #1 \__dim_eval_end: }