summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec.dtx')
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx45
1 files changed, 28 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
index 759f5f291f9..7500e8988d6 100644
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
@@ -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/13 v2.2 Advanced font selection for XeLaTeX/LuaLaTeX]
+ [2011/09/18 v2.2a Advanced font selection for XeLaTeX/LuaLaTeX]
%</fontspec|patches>
%
%<*driver>
@@ -1237,13 +1237,15 @@ This work consists of this file fontspec.dtx
%
% The \opt{Arabic} option (with tag \verb|anum|) maps regular numerals to their Arabic script or Persian equivalents
% based on the current \opt{Language} setting (see \vref{sec:ot}), shown in
-% \exref{num-arab} using the Zar fonts\note{\url{http://wiki.irmug.org/index.php/X_Series_2}}.
+% \exref{num-arab} using the Persian Modern font, which is included in \TeX\ Live
+% and MiK\TeX.
% This option is based on a \LuaTeX\ feature of the \pkg{luaotfload} package,
% not an OpenType feature. (Thus, this feature is unavailable in \XeTeX.)
%
% \begin{Lexample}[firstline=2]{num-arab}{An example of number remapping to Arabic or Persian. (\LuaTeX\ only.)}
% \huge
-% \fontspec[Script=Arabic,Numbers=Arabic]{XB Zar}
+% \fontspec[Script=Arabic,Numbers=Arabic]
+% {persian-modern-regular.ttf}
% {\addfontfeature{Language=Arabic}
% 0123456789} \\
% {\addfontfeature{Language=Parsi}
@@ -2466,22 +2468,24 @@ This work consists of this file fontspec.dtx
% \end{macro}
%
% \begin{macro}{\fontspec_set_family:Nnn}
-% \darg{family}
+% \darg{\LaTeX\ family}
% \darg{fontspec features}
% \darg{font name}
-% Defines a new font family from given \meta{features} and \meta{font},
-% and stores the name in the variable \meta{family}.
+% Defines a new NFSS family from given \meta{features} and \meta{font},
+% and stores the family name in the variable \meta{family}.
+% This font family can then be selected with standard \LaTeX\ commands
+% \cs{fontfamily}\marg{family}\cs{selectfont}.
% See the standard \pkg{fontspec} user commands for applications of this
% function.
% \end{macro}
%
% \begin{macro}{\fontspec_set_fontface:NNnn}
% \darg{primitive font}
-% \darg{family}
+% \darg{\LaTeX\ family}
% \darg{fontspec features}
% \darg{font name}
% Variant of the above in which the primitive \TeX\ font command is stored in
-% meta{primitive font}.
+% the variable \meta{primitive font}.
% If a family is loaded (with bold and italic shapes) the primitive font
% command will only select the regular face.
% This feature is designed for \LaTeX\ programmers who need to
@@ -2991,6 +2995,10 @@ This work consists of this file fontspec.dtx
% document. \cmd\setboldmathrm\ is used for specifying which
% fonts should be used in \cmd\boldmath.
% \begin{macrocode}
+\tl_new:N \g_fontspec_mathrm_tl
+\tl_new:N \g_fontspec_bfmathrm_tl
+\tl_new:N \g_fontspec_mathsf_tl
+\tl_new:N \g_fontspec_mathtt_tl
\DeclareDocumentCommand \setmathrm { O{} m } {
\fontspec_set_family:Nnn \g_fontspec_mathrm_tl {#1}{#2}
}
@@ -3011,10 +3019,9 @@ This work consists of this file fontspec.dtx
% If the commands above are not executed, then \cmd\rmdefault\ (\etc)
% will be used.
% \begin{macrocode}
-\def\g_fontspec_mathrm_tl{\rmdefault}
-\def\g_fontspec_mathsf_tl{\sfdefault}
-\def\g_fontspec_mathtt_tl{\ttdefault}
-\tl_clear:N \g_fontspec_bfmathrm_tl
+\tl_set:Nn \g_fontspec_mathrm_tl {\rmdefault}
+\tl_set:Nn \g_fontspec_mathsf_tl {\sfdefault}
+\tl_set:Nn \g_fontspec_mathtt_tl {\ttdefault}
% \end{macrocode}
% \end{macro} \end{macro} \end{macro}
% \end{macro}
@@ -3063,10 +3070,10 @@ This work consists of this file fontspec.dtx
% concatenated with the individual macro choices in the
% [...] macro.
% \begin{macrocode}
+\tl_new:N \g_fontspec_default_fontopts_tl
\DeclareDocumentCommand \defaultfontfeatures {m} {
\tl_set:Nn \g_fontspec_default_fontopts_tl {#1,}
}
-\tl_clear:N \g_fontspec_default_fontopts_tl
% \end{macrocode}
% \end{macro}
%
@@ -6265,12 +6272,16 @@ This work consists of this file fontspec.dtx
% \begin{macro}{\zf@family}
% \begin{macro}{\zf@basefont}
% \begin{macro}{\zf@fontspec}
-% Just in case.
+% Old interfaces.
+% These are needed by, at least, the \pkg{mathspec} package.
% \begin{macrocode}
\tl_set:Nn \zf@enc { \g_fontspec_encoding_tl }
-\tl_set:Nn \zf@family { \l_fontspec_family_tl }
-\tl_set:Nn \zf@basefont { \l_fontspec_font }
-\cs_set_eq:NN \zf@fontspec \fontspec_select:nn
+\cs_set:Npn \zf@fontspec #1 #2
+ {
+ \fontspec_select:nn {#1} {#2}
+ \tl_set:Nn \zf@family { \l_fontspec_family_tl }
+ \tl_set:Nn \zf@basefont { \l_fontspec_font }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}