summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-05-07 23:51:40 +0000
committerKarl Berry <karl@freefriends.org>2008-05-07 23:51:40 +0000
commitd726ca5998afaac28572056788e01b78fbe0aeeb (patch)
tree0242bb7fbd28fc23ff198c25c20b117be59cbfb5 /Master/texmf-dist/source
parent836d5f65811c78378821754b1b0f07ab1bbf5f9b (diff)
fontspec update (7may08)
git-svn-id: svn://tug.org/texlive/trunk@7927 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx147
-rw-r--r--Master/texmf-dist/source/xelatex/fontspec/fontspec.ins46
2 files changed, 146 insertions, 47 deletions
diff --git a/Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx b/Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx
index d75c8b9b7bf..ffa21e11024 100644
--- a/Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx
+++ b/Master/texmf-dist/source/xelatex/fontspec/fontspec.dtx
@@ -4,7 +4,7 @@
%</internal>
%<*readme>
--------------------------
-THE FONTSPEC PACKAGE v1.14
+THE FONTSPEC PACKAGE v1.17
The fontspec package only works with XeTeX,
a unicode capable TeX-variant. It provides
@@ -120,7 +120,7 @@ This work consists of this file fontspec.dtx
%</internal>
%
%<*driver>
-\documentclass{ltxdoc}
+\documentclass[a4paper]{ltxdoc}
\usepackage{fontspec-doc-style}
\EnableCrossrefs
\CodelineIndex
@@ -135,7 +135,7 @@ This work consists of this file fontspec.dtx
%
%<*fontspec>
\ProvidesPackage{fontspec}
- [2007/06/20 v1.14 Advanced font selection for XeLaTeX]
+ [2008/02/03 v1.17 Advanced font selection for XeLaTeX]
%</fontspec>
%
% \fi
@@ -238,6 +238,8 @@ This work consists of this file fontspec.dtx
% Use the |[quiet]| package option to write
% these warnings to the transcript (\texttt{.log}) file instead.
%
+% Use the |[silent]| package option to completely suppress these warnings if you don't even want the |.log| file cluttered up.
+%
% \subsection{About this manual}
% \warn{v1.6}{An example warning!}
% In the unfortunate case that I need to make backwards incompatible changes (you're probably pretty safe these days), such things, and some other comments, are noted in the margin of this document as shown here, with a red star if the
@@ -388,16 +390,24 @@ This work consists of this file fontspec.dtx
% \bfseries SemiBold \textit{Italic}
% \end{example}
%
+% As a matter of fact, this feature can also be used for the upright font too:
+% \begin{example}
+% \fontspec[UprightFont={* SemiBold},
+% BoldFont={* Bold}]{Baskerville}
+% Upright \textit{Italic}
+% \bfseries Bold \textit{Bold Italic}
+% \end{example}
+%
% Old-fashioned font families used to distribute their small caps
% glyphs in separate fonts due to the limitations on the number
% of glyphs allowed in the PostScript Type~1 format. Such fonts may be used
% by declaring the \feat{SmallCapsFont} of the family you are specifying:
-% \begin{example}
-% \fontspec[
-% SmallCapsFont={Minion MM Small Caps & Oldstyle Figures},
-% ]{Minion MM Roman}
-% Roman 123 \\ \textsc{Small caps 456}
-% \end{example}
+% ^^A\begin{example}
+% ^^A \fontspec[
+% ^^A SmallCapsFont={Minion MM Small Caps & Oldstyle Figures},
+% ^^A ]{Minion MM Roman}
+% ^^A Roman 123 \\ \textsc{Small caps 456}
+% ^^A\end{example}
%
%
% \subsection{Math(s) fonts}
@@ -409,7 +419,7 @@ This work consists of this file fontspec.dtx
% the processing. The \pkg{fontspec} package must also be loaded after
% any maths font packages (\eg, \pkg{euler}) to be
% successful. (Actually, it is \emph{only} \pkg{euler} that is the
-% problem.)
+% problem.\footnote{Speaking of \pkg{euler}, if you want to use its \texttt{[mathbf]} option, it won't work, and you'll need to put this after \pkg{fontspec} is loaded instead:\ttfamily\cmd\AtBeginDocument\char`\{\cmd\DeclareMathAlphabet\cmd\mathbf\char`\{U\char`\}\char`\{eur\char`\}\char`\{b\char`\}\char`\{n\char`\}})
%
% Note that you may find that loading some maths packages won't be as smooth as you expect since \pkg{fontspec} (and \XeTeX\ in general) breaks many of the assumptions of \TeX\ as to where maths characters and accents can be found. Contact me if you have troubles, but I can't guarantee to be able to fix any incompatibilities. The Lucida and Euler maths fonts (the latter loaded with \pkg{euler} rather than \pkg{eulervm}) should be fine; for all others keep an eye out for problems.
%
@@ -428,9 +438,9 @@ This work consists of this file fontspec.dtx
% For example, if you were using Optima with the Euler maths font, you
% might have this in your preamble:
% \begin{Verbatim}[gobble=4]
-% \usepackage[mathcal]{euler}
+% \usepackage{mathpazo}
% \usepackage{fontspec,xunicode}
-% \setmainfont{Optima Regular}
+% \setmainfont{Optima}
% \setmathrm{Optima}
% \setboldmathrm[BoldFont=Optima ExtraBlack]{Optima Bold}
% \end{Verbatim}
@@ -812,6 +822,28 @@ This work consists of this file fontspec.dtx
% The \pkg{xltxtra} package redefines \LaTeX's \cmd\-\ macro
% such that it adjusts along with the above changes.
%
+%
+% \subsection{Font transformations}
+%
+% In rare situations users may want to mechanically distort the shapes of the glyphs in the current font. Please don't overuse these features; they can be extremely ugly if overused.
+%
+% \begin{example}
+% \fontspec{Charis SIL} \emph{ABCxyz} \quad
+% \fontspec[FakeSlant=0.2]{Charis SIL} ABCxyz
+% \end{example}
+%
+% \begin{example}
+% \fontspec{Charis SIL} ABCxyz \quad
+% \fontspec[FakeStretch=1.2]{Charis SIL} ABCxyz
+% \end{example}
+%
+% \begin{example}
+% \fontspec{Charis SIL} \textbf{ABCxyz} \quad
+% \fontspec[FakeBold=1.5]{Charis SIL} ABCxyz
+% \end{example}
+%
+% If values are omitted, their defaults are as shown above.
+%
% \section{Font-dependent features} \label{sec:features}
%
% This section covers each and every font feature catered for by this
@@ -914,14 +946,14 @@ This work consists of this file fontspec.dtx
% it harder to create an automatic interface through \LaTeX, and the
% optical size for a Multiple Master font must always be specified
% explicitly.
-% \begin{aatexample}
-% \fontspec[OpticalSize=11]{Minion MM Roman}
-% MM optical size test \\
-% \fontspec[OpticalSize=47]{Minion MM Roman}
-% MM optical size test \\
-% \fontspec[OpticalSize=71]{Minion MM Roman}
-% MM optical size test \\
-% \end{aatexample}
+% ^^A\begin{aatexample}
+% ^^A \fontspec[OpticalSize=11]{Minion MM Roman}
+% ^^A MM optical size test \\
+% ^^A \fontspec[OpticalSize=47]{Minion MM Roman}
+% ^^A MM optical size test \\
+% ^^A \fontspec[OpticalSize=71]{Minion MM Roman}
+% ^^A MM optical size test \\
+% ^^A\end{aatexample}
%
% The \feat{SizeFeatures} feature (\vref{sec:sizefeature}) can be
% used to specify exactly which optical sizes will be used for ranges
@@ -1410,9 +1442,8 @@ This work consists of this file fontspec.dtx
%
% \subsection{Vertical typesetting}
%
-% A recent feature of \XeTeX\ is the ability to rotate
-% the glyphs in AAT fonts by 90°, providing a method to typeset vertically
-% by building a horizontal box as normal and then rotating it.
+% \XeTeX\ provides for vertical typesetting simply with the ability to rotate
+% the individual glyphs as a font is used for typesetting.
%
% \begin{aatexample}
% \fontspec{Hiragino Mincho Pro}
@@ -1421,11 +1452,6 @@ This work consists of this file fontspec.dtx
% \fontspec[Renderer=AAT,Vertical=RotatedGlyphs]{Hiragino Mincho Pro}
% \rotatebox{-90}{共産主義者は}% requires the graphicx package
% \end{aatexample}
-%
-% The AAT renderer is required above because \XeTeX\ choses the
-% ICU renderer by preference when both options are available; if it
-% is not explicitly chosen, the glyphs will not be rotated and a
-% warning will be printed in the output.
%
% No actual provision is made for typesetting top-to-bottom
% languages; for an example of how to do this, see the vertical Chinese
@@ -1738,10 +1764,6 @@ This work consists of this file fontspec.dtx
\newif\ifzf@math@lucida
\newif\ifzf@package@euler@loaded
% \end{macrocode}
-% For, well, dealing with \pkg{babel}:
-% \begin{macrocode}
-\newif\ifzf@package@babel@loaded
-% \end{macrocode}
% For package options:
% \begin{macrocode}
\newif\if@zf@configfile
@@ -1789,11 +1811,18 @@ This work consists of this file fontspec.dtx
\DeclareOption{config}{\@zf@configfiletrue}
\DeclareOption{no-config}{\@zf@configfilefalse}
\DeclareOption{noconfig}{\@zf@configfilefalse}
-\DeclareOption{quiet}{\let\zf@PackageWarning\zf@PackageInfo}
+\DeclareOption{quiet}{%
+ \let\zf@PackageWarning\zf@PackageInfo
+ \let\zf@PackageInfo\@gobble}
+\DeclareOption{silent}{%
+ \let\zf@PackageWarning\@gobble
+ \let\zf@PackageInfo\@gobble}
\ExecuteOptions{config,lm-default,math}
\ProcessOptions*
% \end{macrocode}
% \changes{v1.12}{2006/10/24}{Package option for disabling the EU1 encoding.}
+% \changes{v1.17}{2008/02/13}{\texttt{[quiet]} now suppresses warnings.}
+% \changes{v1.17}{2008/02/13}{New package option \texttt{[silent]}.}
% Only proceed if it is \XeTeX\ that is doing the typesetting:
% \begin{macrocode}
\RequirePackage{ifxetex}
@@ -2028,12 +2057,12 @@ This work consists of this file fontspec.dtx
\@tempa
\endgroup
\fontfamily\zf@family\selectfont
- \expandafter\ignorespaces
\else
\zf@PackageWarning{%
\protect\addfontfeature (s) ignored;\zf@nl
it cannot be used with a font that wasn't selected by fontspec.}%
- \fi}
+ \fi
+ \ignorespaces}
\let\addfontfeature\addfontfeatures
% \end{macrocode}
% \changes{v1.5}{2004/11/29}{Implemented.}
@@ -2135,7 +2164,7 @@ This work consists of this file fontspec.dtx
\xdef\zf@family@long{\zf@family@long+script=#1}%
\xdef\zf@pre@ff{script=#2,\zf@pre@ff}%
\else
- \zf@PackageWarning{Font \fontname\zf@basefont does not contain script '#1'}%
+ \zf@PackageWarning{Font \fontname\zf@basefont\space does not contain script '#1'}%
\fi}}
% \end{macrocode}
% \changes{v1.9}{2006/02/12}{Implemented.}
@@ -2159,7 +2188,7 @@ This work consists of this file fontspec.dtx
\xdef\zf@pre@ff{\zf@pre@ff language=#2,}%
\else
\zf@PackageWarning{%
- Font \fontname\zf@basefont does not contain
+ Font \fontname\zf@basefont\space does not contain
language '#1' for script '\zf@script@name'}%
\fi}}
% \end{macrocode}
@@ -2194,7 +2223,9 @@ This work consists of this file fontspec.dtx
\edef\zf@fontname{#2}%
\let\zf@family@long\zf@fontname
\setkeys*[zf]{prepreparse}{#1}%
+ \let\zf@up\zf@fontname
\edef\@tempa{\noexpand\setkeys*[zf]{preparse}{\XKV@rm}}\@tempa
+ \let\zf@fontname\zf@up
\let\zf@font@feat\XKV@rm
% \end{macrocode}
% Now check if the font is to be rendered with ATSUI or ICU. This will either
@@ -2246,7 +2277,7 @@ This work consists of this file fontspec.dtx
\expandafter\stepcounter\else
\expandafter\newcounter\fi
{zf@famc@#2}%
- \def@cx{zf@UID@\zf@family@long}{%
+ \gdef@cx{zf@UID@\zf@family@long}{%
\zap@space#2 \@empty
(\expandafter\the\csname c@zf@famc@#2\endcsname)}%
\fi
@@ -2359,8 +2390,10 @@ This work consists of this file fontspec.dtx
% \changes{v1.9}{2005/12/11}{Abstracted the long family name so the NFSS family is simple.}
% \changes{v1.10}{2006/04/14}{Saved family info split into two (now three!) macros.}
% \changes{v1.10}{2006/05/03}{Space zapped from \LaTeX\ family name due to various problems.}
-% \end{macro}
% \changes{v1.11}{2006/06/29}{Ensure bold/italic fonts are loaded with the same renderer as the regular font even if unspecified.}
+% \changes{v1.16}{2007/09/17}{\cmd{\zf@UID...} wasn't being defined globally. gah!}
+% \changes{v1.17}{2008/02/03}{New feature: \feat{UprightFont}.}
+% \end{macro}
%
%
% \subsubsection{Fonts}
@@ -2520,14 +2553,16 @@ This work consists of this file fontspec.dtx
\edef\@tempb{\itdefault}%
\ifx\@tempa\@tempb
\edef\@tempa{\noexpand
- \DeclareFontShape{\zf@enc}{\zf@family}{#1}{\sldefault}
- {<->sub*\zf@family/#2/\itdefault}{\zf@adjust}}%
+ \DeclareFontShape{\zf@enc}{\zf@family}{#2}{\sldefault}
+ {<->ssub*\zf@family/#2/\itdefault}{\zf@adjust}}%
\@tempa
\fi}
% \end{macrocode}
% \changes{v1.9}{2005/12/11}{Implemented as wrapper for \cmd\DeclareFontShape.}
% \changes{v1.9}{2006/01/15}{Slanted/italic shape substitution implemented.}
% \changes{v1.13}{2006/11/12}{New feature \feat{SizeFeatures} implemented.}
+% \changes{v1.17}{2008/04/28}{slshape substitution bug fix (thanks Ulrike!).}
+% \changes{v1.17}{2008/04/30}{slshape substitution is now silent.}
% \end{macro}
%
%
@@ -2975,6 +3010,13 @@ This work consists of this file fontspec.dtx
% \changes{v1.12}{2006/11/02}{\feat{BoldFont}, etc., flags \cmd\zf@nobf\ conditional false rather than assuming it implicitly. This allows, \eg, empty \feat{BoldFont} to be overloaded.}
%
% \paragraph{Fonts}
+% Upright:
+% \begin{macrocode}
+\define@key[zf]{preparse}{UprightFont}{%
+ \edef\@tempa{#1}%
+ \zf@partial@fontname#1\@nil=\zf@up
+ \edef\zf@family@long{\zf@family@long up:#1}}
+% \end{macrocode}
% Bold:
% \begin{macrocode}
\define@key[zf]{preparse}{BoldFont}{%
@@ -3062,6 +3104,7 @@ This work consists of this file fontspec.dtx
% \end{macrocode}
%
% paragraph{Features varying by size}
+% TODO: sizezfeatures and italicfont (etc) don't play nice
% \begin{macrocode}
\define@key[zf]{preparse}{SizeFeatures}{%
\unless\ifzf@firsttime\def\zf@size@feat{#1}\fi
@@ -3275,6 +3318,20 @@ This work consists of this file fontspec.dtx
\fi}
% \end{macrocode}
%
+% \subsubsection{Font transformations}
+% \changes{v1.17}{2008/03/17}{New features \feat{FakeSlant}, \feat{FakeStretch}, \feat{FakeBold}.}
+% \begin{macrocode}
+\define@key[zf]{options}{FakeSlant}{%
+ \zf@update@family{+slant:#1}%
+ \zf@update@ff{slant=#1}}
+\define@key[zf]{options}{FakeStretch}{%
+ \zf@update@family{+extend:#1}%
+ \zf@update@ff{extend=#1}}
+\define@key[zf]{options}{FakeBold}{%
+ \zf@update@family{+embolden:#1}%
+ \zf@update@ff{embolden=#1}}
+% \end{macrocode}
+%
%
% \subsubsection{Ligatures}
% The call to the nested keyval family must be wrapped in braces to
@@ -3510,11 +3567,14 @@ This work consists of this file fontspec.dtx
%
% \subsubsection{Vertical}
% \changes{v1.9}{2006/02/12}{New feature \feat{Vertical}.}
+% \changes{v1.15}{2007/08/27}{\opt{RotatedGlyphs} now works for ICU fonts.}
% \begin{macrocode}
\zf@define@font@feature{Vertical}
\define@key[zf@feat]{Vertical}{RotatedGlyphs}[]{%
\ifzf@icu
\zf@make@feature{}{}{+vrt2}%
+ \zf@update@family{+vert}%
+ \zf@update@ff{vertical}%
\else
\zf@update@family{+vert}%
\zf@update@ff{vertical}%
@@ -4009,11 +4069,12 @@ This work consists of this file fontspec.dtx
\@ifpackageloaded{MinionPro}{\@zf@mathfalse}{}
\@ifpackageloaded{unicode-math}{\@zf@mathfalse}{}
\if@zf@math
- \zf@PackageWarning{Adjusting the maths setup (use [no-math] to avoid this).}
+ \zf@PackageInfo{Adjusting the maths setup (use [no-math] to avoid this).}
\zf@math
\fi}
\AtBeginDocument{\zf@math@maybe}
% \end{macrocode}
+% \changes{v1.16}{2007/09/01}{Maths setup warning sent to the log file instead.}
% \end{macro}
%
%
@@ -4147,7 +4208,7 @@ Please see the documentation for font feature explanation and further package ni
% \begin{macrocode}
\ProvidesPackage{fontspec-doc-style}
-\RequirePackage{booktabs,calc,color,enumitem,euler,fancyvrb,fontspec,
+\RequirePackage{booktabs,calc,color,enumitem,fancyvrb,fontspec,
graphicx,ifthen,ifxetex,url,varioref,xltxtra,xunicode}
%% Titlepage
diff --git a/Master/texmf-dist/source/xelatex/fontspec/fontspec.ins b/Master/texmf-dist/source/xelatex/fontspec/fontspec.ins
index be2494bd03b..89ce4b3fb8f 100644
--- a/Master/texmf-dist/source/xelatex/fontspec/fontspec.ins
+++ b/Master/texmf-dist/source/xelatex/fontspec/fontspec.ins
@@ -1,3 +1,18 @@
+%%
+%% This is file `fontspec.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fontspec.dtx (with options: `batchfile')
+%%
+%% ________________________________
+%% The fontspec package for XeLaTeX
+%% (C) 2004--2007 Will Robertson
+%%
+%% License information appended.
+%%
+%%
\input docstrip.tex
\keepsilent
\usedir{tex/xelatex/fontspec}
@@ -5,14 +20,14 @@
________________________________
The fontspec package for XeLaTeX
- (C) 2004--2006 Will Robertson
+ (C) 2004--2007 Will Robertson
License information appended.
\endpreamble
\postamble
-Copyright 2005-2006 by Will Robertson <wspr81@gmail.com>
+Copyright 2004--2007 by Will Robertson <wspr81@gmail.com>
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -21,8 +36,12 @@ this license is at: http://www.latex-project.org/lppl.txt
This work is "maintained" (as per LPPL maintenance status)
by Will Robertson.
-This work consists of the file fontspec.dtx
- and the derived files fontspec.sty and fontspec.pdf.
+This work consists of this file fontspec.dtx
+ and the derived files fontspec.sty,
+ fontspec.cfg,
+ fontspec.ins,
+ fontspec-example.ltx,
+ and fontspec.pdf.
\endpostamble
\askforoverwritefalse
@@ -30,3 +49,22 @@ This work consists of the file fontspec.dtx
\generate{\file{fontspec.cfg}{\from{fontspec.dtx}{cfg}}}
\generate{\file{fontspec-example.ltx}{\from{fontspec.dtx}{example}}}
\endbatchfile
+%%
+%% Copyright 2004--2007 by Will Robertson <wspr81@gmail.com>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Will Robertson.
+%%
+%% This work consists of this file fontspec.dtx
+%% and the derived files fontspec.sty,
+%% fontspec.cfg,
+%% fontspec.ins,
+%% fontspec-example.ltx,
+%% and fontspec.pdf.
+%%
+%%
+%% End of file `fontspec.ins'.