summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/README10
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdfbin264146 -> 272859 bytes
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec.pdfbin2753411 -> 2779649 bytes
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx117
-rw-r--r--Master/texmf-dist/source/latex/fontspec/testsuite/F-autofake.ltx16
-rw-r--r--Master/texmf-dist/source/latex/fontspec/testsuite/testsuite-listing.tex1
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty78
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty8
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty68
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.lua6
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty22
11 files changed, 210 insertions, 116 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/README b/Master/texmf-dist/doc/latex/fontspec/README
index 845fa587837..b27ad986941 100644
--- a/Master/texmf-dist/doc/latex/fontspec/README
+++ b/Master/texmf-dist/doc/latex/fontspec/README
@@ -71,6 +71,16 @@ Features may be added to the font currently in use with
Change history
--------------
+- v2.2b (2012/05/06) "TL2012 version"
+
+ * Fix error with AutoFakeSlant/Bold (#113) and when used with external fonts (#128)
+ * Add warning when using FakeBold in LuaLaTeX, where it's not supported
+ * Fix slshape misassignment introduced in v2.2
+ * Allow fontspec to be loaded before \documentclass
+ (or rather fix the regression that broke this)
+ * Avoid using the calc package now that it's no longer loaded by expl3
+ * Allow multiple values to StylisticSet and Alternate font options
+
- v2.2a (2011/09/14)
* Bug fix: improve backwards compatibility for packages that use old
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdf
index 1c538b0b038..b2ab6391555 100644
--- a/Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdf
+++ b/Master/texmf-dist/doc/latex/fontspec/fontspec-testsuite.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
index d2e13c841a6..afa424ec78a 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 7500e8988d6..baa09ece87c 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -9,7 +9,7 @@
_________________________________________
The fontspec package for XeLaTeX/LuaLaTeX
- (C) 2004--2011 Will Robertson and Khaled Hosny
+ (C) 2004--2012 Will Robertson and Khaled Hosny
License information appended.
@@ -17,8 +17,8 @@
\endpreamble
\postamble
-Copyright 2004--2011 Will Robertson <wspr81@gmail.com>
-Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>
+Copyright 2004--2012 Will Robertson <wspr81@gmail.com>
+Copyright 2009--2012 Khaled Hosny <khaledhosny@eglug.org>
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -66,7 +66,7 @@ This work consists of this file fontspec.dtx
%<fontspec&luatex>\ProvidesPackage{fontspec-luatex}
%<patches>\ProvidesPackage{fontspec-patches}
%<*fontspec|patches>
- [2011/09/18 v2.2a Advanced font selection for XeLaTeX/LuaLaTeX]
+ [2012/05/06 v2.2b Advanced font selection for XeLaTeX/LuaLaTeX]
%</fontspec|patches>
%
%<*driver>
@@ -168,7 +168,7 @@ This work consists of this file fontspec.dtx
% feedback over the years on feature requests, documentation queries, bug reports, font suggestions, and so on from lots of people all around the world.
% Many thanks to you all.
%
-% Thanks to David Perry and Markus Böhning for numerous documentation
+% Thanks to David Perry and Markus B\"ohning for numerous documentation
% improvements and David Perry again for contributing the text for one of the
% sections of this manual.
%
@@ -1371,9 +1371,11 @@ This work consists of this file fontspec.dtx
% ENLARGED Minuscules. \\
% \end{Lexample}
%
-% (This is a synonym of the \feat{Variant} feature for \AAT\ fonts.)
-% See \vref{sec:newfeatures} for a way to assign names to stylistic sets,
-% which should be done on a per-font basis.
+% Multiple stylistic sets may be selected simultaneously by writing, e.g.,
+% |StylisticSet={1,2,3}|.
+%
+% The |StylisticSet| feature is a synonym of the \feat{Variant} feature for \AAT\ fonts.
+% See \vref{sec:newfeatures} for a way to assign names to stylistic sets, which should be done on a per-font basis.
%
% \subsection{Character Variants}
%
@@ -1427,7 +1429,7 @@ This work consists of this file fontspec.dtx
% \textsc{a} \& h
% \end{Xexample}
%
-% Note that the indexing starts from zero, which is compatible with \XeTeX\
+% Note that the indexing starts from zero, which is compatible with plain \XeTeX\
% but \emph{incompatible} with \texttt{luaotfload}, which starts from one.
%
% See \vref{sec:newfeatures} for a way to assign names to alternates,
@@ -1570,12 +1572,10 @@ This work consists of this file fontspec.dtx
% \fontspec[AutoFakeBold=1.5]{Charis SIL}
% \fontspec[BoldFeatures={FakeBold=1.5}]{Charis SIL}
% \end{Verbatim}
-%
% If both of the \feat{AutoFake...} features are used, then the bold italic
% font will also be faked.
%
-% Currently, \feat{FakeStretch} doesn't work in \LuaTeX\ and will be ignored
-% silently.
+% The \feat{FakeBold} and \feat{AutoFakeBold} features are only available with the \XeTeX\ engine and will be ignored in \LuaTeX.
%
% \subsection{Annotation}
% Some fonts are equipped with an extensive range of
@@ -2648,8 +2648,19 @@ This work consists of this file fontspec.dtx
\cs_generate_variant:Nn \int_set:Nn {Nv}
\cs_generate_variant:Nn \tl_gset:Nn {cV}
\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
% \end{macrocode}
%
+% \begin{macro}{\_int_mult_truncate:Nn}
+% Missing in expl3, IMO.
+% \begin{macrocode}
+\cs_new:Nn \_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \dim_eval:w #2 #1 \dim_eval_end: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsection{Error/warning/info messages}
%
@@ -2793,6 +2804,11 @@ This work consists of this file fontspec.dtx
{
The~ "cm-default"~ package~ option~ is~ obsolete.
}
+\msg_new:nnn {fontspec} {fakebold-only-xetex}
+{
+ The~ "FakeBold"~ and~ "AutoFakeBold"~ options~ are~ only~ available~ with~ XeLaTeX.\\
+ Option~ ignored.
+}
% \end{macrocode}
% Info messages:
% \begin{macrocode}
@@ -2872,8 +2888,8 @@ This work consists of this file fontspec.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\luatex_if_engine:T { \usepackage{fontspec-luatex} \endinput }
-\xetex_if_engine:T { \usepackage{fontspec-xetex} \endinput }
+\luatex_if_engine:T { \RequirePackage{fontspec-luatex} \endinput }
+\xetex_if_engine:T { \RequirePackage{fontspec-xetex} \endinput }
% \end{macrocode}
%
% \begin{macrocode}
@@ -4170,7 +4186,7 @@ This work consists of this file fontspec.dtx
}
{
\use:x {
- \exp_not:N \DeclareFontShape {\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{#2}{\sldefault}
+ \exp_not:N \DeclareFontShape {\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{#1}{\sldefault}
{<->ssub*\l_fontspec_family_tl/#1/\itdefault}{\l_fontspec_postadjust_tl}
}
}
@@ -4262,7 +4278,7 @@ This work consists of this file fontspec.dtx
\tl_set_eq:NN \l_fontspec_opacity_tl \g_fontspec_opacity_tl
\tl_set_eq:NN \l_fontspec_hexcol_tl \g_fontspec_hexcol_tl
\tl_clear:N \l_fontspec_postadjust_tl
- \keys_set:nx {fontspec} {\l_fontspec_fontfeat_clist #1}
+ \keys_set:nx {fontspec} {\l_fontspec_fontfeat_clist, #1}
% \end{macrocode}
% Finish the colour specification.
% Do not set the colour if not explicitly spec'd else \verb|\color| (using
@@ -4695,11 +4711,6 @@ This work consists of this file fontspec.dtx
% This is the tedious section where we correlate all possible
% (eventually) font feature requests with their \XeTeX\ representations.
%
-% \begin{macrocode}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
-% \end{macrocode}
-%
% \subsubsection{Pre-parsing naming information}
%
% These features are extracted from the font feature list before all others.
@@ -4899,34 +4910,36 @@ This work consists of this file fontspec.dtx
% \end{macro}
%
% \paragraph{Features}
+% Can't use |\clist_set:Nn| below, yet, because it would strip the leading comma
+% and we use that implicitly to concatenate options.
% \begin{macrocode}
\keys_define:nn {fontspec-preparse} { UprightFeatures .code:n = {
- \def\l_fontspec_fontfeat_up_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_up_clist { , #1}
\fontspec_update_fontid:n {rmfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldFeatures .code:n = {
- \def\l_fontspec_fontfeat_bf_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bf_clist {, #1}
\fontspec_update_fontid:n {bffeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { ItalicFeatures .code:n = {
- \def\l_fontspec_fontfeat_it_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_it_clist {, #1}
\fontspec_update_fontid:n {itfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldItalicFeatures .code:n = {
- \def\l_fontspec_fontfeat_bfit_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bfit_clist {, #1}
\fontspec_update_fontid:n {bfitfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { SlantedFeatures .code:n = {
- \def\l_fontspec_fontfeat_sl_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_sl_clist {, #1}
\fontspec_update_fontid:n {slfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldSlantedFeatures .code:n = {
- \def\l_fontspec_fontfeat_bfsl_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bfsl_clist {, #1}
\fontspec_update_fontid:n {bfslfeat:#1}
}
}
@@ -4935,7 +4948,7 @@ This work consists of this file fontspec.dtx
% \begin{macrocode}
\keys_define:nn {fontspec} { SmallCapsFeatures .code:n = {
\bool_if:NF \l_fontspec_firsttime_bool {
- \def\l_fontspec_fontfeat_sc_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_sc_clist {, #1}
}
\fontspec_update_fontid:n {scfeat:#1}
}
@@ -5185,10 +5198,11 @@ This work consists of this file fontspec.dtx
\aliasfontfeature{Color}{Colour}
% \end{macrocode}
% \begin{macrocode}
-\newcounter{fontspec_tmp_int}
+\int_new:N \l_fontspec_tmp_int
\keys_define:nn {fontspec} { Opacity .code:n = {
\fontspec_update_fontid:n {+opac:#1}
- \setcounter {fontspec_tmp_int} { 255*\real{#1} }
+ \int_set:Nn \l_fontspec_tmp_int {255}
+ \_int_mult_truncate:Nn \l_fontspec_tmp_int { #1 }
\tl_if_eq:NNF \l_fontspec_opacity_tl \g_fontspec_opacity_tl
{
\bool_if:NF \l_fontspec_firsttime_bool {
@@ -5197,8 +5211,8 @@ This work consists of this file fontspec.dtx
}
\tl_set:Nx \l_fontspec_opacity_tl
{
- \int_compare:nT { \value{fontspec_tmp_int} <= "F } {0} % zero pad
- \int_to_hexadecimal:n { \value{fontspec_tmp_int} }
+ \int_compare:nT { \l_fontspec_tmp_int <= "F } {0} % zero pad
+ \int_to_hexadecimal:n { \l_fontspec_tmp_int }
}
}
}
@@ -5297,12 +5311,20 @@ This work consists of this file fontspec.dtx
},
FakeStretch .default:n = {1.2}
}
+%<*xetexx>
\keys_define:nn {fontspec} { FakeBold .code:n = {
\fontspec_update_fontid:n {+embolden:#1}
\fontspec_update_featstr:n{embolden=#1}
},
FakeBold .default:n = {1.5}
}
+%</xetexx>
+%<*luatex>
+\keys_define:nn {fontspec}
+ {
+ FakeBold .code:n = { \fontspec_warning:n {fakebold-only-xetex} }
+ }
+%</luatex>
% \end{macrocode}
% These are to be given to a shape that has no real bold/italic
% to signal that \pkg{fontspec} should automatically create `fake' shapes.
@@ -5317,13 +5339,19 @@ This work consists of this file fontspec.dtx
% \begin{macrocode}
\keys_define:nn {fontspec} { AutoFakeSlant .code:n = {
\bool_if:NT \l_fontspec_firsttime_bool {
+
\tl_set:Nn \l_fontspec_fake_slant_tl {#1}
- \clist_put_right:Nn \l_fontspec_fontfeat_it_clist {,FakeSlant=#1}
+ \clist_put_right:Nn \l_fontspec_fontfeat_it_clist {FakeSlant=#1}
\tl_set_eq:NN \l_fontspec_fontname_it_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l_fontspec_noit_bool
+
\fontspec_update_fontid:n {fakeit:#1}
- \tl_if_empty:NF \l_fontspec_fake_embolden_tl {
- \tl_put_right:Nx \l_fontspec_fontfeat_bfit_clist
- {,FakeBold=\l_fontspec_fake_embolden_tl,FakeSlant=#1}
+
+ \tl_if_empty:NF \l_fontspec_fake_embolden_tl
+ {
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist
+ {FakeBold=\l_fontspec_fake_embolden_tl}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist {FakeSlant=#1}
\tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
@@ -5335,13 +5363,18 @@ This work consists of this file fontspec.dtx
% \begin{macrocode}
\keys_define:nn {fontspec} { AutoFakeBold .code:n = {
\bool_if:NT \l_fontspec_firsttime_bool {
+
\tl_set:Nn \l_fontspec_fake_embolden_tl {#1}
- \tl_put_right:Nn \l_fontspec_fontfeat_bf_clist {,FakeBold=#1}
+ \clist_put_right:Nn \l_fontspec_fontfeat_bf_clist {FakeBold=#1}
\tl_set_eq:NN \l_fontspec_fontname_bf_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l_fontspec_nobf_bool
+
\fontspec_update_fontid:n {fakebf:#1}
+
\tl_if_empty:NF \l_fontspec_fake_slant_tl {
- \tl_put_right:Nx \l_fontspec_fontfeat_bfit_clist
- {,FakeSlant=\l_fontspec_fake_slant_tl,FakeBold=#1}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist
+ {FakeSlant=\l_fontspec_fake_slant_tl}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist {FakeBold=#1}
\tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
@@ -5520,7 +5553,8 @@ This work consists of this file fontspec.dtx
Alternate .default:n = {0} ,
Alternate / unknown .code:n =
{
- \fontspec_make_feature:nnx {17}{#1} { \fontspec_salt:n {#1} }
+ \clist_map_inline:nn {#1}
+ { \fontspec_make_feature:nnx {17}{##1} { \fontspec_salt:n {##1} } }
}
}
% \end{macrocode}
@@ -5538,7 +5572,8 @@ This work consists of this file fontspec.dtx
Variant .default:n = {0} ,
Variant / unknown .code:n =
{
- \fontspec_make_feature:nnx {18}{#1} { +ss \two@digits {#1} }
+ \clist_map_inline:nn {#1}
+ { \fontspec_make_feature:nnx {18}{##1} { +ss \two@digits {##1} } }
}
}
\aliasfontfeature{Variant}{StylisticSet}
diff --git a/Master/texmf-dist/source/latex/fontspec/testsuite/F-autofake.ltx b/Master/texmf-dist/source/latex/fontspec/testsuite/F-autofake.ltx
new file mode 100644
index 00000000000..66c93682554
--- /dev/null
+++ b/Master/texmf-dist/source/latex/fontspec/testsuite/F-autofake.ltx
@@ -0,0 +1,16 @@
+\documentclass{testsuite}
+\usepackage{fontspec}
+\begin{document}
+\Large
+\def\text{ABC \textit{ABC} \textbf{ABC}
+ \textbf{\textit{ABC}}\\}
+\fontspec{Inconsolata}\text
+\fontspec[AutoFakeSlant]{Inconsolata}\text
+\fontspec[AutoFakeBold]{Inconsolata}\text
+\fontspec[AutoFakeSlant,AutoFakeBold]
+ {Inconsolata}\text
+\fontspec[AutoFakeSlant=0.4]{Inconsolata}\text
+\fontspec[AutoFakeBold=5]{Inconsolata}\text
+\fontspec[AutoFakeSlant=0.4,AutoFakeBold=5]
+ {Inconsolata}\text
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/fontspec/testsuite/testsuite-listing.tex b/Master/texmf-dist/source/latex/fontspec/testsuite/testsuite-listing.tex
index 7a888653eaa..1edda869a08 100644
--- a/Master/texmf-dist/source/latex/fontspec/testsuite/testsuite-listing.tex
+++ b/Master/texmf-dist/source/latex/fontspec/testsuite/testsuite-listing.tex
@@ -1,5 +1,6 @@
\TEST{F-alias-feature-option}
\TEST{F-alias-feature}
+\TEST{F-autofake}
\TEST{F-autoscaling}
\TEST{F-charactervariant}
\TEST{F-colour-basic}
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
index bac3bf4cd66..a7ef1c9a9ec 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
@@ -8,13 +8,13 @@
%%
%% _________________________________________
%% The fontspec package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2011 Will Robertson and Khaled Hosny
+%% (C) 2004--2012 Will Robertson and Khaled Hosny
%%
%% License information appended.
%%
%%
\ProvidesPackage{fontspec-luatex}
- [2011/09/18 v2.2a Advanced font selection for XeLaTeX/LuaLaTeX]
+ [2012/05/06 v2.2b Advanced font selection for XeLaTeX/LuaLaTeX]
\ExplSyntaxOn
@@ -667,7 +667,7 @@
}
{
\use:x {
- \exp_not:N \DeclareFontShape {\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{#2}{\sldefault}
+ \exp_not:N \DeclareFontShape {\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{#1}{\sldefault}
{<->ssub*\l_fontspec_family_tl/#1/\itdefault}{\l_fontspec_postadjust_tl}
}
}
@@ -710,7 +710,7 @@
\tl_set_eq:NN \l_fontspec_opacity_tl \g_fontspec_opacity_tl
\tl_set_eq:NN \l_fontspec_hexcol_tl \g_fontspec_hexcol_tl
\tl_clear:N \l_fontspec_postadjust_tl
- \keys_set:nx {fontspec} {\l_fontspec_fontfeat_clist #1}
+ \keys_set:nx {fontspec} {\l_fontspec_fontfeat_clist, #1}
\str_if_eq:xxF { \l_fontspec_hexcol_tl \l_fontspec_opacity_tl }
{ \g_fontspec_hexcol_tl \g_fontspec_opacity_tl }
{
@@ -894,8 +894,6 @@
}
\if@tempswa \prg_return_true: \else: \prg_return_false: \fi:
}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
\bool_new:N \l_fontspec_external_bool
\keys_define:nn {fontspec-preparse-external} {
ExternalLocation .code:n = {
@@ -1011,38 +1009,38 @@
}
\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
\keys_define:nn {fontspec-preparse} { UprightFeatures .code:n = {
- \def\l_fontspec_fontfeat_up_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_up_clist { , #1}
\fontspec_update_fontid:n {rmfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldFeatures .code:n = {
- \def\l_fontspec_fontfeat_bf_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bf_clist {, #1}
\fontspec_update_fontid:n {bffeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { ItalicFeatures .code:n = {
- \def\l_fontspec_fontfeat_it_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_it_clist {, #1}
\fontspec_update_fontid:n {itfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldItalicFeatures .code:n = {
- \def\l_fontspec_fontfeat_bfit_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bfit_clist {, #1}
\fontspec_update_fontid:n {bfitfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { SlantedFeatures .code:n = {
- \def\l_fontspec_fontfeat_sl_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_sl_clist {, #1}
\fontspec_update_fontid:n {slfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldSlantedFeatures .code:n = {
- \def\l_fontspec_fontfeat_bfsl_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bfsl_clist {, #1}
\fontspec_update_fontid:n {bfslfeat:#1}
}
}
\keys_define:nn {fontspec} { SmallCapsFeatures .code:n = {
\bool_if:NF \l_fontspec_firsttime_bool {
- \def\l_fontspec_fontfeat_sc_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_sc_clist {, #1}
}
\fontspec_update_fontid:n {scfeat:#1}
}
@@ -1199,10 +1197,11 @@
\tl_set:Nn \l_fontspec_opacity_tl {#7#8}
}
\aliasfontfeature{Color}{Colour}
-\newcounter{fontspec_tmp_int}
+\int_new:N \l_fontspec_tmp_int
\keys_define:nn {fontspec} { Opacity .code:n = {
\fontspec_update_fontid:n {+opac:#1}
- \setcounter {fontspec_tmp_int} { 255*\real{#1} }
+ \int_set:Nn \l_fontspec_tmp_int {255}
+ \_int_mult_truncate:Nn \l_fontspec_tmp_int { #1 }
\tl_if_eq:NNF \l_fontspec_opacity_tl \g_fontspec_opacity_tl
{
\bool_if:NF \l_fontspec_firsttime_bool {
@@ -1211,8 +1210,8 @@
}
\tl_set:Nx \l_fontspec_opacity_tl
{
- \int_compare:nT { \value{fontspec_tmp_int} <= "F } {0} % zero pad
- \int_to_hexadecimal:n { \value{fontspec_tmp_int} }
+ \int_compare:nT { \l_fontspec_tmp_int <= "F } {0} % zero pad
+ \int_to_hexadecimal:n { \l_fontspec_tmp_int }
}
}
}
@@ -1261,21 +1260,25 @@
},
FakeStretch .default:n = {1.2}
}
-\keys_define:nn {fontspec} { FakeBold .code:n = {
- \fontspec_update_fontid:n {+embolden:#1}
- \fontspec_update_featstr:n{embolden=#1}
- },
- FakeBold .default:n = {1.5}
-}
+\keys_define:nn {fontspec}
+ {
+ FakeBold .code:n = { \fontspec_warning:n {fakebold-only-xetex} }
+ }
\keys_define:nn {fontspec} { AutoFakeSlant .code:n = {
\bool_if:NT \l_fontspec_firsttime_bool {
+
\tl_set:Nn \l_fontspec_fake_slant_tl {#1}
- \clist_put_right:Nn \l_fontspec_fontfeat_it_clist {,FakeSlant=#1}
+ \clist_put_right:Nn \l_fontspec_fontfeat_it_clist {FakeSlant=#1}
\tl_set_eq:NN \l_fontspec_fontname_it_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l_fontspec_noit_bool
+
\fontspec_update_fontid:n {fakeit:#1}
- \tl_if_empty:NF \l_fontspec_fake_embolden_tl {
- \tl_put_right:Nx \l_fontspec_fontfeat_bfit_clist
- {,FakeBold=\l_fontspec_fake_embolden_tl,FakeSlant=#1}
+
+ \tl_if_empty:NF \l_fontspec_fake_embolden_tl
+ {
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist
+ {FakeBold=\l_fontspec_fake_embolden_tl}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist {FakeSlant=#1}
\tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
@@ -1284,13 +1287,18 @@
}
\keys_define:nn {fontspec} { AutoFakeBold .code:n = {
\bool_if:NT \l_fontspec_firsttime_bool {
+
\tl_set:Nn \l_fontspec_fake_embolden_tl {#1}
- \tl_put_right:Nn \l_fontspec_fontfeat_bf_clist {,FakeBold=#1}
+ \clist_put_right:Nn \l_fontspec_fontfeat_bf_clist {FakeBold=#1}
\tl_set_eq:NN \l_fontspec_fontname_bf_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l_fontspec_nobf_bool
+
\fontspec_update_fontid:n {fakebf:#1}
+
\tl_if_empty:NF \l_fontspec_fake_slant_tl {
- \tl_put_right:Nx \l_fontspec_fontfeat_bfit_clist
- {,FakeSlant=\l_fontspec_fake_slant_tl,FakeBold=#1}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist
+ {FakeSlant=\l_fontspec_fake_slant_tl}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist {FakeBold=#1}
\tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
@@ -1402,7 +1410,8 @@
Alternate .default:n = {0} ,
Alternate / unknown .code:n =
{
- \fontspec_make_feature:nnx {17}{#1} { \fontspec_salt:n {#1} }
+ \clist_map_inline:nn {#1}
+ { \fontspec_make_feature:nnx {17}{##1} { \fontspec_salt:n {##1} } }
}
}
\cs_set:Nn \fontspec_salt:n
@@ -1413,7 +1422,8 @@
Variant .default:n = {0} ,
Variant / unknown .code:n =
{
- \fontspec_make_feature:nnx {18}{#1} { +ss \two@digits {#1} }
+ \clist_map_inline:nn {#1}
+ { \fontspec_make_feature:nnx {18}{##1} { +ss \two@digits {##1} } }
}
}
\aliasfontfeature{Variant}{StylisticSet}
@@ -1957,8 +1967,8 @@
}
\ExplSyntaxOff
%%
-%% Copyright 2004--2011 Will Robertson <wspr81@gmail.com>
-%% Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>
+%% Copyright 2004--2012 Will Robertson <wspr81@gmail.com>
+%% Copyright 2009--2012 Khaled Hosny <khaledhosny@eglug.org>
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
index 8f9ba41e426..f2fc15b2a82 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
@@ -8,13 +8,13 @@
%%
%% _________________________________________
%% The fontspec package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2011 Will Robertson and Khaled Hosny
+%% (C) 2004--2012 Will Robertson and Khaled Hosny
%%
%% License information appended.
%%
%%
\ProvidesPackage{fontspec-patches}
- [2011/09/18 v2.2a Advanced font selection for XeLaTeX/LuaLaTeX]
+ [2012/05/06 v2.2b Advanced font selection for XeLaTeX/LuaLaTeX]
\ExplSyntaxOn
@@ -110,8 +110,8 @@
{ \addfontfeature{Numbers=Lining} #1 }
}
%%
-%% Copyright 2004--2011 Will Robertson <wspr81@gmail.com>
-%% Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>
+%% Copyright 2004--2012 Will Robertson <wspr81@gmail.com>
+%% Copyright 2009--2012 Khaled Hosny <khaledhosny@eglug.org>
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
index b0fad28a8a8..701d5030093 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
@@ -8,13 +8,13 @@
%%
%% _________________________________________
%% The fontspec package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2011 Will Robertson and Khaled Hosny
+%% (C) 2004--2012 Will Robertson and Khaled Hosny
%%
%% License information appended.
%%
%%
\ProvidesPackage{fontspec-xetex}
- [2011/09/18 v2.2a Advanced font selection for XeLaTeX/LuaLaTeX]
+ [2012/05/06 v2.2b Advanced font selection for XeLaTeX/LuaLaTeX]
\ExplSyntaxOn
@@ -686,7 +686,7 @@
}
{
\use:x {
- \exp_not:N \DeclareFontShape {\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{#2}{\sldefault}
+ \exp_not:N \DeclareFontShape {\g_fontspec_encoding_tl}{\l_fontspec_family_tl}{#1}{\sldefault}
{<->ssub*\l_fontspec_family_tl/#1/\itdefault}{\l_fontspec_postadjust_tl}
}
}
@@ -730,7 +730,7 @@
\tl_set_eq:NN \l_fontspec_opacity_tl \g_fontspec_opacity_tl
\tl_set_eq:NN \l_fontspec_hexcol_tl \g_fontspec_hexcol_tl
\tl_clear:N \l_fontspec_postadjust_tl
- \keys_set:nx {fontspec} {\l_fontspec_fontfeat_clist #1}
+ \keys_set:nx {fontspec} {\l_fontspec_fontfeat_clist, #1}
\str_if_eq:xxF { \l_fontspec_hexcol_tl \l_fontspec_opacity_tl }
{ \g_fontspec_hexcol_tl \g_fontspec_opacity_tl }
{
@@ -960,8 +960,6 @@
}
\if@tempswa \prg_return_true: \else: \prg_return_false: \fi:
}
-\cs_generate_variant:Nn \keys_set:nn {nx}
-\cs_generate_variant:Nn \keys_set_known:nnN {nx}
\bool_new:N \l_fontspec_external_bool
\keys_define:nn {fontspec-preparse-external} {
ExternalLocation .code:n = {
@@ -1079,38 +1077,38 @@
}
\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
\keys_define:nn {fontspec-preparse} { UprightFeatures .code:n = {
- \def\l_fontspec_fontfeat_up_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_up_clist { , #1}
\fontspec_update_fontid:n {rmfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldFeatures .code:n = {
- \def\l_fontspec_fontfeat_bf_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bf_clist {, #1}
\fontspec_update_fontid:n {bffeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { ItalicFeatures .code:n = {
- \def\l_fontspec_fontfeat_it_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_it_clist {, #1}
\fontspec_update_fontid:n {itfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldItalicFeatures .code:n = {
- \def\l_fontspec_fontfeat_bfit_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bfit_clist {, #1}
\fontspec_update_fontid:n {bfitfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { SlantedFeatures .code:n = {
- \def\l_fontspec_fontfeat_sl_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_sl_clist {, #1}
\fontspec_update_fontid:n {slfeat:#1}
}
}
\keys_define:nn {fontspec-preparse} { BoldSlantedFeatures .code:n = {
- \def\l_fontspec_fontfeat_bfsl_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_bfsl_clist {, #1}
\fontspec_update_fontid:n {bfslfeat:#1}
}
}
\keys_define:nn {fontspec} { SmallCapsFeatures .code:n = {
\bool_if:NF \l_fontspec_firsttime_bool {
- \def\l_fontspec_fontfeat_sc_clist{, #1}
+ \tl_set:Nn \l_fontspec_fontfeat_sc_clist {, #1}
}
\fontspec_update_fontid:n {scfeat:#1}
}
@@ -1264,10 +1262,11 @@
\tl_set:Nn \l_fontspec_opacity_tl {#7#8}
}
\aliasfontfeature{Color}{Colour}
-\newcounter{fontspec_tmp_int}
+\int_new:N \l_fontspec_tmp_int
\keys_define:nn {fontspec} { Opacity .code:n = {
\fontspec_update_fontid:n {+opac:#1}
- \setcounter {fontspec_tmp_int} { 255*\real{#1} }
+ \int_set:Nn \l_fontspec_tmp_int {255}
+ \_int_mult_truncate:Nn \l_fontspec_tmp_int { #1 }
\tl_if_eq:NNF \l_fontspec_opacity_tl \g_fontspec_opacity_tl
{
\bool_if:NF \l_fontspec_firsttime_bool {
@@ -1276,8 +1275,8 @@
}
\tl_set:Nx \l_fontspec_opacity_tl
{
- \int_compare:nT { \value{fontspec_tmp_int} <= "F } {0} % zero pad
- \int_to_hexadecimal:n { \value{fontspec_tmp_int} }
+ \int_compare:nT { \l_fontspec_tmp_int <= "F } {0} % zero pad
+ \int_to_hexadecimal:n { \l_fontspec_tmp_int }
}
}
}
@@ -1341,13 +1340,19 @@
}
\keys_define:nn {fontspec} { AutoFakeSlant .code:n = {
\bool_if:NT \l_fontspec_firsttime_bool {
+
\tl_set:Nn \l_fontspec_fake_slant_tl {#1}
- \clist_put_right:Nn \l_fontspec_fontfeat_it_clist {,FakeSlant=#1}
+ \clist_put_right:Nn \l_fontspec_fontfeat_it_clist {FakeSlant=#1}
\tl_set_eq:NN \l_fontspec_fontname_it_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l_fontspec_noit_bool
+
\fontspec_update_fontid:n {fakeit:#1}
- \tl_if_empty:NF \l_fontspec_fake_embolden_tl {
- \tl_put_right:Nx \l_fontspec_fontfeat_bfit_clist
- {,FakeBold=\l_fontspec_fake_embolden_tl,FakeSlant=#1}
+
+ \tl_if_empty:NF \l_fontspec_fake_embolden_tl
+ {
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist
+ {FakeBold=\l_fontspec_fake_embolden_tl}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist {FakeSlant=#1}
\tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
@@ -1356,13 +1361,18 @@
}
\keys_define:nn {fontspec} { AutoFakeBold .code:n = {
\bool_if:NT \l_fontspec_firsttime_bool {
+
\tl_set:Nn \l_fontspec_fake_embolden_tl {#1}
- \tl_put_right:Nn \l_fontspec_fontfeat_bf_clist {,FakeBold=#1}
+ \clist_put_right:Nn \l_fontspec_fontfeat_bf_clist {FakeBold=#1}
\tl_set_eq:NN \l_fontspec_fontname_bf_tl \l_fontspec_fontname_tl
+ \bool_set_false:N \l_fontspec_nobf_bool
+
\fontspec_update_fontid:n {fakebf:#1}
+
\tl_if_empty:NF \l_fontspec_fake_slant_tl {
- \tl_put_right:Nx \l_fontspec_fontfeat_bfit_clist
- {,FakeSlant=\l_fontspec_fake_slant_tl,FakeBold=#1}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist
+ {FakeSlant=\l_fontspec_fake_slant_tl}
+ \clist_put_right:Nx \l_fontspec_fontfeat_bfit_clist {FakeBold=#1}
\tl_set_eq:NN \l_fontspec_fontname_bfit_tl \l_fontspec_fontname_tl
}
}
@@ -1474,7 +1484,8 @@
Alternate .default:n = {0} ,
Alternate / unknown .code:n =
{
- \fontspec_make_feature:nnx {17}{#1} { \fontspec_salt:n {#1} }
+ \clist_map_inline:nn {#1}
+ { \fontspec_make_feature:nnx {17}{##1} { \fontspec_salt:n {##1} } }
}
}
\cs_set:Nn \fontspec_salt:n
@@ -1485,7 +1496,8 @@
Variant .default:n = {0} ,
Variant / unknown .code:n =
{
- \fontspec_make_feature:nnx {18}{#1} { +ss \two@digits {#1} }
+ \clist_map_inline:nn {#1}
+ { \fontspec_make_feature:nnx {18}{##1} { +ss \two@digits {##1} } }
}
}
\aliasfontfeature{Variant}{StylisticSet}
@@ -2029,8 +2041,8 @@
}
\ExplSyntaxOff
%%
-%% Copyright 2004--2011 Will Robertson <wspr81@gmail.com>
-%% Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>
+%% Copyright 2004--2012 Will Robertson <wspr81@gmail.com>
+%% Copyright 2009--2012 Khaled Hosny <khaledhosny@eglug.org>
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
index 869bc5879dd..06be52164de 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.lua
@@ -8,7 +8,7 @@
--
-- _________________________________________
-- The fontspec package for XeLaTeX/LuaLaTeX
--- (C) 2004--2011 Will Robertson and Khaled Hosny
+-- (C) 2004--2012 Will Robertson and Khaled Hosny
--
-- License information appended.
--
@@ -152,8 +152,8 @@ local function set_capheight(fontdata)
end
luatexbase.add_to_callback("luaotfload.patch_font", set_capheight, "fontspec.set_capheight")
--
--- Copyright 2004--2011 Will Robertson <wspr81@gmail.com>
--- Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>
+-- Copyright 2004--2012 Will Robertson <wspr81@gmail.com>
+-- Copyright 2009--2012 Khaled Hosny <khaledhosny@eglug.org>
--
-- Distributable under the LaTeX Project Public License,
-- version 1.3c or higher (your choice). The latest version of
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
index 6b4caf9d773..8d9eae77f22 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
@@ -8,13 +8,13 @@
%%
%% _________________________________________
%% The fontspec package for XeLaTeX/LuaLaTeX
-%% (C) 2004--2011 Will Robertson and Khaled Hosny
+%% (C) 2004--2012 Will Robertson and Khaled Hosny
%%
%% License information appended.
%%
%%
\ProvidesPackage{fontspec}
- [2011/09/18 v2.2a Advanced font selection for XeLaTeX/LuaLaTeX]
+ [2012/05/06 v2.2b Advanced font selection for XeLaTeX/LuaLaTeX]
\RequirePackage{expl3}[2011/09/05]
@@ -65,6 +65,11 @@
\cs_generate_variant:Nn \int_set:Nn {Nv}
\cs_generate_variant:Nn \tl_gset:Nn {cV}
\cs_generate_variant:Nn \keys_set:nn {nx}
+\cs_generate_variant:Nn \keys_set_known:nnN {nx}
+\cs_new:Nn \_int_mult_truncate:Nn
+ {
+ \int_set:Nn #1 { \dim_eval:w #2 #1 \dim_eval_end: }
+ }
\cs_new:Npn \fontspec_error:n { \msg_error:nn {fontspec} }
\cs_new:Npn \fontspec_error:nx { \msg_error:nnx {fontspec} }
\cs_new:Npn \fontspec_warning:n { \msg_warning:nn {fontspec} }
@@ -196,6 +201,11 @@
{
The~ "cm-default"~ package~ option~ is~ obsolete.
}
+\msg_new:nnn {fontspec} {fakebold-only-xetex}
+{
+ The~ "FakeBold"~ and~ "AutoFakeBold"~ options~ are~ only~ available~ with~ XeLaTeX.\\
+ Option~ ignored.
+}
\msg_new:nnn {fontspec} {defining-font}
{
Font~ family~'\l_fontspec_family_tl'~ created~ for~ font~ '#2'~
@@ -256,11 +266,11 @@
\ExecuteOptions{config,math}
\ProcessOptions*
\RequirePackage{fontspec-patches}
-\luatex_if_engine:T { \usepackage{fontspec-luatex} \endinput }
-\xetex_if_engine:T { \usepackage{fontspec-xetex} \endinput }
+\luatex_if_engine:T { \RequirePackage{fontspec-luatex} \endinput }
+\xetex_if_engine:T { \RequirePackage{fontspec-xetex} \endinput }
%%
-%% Copyright 2004--2011 Will Robertson <wspr81@gmail.com>
-%% Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>
+%% Copyright 2004--2012 Will Robertson <wspr81@gmail.com>
+%% Copyright 2009--2012 Khaled Hosny <khaledhosny@eglug.org>
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of