summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-06-19 22:49:18 +0000
committerKarl Berry <karl@freefriends.org>2006-06-19 22:49:18 +0000
commit446616af78c68a47b3851065c2121bab5a96ad53 (patch)
treed0d19399424d93ae6e99d635428049ce428f475a /Master
parent315f6e8cf21d3f57aaefe05b58147de728d5ede0 (diff)
fontspec update, and put under xetex
git-svn-id: svn://tug.org/texlive/trunk@1706 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/fontspec/fontspec.pdfbin1180411 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/xetex/fontspec/README (renamed from Master/texmf-dist/doc/latex/fontspec/README)20
-rw-r--r--Master/texmf-dist/doc/xetex/fontspec/fontspec-example.tex55
-rw-r--r--Master/texmf-dist/doc/xetex/fontspec/fontspec.pdfbin0 -> 1971940 bytes
-rw-r--r--Master/texmf-dist/source/latex/fontspec/fontspec.dtx3096
-rw-r--r--Master/texmf-dist/source/xetex/fontspec/fontspec.dtx3765
-rw-r--r--Master/texmf-dist/source/xetex/fontspec/fontspec.ins37
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec.sty1070
-rw-r--r--Master/texmf-dist/tex/xetex/fontspec/fontspec.cfg25
-rw-r--r--Master/texmf-dist/tex/xetex/fontspec/fontspec.sty1028
-rw-r--r--Master/texmf-dist/tpm/fontspec.tpm19
-rw-r--r--Master/texmf/lists/fontspec11
-rw-r--r--Master/texmf/tpm/collection-latexextra.tpm1
13 files changed, 4941 insertions, 4186 deletions
diff --git a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
deleted file mode 100644
index 1020d0ea238..00000000000
--- a/Master/texmf-dist/doc/latex/fontspec/fontspec.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/fontspec/README b/Master/texmf-dist/doc/xetex/fontspec/README
index c14ce95f2c5..b9f6e1b014b 100644
--- a/Master/texmf-dist/doc/latex/fontspec/README
+++ b/Master/texmf-dist/doc/xetex/fontspec/README
@@ -1,11 +1,11 @@
--------------------------
-THE FONTSPEC PACKAGE v1.8a
+THE FONTSPEC PACKAGE v1.10
-The fontspec package only works with XeTeX, a unicode capable TeX-variant for Mac OS X. It provides an automatic and unified interface for loading fonts in LaTeX. XeTeX allows a direct interface to system-installed fonts, so no manual font installation is required.
+The fontspec package only works with XeTeX, a unicode capable TeX-variant. It provides an automatic and unified interface for loading fonts in LaTeX. XeTeX allows a direct interface to system-installed fonts, so no manual font installation is required.
This package also provides access to the large number of font features available with AAT and OpenType fonts, including upper and lower case numbers, proportional and monospaced numbers, swash letters, vulgar fractions, ligature control, and many others.
-It also provides an interface to set the XeTeX font mappings, font colour, and relative font scaling.
+It also provides an interface to set the XeTeX font mappings, font colour, relative font scaling, inter-word space scaling, and more.
------------------------
SUMMARY OF USER COMMANDS
@@ -14,7 +14,7 @@ Font families may be selected individually with the command
\fontspec[<font options>]{<font name>}
Commands for selecting fonts efficiently can be created with
- \newfontinstance\yourfontselectingcommandname[<font options>]{<font name>}
+ \newfontinstance\myfont[<font options>]{<font name>}
Default document fonts are selected with
\setromanfont[<font options>]{<font name>}
@@ -32,11 +32,17 @@ Features to be used for every subsequently defined font are specified with
Features may be added to the font currently in use with
\addfontfeatures{<font options to add>}
+ \addfontfeature{<...>} does the same thing
Features not provided for out of the box may be defined with
- \newfontfeature{<feature tag>}{<feature activation string>}
- \newfeaturecode{<feature tag>}{<feature code>}{<selector code>}
+ \newAATfeature{<feature tag>}{<feature code>}{<selector code>}
+ \newICUfeature{<feature tag>}{[+|-]<4 letter feature string>}
+ \newfontfeature{<feature tag>}{<arbitrary XeTeX font options>}
+
+Features can be renamed and feature options can be renamed with
+ \aliasfontfeature{<current feature>}{<new feature>}
+ \aliasfontfeatureoption{<feature>}{<current option>}{<new option>}
--------------
Will Robertson
-2005 \ No newline at end of file
+2006 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/xetex/fontspec/fontspec-example.tex b/Master/texmf-dist/doc/xetex/fontspec/fontspec-example.tex
new file mode 100644
index 00000000000..2aed92a6fc3
--- /dev/null
+++ b/Master/texmf-dist/doc/xetex/fontspec/fontspec-example.tex
@@ -0,0 +1,55 @@
+
+\documentclass[12pt]{article}
+
+\usepackage{euler,fontspec,graphicx}
+
+\defaultfontfeatures{Scale=MatchLowercase ,Mapping=tex-text}
+\setromanfont{Hoefler Text}
+\setsansfont{Gill Sans}
+\setmonofont{Lucida Sans Typewriter}
+
+%% Define the \XeTeX logo:
+\DeclareRobustCommand\XeTeX{%
+ \mbox{\smash{%
+ X\lower.5ex\hbox{\kern-.12em\reflectbox{E}}\kern-.1667em
+ T\kern -.1667em\lower .5ex\hbox {E}\kern -.12em X}}\@}
+%% The logo should be defined on a per-document basis
+%% so that its parameters may be fine tuned for the fonts used.
+
+\begin{document}
+\pagestyle{empty}
+
+\section{The basics of the \textsf{fontspec} package}
+
+The \textsf{fontspec} package enables automatic font selection for \LaTeX{} documents typeset with \XeTeX{}. The basic command is\\
+\indent \verb|\fontspec[font features]{Mac OS X font display name}|.\\
+As an example:
+
+\begin{center}
+ \Large
+ \fontspec[
+ Colour = 0000CC,
+ Numbers = OldStyle,
+ VerticalPosition = Ordinal,
+ Variant = 2
+ ]{Apple Chancery}
+ My 1st example of Apple Chancery
+\end{center}
+
+The default roman, sans serif, and typewriter fonts may be set with the \verb|\setromanfont|, \verb|\setsansfont| and \verb|\setmonofont| commands, respectively, as shown in the preamble. They take the same syntax as the \verb|\fontspec| package. All expected font shapes are available:
+
+\begin{center}
+ {\scshape Small caps and \itshape small caps italic\dots}\\
+ {\sffamily\bfseries Bold sans serif and \itshape bold italic sans serif\dots}
+\end{center}
+
+With the roman and sans serif fonts set in the preamble, text fonts in math mode are also changed: $\cos(n\pi)=\pm 1$. The maths typeface `Euler' has been used in this document (with the \textsf{euler} package---note that the \textsf{eulervm} package will not work in \XeTeX{} because it uses virtual fonts), since the default Computer Modern maths font is rather light.
+\[
+ \mathcal F(s) = \int^\infty_0\! f(t) e^{-st}\,\mathrm{d}t
+\]
+
+You'll also notice the \verb|\defaultfontfeatures| command in the preamble. This command takes a single argument of font features that are then applied to every subsequent instance of font selection. The first argument in this case, \verb|Mapping=tex-text|, enables regular \TeX{} ligatures like \verb|``---''| for ``---''. The second automatically scales the fonts to the same x-height.
+
+Please see the documentation for font feature explanation and further package niceties.
+
+\end{document}
diff --git a/Master/texmf-dist/doc/xetex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/xetex/fontspec/fontspec.pdf
new file mode 100644
index 00000000000..b9a50832149
--- /dev/null
+++ b/Master/texmf-dist/doc/xetex/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
deleted file mode 100644
index 9be474f4051..00000000000
--- a/Master/texmf-dist/source/latex/fontspec/fontspec.dtx
+++ /dev/null
@@ -1,3096 +0,0 @@
-% \iffalse meta-comment
-%
-%!TEX encoding = UTF-8 Unicode
-%!TEX TS-program = latex
-%
-% Copyright 2005 by Will Robertson <will@guerilla.edu.au>
-%
-% Distributable under the LaTeX Project Public License,
-% version 1.3a 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 the file fontspec.dtx
-% and the derived files fontspec.sty and fontspec.pdf.
-%
-%<*fontspec>
-\ProvidesPackage{fontspec}[2005/07/15 v1.8a Advanced font selection for XeLaTeX]
-%</fontspec>
-%
-%<*batchfile>
-\begingroup
-\input docstrip.tex
-\keepsilent
-\usedir{tex/xetex/fontspec}
-\preamble
-
- ________________________________
- The fontspec package for XeLaTeX
- (C) 2004, 2005 Will Robertson
-
- License information appended.
-
-
-\endpreamble
-\postamble
-
-Copyright 2005 by Will Robertson <will@guerilla.net.au>
-
-Distributable under the LaTeX Project Public License,
-version 1.3a 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 the file fontspec.dtx
- and the derived files fontspec.sty and fontspec.pdf.
-
-\endpostamble
-\askforoverwritefalse
-\generate{\file{fontspec.sty}{\from{fontspec.dtx}{fontspec}}}
-\endgroup
-%</batchfile>
-%
-%<*driver>
-\documentclass{ltxdoc}
-\usepackage{booktabs,calc,color,euler,fancyvrb,fontspec,
- graphicx,ifthen,varioref,xunicode}
-
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-%\OnlyDescription
-
-\setmonofont[Scale=0.95]{Osaka-Mono}
-\defaultfontfeatures{Mapping=tex-text}
-\setromanfont[Diacritics=Decompose]{Palatino}
-\setsansfont[Scale=0.91, Weight=1.2, Width=1.1,
- BoldFont={Skia Regular},
- BoldFeatures={Weight=1.7}]{Skia Regular}
-\setmathrm{Optima Regular}
-\setboldmathrm[BoldFont=Optima ExtraBlack]{Optima Bold}
-\linespread{1.05} % Palatino needs more space between lines
-\lineskiplimit=-5pt % Osaka is really tall so this prevents ugly lines
-\frenchspacing % Remove ugly extra space after punctuation
-
-
-\begin{document}
- \DocInput{fontspec.dtx}
-\end{document}
-
-%</driver>
-%
-% \fi
-%
-% \errorcontextlines=999 ^^A% Show up all my mistakes
-% \GetFileInfo{fontspec.sty}
-% \CheckSum{1589}
-%
-% \title{The \pkg{fontspec} package}
-% \author{Will Robertson}
-% \date{\filedate \qquad \fileversion}
-%
-% \changes{v1.3}{2004/10/25}{More OpenType support.}
-% \changes{v1.2}{2004/10/22}{Initial OpenType support.}
-% \changes{v1.1}{2004/10/18}{Name change to fontspec.}
-% \changes{v1.0}{2004/10/16}{Initial version.}
-%
-% \DoNotIndex{\@empty,\@latex@error,\@tempa,\@tempb,\@temptokena}
-% \DoNotIndex{\advance}
-% \DoNotIndex{\begingroup,\bgroup}
-% \DoNotIndex{\count,\csname}
-% \DoNotIndex{\DeclareRobustCommand,\def,\define@key}
-% \DoNotIndex{\edef,\egroup,\else,\endcsname,\endgroup,\expandafter}
-% \DoNotIndex{\fi}
-% \DoNotIndex{\gdef}
-% \DoNotIndex{\if,\ifnum,\ifodd,\iftrue,\ifx,\let,\loop}
-% \DoNotIndex{\let,\loop}
-% \DoNotIndex{\mathbf,\mathit,\mathrm,\mathsf,\mathtt}
-% \DoNotIndex{\newcommand,\newcount,\noexpand,\number}
-% \DoNotIndex{\relax,\renewcommand,\repeat,\RequirePackage}
-% \DoNotIndex{\selectfont}
-% \DoNotIndex{\the,\then,\tempfont}
-% \DoNotIndex{\xdef}
-% \DoNotIndex{\zap@space}
-%
-% \labelformat{table}{Table~#1} ^^A% varioref definitions
-% \labelformat{section}{Section~#1}
-% \labelformat{subsection}{Section~#1}
-%
-% ^^A%
-% ^^A% VERBATIM EXAMPLES CODE:
-% ^^A%
-%
-% \newlength\examplewidth\newlength\verbatimwidth
-% \newlength\exoutdent \newlength\exverbgap
-% \setlength\exverbgap{1em}
-% \setlength\exoutdent{-0.15\textwidth}
-% \newsavebox\verbatimbox
-% \edef\examplefilename{\jobname.example}
-%
-% \newenvironment{aatexample}
-% {\VerbatimEnvironment
-% \begin{VerbatimOut}[gobble=4]{\examplefilename}}
-% {\end{VerbatimOut}\relax
-% \defaultfontfeatures{Mapping=tex-text,Colour=005599}
-% \typesetexample}
-% \newenvironment{opentypeexample}
-% {\VerbatimEnvironment
-% \begin{VerbatimOut}[gobble=4]{\examplefilename}}%
-% {\end{VerbatimOut}%
-% \defaultfontfeatures{Mapping=tex-text,Colour=AA0000}
-% \typesetexample}
-%
-% \let\examplesize\normalsize
-% \let\auxwidth\relax
-%
-% \newcommand\typesetexample{\relax
-% \begin{lrbox}{\verbatimbox}\relax
-% \BVerbatimInput[fontsize=\small]{\examplefilename}\relax
-% \end{lrbox}
-% \begin{list}{}{\setlength\itemindent{0pt}
-% \setlength\leftmargin\exoutdent
-% \setlength\rightmargin{0pt}}\item
-% \ifx\auxwidth\relax
-% \setlength\verbatimwidth{\wd\verbatimbox}\relax
-% \else
-% \setlength\verbatimwidth{\auxwidth}\relax
-% \fi
-% \begin{minipage}[c]{\textwidth-\exoutdent-\verbatimwidth-\exverbgap}
-% \catcode`\%=14\centering\examplesize\input\examplefilename\relax
-% \end{minipage}\hfill
-% \begin{minipage}[c]{\verbatimwidth}
-% \usebox\verbatimbox
-% \end{minipage}
-% \end{list}
-% \global\let\examplesize\normalsize}
-%
-% \newcommand*\setexsize[1]{\let\examplesize#1}
-% \newcommand*\setverbwidth[1]{\def\auxwidth{#1}}
-%
-%
-% ^^A% Definition of sidenotes:
-%
-% \newcommand\warn[2]{\relax
-% \edef\thisversion{#1}\relax
-% ({\ifx\thisversion\fileversion\color{red}\fi
-% $\leftarrow$})\relax
-% \marginpar{\raggedleft
-% \scriptsize({\ifx\thisversion\fileversion\color{red}\fi
-% $\rightarrow$}\,\notefont #1:~#2)}}
-%
-% \newfontinstance\notefont[ ^^A% Sidenote font
-% Width=1.3,
-% BoldFont={Skia Regular},
-% BoldFeatures={Width=1.3,Weight=1.5}
-% ]{Skia Regular}
-%
-% ^^A% Various labelling commands:
-%
-% \newcommand*\name[1]{{#1}}
-% \newcommand*\pkg[1]{\textsf{#1}}
-% \newcommand*\opt[1]{\texttt{#1}}
-% \newcommand*\feat[1]{\texttt{#1}}
-%
-% \let\latin\textit
-% \def\eg{\latin{e.g.}}
-% \def\ie{\latin{i.e.}}
-% \makeatletter
-% \def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}}
-% \makeatother
-%
-% ^^A% LOGOS, tuned for Palatino:
-%
-% \def\TeX{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax}
-% \def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0
-% \special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}}
-% \def\XeTeX{\raisebox{0pt}[0pt][0pt]
-% {X\lower.5ex\hbox{\kern-.07em\reflect{E}}\kern-.15em \TeX}}
-% \def\MacOSX{Mac~OS~X}
-%
-% \let\oldTeX\TeX\def\TeX{\raisebox{0pt}[0pt][0pt]{\oldTeX}}
-% \let\oldLaTeX\LaTeX\def\LaTeX{\raisebox{0pt}[0pt][0pt]{\oldLaTeX}}
-%
-%
-%
-%
-%
-%
-% \maketitle ^^A% BEGIN!
-%
-% \begin{abstract}
-% \noindent This package provides functionality for selecting families of
-% fonts with extended feature sets in \XeTeX-based \LaTeX.
-% \cs{fontspec}\oarg{opts}\marg{font} selects arbitrary
-% fonts; \cmd\setromanfont\ sets the default for the whole
-% document, with analogous commands for \texttt{sans} and
-% \texttt{mono}. Other commands are provided for the advanced
-% selection of a large (and extensible) number of rich font features.
-% \end{abstract}
-%
-% \makeatletter
-% \def\@dotsep{1000}
-% \setcounter{tocdepth}{2}
-% \setlength\columnseprule{0.4pt}
-% \renewcommand\tableofcontents{\relax
-% \begin{multicols}{2}[\section*{\contentsname}]\relax
-% \@starttoc{toc}\relax
-% \end{multicols}}
-% \makeatother
-% \tableofcontents
-%
-% \section{Introduction}
-% With the introduction of \name{Jonathan Kew}'s
-% \XeTeX,\footnote{\texttt{http://scripts.sil.org/xetex}} \MacOSX\
-% users can now easily access system-wide fonts directly in a \TeX\
-% variant, providing a best of both worlds environment. \XeTeX\
-% eliminates the need for all those files required for installing
-% fonts (|.tfm|, |.vf|, |.map|,\dots) and provides an easy
-% way to select fonts in Plain \TeX: |\font\tenrm="Times New Roman" at 10pt|.
-%
-% However, it was still necessary to write cumbersome font definition
-% files for \LaTeX, since the NFSS had a lot more going on behind the
-% scenes to allow easy commands like |\bfseries| and |\emph|.
-%
-% This package almost entirely eliminates this need by providing a
-% completely automatic way to select font families in \LaTeX\ for
-% arbitrary fonts. Furthermore, it allows (again, almost) total
-% control over the selection of rich font features such as number case
-% and fancy ligatures present in many modern fonts provided with
-% \MacOSX.
-%
-% \subsection{Usage}
-% There are no options for this package: simply call it in your
-% preamble somewhere. As of \textsf{v1.6}, it is necessary to
-% explicitly request \name{Ross Moore}'s \textsf{xunicode} package if
-% you want access to use \LaTeX's various methods for accessing extra
-% characters and accents (for example, |\textbullet|, |\"u|, |\O|, and
-% so on).
-%
-% This is highly recommended, since macros such as |\%| will otherwise
-% give you incorrect output. Note however that this will also break
-% some characters in the default Computer Modern (or any other
-% non-unicode encoded) fonts, but you're not using \XeTeX\ to use
-% \emph{them}, are you!
-% \begin{Verbatim}[gobble=4]
-% \usepackage{fontspec,xunicode}
-% \end{Verbatim}
-%
-% \subsection{Warning}
-% I still consider this package to be experimental, so I'm not
-% ensuring backwards compatibility at all costs. I don't want to weigh
-% the package down with old ways of doing things, so unfortunately
-% this will mean that some old documents will need to be modified in
-% order to compile correctly again. It'll be worth it in the long run,
-% but you can curse at my lack of foresight as much as you wish in the
-% meantime.
-%
-% Such things, and some other comments, are noted in the margin like
-% this~\warn{v1.6}{An example warning!}, with a red arrow if the
-% change is relevant to the current release of the package.
-%
-% \subsection{About this manual}
-% This document has been typeset with \XeTeX\ using a variety of fonts
-% to display various features that the package supports. You will not
-% be able to typeset the documentation if you do not have all of these
-% fonts, although I've used as many Mac~OS~X pre-installed fonts as
-% possible. Running normal \LaTeX\ (\ie, with\emph{out} \XeTeX) on
-% this file will generate the \texttt{fontspec.sty} file if this is
-% required for some odd reason.
-%
-% Many examples are shown in this manual. These are typeset
-% side-by-side with their verbatim source code, although various
-% size-altering commands (\cs{large}, \cs{Huge}, \etc) are omitted for
-% clarity. Since the package supports font features for both AAT and
-% OpenType fonts (whose feature sets only overlap to some extent),
-% examples are distinguished by colour: blue and red, respectively.
-%
-%
-% \section{Font selection}
-% \DescribeMacro{\fontspec} \cmd{\fontspec}\oarg{font
-% features}\marg{font name} is the base command of the package, used
-% for selecting the specified \meta{font name} (which is the \MacOSX\
-% display name of the font) in a \LaTeX\ family. We shall look at font
-% features later. As an example, look how easy it is to select the
-% Hoefler Text typeface:
-% \begin{aatexample}
-% \def\pangram{The five boxing
-% wizards jump quickly.}
-% \fontspec{Hoefler Text}
-% \pangram \\
-% {\itshape \pangram } \\
-% {\scshape \pangram } \\
-% {\itshape\scshape\pangram } \\
-% \bfseries \pangram \\
-% {\itshape \pangram } \\
-% {\scshape \pangram } \\
-% {\scshape\itshape\pangram }
-% \end{aatexample}
-% The \pkg{fontspec} package takes care of the necessary font
-% definitions for those shapes as shown above
-% \emph{automatically}. Furthermore, it is not necessary to install
-% the font for \XeTeX\ in any way whatsoever: every font that exists
-% in one of \MacOSX's font folders may be accessed.
-%
-% Note that this package redefines the \cs{itshape} and \cs{scshape}
-% commands in order to allow them to select italic small caps in
-% conjunction.
-%
-% \subsection{Font instances for efficiency}
-% For cases when a specific font with a specific feature set is going
-% to be re-used many times in a document, it is inefficient to keep
-% calling \cs{fontspec} for every use. While the command does not
-% define a new font instance after the first call, the feature options
-% must still be parsed and processed.
-%
-% \DescribeMacro{\newfontinstance} For this reason, \emph{instances}
-% of a font may be created with the \cs{newfontinstance} command, as
-% shown in the following example:
-% \begin{aatexample}
-% \newfontinstance\secfont[Letters=SmallCaps]{Hoefler Text}
-% \secfont Font instances for efficiency
-% \end{aatexample}
-%
-% \subsection{Default font families}\label{sec:setxxfont}
-% \DescribeMacro{\setromanfont} \DescribeMacro{\setsansfont}
-% \DescribeMacro{\setmonofont} The \cs{setromanfont},
-% \cs{setsansfont}, and \cs{setmonofont} commands are used to select
-% the default font families for the entire document. They take the
-% same arguments as \cmd{\fontspec}. For example:
-% \begin{aatexample}
-% \def\pangram{Pack my box with five
-% dozen liquor jugs.}
-% \setromanfont{Baskerville}
-% \setsansfont[Scale=0.86]{Skia Regular}
-% \setmonofont[Scale=0.8]{Monaco}
-% \rmfamily\pangram\par
-% \sffamily\pangram\par
-% \ttfamily\pangram
-% \end{aatexample}
-% To match the families' sizes, you should use the \feat{Scale} feature with
-% trial and error until the heights of the lowercase letters are
-% equal. (Although there are more factors involved, this can often
-% give a reasonable result.)
-%
-%
-% \subsection{Arbitrary bold/italic fonts} \label{sec:bfitfonts} The
-% automatic bold, italic, and bold italic font selections will not be
-% adequate for the needs of every font: while some fonts mayn't even
-% have bold or italic shapes, in which case a skilled (or lucky)
-% designer may be able to chose well-matching accompanying shapes from
-% a different font altogether, others can have a range of bold and
-% italic fonts to chose between. The \opt{BoldFont} and
-% \opt{ItalicFont} options~\warn{v1.6}{These options used to be called
-% \opt{Bold} and \opt{Italic}, and these shorter names may still be
-% used if you desire.} are provided for these situations. If only
-% one of these is used, the bold italic font is requested as the
-% default from the \emph{new} font.
-% \begin{aatexample}
-% \fontspec[BoldFont={Helvetica Neue}]
-% {Helvetica Neue UltraLight}
-% Helvetica Neue UltraLight \\
-% {\itshape Helvetica Neue UltraLight Italic} \\
-% {\bfseries Helvetica Neue } \\
-% {\bfseries\itshape Helvetica Neue Italic} \\
-% \end{aatexample}
-% If a bold italic shape is not defined, or you want to specify
-% \emph{both} custom bold and italic shapes, the \opt{BoldItalicFont}
-% option is provided~\warn{v1.6}{Yes, \opt{BoldItalic} also works}.
-% \begin{aatexample}
-% \fontspec[BoldFont={Optima ExtraBlack}]{Optima Regular}
-% Optima \\
-% {\itshape Optima Italic } \\
-% {\bfseries Optima ExtraBlack } \\
-% {\bfseries\itshape Optima ExtraBlack (italic?) } \\
-% \addfontfeature{BoldItalic={Optima Bold Italic}}
-% {\bfseries\itshape Optima Bold Italic }
-% \end{aatexample}
-% (The \cmd{\addfontfeature} command, used here for brevity, is
-% described in \vref{sec:addfontfeatures}.)
-%
-%
-% \subsection{Math(s) fonts}
-%
-% When \cmd\setromanfont, \cmd\setsansfont\ and \cmd\setmonofont\ are
-% used in the preamble, they also define the fonts to be used in maths
-% mode inside the \cmd\mathrm-type commands. This only occurs in the
-% preamble because \LaTeX\ freezes the maths fonts after this stage of
-% 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.)
-%
-% \DescribeMacro{\setmathrm} \DescribeMacro{\setboldmathrm}
-% \DescribeMacro{\setmathsf} \DescribeMacro{\setmathtt}
-% However, the default text fonts may not necessarily be the ones you
-% wish to use when typesetting maths (especially with the use of fancy
-% ligatures and so on). For this reason, you may optionally use those
-% commands listed in the margin (in the same way as our other
-% \cmd\fontspec-like commands) to explicitly state which fonts to use
-% inside such commands as \cmd\mathrm. Additionally, the
-% \cmd\setboldmathrm\ command allows you define the font used for
-% \cmd\mathrm\ when in bold maths mode (which is activated with, among
-% others, \cmd\boldmath).
-%
-% For example, if you were using Optima with the Euler maths font, you
-% might have this in your preamble:
-% \begin{verbatim}
-% \usepackage[mathcal]{euler}
-% \usepackage{fontspec,xunicode}
-% \setromanfont{Optima Regular}
-% \setmathrm{Optima}
-% \setboldmathrm[BoldFont=Optima ExtraBlack]{Optima Bold}
-% \end{verbatim}
-% and this would allow you to typeset something like this:
-% \begingroup
-% \setromanfont{Optima Regular}
-% \begin{aatexample}
-% $ X \rightarrow \mathrm{X} \rightarrow \mathbf{X} $
-% \\\boldmath
-% $ X \rightarrow \mathrm{X} \rightarrow \mathbf{X} $
-% \end{aatexample}
-% \endgroup
-%
-% \section{Selecting font features} \label{sec:selectingfeature} The
-% commands discussed so far each take an optional argument for
-% accessing the font features of the requested font. These features
-% are generally unavailable or harder to access in regular \LaTeX. The
-% font features and their options are described in
-% \vref{sec:features}, but there are, however, two other commands
-% which may be used to affect font features, and they must be
-% introduced first.
-%
-% \subsection{Default settings} \label{sec:defaults}
-% \DescribeMacro{\defaultfontfeatures} It is desirable to define
-% options that are applied to every subsequent font selection command:
-% a default feature set, so to speak. This may be defined with the
-% \cmd{\defaultfontfeatures}\marg{font features} command. This command
-% is used, for example, to automatically colour all of the examples in
-% this document. New calls of \cs{defaultfontfeatures} overwrite
-% previous ones.
-% \begin{aatexample}
-% \fontspec{Didot}
-% Some `default' Didot 0123456789 \\
-% \defaultfontfeatures{Numbers=OldStyle, Colour=009900}
-% \fontspec{Didot}
-% Now green, with old-style figures: 0123456789
-% \end{aatexample}
-%
-% \subsection{Changing the currently selected features}
-% \label{sec:addfontfeatures}
-% \DescribeMacro{\addfontfeatures} The \cs{addfontfeatures}\marg{font
-% features} command allows font features to be changed without
-% knowing what features are currently selected or even what font is
-% being used. A good example of this could be to add a hook to all
-% tabular material to use monospaced numbers, as shown in the
-% following example:
-% \begin{aatexample}
-% \fontspec[Numbers=OldStyle]{Skia Regular}
-% `In 1842, 999 people sailed 97 miles in
-% 13 boats. In 1923, 111 people sailed 54
-% miles in 56 boats.' \bigskip
-%
-% \addfontfeatures{Numbers={Monospaced,Lining}}
-% \begin{tabular}{@{} cccc @{}}
-% \toprule Year & People & Miles & Boats \\
-% \midrule 1842 & 999 & 75 & 13 \\
-% 1923 & 111 & 54 & 56 \\
-% \bottomrule
-% \end{tabular}
-% \end{aatexample}
-% \DescribeMacro{\addfontfeature}
-% This command may also be executed under the alias \cmd{\addfontfeature}.
-%
-% \subsection{Priority of feature selection}
-% Features defined with \cs{addfontfeatures} override features
-% specified by \cs{fontspec}, which in turn override features
-% specified by \cs{defaultfontfeatures}. If in doubt, whenever a
-% new font is chosen for the first time, an entry is made in the
-% transcript (\texttt{.log}) file displaying the font name and the
-% features requested.
-%
-%
-% \section{Available font features}
-% \label{sec:features}
-% This section covers each and every font feature catered for by this
-% package. Some, in fact, have already be seen in previous
-% sections. There are too many to list in this introduction, but for a
-% first taste of what is available, here is an example of the Apple
-% Chancery typeface:
-% \setexsize\Large
-% \begin{aatexample}
-% \fontspec[
-% Colour=CC00CC,
-% Numbers=OldStyle,
-% VerticalPosition=Ordinal,
-% Variant=2]{Apple Chancery}
-% My 1st example of\\ Apple Chancery
-% \end{aatexample}
-% You can see that font features are accessed with a
-% \meta{feature}=\meta{option(s)}
-% interface. Multiple options may be given to
-% any feature that accepts non-numerical input, although doing so will
-% not always work. Some options will override others in generally
-% obvious ways; \Verb|Numbers={OldStyle,Lining}| doesn't make much
-% sense because the two options are mutually exclusive, and \XeTeX\
-% will simply use the last option that is specified (in this case
-% using \opt{Lining} over \opt{OldStyle}).
-%
-%
-% \subsection{Different features for different font shapes}
-% It is entirely possible that separate fonts in a family will require
-% separate options; \eg, Hoefler Text Italic contains various swash
-% feature options that are completely unavailable in the upright shapes.
-%
-% Using the \opt{Bold-}, \opt{Italic-}, and \opt{BoldItalicFeatures}
-% options, separate font features may be \emph{added} to those
-% shapes. As a trivial example, let's colour each shape differently:
-% \begin{aatexample}
-% \fontspec[
-% Numbers=Lining,
-% BoldFeatures={Colour=AA0000},
-% ItalicFeatures={Colour=008833},
-% BoldItalicFeatures={Colour=AA8833},
-% ]{Hoefler Text}
-% 0 -- Normal \\
-% {\itshape 1 -- Italic} \\
-% {\bfseries 2 -- Bold} \\
-% {\bfseries\itshape 3 -- Bold Italic}
-% \end{aatexample}
-% Combined with the options for selecting arbitrary \emph{fonts} for
-% the different shapes, these separate feature options allow the
-% selection of arbitrary weights in (at least) the Skia typeface:
-% \begin{aatexample}
-% \fontspec[BoldFont={Skia Regular},
-% BoldFeatures={Weight=2}]{Skia Regular}
-% Skia Regular \\ \bfseries Skia `Bold'
-% \end{aatexample}
-%
-% \subsection{Font independent options}
-%
-% These features may be used with any font. \feat{Scale} takes a single
-% numeric argument for scaling the font glyphs, and was demonstrated
-% in \vref{sec:setxxfont}. \feat{Mapping} enables an \XeTeX\ text-mapping
-% scheme.
-% \begin{aatexample}
-% \fontspec[Mapping=tex-text]{Cochin}
-% ``!`A small amount of---text!''
-% \end{aatexample}
-% \feat{Colour} (or \feat{Color}), also shown in \vref{sec:defaults} and
-% \vref{sec:features}, uses \XeTeX\ font specifications to set the colour of
-% the font. The colour is defined as a triplet of two-digit Hex RGB
-% values, with optionally another value for the transparency (where
-% |00| is completely transparent and |FF| is opaque.)
-% \begin{aatexample}
-% \fontsize{48}{48}
-% \fontspec{Hoefler Text Black}
-% {\addfontfeature{Color=FF000099}W}\kern-1ex
-% {\addfontfeature{Color=0000FF99}S}\kern-0.8ex
-% {\addfontfeature{Color=DDBB2299}P}\kern-0.8ex
-% {\addfontfeature{Color=00BB3399}R}
-% \end{aatexample}
-% \XeTeX\ has more advanced colour management abilities, but they
-% cannot be accessed through this package (yet, if at all).
-%
-% \subsection{Optical font sizes} \label{sec:opticalsize}
-%
-% Optically scaled fonts thicken out as the font size decreases
-% in order to make the glyph shapes more robust (less prone to losing
-% detail) which improves legibility. Conversely, at large optical
-% sizes the serifs and other small details may be more delicately
-% rendered. This is how type was set back in the day of lead and
-% presses.
-%
-% Optically sized fonts can be seen in either OpenType or Multiple
-% Master varieties. The differences when dealing with these two are
-% quite significant. OpenType fonts with optical scaling will exist in
-% several discrete sizes, and these will be selected by \XeTeX\
-% \emph{automatically} determined by the current font size. The
-% \opt{OpticalSize} option may be used to specify a different optical
-% size.
-%
-% For the OpenType font Warnock Pro, we have three optically sized
-% variants: caption, subhead, and display. With \opt{OpticalSize} set
-% to zero, these are selected as with a regular font:
-% \begin{opentypeexample}
-% \fontspec[OpticalSize=0]{Warnock Pro Caption}
-% Warnock Pro optical sizes \\
-% \fontspec[OpticalSize=0]{Warnock Pro}
-% Warnock Pro optical sizes \\
-% \fontspec[OpticalSize=0]{Warnock Pro Subhead}
-% Warnock Pro optical sizes \\
-% \fontspec[OpticalSize=0]{Warnock Pro Display}
-% Warnock Pro optical sizes
-% \end{opentypeexample}
-%
-% Automatic OpenType optical scaling is shown in the following
-% example, in which we've scaled down some large text in order to be
-% able to compare the difference for equivalent font sizes: (this
-% gives the same output as we saw in the previous example for Warnock
-% Pro Display)
-% \begin{opentypeexample}
-% \fontspec{Warnock Pro}
-% Automatic optical size \\
-% \scalebox{0.4}{\Huge
-% Automatic optical size}
-% \end{opentypeexample}
-%
-% Multiple Master fonts, on the other hand, are parameterised over
-% orthogonal font axes, allowing continuous selection along such
-% features as weight, width, and optical size~(see \vref{sec:mm} for
-% details). Whereas an OpenType font will have only a few separate
-% optical sizes, a Multiple Master font's optical size can be
-% specified over a large range. Unfortunately, this flexibility makes
-% 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}
-%
-%
-%
-%
-% \subsection{Ligatures}
-%
-% \feat{Ligatures} refer to the replacement of two separate characters
-% with a specially drawn glyph for functional or \ae sthetic reasons.
-% For AAT fonts, you may choose from any combination of \opt{Required},
-% \opt{Common}, \opt{Rare} (or \opt{Discretionary}), \opt{Logos}, \opt{Rebus},
-% \opt{Diphthong}, \opt{Squared}, \opt{AbbrevSquared}, and \opt{Icelandic}.
-%
-% The first three are also supported in OpenType fonts, which may also
-% use \opt{Historical} and \opt{Contextual}. To turn a ligature option
-% \emph{off}, prefix its name with \opt{No}: \eg, \opt{NoDiphthong}.
-% \setexsize\Large
-% \begin{aatexample}
-% \fontspec[Ligatures=Rare]{Hoefler Text}
-% strict firefly \\
-% \fontspec[Ligatures=NoCommon]{Hoefler Text}
-% strict firefly
-% \end{aatexample}
-% \setexsize\large
-% \begin{aatexample}
-% \fontspec
-% [Ligatures={Rare,Logos,Rebus,Diphthong}]
-% {Palatino}
-% Rare: Dh Th dh th \\
-% Logos: apple \\
-% Rebus: \%0 \\
-% Dipht\null hong: AE OE ae oe
-% \end{aatexample}
-% Some other Apple AAT fonts have those `Rare' ligatures contained in
-% the \opt{Icelandic} feature. Notice also that the old \TeX\ trick of
-% splitting up a ligature with an empty brace pair does not work in
-% \XeTeX; you must use a 0\,pt kern or \cs{hbox} (\eg, \cs{null}) to
-% split the characters up.
-%
-% \subsection{Letters}
-% The \opt{Letters} feature~\warn{v1.6}{This feature has changed names
-% along with its options, \textbf{breaking} backwards
-% compatibility!} specifies how the letters in the current font
-% will look. For AAT fonts, you may choose from \opt{Normal},
-% \opt{Uppercase}, \opt{Lowercase}, \opt{SmallCaps}, and
-% \opt{InitialCaps}.
-% \begin{aatexample}
-% \fontspec[Letters=Uppercase]{Palatino}
-% THIS Sentence no verb \\
-% \fontspec[Letters=Lowercase]{Palatino}
-% THIS Sentence no verb \\
-% \fontspec[Letters=InitialCaps]{Palatino}
-% THIS Sentence no verb
-% \end{aatexample}
-% OpenType fonts have some different options:
-% \opt{SmallCaps}, \opt{PetiteCaps}, \opt{SMALLCAPS}, \opt{PETITECAPS}, and
-% \opt{Unicase}. Petite caps are smaller than small caps. Mixed case
-% commands turn lowercase letters into the smaller caps letters,
-% whereas uppercase options turn the capital letters to the smaller
-% caps (good, \eg, for applying to already uppercase acronyms like
-% `NASA'). Finally, unicase is a weird hybrid of upper and lower case
-% letters.
-% \begin{opentypeexample}
-% \fontspec[Letters=SmallCaps]{Warnock Pro}
-% THIS SENTENCE no verb \\
-% \fontspec[Letters=SMALLCAPS]{Warnock Pro}
-% THIS SENTENCE no verb
-% \end{opentypeexample}
-%
-%
-% \subsection{Numbers}
-% The \feat{Numbers} feature defines how numbers will look in the
-% selected font. For both AAT and OpenType fonts, they may be a
-% combination of \opt{Lining} or \opt{OldStyle} and \opt{Proportional} or
-% \opt{Monospaced} (the latter is good for tabular material). The synonyms
-% \opt{Uppercase} and \opt{Lowercase} are equivalent to \opt{Lining} and
-% \opt{OldStyle}, respectively. The differences have been shown previously
-% in \vref{sec:addfontfeatures}.
-%
-% For OpenType fonts, there is also the \opt{SlashedZero} option which
-% replaces the default zero with a slashed version to prevent
-% confusion with an uppercase `O'.
-% \begin{opentypeexample}
-% \fontspec[Numbers=Lining]{Warnock Pro}
-% 0123456789
-% \fontspec[Numbers=SlashedZero]{Warnock Pro}
-% 0123456789
-% \end{opentypeexample}
-%
-% \subsection{Swashes}
-% \feat{Swashes} are fancy ornaments on letters. The options for AAT are
-% \opt{WordInitial}, \opt{WordFinal}, \opt{LineInitial},
-% \opt{LineFinal}, and \opt{Inner} (also known as `non-final'). As
-% non-exclusive selectors, like the ligatures, you can turn them off
-% by prefixing their name with \opt{No}.
-% \begin{aatexample}
-% \fontspec
-% [Swashes={WordInitial,WordFinal}]
-% {Hoefler Text Italic}
-% where is all the vegemite
-% \end{aatexample}
-% \begin{aatexample}
-% \fontspec[Swashes=Inner]{Hoefler Text}
-% `Inner' swashes can \emph{sometimes} \\
-% contain the archaic long~s.
-% \end{aatexample}
-% For OpenType fonts, all but the \opt{LineInitial} and \opt{Inner} features
-% are also supported, and \opt{Contextual} turns on contextual
-% swashes.
-% \begin{opentypeexample}
-% \fontspec{Warnock Pro}\itshape
-% Without Contextual Swashes \\
-% \fontspec[Swashes=Contextual]{Warnock Pro}
-% With Contextual Swashes; cf. W C S
-% \end{opentypeexample}
-%
-%
-% \subsection{Diacritics}
-% Diacritics refer to characters that include extra marks that usually
-% indicate pronunciation; \eg, accented letters. You may either choose
-% to \opt{Show}, \opt{Hide} or \opt{Decompose} them in AAT fonts.
-%
-% Some fonts include |O/| \etc\ as diacritics for writing \O. You'll
-% want to turn this feature off (imagine typing |hello/goodbye| and
-% getting `hell\o goodbye' instead!) by decomposing the two characters
-% in the diacritic into the ones you actually
-% want. I would recommend using
-% the proper \TeX\ input conventions for obtaining such characters
-% instead.
-% \begin{aatexample}
-% \fontspec[Diacritics=Show]{Palatino}
-% O´ \quad O¨ \quad O/ \par
-% \fontspec[Diacritics=Decompose]{Palatino}
-% O´ \quad O¨ \quad O/ \par
-% Better: \'O \"O \O % (requires xunicode)
-% \end{aatexample}
-% The \opt{Hide} option is for Arabic-like fonts which may be
-% displayed either with or without vowel markings.
-%
-% No options for OpenType fonts.
-%
-%
-% \subsection{Vertical position}
-% Some subscript (\opt{Superior}) and superscript (\opt{Inferior}) numbers and
-% letters (and a small amount of punctuation, sometimes) are available
-% in various fonts. The \opt{Ordinal} feature is (supposed to be)
-% contextually sensitive to only raise characters that appear directly
-% after a number.
-% \begin{aatexample}
-% \fontspec{Skia Regular}
-% Normal
-% \fontspec[VerticalPosition=Superior]{Skia Regular}
-% Superior
-% \fontspec[VerticalPosition=Inferior]{Skia Regular}
-% Inferior \\
-% \fontspec[VerticalPosition=Ordinal]{Skia Regular}
-% 1st 2nd 3rd 4th 0th 8abcde
-% \end{aatexample}
-% OpenType fonts also have the option \opt{ScientificInferior} which
-% extends further below the baseline than \opt{Inferior}s, as well as
-% \opt{Numerator} and \opt{Denominator} for creating arbitrary fractions (see
-% next section). Beware, the \opt{Ordinal} feature will not work
-% correctly for all OpenType fonts!
-% \begin{opentypeexample}
-% \fontspec[VerticalPosition=Superior]{Warnock Pro}
-% Sup: abdehilmnorst (-\$12,345.67) \\
-% \fontspec[VerticalPosition=Numerator]{Warnock Pro}
-% Numerator: 12345 \\
-% \fontspec[VerticalPosition=Denominator]{Warnock Pro}
-% Denominator: 12345 \\
-% \fontspec[VerticalPosition=ScientificInferior]{Warnock Pro}
-% Scientific~Inferior: 12345 \\
-% \fontspec[VerticalPosition=Ordinal]{Warnock Pro}
-% `Ordinals': 1st 2nd 3rd 4th 0th
-% \end{opentypeexample}
-%
-% \subsection{Fractions}
-% Many fonts come with the capability to typeset various forms of
-% fractional material. This is accessed in \pkg{fontspec} with the
-% \feat{Fractions} feature, which may be turned \opt{On} or \opt{Off}
-% in both AAT and OpenType fonts.~\warn{v1.7}{This feature has
-% changed: no backwards compatibility!}
-%
-% In AAT fonts, the `fraction slash' or solidus character, which may
-% be obtained by typing `{\fontspec{Lucida Grande}⌥⇧\,1}', is (supposed)
-% to be used to create fractions. When \feat{Fractions} are turned
-% \opt{On}, then (supposedly) only pre-drawn fractions will be used.
-% \setmonofont[Scale=0.8]{Monaco}
-% \begin{aatexample}
-% \fontspec[Fractions=On]{Palatino}
-% 1⁄2 \quad 5⁄6 \\ % fraction slash
-% 1/2 \quad 5/6 % regular slash
-% \end{aatexample}
-% Using the \opt{Diagonal} option (AAT only), the font will attempt
-% to create the fraction from superscript and subscript
-% characters. This is shown in the following example by Hoefler Text,
-% whose fraction support may actually not be turned off.
-% \begin{aatexample}
-% \fontspec{Hoefler Text}
-% 13579⁄24680 \\ % fraction slash
-% \quad 13579/24680 % regular slash
-% \end{aatexample}
-% \setmonofont[Scale=0.95]{Osaka-Mono}
-% OpenType fonts simply use a regular text slash to create fractions:
-% \begin{opentypeexample}
-% \fontspec{Hiragino Maru Gothic Pro W4}
-% 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
-% \addfontfeature{Fractions=On}
-% 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
-% \end{opentypeexample}
-% Some (Asian fonts predominantly, perhaps) also provide for the
-% \opt{Alternate} feature:
-% \begin{opentypeexample}
-% \fontspec{Hiragino Maru Gothic Pro W4}
-% 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
-% \addfontfeature{Fractions=Alternate}
-% 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
-% \end{opentypeexample}
-% You may wish to use a command like the following to build arbitrary
-% vulgar fractions in fonts with numerator and denominator glyphs if
-% the font doesn't support it explicitly:
-% \begin{opentypeexample}
-% \newcommand*\vulgarfraction[2]{%
-% {\addfontfeature{VerticalPosition=Numerator}#1}%
-% \textfractionsolidus
-% {\addfontfeature{VerticalPosition=Denominator}#2}}
-% \fontspec{Warnock Pro}
-% There's a reason they're called `vulgar':
-% \vulgarfraction{13579}{24680}
-% \end{opentypeexample}
-% (Requires the \pkg{xunicode} package for \cs{textfractionsolidus}.)
-%
-% \subsection{AAT Character Alternates}
-% Alternates are tricky, because there's no definition for what they
-% can be. This is where the swashes are in Hoefler Text, but you can't
-% guarantee that this is where they'll always be or that they'll use
-% the same number. So unfortunately selection of Character Alternates
-% must be done numerically on a per font basis (although
-% \vref{sec:newfeatures} may help a little in this regard).
-% \begin{aatexample}
-% \fontspec[Alternate=0]{Hoefler Text Italic}
-% Sphinx Of Black Quartz, {\scshape Judge My Vow} \\
-% \fontspec[Alternate=1]{Hoefler Text Italic}
-% Sphinx Of Black Quartz, {\scshape Judge My Vow}
-% \end{aatexample}
-% For an OpenType font, stylistic alternates used to be accessed
-% through here, but now they're through the \feat{Style}
-% feature~\warn{v1.7}{Yes, I don't have a high regard for backwards
-% compatibility at the moment. Sorry.}.
-%
-% \subsection{Variants}
-% The \feat{Variant} feature takes a single numerical input for
-% choosing different alphabetic shapes. Don't mind my fancy example
-% \texttt{:)} I'm just looping through the nine~(\,!\,) variants of
-% Zapfino.
-% \begin{aatexample}
-% \Huge
-% \newcounter{var}\newcounter{trans}
-% \raisebox{0pt}[\height][0pt]{%
-% \whiledo{\value{var}<9}{%
-% \stepcounter{trans}%
-% \fontspec[Variant=\thevar,
-% Colour=005599\thetrans\thetrans]{Zapfino}%
-% \makebox[0.75\width]{d}%
-% \stepcounter{var}}}
-% \end{aatexample}
-% For OpenType fonts, \opt{Variant} selects a Stylistic Set, specified
-% numerically between one and twenty. I don't have a font to
-% demonstrate this feature with, unfortunately.
-%
-% \subsection{Style}
-% The options of the \feat{Style} feature
-% \warn{v1.7}{The old name, \feat{StyleOptions}, still works.}
-% are defined in AAT as one of the following: \opt{Display},
-% \opt{Engraved}, \opt{IlluminatedCaps}, \opt{Italic},
-% \opt{Ruby},\footnotemark\ \opt{TitlingCaps}, or \opt{TallCaps}.
-% \footnotetext{`Ruby' refers to a small optical size, historically for
-% Japanese kana typography}
-% \makeatletter\let\savemark\@thefnmark\makeatother
-% \setexsize\huge
-% \begin{aatexample}
-% \fontspec[Style=Engraved]{Hoefler Text}
-% [ABCD\dots WXYZ]
-% \end{aatexample}
-% OpenType supported options are \opt{Alternate}~\warn{v1.7}{%
-% Note the difference with the \feat{Alternate} \emph{feature}, which is for
-% AAT fonts.},
-% \opt{Italic}, \opt{Ruby},\footnotemark[\savemark]
-% \opt{Swash}, and \opt{TitlingCaps}.
-% \setexsize\Large
-% \begin{opentypeexample}
-% \fontspec{Warnock Pro}
-% K Q R k v w y \\
-% \addfontfeature{Style=Alternate}
-% K Q R k v w y
-% \end{opentypeexample}
-% \setexsize\Large
-% \begin{opentypeexample}
-% \fontspec{Hiragino Mincho Pro W3}
-% Latin ようこそ ワカヨタレソ \\
-% \addfontfeature{Style={Italic, Ruby}}
-% Latin ようこそ ワカヨタレソ
-% \end{opentypeexample}
-% \setexsize\Large
-% \begin{opentypeexample}
-% \fontspec{Adobe Garamond Pro}
-% TITLING CAPS \\
-% \addfontfeature{Style=TitlingCaps}
-% TITLING CAPS
-% \end{opentypeexample}
-% (Look closely.)
-%
-% \subsection{Character Shape}
-%
-% There have been many standards for how Japanese (and other?) kanji
-% glyphs are `supposed' to look. Some fonts will have many alternate
-% glyphs available in order to be able to display these gylphs
-% correctly in whichever form is appropriate. Both AAT and OpenType
-% fonts support the following \feat{CharacterShape} options:
-% \opt{Traditional}, \opt{Simplified}, \opt{JIS1978}, \opt{JIS1983},
-% \opt{JIS1990}, and \opt{Expert}. OpenType also supports the \opt{NLC} option.
-%
-% \setexsize\LARGE
-% \begin{opentypeexample}
-% \fontspec{Hiragino Mincho Pro W3}
-% {\addfontfeature{CharacterShape=Traditional}
-% 唖噛躯 妍并訝 } \\
-% {\addfontfeature{CharacterShape=NLC}
-% 唖噛躯 妍并訝 } \\
-% {\addfontfeature{CharacterShape=Expert}
-% 唖噛躯 妍并訝 }
-% \end{opentypeexample}
-%
-% \subsection{Text Spacing}
-%
-% Many Asian fonts are equipped with variously spaced characters for
-% shoe-horning into their generally monospaced text. These are
-% accessed through the \feat{TextSpacing} feature.\footnote{Apple
-% seems to be adapting its AAT features in this regard (at least in
-% the fonts it distributes with \MacOSX) to have a one-to-one
-% correspondence with the equivalent OpenType features. Previously
-% AAT was more fine grained, but naturally they're not documenting
-% their AAT tables any more, so if the following features don't work
-% for a specific font let me know and I'll try and see if anything
-% can be salvaged from the situation.} For now, OpenType and AAT
-% share the same six options for this feature: \opt{Proportional},
-% \opt{FullWidth}, \opt{HalfWidth}, \opt{ThirdWidth},
-% \opt{QuarterWidth}, \opt{AlternateProportional}, and
-% \opt{AlternateHalfWidth}. AAT also allows \opt{Default} to return to
-% whatever was originally specified.
-%
-% Japanese alphabetic glyphs (hiragana or katakana) may be typeset
-% proportionally, to better fit horizontal measures, or monospaced, to
-% fit into the rigid grid imposed by ideographic typesetting. In this
-% latter case, there are also half-width forms for squeezing more kana
-% glyphs (which are less complex than the kanji they are amongst) into
-% a given block of space. The same features are given to roman letters
-% in Japanese fonts, for typesetting foreign words in the same style
-% as the surrounding text.
-% \begin{opentypeexample}
-% \def\test{\makebox[2cm][l]{ようこそ}%
-% \makebox[2.5cm][l]{ワカヨタレソ}%
-% \makebox[2.5cm][l]{abcdef}}
-% \fontspec{Hiragino Mincho Pro W3}
-% {\addfontfeature{TextSpacing=Proportional}\test}\\
-% {\addfontfeature{TextSpacing=FullWidth}\test}\\
-% {\addfontfeature{TextSpacing=HalfWidth}\test}
-% \end{opentypeexample}
-% The same situation occurs with numbers, which are provided in
-% increasingly illegible compressed forms:
-% \setexsize\large
-% \begin{opentypeexample}
-% \fontspec{Hiragino Mincho Pro W3}
-% {\addfontfeature{TextSpacing=FullWidth}
-% ---12321---}\\
-% {\addfontfeature{TextSpacing=HalfWidth}
-% ---1234554321---}\\
-% {\addfontfeature{TextSpacing=ThirdWidth}
-% ---123456787654321---}\\
-% {\addfontfeature{TextSpacing=QuarterWidth}
-% ---12345678900987654321---}
-% \end{opentypeexample}
-%
-%
-%
-% \subsection{Annotation}
-%
-% Various Asian fonts are equipped with a more extensive range of
-% numbers and numerals in different forms. These are accessed through
-% the \feat{Annotation} feature with the following options: \opt{Off},
-% \opt{Box}, \opt{RoundedBox}, \opt{Circle}, \opt{BlackCircle},
-% \opt{Parenthesis}, \opt{Period}, \opt{RomanNumerals}, \opt{Diamond},
-% \opt{BlackSquare}, \opt{BlackRoundSquare}, and \opt{DoubleCircle}.
-% \begin{aatexample}
-% \fontspec{Hei Regular}
-% 1 2 3 4 5 6 7 8 9 \\
-% \fontspec[Annotation=Circle]{Hei Regular}
-% 1 2 3 4 5 6 7 8 9 \\
-% \fontspec[Annotation=Parenthesis]{Hei Regular}
-% 1 2 3 4 5 6 7 8 9 \\
-% \fontspec[Annotation=Period]{Hei Regular}
-% 1 2 3 4 5 6 7 8 9
-% \end{aatexample}
-% For OpenType fonts, the only option supported is \opt{On} and \opt{Off}:
-% \begin{opentypeexample}
-% \fontspec{Hiragino Maru Gothic Pro W4}
-% 1 2 3 4 5 6 7 8 9 \\
-% \addfontfeature{Annotation=On}
-% 1 2 3 4 5 6 7 8 9
-% \end{opentypeexample}
-% I'm not sure if \XeTeX\ can access alternate annotation
-% forms, even if they exist (as in this case) in the font.
-%
-% \subsection{AAT \& Multiple Master font axes} \label{sec:mm}
-%
-% Multiple Master and AAT font specifications both provide continuous
-% variation along font parameters. For example, they don't have just
-% regular and bold weights, they have any bold weight you like between
-% the two extremes.
-%
-% \opt{Weight}, \opt{Width}, and \opt{OpticalSize} are supported by this
-% package. Luckily Skia, which is distributed with
-% Mac~OS~X, has these variable parameters, allowing for a
-% demonstration:
-% \begin{aatexample}
-% \fontspec[Weight=0.5,Width=3]{Skia Regular}
-% Really light and extended Skia \\
-% \fontspec[Weight=2,Width=0.5]{Skia Regular}
-% Really fat and condensed Skia
-% \end{aatexample}
-% Variations along a Multiple Master font's optical size axis has been
-% shown previously in \vref{sec:opticalsize}.
-%
-%
-% \subsection{OpenType scripts and languages}
-%
-% When dealing with fonts that include glyphs for various languages,
-% they may contain different font features for the different character
-% sets and languages it supports. These may be selected with the
-% \opt{Script} and \opt{Language} features. The possible options are
-% tabulated in \vref{tab:ot-scpt} and \vref{tab:ot-lang},
-% respectively.
-%
-% In the following examples, the same font is used to typeset the
-% verbatim input and the \XeTeX\ output. Because the \opt{Script} is
-% only specified for the output, the text is rendered incorrectly in
-% the verbatim input. Many examples of incorrect diacritic spacing as
-% well as a lack of contextual ligatures and rearrangement can be
-% seen. Thanks to \name{Jonathan Kew}, \name{Yves Codet} and
-% \name{Gildas Hamel} for their contributions towards these examples.
-%
-% \begingroup\setmonofont{Code2000}
-% \setverbwidth{0.5\textwidth}
-% \begin{opentypeexample}
-% \fontspec[Script=Arabic]{Code2000}
-% العربي
-% \end{opentypeexample}
-% \begin{opentypeexample}
-% \fontspec[Script=Devanagari]{Code2000}
-% हिन्दी
-% \end{opentypeexample}
-% \begin{opentypeexample}
-% \fontspec[Script=Bengali]{Code2000}
-% লেখ
-% \end{opentypeexample}
-% \begin{opentypeexample}
-% \fontspec[Script=Gujarati]{Code2000}
-% મર્યાદા-સૂચક નિવેદન
-% \end{opentypeexample}
-% \begin{opentypeexample}
-% \fontspec[Script=Malayalam]{Code2000}
-% നമ്മുടെ പാരബര്യ
-% \end{opentypeexample}
-% \begin{opentypeexample}
-% \fontspec[Script=Gurmukhi]{Code2000}
-% ਆਦਿ ਸਚੁ ਜੁਗਾਦਿ ਸਚੁ
-% \end{opentypeexample}
-% \begin{opentypeexample}
-% \fontspec[Script=Tamil]{Code2000}
-% தமிழ் தேடி
-% \end{opentypeexample}
-% \begin{opentypeexample}
-% \fontspec[Script=Hebrew]{Code2000}
-% רִדְתָּֽהּ
-% \end{opentypeexample}
-% \endgroup
-%
-% \begin{table}[!hbp]
-% \def\dup{\makebox[0pt][r]{\textcolor{red}{\P}}}%
-% \setlength\columnseprule{0pt}
-% \hrule
-% \begin{multicols}{4}\setlength\parindent{0pt}
-% \sffamily\scriptsize
-% Arabic \par Armenian \par Balinese \par Bengali \par Bopomofo \par Braille \par Buginese \par Buhid \par Byzantine Music \par Canadian Syllabics \par Cherokee \par \dup CJK \par \dup CJK Ideographic \par Coptic \par Cypriot Syllabary \par Cyrillic \par Default \par Deseret \par Devanagari \par Ethiopic \par Georgian \par Glagolitic \par Gothic \par Greek \par Gujarati \par Gurmukhi \par Hangul Jamo \par Hangul \par Hanunoo \par Hebrew \par \dup Hiragana and Katakana \par \dup Kana \par Javanese \par Kannada \par Kharosthi \par Khmer \par Lao \par Latin \par Limbu \par Linear B \par Malayalam \par \dup Math \par \dup Maths \par Mongolian \par Musical Symbols \par Myanmar \par N'ko \par Ogham \par Old Italic \par Old Persian Cuneiform \par Oriya \par Osmanya \par Phags-pa \par Phoenician \par Runic \par Shavian \par Sinhala \par Sumero-Akkadian Cuneiform \par Syloti Nagri \par Syriac \par Tagalog \par Tagbanwa \par Tai Le \par Tai Lu \par Tamil \par Telugu \par Thaana \par Thai \par Tibetan \par Tifinagh \par Ugaritic Cuneiform \par Yi
-% \end{multicols}
-% \hrule
-% \caption{Defined \opt{Script}s for OpenType fonts. Aliased names are shown in adjacent positions marked with red pilcrows ({\sffamily\textcolor{red}{\P}}).}
-% \label{tab:ot-scpt}
-% \end{table}
-%
-% \begin{table}
-% \setlength\columnseprule{0pt}
-% \hrule
-% \begin{multicols}{6}\setlength\parindent{0pt}
-% \sffamily\tiny
-% Abaza \par Abkhazian \par Adyghe \par Afrikaans \par Afar \par Agaw \par Altai \par Amharic \par Arabic \par Aari \par Arakanese \par Assamese \par Athapaskan \par Avar \par Awadhi \par Aymara \par Azeri \par Badaga \par Baghelkhandi \par Balkar \par Baule \par Berber \par Bench \par Bible Cree \par Belarussian \par Bemba \par Bengali \par Bulgarian \par Bhili \par Bhojpuri \par Bikol \par Bilen \par Blackfoot \par Balochi \par Balante \par Balti \par Bambara \par Bamileke \par Breton \par Brahui \par Braj Bhasha \par Burmese \par Bashkir \par Beti \par Catalan \par Cebuano \par Chechen \par Chaha Gurage \par Chattisgarhi \par Chichewa \par Chukchi \par Chipewyan \par Cherokee \par Chuvash \par Comorian \par Coptic \par Cree \par Carrier \par Crimean Tatar \par Church Slavonic \par Czech \par Danish \par Dargwa \par Woods Cree \par German \par Default \par Dogri \par Divehi \par Djerma \par Dangme \par Dinka \par Dungan \par Dzongkha \par Ebira \par Eastern Cree \par Edo \par Efik \par Greek \par English \par Erzya \par Spanish \par Estonian \par Basque \par Evenki \par Even \par Ewe \par French Antillean \par Farsi \par Finnish \par Fijian \par Flemish \par Forest Nenets \par Fon \par Faroese \par French \par Frisian \par Friulian \par Futa \par Fulani \par Ga \par Gaelic \par Gagauz \par Galician \par Garshuni \par Garhwali \par Ge'ez \par Gilyak \par Gumuz \par Gondi \par Greenlandic \par Garo \par Guarani \par Gujarati \par Haitian \par Halam \par Harauti \par Hausa \par Hawaiin \par Hammer-Banna \par Hiligaynon \par Hindi \par High Mari \par Hindko \par Ho \par Harari \par Croatian \par Hungarian \par Armenian \par Igbo \par Ijo \par Ilokano \par Indonesian \par Ingush \par Inuktitut \par Irish \par Irish Traditional \par Icelandic \par Inari Sami \par Italian \par Hebrew \par Javanese \par Yiddish \par Japanese \par Judezmo \par Jula \par Kabardian \par Kachchi \par Kalenjin \par Kannada \par Karachay \par Georgian \par Kazakh \par Kebena \par Khutsuri Georgian \par Khakass \par Khanty-Kazim \par Khmer \par Khanty-Shurishkar \par Khanty-Vakhi \par Khowar \par Kikuyu \par Kirghiz \par Kisii \par Kokni \par Kalmyk \par Kamba \par Kumaoni \par Komo \par Komso \par Kanuri \par Kodagu \par Korean Old Hangul \par Konkani \par Kikongo \par Komi-Permyak \par Korean \par Komi-Zyrian \par Kpelle \par Krio \par Karakalpak \par Karelian \par Karaim \par Karen \par Koorete \par Kashmiri \par Khasi \par Kildin Sami \par Kui \par Kulvi \par Kumyk \par Kurdish \par Kurukh \par Kuy \par Koryak \par Ladin \par Lahuli \par Lak \par Lambani \par Lao \par Latin \par Laz \par L-Cree \par Ladakhi \par Lezgi \par Lingala \par Low Mari \par Limbu \par Lomwe \par Lower Sorbian \par Lule Sami \par Lithuanian \par Luba \par Luganda \par Luhya \par Luo \par Latvian \par Majang \par Makua \par Malayalam Traditional \par Mansi \par Marathi \par Marwari \par Mbundu \par Manchu \par Moose Cree \par Mende \par Me'en \par Mizo \par Macedonian \par Male \par Malagasy \par Malinke \par Malayalam Reformed \par Malay \par Mandinka \par Mongolian \par Manipuri \par Maninka \par Manx Gaelic \par Moksha \par Moldavian \par Mon \par Moroccan \par Maori \par Maithili \par Maltese \par Mundari \par Naga-Assamese \par Nanai \par Naskapi \par N-Cree \par Ndebele \par Ndonga \par Nepali \par Newari \par Nagari \par Norway House Cree \par Nisi \par Niuean \par Nkole \par N'ko \par Dutch \par Nogai \par Norwegian \par Northern Sami \par Northern Tai \par Esperanto \par Nynorsk \par Oji-Cree \par Ojibway \par Oriya \par Oromo \par Ossetian \par Palestinian Aramaic \par Pali \par Punjabi \par Palpa \par Pashto \par Polytonic Greek \par Pilipino \par Palaung \par Polish \par Provencal \par Portuguese \par Chin \par Rajasthani \par R-Cree \par Russian Buriat \par Riang \par Rhaeto-Romanic \par Romanian \par Romany \par Rusyn \par Ruanda \par Russian \par Sadri \par Sanskrit \par Santali \par Sayisi \par Sekota \par Selkup \par Sango \par Shan \par Sibe \par Sidamo \par Silte Gurage \par Skolt Sami \par Slovak \par Slavey \par Slovenian \par Somali \par Samoan \par Sena \par Sindhi \par Sinhalese \par Soninke \par Sodo Gurage \par Sotho \par Albanian \par Serbian \par Saraiki \par Serer \par South Slavey \par Southern Sami \par Suri \par Svan \par Swedish \par Swadaya Aramaic \par Swahili \par Swazi \par Sutu \par Syriac \par Tabasaran \par Tajiki \par Tamil \par Tatar \par TH-Cree \par Telugu \par Tongan \par Tigre \par Tigrinya \par Thai \par Tahitian \par Tibetan \par Turkmen \par Temne \par Tswana \par Tundra Nenets \par Tonga \par Todo \par Turkish \par Tsonga \par Turoyo Aramaic \par Tulu \par Tuvin \par Twi \par Udmurt \par Ukrainian \par Urdu \par Upper Sorbian \par Uyghur \par Uzbek \par Venda \par Vietnamese \par Wa \par Wagdi \par West-Cree \par Welsh \par Wolof \par Tai Lue \par Xhosa \par Yakut \par Yoruba \par Y-Cree \par Yi Classic \par Yi Modern \par Chinese Hong Kong \par Chinese Phonetic \par Chinese Simplified \par Chinese Traditional \par Zande \par Zulu
-% \end{multicols}
-% \hrule
-% \caption{Defined \opt{Language}s for OpenType fonts.
-% Note that they are sorted alphabetically \emph{not}
-% by name but by OpenType tag, which is a little irritating, really.}
-% \label{tab:ot-lang}
-% \end{table}
-%
-% \section{Defining new features}
-% \label{sec:newfeatures}
-% This package cannot hope to contain every possible font
-% feature. Two commands are provided for selecting font features
-% that are not provided for out of the box. If you are using
-% them a lot, chances are I've left something out, so please let me
-% know.
-%
-% \DescribeMacro{\newfontfeature}
-% \cmd{\newfontfeature}\marg{tag}\marg{feature string} takes two
-% arguments: \meta{tag} is the name to reference the new feature by
-% when selecting it in your font; and \meta{feature string} the string
-% that activates the particular font feature. For example, Zapfino
-% contains a non-standard feature `Avoid d-collisions'. To access it
-% with this package, you could do the following:
-% \begin{aatexample}
-% \newfontfeature{AvoidD}{Special=Avoid d-collisions}
-% \newfontfeature{NoAvoidD}{Special=!Avoid d-collisions}
-% \fontspec[AvoidD,Variant=1]{Zapfino}
-% sockdolager rubdown \\
-% \fontspec[NoAvoidD,Variant=1]{Zapfino}
-% sockdolager rubdown
-% \end{aatexample}
-% Of course, you may perform similar operations with OpenType
-% features, \eg, |\newfontfeature{OTSwash}{+swsh}| to activate swash forms.
-%
-% \DescribeMacro{\newfeaturecode}
-% \cmd{\newfeaturecode}\marg{tag}\marg{feature number}\marg{selector
-% number} performs the same function as the last macro, but instead
-% of using a string, it takes two arguments to define the
-% \meta{feature number} and \meta{selector number} of the feature. It
-% works only for AAT fonts. There is no mechanism yet for the package
-% to help inform you what codes are available for a specific font, sorry.
-% \begin{aatexample}
-% \newfeaturecode{Swash}{17}{1}
-% \fontspec[Swash]{Hoefler Text Italic}
-% This is XeTeX by Jonathan Kew.
-% \end{aatexample}
-%
-% \iffalse
-% \subsection{Renaming existing features}\label{sec:aliasfeature}
-%
-% \DescribeMacro{\aliasfeature}
-% If you don't like the name that a certain font feature is defined with,
-% it may be aliased to another with the
-% \cs{aliasfeature}\marg{existing name}\marg{new name} command:
-% \begin{aatexample}
-% \aliasfeature{VerticalPosition}{Vert Pos}
-% \fontspec[Vert Pos=Ordinal]{Hoefler Text}
-% 0th 1st 2nd 3rd 4th 5th
-% \end{aatexample}
-% (Yes, note yet another Hoefler Text bug.)
-%
-% Spaces in feature and option names \emph{are} allowed (you may have
-% noticed this in the lists of OpenType scripts and languages). This
-% command only works (for now) with \emph{font} features. What does
-% this mean? You can't alias \feat{BoldFont}, or \feat{Mapping}, or
-% \feat{Script}, or\dots
-% \fi
-%
-% \StopEventually{}
-%
-% \clearpage
-% \begingroup
-% \makeatletter
-% \renewenvironment{theglossary}
-% {\small\list{}{}
-% \item\relax
-% \glossary@prologue\GlossaryParms
-% \let\item\@idxitem \ignorespaces
-% \def\pfill{\hspace*{\fill}}}
-% {\endlist}
-% \PrintChanges
-% \endgroup
-%
-% \clearpage
-% \section{Implementation}
-% Herein lies the implementation details of this package. Welcome!
-% It's my first.
-%
-% For some reason, I decided to prefix all the package internal
-% command names and variables with |zf|. I don't know why I chose
-% those letters, but I guess I just liked the look/feel of the
-% letters together at the time.
-% \begin{macrocode}
-%<*fontspec>
-% \end{macrocode}
-% Only proceed if it is \XeTeX\ that is doing the typesetting.
-% \begin{macrocode}
-\expandafter\ifx\csname XeTeXversion\endcsname\relax
- \@latex@error{^^J
- *************************************************^^J
- *** Sorry! ^^J
- *** The fontspec package only works with XeTeX. ^^J
- *************************************************}
-\fi
-% \end{macrocode}
-% While the business of encoding names is up in the air, I'll continue
-% to use the |U| encoding.
-% \changes{v1.6}{2005/03/03}{\textsf{utf8accents} is no longer loaded
-% by this package!}
-% \begin{macrocode}
-\def\zf@enc{U}
-%\RequirePackage[\zf@enc]{fontenc}
-\renewcommand\encodingdefault{\zf@enc}
-% \end{macrocode}
-% \DescribeMacro{\define@key}\DescribeMacro{\setkeys} The \pkg{keyval}
-% package makes processing comma separated inputs very simple with the
-% \cs{define@key} and \cs{setkeys} commands:
-% \begin{itemize}
-% \item \cmd{\define@key}\marg{family}\marg{option}\marg{commands
-% to process}
-% \item \cmd{\setkeys}\marg{family}\marg{input list}
-% \end{itemize}
-% \cmd{\define@key} is used to define each \meta{option}, grouped by
-% \meta{family}, each of which executes its \meta{commands to process}
-% when it is included in an \meta{input list} in a call to
-% \cmd{\setkeys}.
-% \begin{macrocode}
-\RequirePackage{keyval}
-% \end{macrocode}
-%
-% A typical example of what happens when this package runs various
-% user commands is outlined below. I'll find some better way of
-% slotting it into the real documentation sometime in the future.
-%
-% \begin{enumerate}
-% \item The commands
-% \begin{Verbatim}[gobble=8]
-% \defaultfontfeatures{Numbers=OldStyle}
-% \fontspec[Ligatures=Rare]{Warnock Pro}
-% \end{Verbatim}
-% \item are equivalent to
-% \begin{Verbatim}[gobble=8]
-% \fontspec[Numbers=OldStyle,%
-% Ligatures=Rare]{Warnock Pro}
-% \end{Verbatim}
-% \item which produces the font family
-% \begin{Verbatim}[gobble=8]
-% WarnockPro+onum+dlig
-% \end{Verbatim}
-% (for use with \cs{fontfamily{}}, \etc)
-% \item which, in \cs{csname...}\cs{endcsname}, gives
-% \begin{Verbatim}[gobble=8]
-% {Numbers=OldStyle,Ligatures=Rare}%
-% {Warnock Pro}
-% \end{Verbatim}
-% \item This is used by
-% \begin{Verbatim}[gobble=8]
-% \addfontfeature{Color=CC0000}
-% \end{Verbatim}
-% \item which is in this case equivalent to
-% \begin{Verbatim}[gobble=8]
-% \fontspec[Numbers=OldStyle,%
-% Ligatures=Rare,%
-% Color=CC0000]{Warnock Pro}
-% \end{Verbatim}
-% \item and the process starts again.
-% \end{enumerate}
-%
-% \subsection{User commands}\label{sec:codeuser}
-%
-%
-% This section contains the definitions of the commands detailed in
-% the user documentation. Only the `top level' definitions of the
-% commands are contained herein; they all use or define macros which
-% are defined or used later on in \vref{sec:codeinternal}.
-%
-%
-% \subsubsection{Font selection}
-% \begin{macro}{\fontspec}
-% This is the main command of the package that
-% selects fonts with various features. It takes two arguments: the
-% Mac OS X font name and the optional requested features of that
-% font. It simply runs \cs{zf@fontspec}, which takes the same
-% arguments as the top level macro and puts the new-fangled font
-% family name into the global \cmd{\zf@family}. Then this new font
-% family is selected.
-%
-% \changes{v1.6}{2005/01/25}{Removed \cs{zf@currfont} (unnecessary)}
-%
-% \begin{macrocode}
-\newcommand*\fontspec[2][]{%
- \zf@fontspec{#1}{#2}%
- \fontfamily\zf@family\selectfont}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\setromanfont}
-%
-% \changes{v1.1}{2004/10/18}{Implemented (with friends).}
-% \changes{v1.6}{2005/01/25}{Changed \cs{rmdefault}, etc., assigning
-% to use \cs{let} directly.}
-%
-% \begin{macro}{\setsansfont} \begin{macro}{\setmonofont}
-%
-% The following three macros perform equivalent operations setting
-% the default font (using \cs{let} rather than \cs{renewcommand}
-% because \cs{zf@family} will change in the future) for a
-% particular family: roman, sans serif, or typewriter
-% (monospaced). I end them with |\normalfont| so that if they're
-% used in the document, the change registers immediately.
-% \begin{macrocode}
-\newcommand*\setromanfont[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\rmdefault\zf@family
- \normalfont}
-\newcommand*\setsansfont[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\sfdefault\zf@family
- \normalfont}
-\newcommand*\setmonofont[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\ttdefault\zf@family
- \normalfont}
-% \end{macrocode}
-% \end{macro} \end{macro} \end{macro}
-%
-% \begin{macro}{\setmathrm}
-%
-% \changes{v1.8}{2005/07/04}{Implemented (with friends).}
-%
-% \begin{macro}{\setmathsf} \begin{macro}{\setboldmathrm} \begin{macro}{\setmathtt}
-%
-% These commands are analogous to \cmd\setromanfont\ and others,
-% but for selecting the font used for \cmd\mathrm, \etc. They
-% can only be used in the preamble of the
-% document. \cmd\setboldmathrm\ is used for specifying which
-% fonts should be used in \cmd\boldmath.
-%
-% \begin{macrocode}
-\newcommand*\setmathrm[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\zf@rmmaths\zf@family}
-\newcommand*\setboldmathrm[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\zf@rmboldmaths\zf@family}
-\newcommand*\setmathsf[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\zf@sfmaths\zf@family}
-\newcommand*\setmathtt[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\zf@ttmaths\zf@family}
-\@onlypreamble\setmathrm
-\@onlypreamble\setboldmathrm
-\@onlypreamble\setmathsf
-\@onlypreamble\setmathtt
-% \end{macrocode}
-% If the commands above are not executed, then \cmd\rmdefault\ (etc.)
-% will be used.
-% \begin{macrocode}
-\def\zf@rmmaths{\rmdefault}
-\def\zf@sfmaths{\sfdefault}
-\def\zf@ttmaths{\ttdefault}
-% \end{macrocode}
-% \end{macro} \end{macro} \end{macro} \end{macro}
-%
-%
-%
-% \begin{macro}{\newfontinstance}
-% \changes{v1.6}{2005/01/02}{Implemented.}
-%
-% This macro takes the arguments of \cs{fontspec} with a prepended
-% \meta{instance cmd} (code for middle optional argument generated
-% by \name{Scott Pakin}'s \textsf{newcommand.py}). This command is used
-% when a specific font instance needs to be referred to repetitively
-% (\eg, in a section heading) since continuously calling
-% \cs{zf@fontspec} is inefficient because it must parse the
-% option arguments every time.
-%
-% \cs{zf@fontspec} defines a font family and saves its name in
-% \cs{zf@family}. So then this value is expanded in a temporary
-% macro also containing the \emph{unexpanded} commands to later
-% select the font family to which it refers. Finally, the requested
-% name for the font instance is \cs{let}ed from the temporary macro.
-%
-% \begin{macrocode}
-\newcommand*\newfontinstance[1]{%
- \@ifnextchar[{\newfontinstance@i#1}{\newfontinstance@i#1[]}}
-\def\newfontinstance@i#1[#2]#3{%
- \zf@fontspec{#2}{#3}%
- \edef\zf@tempinst{\noexpand\fontfamily{\zf@family}\noexpand\selectfont}%
- \let#1\zf@tempinst}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Font feature selection}
-%
-% \begin{macro}{\defaultfontfeatures}
-%
-% \changes{v1.3}{2004/10/25}{Implemented.}
-% \changes{v1.4}{2004/11/25}{Name changed from \cs{setdefaultoptions}.}
-%
-% \begin{macro}{\zf@default@options}
-%
-% This macro takes one argument that consists of all of feature
-% options that will be applied by default to all subsequent
-% \cs{fontspec}, et al., commands. It stores its value in
-% \cs{zf@default@options} (initialised empty), which is
-% concatenated with the individual macro choices in the
-% \cs{zf@get@feature@requests} macro.
-%
-% \begin{macrocode}
-\newcommand*\defaultfontfeatures[1]{\def\zf@default@options{#1}}
-\let\zf@default@options\@empty
-% \end{macrocode}
-% \end{macro} \end{macro}
-%
-%
-%
-% \begin{macro}{\addfontfeatures}
-%
-% In order to be able to extend the feature selection of
-% a given font, two things need to be known: the currently selected
-% features, and the currently selected font. Every time a font
-% family is creating, this information is saved inside a control
-% sequence with the name of the font family itself.
-%
-% This macro extracts this information, then appends the requested
-% font features to add to the already existing ones, and calls the
-% font again with the top level \cs{fontspec} command.
-%
-% The default options are \emph{not} applied (which is why they're
-% saved and restored with \cs{zf@default@options@old}), so this
-% means that the only added features to the font are strictly those
-% specified by this command.
-%
-% \cs{addfontfeature} is defined as an alias, as I found that I
-% often typed this instead when adding only a single font feature.
-%
-% \changes{v1.5}{2004/11/29}{Implemented.}
-% \changes{v1.6}{2005/02/03}{Removed \cs{relax}ing of temporary macros.}
-%
-% \begin{macrocode}
-\newcommand*\addfontfeatures[1]{%
- \let\zf@default@options@old\zf@default@options
- \let\zf@default@options\@empty
- \edef\zf@thisinfo{\csname\f@family\endcsname}%
- \fontspec
- [\expandafter\@firstoftwo\zf@thisinfo, #1]%
- {\expandafter\@secondoftwo\zf@thisinfo}%
- \let\zf@default@options\zf@default@options@old}
-\let\addfontfeature\addfontfeatures
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Defining new font features}
-%
-%
-% \begin{macro}{\newfontfeature}
-% \changes{v1.3}{2004/10/25}{Implemented.}
-% \changes{v1.6}{2005/01/25}{\textsf{newff} counter now uses LaTeX
-% methods rather than primitive TeX. I don't know if there is any
-% advantage to this.}
-%
-% \cs{newfontfeature} takes two arguments: the name of the feature
-% tag by which to reference it, and the string that is used to
-% select the font feature. It uses a counter to keep track of the
-% number of new features introduced; every time a new feature is
-% defined, a control sequence is defined made up of the
-% concatenation of |+zf-| and the new feature tag. This long-winded
-% control sequence is then called upon to update the font family
-% string when a new instance is requested.
-% \begin{macrocode}
-\newcounter{newff}
-\newcommand*\newfontfeature[2]{%
- \stepcounter{newff}%
- \expandafter\edef\csname +zf-#1\endcsname{+zf-\thenewff}%
- \define@key{zf}{#1}[]{%
- \zf@update@family{\csname +zf-#1\endcsname}%
- \zf@update@ff{#2}}}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\newfeaturecode}
-% \changes{v1.3}{2004/10/25}{Implemented.} This is similar to
-% above, but simply defines a new AAT feature code (second two
-% arguments) with a new name (first argument). Maybe I should just
-% give users access to the \cs{zf@make@feature} command?
-% \begin{macrocode}
-\newcommand*\newfeaturecode[3]{%
- \define@key{zf}{#1}[]{\zf@make@feature{#2}{#3}{}}}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Internal macros}\label{sec:codeinternal}
-%
-%
-% \begin{macro}{\zf@fontspec}
-% This is the command that defines font families for use. Given a
-% list of font features (|#1|, stored in \cs{zf@options} for
-% \cs{zf@get@feature@requests}) for a requested font (|#2|, stored
-% in \cs{zf@macname} globally for the \cs{zf@set@font@type} and
-% \cs{zf@make@aat@feature@string} macros), it will define an NFSS
-% family for that font and put the family name into \cs{zf@family}.
-%
-% Then we check with \cs{zf@set@font@type} whether the font is AAT
-% or OpenType, and convert the requested features to font definition
-% strings. This is performed with \cs{zf@get@feature@requests}, in
-% which \cs{setkeys} retrieves the requested font features and
-% processes them. To build up the complex family name, it
-% concatenates each font feature with the family name of the
-% font. So since \cs{setkeys} is run more than once (since different
-% font faces may have different feature names), we only want the
-% complex family name to be built up once, hence the \cs{zf@firsttime}
-% conditionals.
-%
-% \changes{v1.7}{2005/03/22}{Optional argument now mandatory.}
-%
-% \begin{macrocode}
-\newcommand*\zf@fontspec[2]{%
- \edef\zf@options{#1}%
- \edef\zf@macname{#2}%
- \edef\zf@family{\zap@space #2 \@empty}%
- \zf@set@font@type{#2}%
- \zf@firsttimetrue
- \zf@get@feature@requests
- \zf@firsttimefalse
-% \end{macrocode}
-% Now that we have the complex family name, we
-% can check to see if the family has already been defined, and if not,
-% do so. Once the family name is created, save \emph{in} it the user
-% string of the requested options and font name for use with
-% \cs{addfontfeatures} (this info is separately braced for easy
-% extraction with the \cs{@first-} and \cs{@secondoftwo} commands).
-%
-% \cs{zf@current@options} is the option list prepended by the default
-% option list, if any.
-%
-% \changes{v1.5}{2004/12/01}{Checks if the font family has already
-% been defined.}
-% \changes{v1.6}{2005/01/25}{Writes some info to the \texttt{.log} file}
-%
-% \begin{macrocode}
- \expandafter\ifx\csname\zf@family\endcsname\relax
- \wlog{fontspec: Defining font family for "#2"
- with options [\zf@current@options]}%
- \edef\zf@info{{\zf@current@options}{#2}}%
- \expandafter\let\csname\zf@family\endcsname\zf@info
-% \end{macrocode}
-% Next the font family and its shapes are defined in the NFSS.
-%
-% All NFSS specifications take their default values, so if any of them
-% are redefined, the shapes will be selected to fit in with the
-% current state. For example, if \cs{bfdefault} is redefined to |b|, all
-% bold shapes defined by this package will also be assigned to |b|.
-%
-% \changes{v1.5}{2004/11/29}
-% {NFSS specifiers now take the default values.}
-%
-% \changes{v1.5}{2004/11/29}
-% {Added code for choosing arbitrary bold/italic fonts.}
-%
-% \changes{v1.6}{2005/02/09}
-% {Added code for choosing arbitrary bold/italic font features.}
-%
-% \changes{v1.7}{2005/03/22}
-% {More documentation of the code and some extra braces removed.}
-%
-% The macros \cs{zf@bf}, et al., are used to store the name of the
-% custom bold, et al., font, if requested as user options. If they are
-% empty, the default fonts are used.
-%
-% First we define the font family and define the normal shape: (the
-% specified options are used implicitly)
-% \begin{macrocode}
- \DeclareFontFamily{\zf@enc}{\zf@family}{}%
- \zf@make@font@shapes{#2}{\mddefault}{\updefault}%
-% \end{macrocode}
-% Secondly, bold. Start out by saving the current font features and
-% appending to them, if any, the extra bold options defined with
-% \feat{BoldFeatures}. Then, the bold font is defined either as the ATS
-% default (\cs{zf@make@font@shapes}' optional argument is to check if
-% there actually is one; if not, the bold NFSS series is left
-% undefined) or with the font specified with the \feat{BoldFont} feature.
-% \begin{macrocode}
- \let\zf@options@old\zf@options
- \def\zf@options{\zf@options@old,\zf@bf@options}%
- \ifx\zf@bf\@empty
- \zf@make@font@shapes[#2]{#2/B}{\bfdefault}{\updefault}%
- \else
- \zf@make@font@shapes\zf@bf\bfdefault\updefault
- \fi
- \let\zf@options\zf@options@old
-% \end{macrocode}
-% And italic in the same way:
-% \begin{macrocode}
- \let\zf@options@old\zf@options
- \def\zf@options{\zf@options@old,\zf@it@options}%
- \ifx\zf@it\@empty
- \zf@make@font@shapes[#2]{#2/I}{\mddefault}{\itdefault}%
- \else
- \zf@make@font@shapes\zf@it\mddefault\itdefault
- \fi
- \let\zf@options\zf@options@old
-% \end{macrocode}
-% If requested, the custom fonts take precedence when choosing the
-% bold italic font. When both italic and bold fonts are requested and
-% the bold italic font hasn't been explicitly specified (a rare
-% occurance, presumably), the new bold font is used to define the new
-% bold italic font.
-%
-% \begin{macrocode}
- \let\zf@options@old\zf@options
- \def\zf@options{\zf@options@old,\zf@bfit@options}%
- \ifx\zf@bfit\@empty
- \ifx\zf@bf\@empty
- \ifx\zf@it\@empty
- \zf@make@font@shapes[#2]{#2/BI}{\bfdefault}{\itdefault}%
- \else
- \zf@make@font@shapes[\zf@it]{\zf@it/B}{\bfdefault}{\itdefault}%
- \fi
- \else
- \zf@make@font@shapes[\zf@bf]{\zf@bf/I}{\bfdefault}{\itdefault}%
- \fi
- \else
- \zf@make@font@shapes\zf@bfit\bfdefault\itdefault
- \fi
- \let\zf@options\zf@options@old
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Fonts}
-%
-% \begin{macro}{\zf@set@font@type}
-% This macro sets \cs{zf@aat} or \cs{zf@opentype} booleans
-% accordingly depending if the font in \cs{zf@macname} is an AAT
-% font or an OpenType font, respectively.
-% \changes{v1.7}{2005/04/18}{Removed exclusivity from font type
-% (AAT, OpenType) check, since fonts can be both.}
-% \changes{v1.7}{2005/06/18}{Added `MM' font type; tests true, \eg,
-% with Skia \& Minion MM. Used with the \feat{OpticalSize}
-% feature.}
-% \changes{v1.7}{2005/06/18}{Removed various \cmd{\count255}s;
-% replaced by \cmd\expandafter s directly in the conditionals.}
-% \begin{macrocode}
-\newcommand*\zf@set@font@type[1]{%
- \font\zf@testfont = "#1" at 10pt
- \zf@aatfalse \zf@opentypefalse \zf@mmfalse
- \expandafter\ifnum\XeTeXcountfeatures\zf@testfont > 0
- \zf@aattrue
- \fi
- \expandafter\ifnum\XeTeXOTcountscripts\zf@testfont > 0
- \zf@opentypetrue
- \fi
- \expandafter\ifnum\XeTeXcountvariations\zf@testfont > 0
- \zf@mmtrue
- \fi}
-\newif\ifzf@aat \newif\ifzf@opentype \newif\ifzf@mm
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\zf@make@font@shapes}
-% This macro uses \cs{DeclareFontShape} to define the font shape in
-% question. It is necessary to wrap the whole thing in
-% \cs{nfss@catcodes} so that the scale factor works. This
-% necessitates |\globaldefs=1| so the macro is visible to the rest
-% of the package. The mandatory arguments are: |#2|~the font name,
-% |#3|~the font series, and |#4|~the font shape. The optional
-% argument is used when making the font shapes for bold, italic, and
-% bold italic fonts using \XeTeX's auto-recognition with |/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.
-%
-% \changes{v1.5}{2004/11/29}{Absorbed font-checking from \cs{zf@fontspec}.}
-% \changes{v1.7}{2005/03/22}{Changed some \cs{edef}s to \cs{let}.}
-% \changes{v1.7}{2005/04/02}{Support for the \feat{OpticalSize} feature.}
-%
-% \begin{macrocode}
-\begingroup
- \nfss@catcodes
- \globaldefs=1
- \newcommand*\zf@make@font@shapes[4][]{%
- \ifEqFonts{#1}{#2}\then\else
- \edef\zf@macname{#2}%
- \zf@get@feature@requests
- \ifx\zf@scale\@empty
- \let\zf@scale@str\@empty
- \else
- \edef\zf@scale@str{s*[\zf@scale]}%
- \fi
- \DeclareFontShape{\zf@enc}{\zf@family}{#3}{#4}%
- {<-> \zf@scale@str "#2\zf@suffix:\zf@ff"}{}%
-% \end{macrocode}
-% Next, the small caps are defined. \cs{zf@test@smallcaps} 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}
- \zf@test@smallcaps
- \ifx\zf@smallcaps\@empty\else
- \ifx #4\updefault
- \let\zf@scshape\scdefault
- \fi
- \ifx #4\itdefault
- \let\zf@scshape\sidefault
- \fi
- \DeclareFontShape
- {\zf@enc}{\zf@family}{#3}{\zf@scshape}%
- {<-> \zf@scale@str "#2\zf@suffix:\zf@ff\zf@smallcaps"}{}%
- \fi
- \fi}
-\endgroup
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\zf@update@family}
-% This macro is used to build up a complex family name based on its
-% features.
-%
-% \cmd{\zf@firsttime} is set true in \cmd{\zf@fontspec} only the first
-% time \cmd{zf@get@feature@requests} is called, so that the family
-% name is only created once.
-% \begin{macrocode}
-\newcommand*{\zf@update@family}[1]{%
- \ifzf@firsttime
- \g@addto@macro\zf@family{#1}%
- \fi}
-\newif\ifzf@firsttime
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Features}
-%
-% \begin{macro}{\zf@get@feature@requests}
-% This macro is a wrapper for |\setkeys| which expands and adds a
-% default specification to the original passed options. It begins by
-% initialising the commands used to hold font-feature specific
-% strings.
-%
-% \changes{v1.6}{2005/01/25}{Removed the space between the comma and
-% \cs{zf@options} when it's concatenated with the defaults. This
-% fixes that bug in the big Apple Chancery example.}
-%
-% \begin{macrocode}
-\newcommand*\zf@get@feature@requests{%
- \ifzf@firsttime
- \let\zf@scale \@empty
- \let\zf@suffix \@empty
- \let\zf@bf \@empty
- \let\zf@it \@empty
- \let\zf@bfit \@empty
- \let\zf@bf@options \@empty
- \let\zf@it@options \@empty
- \let\zf@bfit@options\@empty
- \fi
- \let\zf@ff\@empty
- \ifx\zf@default@options\@empty
- \let\zf@current@options\zf@options
- \else
- \edef\zf@current@options{\zf@default@options,\zf@options}%
- \fi
- \edef\zf@process@options
- {\noexpand\setkeys{zf}{\zf@current@options}}%
- \zf@process@options}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\zf@test@smallcaps}
-%
-% This macro checks if the font contains small caps, and if so
-% creates the string for accessing them in |\zf@smallcaps|. The
-% OpenType portion of this macro has been adapted/stolen from
-% \name{Jonathan Kew}'s osxfonts.sty package.
-%
-% \changes{v1.7}{2005/03/27}
-% {Accommodation of the \cs{zf@thisfontfeature} change.}
-%
-% \begin{macrocode}
-\newcommand*\zf@test@smallcaps{%
- \let\zf@smallcaps\@empty
- \ifzf@aat
- \zf@make@aat@feature@string{3}{3}%
- \ifx\zf@thisfontfeature\@empty\else
- \edef\zf@smallcaps{\zf@thisfontfeature;}%
- \fi
- \fi
- \ifzf@opentype
- \font\zf@testfont="\zf@macname" at 10pt
- \count255 = \XeTeXOTcountscripts\zf@testfont
- \ifnum\count255 > 0
- \count255 = 0
- \zf@featurecount = \XeTeXOTcountfeatures\zf@testfont "6C61746E "0
- \loop\ifnum\count255 < \zf@featurecount
- \ifnum\XeTeXOTfeaturetag\zf@testfont "6C61746E "0
- \count255 = "736D6370 % 'smcp'
- \edef\zf@smallcaps{+smcp,}%
- \count255 = \zf@featurecount
- \else
- \advance\count255 by 1
- \fi
- \repeat
- \fi
- \fi}
-\newcount\zf@featurecount
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\zf@update@ff}
-%
-% \cmd{\zf@ff} is the string used to define the list of specific
-% font features. Each time another font feature is requested, this
-% macro is used to add that feature to the list. AAT features are
-% separated by semicolons, OpenType features by commas.
-%
-%
-% \changes{v1.7}{2005/05/30}{Fix for featureless fonts (\eg, the MS
-% fonts) being ignored.}
-%
-% \begin{macrocode}
-\newcommand*\zf@update@ff[1]{%
- \begingroup
- \def\zf@feature@separator{;}%
- \ifzf@opentype
- \def\zf@feature@separator{,}%
- \fi
- \let\@tempa\zf@ff
- \xdef\zf@ff{\@tempa #1\zf@feature@separator}%
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\zf@make@feature}
-%
-% This macro is called by each feature key selected, and runs
-% according to which type of font is selected. Note that it does not
-% check to see if an OpenType feature exists.
-%
-% \changes{v1.7}{2005/03/27}{Accommodation of the
-% \cs{zf@thisfontfeature} change.}
-%
-% \begin{macrocode}
-\newcommand*\zf@make@feature[3]{%
- \ifzf@aat
- \zf@make@aat@feature@string{#1}{#2}%
- \ifx\zf@thisfontfeature\@empty\else
- \zf@update@family{+#1,#2}%
- \zf@update@ff\zf@thisfontfeature
- \fi
- \fi
- \ifzf@opentype
- \zf@update@family{#3}%
- \zf@update@ff{#3}%
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\zf@define@font@feature}
-% \begin{macro}{\zf@define@feature@option}
-%
-% These macros are used in order to simplify font feature definition
-% later on. \cs{aliasfeature} works for features defined with
-% \cs{zf@define@font@feature}, but that's it for now. It remains as
-% a reminder for me to get it working for all features.
-%
-% \changes{v1.7}{2005/03/27}{Implemented for the bulk of the feature
-% processing code.}
-%
-% \begin{macrocode}
-\newcommand*\zf@define@font@feature[1]{%
- \define@key{zf}{#1}{{\setkeys{zf@feat@#1}{##1}}}}
-\newcommand*\zf@define@feature@option[5]{%
- \define@key{zf@feat@#1}{#2}[]{\zf@make@feature{#3}{#4}{#5}}}
-\newcommand*\aliasfeature[2]{%
- \define@key{zf}{#2}{{\setkeys{zf@feat@#1}{##1}}}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\zf@make@aat@feature@string}
-%
-% This macro takes the numerical codes for a font feature and
-% creates a specified macro containing the string required in the
-% font definition to turn that feature on or off. Used primarily in
-% |\zf@make@aat@feature|, but also used to check if small caps
-% exists in the requested font.
-%
-% \changes{v1.7}{2005/03/22}{Changed some \cs{edef}s to \cs{let}}
-% \changes{v1.7}{2005/03/27}{Removed third argument; always saves
-% the feature string in \cs{zf@thisfontfeature}}
-%
-% \begin{macrocode}
-\newcommand*\zf@make@aat@feature@string[2]{%
- \font\zf@fontone="\zf@macname" at 10pt
- \edef\zf@this@featurename{\XeTeXfeaturename\zf@fontone #1}%
- \ifx\zf@this@featurename\@empty
- \let\zf@thisfontfeature\@empty
- \else
- \edef\zf@this@selectionname{\XeTeXselectorname\zf@fontone #1 #2}%
- \ifx\zf@this@selectionname\@empty
- \let\zf@thisfontfeature\@empty
- \else
- \edef\zf@thisfontfeature{%
- \ifnum\XeTeXisexclusivefeature\zf@fontone #1 > 0
- \zf@this@featurename=\zf@this@selectionname
- \else
- \ifodd #2
- \zf@this@featurename=!\zf@this@selectionname
- \else
- \zf@this@featurename=\zf@this@selectionname
- \fi
- \fi}%
- \fi
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\ifEqStr}
-%
-% \cs{ifEqStr} was a conditional
-% for checking it two strings are the same. It no longer exists.
-%
-% \changes{v1.6}{2005/02/25}{Removed entirely from
-% code. \textsf{keyval} \cs{setkeys} used instead.}
-%
-% \end{macro}
-%
-%
-% \begin{macro}{\ifEqFonts}
-%
-% A conditional for checking if two fonts are the same. If one of the
-% arguments is empty, special provision needs to be taken, since
-% there is no font with an empty string for a name. This case arises
-% when \cs{zf@make@font@shapes} doesn't take its optional argument.
-%
-% \changes{v1.5}{2004/11/29}{Added check for empty font.}
-% \changes{v1.7}{2005/03/22}{Removed some redundant code.}
-%
-% \begin{macrocode}
-\let\then\iftrue
-\def\ifEqFonts#1#2\then{%
- \ifx#1\@empty\else
- \font\zf@fontone = "#1" at 10pt
- \edef\@tempa{\fontname\zf@fontone}%
- \fi
- \font\zf@fonttwo = "#2" at 10pt
- \edef\@tempb{\fontname\zf@fonttwo}%
- \ifx\@tempa\@tempb}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-% \subsection{\pkg{keyval} definitions}
-%
-% This is the tedious section where we correlate all possible
-% (eventually) font feature requests with their \XeTeX\ representations.
-%
-% \subsubsection{Bold/italic choosing options}
-%
-% The \opt{Bold}, \opt{Italic}, and \opt{BoldItalic}
-% features are for defining explicitly the bold and italic fonts used
-% in a font family. \textsf{v1.6} introduced arbitrary font features
-% for these shapes (\opt{BoldFeatures}, etc.), so the names of the
-% shape-selecting options were appended with \opt{Font} for
-% consistency.
-%
-% \changes{v1.5}{2004/11/29}
-% {New options for arbitrary bold/italic shapes.}
-%
-% \changes{v1.6}{2005/02/09}
-% {\opt{Bold} option aliased to \opt{BoldFont}}
-%
-% \changes{v1.7}{2005/04/02}
-% {Some \cs{edef}s replaced with \cs{def} in the font feature processing}
-%
-% \begin{macrocode}
-\define@key{zf}{Bold}{%
- \def\zf@bf{#1}%
- \zf@update@family{bf:\zap@space #1 \@empty}}
-\define@key{zf}{Italic}{%
- \def\zf@it{#1}%
- \zf@update@family{it:\zap@space #1 \@empty}}
-\define@key{zf}{BoldItalic}{%
- \def\zf@bfit{#1}%
- \zf@update@family{bfit:\zap@space #1 \@empty}}
-\define@key{zf}{BoldFont}{%
- \def\zf@bf{#1}%
- \zf@update@family{bf:\zap@space #1 \@empty}}
-\define@key{zf}{ItalicFont}{%
- \def\zf@it{#1}%
- \zf@update@family{it:\zap@space #1 \@empty}}
-\define@key{zf}{BoldItalicFont}{%
- \def\zf@bfit{#1}%
- \zf@update@family{bfit:\zap@space #1 \@empty}}
-
-\define@key{zf}{BoldFeatures}{%
- \def\zf@bf@options{#1}%
- \zf@update@family{bffeat:\zap@space #1 \@empty}}
-\define@key{zf}{ItalicFeatures}{%
- \def\zf@it@options{#1}%
- \zf@update@family{itfeat:\zap@space #1 \@empty}}
-\define@key{zf}{BoldItalicFeatures}{%
- \def\zf@bfit@options{#1}%
- \zf@update@family{bfitfeat:\zap@space #1 \@empty}}
-% \end{macrocode}
-%
-% \subsubsection{Font-independent options}
-%
-% These options can be applied to any font. Both spellings (American
-% and correct) of `colour' offered.
-% \changes{v1.2}{2004/10/22}{Support for \feat{Scale}.}
-% \changes{v1.3}{2004/10/25}{Support for \feat{Mapping} and \feat{Colour}.}
-% \changes{v1.6}{2005/01/04}{\feat{Scale} feature now updates family name.}
-%
-% \begin{macrocode}
-\define@key{zf}{Scale}{%
- \zf@update@family{+scale:#1}%
- \edef\zf@scale{#1}}
-\define@key{zf}{Colour}{%
- \zf@update@family{+col:#1}%
- \zf@update@ff{color=#1}}
-\define@key{zf}{Color}{%
- \zf@update@family{+col:#1}%
- \zf@update@ff{color=#1}}
-\define@key{zf}{Mapping}{%
- \zf@update@family{+map:#1}%
- \zf@update@ff{mapping=#1}}
-% \end{macrocode}
-%
-%
-% \subsubsection{Continuous font axes}
-%
-% \changes{v1.4}{2004/11/25}{Support for \opt{Weight} and \opt{Width}
-% AAT features.}
-% \changes{v1.7}{2005/04/18}{Removed AAT check for weight/width axes
-% (could also be Multiple Master)}
-% \changes{v1.7}{2005/04/02}{New feature: \feat{OpticalSize}; works
-% with both OpenType and MM fonts.}
-%
-% \begin{macrocode}
-\define@key{zf}{Weight}{%
- \zf@update@family{+weight:#1}%
- \zf@update@ff{weight=#1}}
-\define@key{zf}{Width}{%
- \zf@update@family{+width:#1}%
- \zf@update@ff{width=#1}}
-\define@key{zf}{OpticalSize}{%
- \ifzf@opentype
- \g@addto@macro\zf@suffix{/S=#1}%
- \zf@update@family{+size:#1}
- \fi
- \ifzf@mm
- \zf@update@family{+size:#1}%
- \zf@update@ff{optical size=#1}
- \fi
- \ifzf@opentype\else
- \ifzf@mm\else
- \ifzf@firsttime
- \PackageWarning{fontspec}{\zf@macname doesn't appear to have an Optical Size axis}
- \fi
- \fi
- \fi}
-% \end{macrocode}
-%
-% \subsubsection{OpenType script and language}\label{sec:ot-features}
-% \changes{v1.6}{2005/02/28}{New OpenType feature: \opt{Script}}
-% \changes{v1.6}{2005/03/02}{New OpenType feature: \opt{Language}}
-%
-% \begin{macrocode}
-\define@key{zf}{Script}{\ifzf@opentype\bgroup\setkeys{zf@scpt}{#1}\egroup\fi}
-\newcommand*\zf@make@scpt@feature[2]{%
- \define@key{zf@scpt}{#1}[]{%
- \zf@update@family{+scpt:#2}%
- \zf@update@ff{script=#2}}}
-\zf@make@scpt@feature{Arabic}{arab}
-\zf@make@scpt@feature{Armenian}{armn}
-\zf@make@scpt@feature{Balinese}{bali}
-\zf@make@scpt@feature{Bengali}{beng}
-\zf@make@scpt@feature{Bopomofo}{bopo}
-\zf@make@scpt@feature{Braille}{brai}
-\zf@make@scpt@feature{Buginese}{bugi}
-\zf@make@scpt@feature{Buhid}{buhd}
-\zf@make@scpt@feature{Byzantine Music}{byzm}
-\zf@make@scpt@feature{Canadian Syllabics}{cans}
-\zf@make@scpt@feature{Cherokee}{cher}
-\zf@make@scpt@feature{CJK}{hani}
-\zf@make@scpt@feature{CJK Ideographic}{hani}
-\zf@make@scpt@feature{Coptic}{copt}
-\zf@make@scpt@feature{Cypriot Syllabary}{cprt}
-\zf@make@scpt@feature{Cyrillic}{cyrl}
-\zf@make@scpt@feature{Default}{DFLT}
-\zf@make@scpt@feature{Deseret}{dsrt}
-\zf@make@scpt@feature{Devanagari}{deva}
-\zf@make@scpt@feature{Ethiopic}{ethi}
-\zf@make@scpt@feature{Georgian}{geor}
-\zf@make@scpt@feature{Glagolitic}{glag}
-\zf@make@scpt@feature{Gothic}{goth}
-\zf@make@scpt@feature{Greek}{grek}
-\zf@make@scpt@feature{Gujarati}{gujr}
-\zf@make@scpt@feature{Gurmukhi}{guru}
-\zf@make@scpt@feature{Hangul Jamo}{jamo}
-\zf@make@scpt@feature{Hangul}{hang}
-\zf@make@scpt@feature{Hanunoo}{hano}
-\zf@make@scpt@feature{Hebrew}{hebr}
-\zf@make@scpt@feature{Hiragana and Katakana}{kana}
-\zf@make@scpt@feature{Kana}{kana}
-\zf@make@scpt@feature{Javanese}{java}
-\zf@make@scpt@feature{Kannada}{knda}
-\zf@make@scpt@feature{Kharosthi}{khar}
-\zf@make@scpt@feature{Khmer}{khmr}
-\zf@make@scpt@feature{Lao}{lao }
-\zf@make@scpt@feature{Latin}{latn}
-\zf@make@scpt@feature{Limbu}{limb}
-\zf@make@scpt@feature{Linear B}{linb}
-\zf@make@scpt@feature{Malayalam}{mlym}
-\zf@make@scpt@feature{Math}{math}
-\zf@make@scpt@feature{Maths}{math}
-\zf@make@scpt@feature{Mongolian}{mong}
-\zf@make@scpt@feature{Musical Symbols}{musc}
-\zf@make@scpt@feature{Myanmar}{mymr}
-\zf@make@scpt@feature{N'ko}{nko }
-\zf@make@scpt@feature{Ogham}{ogam}
-\zf@make@scpt@feature{Old Italic}{ital}
-\zf@make@scpt@feature{Old Persian Cuneiform}{xpeo}
-\zf@make@scpt@feature{Oriya}{orya}
-\zf@make@scpt@feature{Osmanya}{osma}
-\zf@make@scpt@feature{Phags-pa}{phag}
-\zf@make@scpt@feature{Phoenician}{phnx}
-\zf@make@scpt@feature{Runic}{runr}
-\zf@make@scpt@feature{Shavian}{shaw}
-\zf@make@scpt@feature{Sinhala}{sinh}
-\zf@make@scpt@feature{Sumero-Akkadian Cuneiform}{xsux}
-\zf@make@scpt@feature{Syloti Nagri}{sylo}
-\zf@make@scpt@feature{Syriac}{syrc}
-\zf@make@scpt@feature{Tagalog}{tglg}
-\zf@make@scpt@feature{Tagbanwa}{tagb}
-\zf@make@scpt@feature{Tai Le}{tale}
-\zf@make@scpt@feature{Tai Lu}{talu}
-\zf@make@scpt@feature{Tamil}{taml}
-\zf@make@scpt@feature{Telugu}{telu}
-\zf@make@scpt@feature{Thaana}{thaa}
-\zf@make@scpt@feature{Thai}{thai}
-\zf@make@scpt@feature{Tibetan}{tibt}
-\zf@make@scpt@feature{Tifinagh}{tfng}
-\zf@make@scpt@feature{Ugaritic Cuneiform}{ugar}
-\zf@make@scpt@feature{Yi}{yi }
-
-\define@key{zf}{Language}{\ifzf@opentype\bgroup\setkeys{zf@lang}{#1}\egroup\fi}
-\newcommand*\zf@make@lang@feature[2]{%
- \define@key{zf@lang}{#1}[]{%
- \zf@update@family{+lang:#2}%
- \zf@update@ff{language=#2}}}
-\zf@make@lang@feature{Abaza}{ABA}
-\zf@make@lang@feature{Abkhazian}{ABK}
-\zf@make@lang@feature{Adyghe}{ADY}
-\zf@make@lang@feature{Afrikaans}{AFK}
-\zf@make@lang@feature{Afar}{AFR}
-\zf@make@lang@feature{Agaw}{AGW}
-\zf@make@lang@feature{Altai}{ALT}
-\zf@make@lang@feature{Amharic}{AMH}
-\zf@make@lang@feature{Arabic}{ARA}
-\zf@make@lang@feature{Aari}{ARI}
-\zf@make@lang@feature{Arakanese}{ARK}
-\zf@make@lang@feature{Assamese}{ASM}
-\zf@make@lang@feature{Athapaskan}{ATH}
-\zf@make@lang@feature{Avar}{AVR}
-\zf@make@lang@feature{Awadhi}{AWA}
-\zf@make@lang@feature{Aymara}{AYM}
-\zf@make@lang@feature{Azeri}{AZE}
-\zf@make@lang@feature{Badaga}{BAD}
-\zf@make@lang@feature{Baghelkhandi}{BAG}
-\zf@make@lang@feature{Balkar}{BAL}
-\zf@make@lang@feature{Baule}{BAU}
-\zf@make@lang@feature{Berber}{BBR}
-\zf@make@lang@feature{Bench}{BCH}
-\zf@make@lang@feature{Bible Cree}{BCR}
-\zf@make@lang@feature{Belarussian}{BEL}
-\zf@make@lang@feature{Bemba}{BEM}
-\zf@make@lang@feature{Bengali}{BEN}
-\zf@make@lang@feature{Bulgarian}{BGR}
-\zf@make@lang@feature{Bhili}{BHI}
-\zf@make@lang@feature{Bhojpuri}{BHO}
-\zf@make@lang@feature{Bikol}{BIK}
-\zf@make@lang@feature{Bilen}{BIL}
-\zf@make@lang@feature{Blackfoot}{BKF}
-\zf@make@lang@feature{Balochi}{BLI}
-\zf@make@lang@feature{Balante}{BLN}
-\zf@make@lang@feature{Balti}{BLT}
-\zf@make@lang@feature{Bambara}{BMB}
-\zf@make@lang@feature{Bamileke}{BML}
-\zf@make@lang@feature{Breton}{BRE}
-\zf@make@lang@feature{Brahui}{BRH}
-\zf@make@lang@feature{Braj Bhasha}{BRI}
-\zf@make@lang@feature{Burmese}{BRM}
-\zf@make@lang@feature{Bashkir}{BSH}
-\zf@make@lang@feature{Beti}{BTI}
-\zf@make@lang@feature{Catalan}{CAT}
-\zf@make@lang@feature{Cebuano}{CEB}
-\zf@make@lang@feature{Chechen}{CHE}
-\zf@make@lang@feature{Chaha Gurage}{CHG}
-\zf@make@lang@feature{Chattisgarhi}{CHH}
-\zf@make@lang@feature{Chichewa}{CHI}
-\zf@make@lang@feature{Chukchi}{CHK}
-\zf@make@lang@feature{Chipewyan}{CHP}
-\zf@make@lang@feature{Cherokee}{CHR}
-\zf@make@lang@feature{Chuvash}{CHU}
-\zf@make@lang@feature{Comorian}{CMR}
-\zf@make@lang@feature{Coptic}{COP}
-\zf@make@lang@feature{Cree}{CRE}
-\zf@make@lang@feature{Carrier}{CRR}
-\zf@make@lang@feature{Crimean Tatar}{CRT}
-\zf@make@lang@feature{Church Slavonic}{CSL}
-\zf@make@lang@feature{Czech}{CSY}
-\zf@make@lang@feature{Danish}{DAN}
-\zf@make@lang@feature{Dargwa}{DAR}
-\zf@make@lang@feature{Woods Cree}{DCR}
-\zf@make@lang@feature{German}{DEU}
-\zf@make@lang@feature{Default}{DFLT}
-\zf@make@lang@feature{Dogri}{DGR}
-\zf@make@lang@feature{Divehi}{DIV}
-\zf@make@lang@feature{Djerma}{DJR}
-\zf@make@lang@feature{Dangme}{DNG}
-\zf@make@lang@feature{Dinka}{DNK}
-\zf@make@lang@feature{Dungan}{DUN}
-\zf@make@lang@feature{Dzongkha}{DZN}
-\zf@make@lang@feature{Ebira}{EBI}
-\zf@make@lang@feature{Eastern Cree}{ECR}
-\zf@make@lang@feature{Edo}{EDO}
-\zf@make@lang@feature{Efik}{EFI}
-\zf@make@lang@feature{Greek}{ELL}
-\zf@make@lang@feature{English}{ENG}
-\zf@make@lang@feature{Erzya}{ERZ}
-\zf@make@lang@feature{Spanish}{ESP}
-\zf@make@lang@feature{Estonian}{ETI}
-\zf@make@lang@feature{Basque}{EUQ}
-\zf@make@lang@feature{Evenki}{EVK}
-\zf@make@lang@feature{Even}{EVN}
-\zf@make@lang@feature{Ewe}{EWE}
-\zf@make@lang@feature{French Antillean}{FAN}
-\zf@make@lang@feature{Farsi}{FAR}
-\zf@make@lang@feature{Finnish}{FIN}
-\zf@make@lang@feature{Fijian}{FJI}
-\zf@make@lang@feature{Flemish}{FLE}
-\zf@make@lang@feature{Forest Nenets}{FNE}
-\zf@make@lang@feature{Fon}{FON}
-\zf@make@lang@feature{Faroese}{FOS}
-\zf@make@lang@feature{French}{FRA}
-\zf@make@lang@feature{Frisian}{FRI}
-\zf@make@lang@feature{Friulian}{FRL}
-\zf@make@lang@feature{Futa}{FTA}
-\zf@make@lang@feature{Fulani}{FUL}
-\zf@make@lang@feature{Ga}{GAD}
-\zf@make@lang@feature{Gaelic}{GAE}
-\zf@make@lang@feature{Gagauz}{GAG}
-\zf@make@lang@feature{Galician}{GAL}
-\zf@make@lang@feature{Garshuni}{GAR}
-\zf@make@lang@feature{Garhwali}{GAW}
-\zf@make@lang@feature{Ge'ez}{GEZ}
-\zf@make@lang@feature{Gilyak}{GIL}
-\zf@make@lang@feature{Gumuz}{GMZ}
-\zf@make@lang@feature{Gondi}{GON}
-\zf@make@lang@feature{Greenlandic}{GRN}
-\zf@make@lang@feature{Garo}{GRO}
-\zf@make@lang@feature{Guarani}{GUA}
-\zf@make@lang@feature{Gujarati}{GUJ}
-\zf@make@lang@feature{Haitian}{HAI}
-\zf@make@lang@feature{Halam}{HAL}
-\zf@make@lang@feature{Harauti}{HAR}
-\zf@make@lang@feature{Hausa}{HAU}
-\zf@make@lang@feature{Hawaiin}{HAW}
-\zf@make@lang@feature{Hammer-Banna}{HBN}
-\zf@make@lang@feature{Hiligaynon}{HIL}
-\zf@make@lang@feature{Hindi}{HIN}
-\zf@make@lang@feature{High Mari}{HMA}
-\zf@make@lang@feature{Hindko}{HND}
-\zf@make@lang@feature{Ho}{HO}
-\zf@make@lang@feature{Harari}{HRI}
-\zf@make@lang@feature{Croatian}{HRV}
-\zf@make@lang@feature{Hungarian}{HUN}
-\zf@make@lang@feature{Armenian}{HYE}
-\zf@make@lang@feature{Igbo}{IBO}
-\zf@make@lang@feature{Ijo}{IJO}
-\zf@make@lang@feature{Ilokano}{ILO}
-\zf@make@lang@feature{Indonesian}{IND}
-\zf@make@lang@feature{Ingush}{ING}
-\zf@make@lang@feature{Inuktitut}{INU}
-\zf@make@lang@feature{Irish}{IRI}
-\zf@make@lang@feature{Irish Traditional}{IRT}
-\zf@make@lang@feature{Icelandic}{ISL}
-\zf@make@lang@feature{Inari Sami}{ISM}
-\zf@make@lang@feature{Italian}{ITA}
-\zf@make@lang@feature{Hebrew}{IWR}
-\zf@make@lang@feature{Javanese}{JAV}
-\zf@make@lang@feature{Yiddish}{JII}
-\zf@make@lang@feature{Japanese}{JAN}
-\zf@make@lang@feature{Judezmo}{JUD}
-\zf@make@lang@feature{Jula}{JUL}
-\zf@make@lang@feature{Kabardian}{KAB}
-\zf@make@lang@feature{Kachchi}{KAC}
-\zf@make@lang@feature{Kalenjin}{KAL}
-\zf@make@lang@feature{Kannada}{KAN}
-\zf@make@lang@feature{Karachay}{KAR}
-\zf@make@lang@feature{Georgian}{KAT}
-\zf@make@lang@feature{Kazakh}{KAZ}
-\zf@make@lang@feature{Kebena}{KEB}
-\zf@make@lang@feature{Khutsuri Georgian}{KGE}
-\zf@make@lang@feature{Khakass}{KHA}
-\zf@make@lang@feature{Khanty-Kazim}{KHK}
-\zf@make@lang@feature{Khmer}{KHM}
-\zf@make@lang@feature{Khanty-Shurishkar}{KHS}
-\zf@make@lang@feature{Khanty-Vakhi}{KHV}
-\zf@make@lang@feature{Khowar}{KHW}
-\zf@make@lang@feature{Kikuyu}{KIK}
-\zf@make@lang@feature{Kirghiz}{KIR}
-\zf@make@lang@feature{Kisii}{KIS}
-\zf@make@lang@feature{Kokni}{KKN}
-\zf@make@lang@feature{Kalmyk}{KLM}
-\zf@make@lang@feature{Kamba}{KMB}
-\zf@make@lang@feature{Kumaoni}{KMN}
-\zf@make@lang@feature{Komo}{KMO}
-\zf@make@lang@feature{Komso}{KMS}
-\zf@make@lang@feature{Kanuri}{KNR}
-\zf@make@lang@feature{Kodagu}{KOD}
-\zf@make@lang@feature{Korean Old Hangul}{KOH}
-\zf@make@lang@feature{Konkani}{KOK}
-\zf@make@lang@feature{Kikongo}{KON}
-\zf@make@lang@feature{Komi-Permyak}{KOP}
-\zf@make@lang@feature{Korean}{KOR}
-\zf@make@lang@feature{Komi-Zyrian}{KOZ}
-\zf@make@lang@feature{Kpelle}{KPL}
-\zf@make@lang@feature{Krio}{KRI}
-\zf@make@lang@feature{Karakalpak}{KRK}
-\zf@make@lang@feature{Karelian}{KRL}
-\zf@make@lang@feature{Karaim}{KRM}
-\zf@make@lang@feature{Karen}{KRN}
-\zf@make@lang@feature{Koorete}{KRT}
-\zf@make@lang@feature{Kashmiri}{KSH}
-\zf@make@lang@feature{Khasi}{KSI}
-\zf@make@lang@feature{Kildin Sami}{KSM}
-\zf@make@lang@feature{Kui}{KUI}
-\zf@make@lang@feature{Kulvi}{KUL}
-\zf@make@lang@feature{Kumyk}{KUM}
-\zf@make@lang@feature{Kurdish}{KUR}
-\zf@make@lang@feature{Kurukh}{KUU}
-\zf@make@lang@feature{Kuy}{KUY}
-\zf@make@lang@feature{Koryak}{KYK}
-\zf@make@lang@feature{Ladin}{LAD}
-\zf@make@lang@feature{Lahuli}{LAH}
-\zf@make@lang@feature{Lak}{LAK}
-\zf@make@lang@feature{Lambani}{LAM}
-\zf@make@lang@feature{Lao}{LAO}
-\zf@make@lang@feature{Latin}{LAT}
-\zf@make@lang@feature{Laz}{LAZ}
-\zf@make@lang@feature{L-Cree}{LCR}
-\zf@make@lang@feature{Ladakhi}{LDK}
-\zf@make@lang@feature{Lezgi}{LEZ}
-\zf@make@lang@feature{Lingala}{LIN}
-\zf@make@lang@feature{Low Mari}{LMA}
-\zf@make@lang@feature{Limbu}{LMB}
-\zf@make@lang@feature{Lomwe}{LMW}
-\zf@make@lang@feature{Lower Sorbian}{LSB}
-\zf@make@lang@feature{Lule Sami}{LSM}
-\zf@make@lang@feature{Lithuanian}{LTH}
-\zf@make@lang@feature{Luba}{LUB}
-\zf@make@lang@feature{Luganda}{LUG}
-\zf@make@lang@feature{Luhya}{LUH}
-\zf@make@lang@feature{Luo}{LUO}
-\zf@make@lang@feature{Latvian}{LVI}
-\zf@make@lang@feature{Majang}{MAJ}
-\zf@make@lang@feature{Makua}{MAK}
-\zf@make@lang@feature{Malayalam Traditional}{MAL}
-\zf@make@lang@feature{Mansi}{MAN}
-\zf@make@lang@feature{Marathi}{MAR}
-\zf@make@lang@feature{Marwari}{MAW}
-\zf@make@lang@feature{Mbundu}{MBN}
-\zf@make@lang@feature{Manchu}{MCH}
-\zf@make@lang@feature{Moose Cree}{MCR}
-\zf@make@lang@feature{Mende}{MDE}
-\zf@make@lang@feature{Me'en}{MEN}
-\zf@make@lang@feature{Mizo}{MIZ}
-\zf@make@lang@feature{Macedonian}{MKD}
-\zf@make@lang@feature{Male}{MLE}
-\zf@make@lang@feature{Malagasy}{MLG}
-\zf@make@lang@feature{Malinke}{MLN}
-\zf@make@lang@feature{Malayalam Reformed}{MLR}
-\zf@make@lang@feature{Malay}{MLY}
-\zf@make@lang@feature{Mandinka}{MND}
-\zf@make@lang@feature{Mongolian}{MNG}
-\zf@make@lang@feature{Manipuri}{MNI}
-\zf@make@lang@feature{Maninka}{MNK}
-\zf@make@lang@feature{Manx Gaelic}{MNX}
-\zf@make@lang@feature{Moksha}{MOK}
-\zf@make@lang@feature{Moldavian}{MOL}
-\zf@make@lang@feature{Mon}{MON}
-\zf@make@lang@feature{Moroccan}{MOR}
-\zf@make@lang@feature{Maori}{MRI}
-\zf@make@lang@feature{Maithili}{MTH}
-\zf@make@lang@feature{Maltese}{MTS}
-\zf@make@lang@feature{Mundari}{MUN}
-\zf@make@lang@feature{Naga-Assamese}{NAG}
-\zf@make@lang@feature{Nanai}{NAN}
-\zf@make@lang@feature{Naskapi}{NAS}
-\zf@make@lang@feature{N-Cree}{NCR}
-\zf@make@lang@feature{Ndebele}{NDB}
-\zf@make@lang@feature{Ndonga}{NDG}
-\zf@make@lang@feature{Nepali}{NEP}
-\zf@make@lang@feature{Newari}{NEW}
-\zf@make@lang@feature{Nagari}{NGR}
-\zf@make@lang@feature{Norway House Cree}{NHC}
-\zf@make@lang@feature{Nisi}{NIS}
-\zf@make@lang@feature{Niuean}{NIU}
-\zf@make@lang@feature{Nkole}{NKL}
-\zf@make@lang@feature{N'ko}{NKO}
-\zf@make@lang@feature{Dutch}{NLD}
-\zf@make@lang@feature{Nogai}{NOG}
-\zf@make@lang@feature{Norwegian}{NOR}
-\zf@make@lang@feature{Northern Sami}{NSM}
-\zf@make@lang@feature{Northern Tai}{NTA}
-\zf@make@lang@feature{Esperanto}{NTO}
-\zf@make@lang@feature{Nynorsk}{NYN}
-\zf@make@lang@feature{Oji-Cree}{OCR}
-\zf@make@lang@feature{Ojibway}{OJB}
-\zf@make@lang@feature{Oriya}{ORI}
-\zf@make@lang@feature{Oromo}{ORO}
-\zf@make@lang@feature{Ossetian}{OSS}
-\zf@make@lang@feature{Palestinian Aramaic}{PAA}
-\zf@make@lang@feature{Pali}{PAL}
-\zf@make@lang@feature{Punjabi}{PAN}
-\zf@make@lang@feature{Palpa}{PAP}
-\zf@make@lang@feature{Pashto}{PAS}
-\zf@make@lang@feature{Polytonic Greek}{PGR}
-\zf@make@lang@feature{Pilipino}{PIL}
-\zf@make@lang@feature{Palaung}{PLG}
-\zf@make@lang@feature{Polish}{PLK}
-\zf@make@lang@feature{Provencal}{PRO}
-\zf@make@lang@feature{Portuguese}{PTG}
-\zf@make@lang@feature{Chin}{QIN}
-\zf@make@lang@feature{Rajasthani}{RAJ}
-\zf@make@lang@feature{R-Cree}{RCR}
-\zf@make@lang@feature{Russian Buriat}{RBU}
-\zf@make@lang@feature{Riang}{RIA}
-\zf@make@lang@feature{Rhaeto-Romanic}{RMS}
-\zf@make@lang@feature{Romanian}{ROM}
-\zf@make@lang@feature{Romany}{ROY}
-\zf@make@lang@feature{Rusyn}{RSY}
-\zf@make@lang@feature{Ruanda}{RUA}
-\zf@make@lang@feature{Russian}{RUS}
-\zf@make@lang@feature{Sadri}{SAD}
-\zf@make@lang@feature{Sanskrit}{SAN}
-\zf@make@lang@feature{Santali}{SAT}
-\zf@make@lang@feature{Sayisi}{SAY}
-\zf@make@lang@feature{Sekota}{SEK}
-\zf@make@lang@feature{Selkup}{SEL}
-\zf@make@lang@feature{Sango}{SGO}
-\zf@make@lang@feature{Shan}{SHN}
-\zf@make@lang@feature{Sibe}{SIB}
-\zf@make@lang@feature{Sidamo}{SID}
-\zf@make@lang@feature{Silte Gurage}{SIG}
-\zf@make@lang@feature{Skolt Sami}{SKS}
-\zf@make@lang@feature{Slovak}{SKY}
-\zf@make@lang@feature{Slavey}{SLA}
-\zf@make@lang@feature{Slovenian}{SLV}
-\zf@make@lang@feature{Somali}{SML}
-\zf@make@lang@feature{Samoan}{SMO}
-\zf@make@lang@feature{Sena}{SNA}
-\zf@make@lang@feature{Sindhi}{SND}
-\zf@make@lang@feature{Sinhalese}{SNH}
-\zf@make@lang@feature{Soninke}{SNK}
-\zf@make@lang@feature{Sodo Gurage}{SOG}
-\zf@make@lang@feature{Sotho}{SOT}
-\zf@make@lang@feature{Albanian}{SQI}
-\zf@make@lang@feature{Serbian}{SRB}
-\zf@make@lang@feature{Saraiki}{SRK}
-\zf@make@lang@feature{Serer}{SRR}
-\zf@make@lang@feature{South Slavey}{SSL}
-\zf@make@lang@feature{Southern Sami}{SSM}
-\zf@make@lang@feature{Suri}{SUR}
-\zf@make@lang@feature{Svan}{SVA}
-\zf@make@lang@feature{Swedish}{SVE}
-\zf@make@lang@feature{Swadaya Aramaic}{SWA}
-\zf@make@lang@feature{Swahili}{SWK}
-\zf@make@lang@feature{Swazi}{SWZ}
-\zf@make@lang@feature{Sutu}{SXT}
-\zf@make@lang@feature{Syriac}{SYR}
-\zf@make@lang@feature{Tabasaran}{TAB}
-\zf@make@lang@feature{Tajiki}{TAJ}
-\zf@make@lang@feature{Tamil}{TAM}
-\zf@make@lang@feature{Tatar}{TAT}
-\zf@make@lang@feature{TH-Cree}{TCR}
-\zf@make@lang@feature{Telugu}{TEL}
-\zf@make@lang@feature{Tongan}{TGN}
-\zf@make@lang@feature{Tigre}{TGR}
-\zf@make@lang@feature{Tigrinya}{TGY}
-\zf@make@lang@feature{Thai}{THA}
-\zf@make@lang@feature{Tahitian}{THT}
-\zf@make@lang@feature{Tibetan}{TIB}
-\zf@make@lang@feature{Turkmen}{TKM}
-\zf@make@lang@feature{Temne}{TMN}
-\zf@make@lang@feature{Tswana}{TNA}
-\zf@make@lang@feature{Tundra Nenets}{TNE}
-\zf@make@lang@feature{Tonga}{TNG}
-\zf@make@lang@feature{Todo}{TOD}
-\zf@make@lang@feature{Turkish}{TRK}
-\zf@make@lang@feature{Tsonga}{TSG}
-\zf@make@lang@feature{Turoyo Aramaic}{TUA}
-\zf@make@lang@feature{Tulu}{TUL}
-\zf@make@lang@feature{Tuvin}{TUV}
-\zf@make@lang@feature{Twi}{TWI}
-\zf@make@lang@feature{Udmurt}{UDM}
-\zf@make@lang@feature{Ukrainian}{UKR}
-\zf@make@lang@feature{Urdu}{URD}
-\zf@make@lang@feature{Upper Sorbian}{USB}
-\zf@make@lang@feature{Uyghur}{UYG}
-\zf@make@lang@feature{Uzbek}{UZB}
-\zf@make@lang@feature{Venda}{VEN}
-\zf@make@lang@feature{Vietnamese}{VIT}
-\zf@make@lang@feature{Wa}{WA}
-\zf@make@lang@feature{Wagdi}{WAG}
-\zf@make@lang@feature{West-Cree}{WCR}
-\zf@make@lang@feature{Welsh}{WEL}
-\zf@make@lang@feature{Wolof}{WLF}
-\zf@make@lang@feature{Tai Lue}{XBD}
-\zf@make@lang@feature{Xhosa}{XHS}
-\zf@make@lang@feature{Yakut}{YAK}
-\zf@make@lang@feature{Yoruba}{YBA}
-\zf@make@lang@feature{Y-Cree}{YCR}
-\zf@make@lang@feature{Yi Classic}{YIC}
-\zf@make@lang@feature{Yi Modern}{YIM}
-\zf@make@lang@feature{Chinese Hong Kong}{ZHH}
-\zf@make@lang@feature{Chinese Phonetic}{ZHP}
-\zf@make@lang@feature{Chinese Simplified}{ZHS}
-\zf@make@lang@feature{Chinese Traditional}{ZHT}
-\zf@make@lang@feature{Zande}{ZND}
-\zf@make@lang@feature{Zulu}{ZUL}
-% \end{macrocode}
-%
-% \subsubsection{Ligatures}
-% The call to the nested keyval family must be wrapped in braces to
-% hide the parent list (this later requires the use of global
-% definitions (|\xdef|) in |\zf@update@...|). Both AAT and OpenType
-% names are offered to chose |Rare|/|Discretionary| ligatures.
-%
-% \changes{v1.6}{2004/12/07}{OpenType ligature features: \opt{Contextual}
-% and \opt{Historical}.}
-% \begin{macrocode}
-\zf@define@font@feature{Ligatures}
-\zf@define@feature@option{Ligatures}{Required}{1}{0}{+rlig}
-\zf@define@feature@option{Ligatures}{NoRequired} {1}{1} {-rlig}
-\zf@define@feature@option{Ligatures}{Common} {1}{2} {+liga}
-\zf@define@feature@option{Ligatures}{NoCommon} {1}{3} {-liga}
-\zf@define@feature@option{Ligatures}{Rare} {1}{4} {+dlig}
-\zf@define@feature@option{Ligatures}{NoRare} {1}{5} {-dlig}
-\zf@define@feature@option{Ligatures}{Discretionary} {1}{4} {+dlig}
-\zf@define@feature@option{Ligatures}{NoDiscretionary}{1}{5} {-dlig}
-\zf@define@feature@option{Ligatures}{Contextual} {}{} {+clig}
-\zf@define@feature@option{Ligatures}{NoContextual} {}{} {-clig}
-\zf@define@feature@option{Ligatures}{Historical} {}{} {+hlig}
-\zf@define@feature@option{Ligatures}{NoHistorical} {}{} {-hlig}
-\zf@define@feature@option{Ligatures}{Logos} {1}{6} {}
-\zf@define@feature@option{Ligatures}{NoLogos} {1}{7} {}
-\zf@define@feature@option{Ligatures}{Rebus} {1}{8} {}
-\zf@define@feature@option{Ligatures}{NoRebus} {1}{9} {}
-\zf@define@feature@option{Ligatures}{Diphthong} {1}{10}{}
-\zf@define@feature@option{Ligatures}{NoDiphthong} {1}{11}{}
-\zf@define@feature@option{Ligatures}{Squared} {1}{12}{}
-\zf@define@feature@option{Ligatures}{NoSquared} {1}{13}{}
-\zf@define@feature@option{Ligatures}{AbbrevSquared} {1}{14}{}
-\zf@define@feature@option{Ligatures}{NoAbbrevSquared}{1}{15}{}
-\zf@define@feature@option{Ligatures}{Icelandic} {1}{32}{}
-\zf@define@feature@option{Ligatures}{NoIcelandic} {1}{33}{}
-% \end{macrocode}
-%
-% \subsubsection{Letters}
-% \changes{v1.3a}{2004/10/29}{Bug fix for OpenType small caps.}
-% \changes{v1.6}{2005/01/02}{\feat{LetterCase} is now \feat{Letters}
-% and options changed appropriately.}
-% \changes{v1.6}{2004/12/01}{OpenType letters features:
-% \opt{PetiteCaps} and \opt{PETITECAPS}.}
-%
-% \begin{macrocode}
-\zf@define@font@feature{Letters}
-\zf@define@feature@option{Letters}{Normal}{3}{0}{}
-\zf@define@feature@option{Letters}{Uppercase}{3}{1}{+cpsp}
-\zf@define@feature@option{Letters}{Lowercase}{3}{2}{}
-\zf@define@feature@option{Letters}{SmallCaps}{3}{3}{+smcp}
-\zf@define@feature@option{Letters}{PetiteCaps}{}{}{+pcap}
-\zf@define@feature@option{Letters}{SMALLCAPS}{}{}{+c2sc}
-\zf@define@feature@option{Letters}{PETITECAPS}{}{}{+c2pc}
-\zf@define@feature@option{Letters}{InitialCaps}{3}{4}{}
-\zf@define@feature@option{Letters}{Unicase}{}{}{+unic}
-% \end{macrocode}
-%
-% \subsubsection{Numbers}
-%
-% These were originally separated into \feat{NumberCase} and
-% \feat{NumberSpacing} following AAT, but it makes more sense to
-% combine them.
-%
-% Both naming conventions are offered to select the number case.
-%
-% \changes{v1.7}{2005/04/18}{AAT \feat{Numbers}:\opt{SlashedZero}.}
-%
-% \begin{macrocode}
-\zf@define@font@feature{Numbers}
-\zf@define@feature@option{Numbers}{Monospaced}{6}{0}{+tnum}
-\zf@define@feature@option{Numbers}{Proportional}{6}{1}{+pnum}
-\zf@define@feature@option{Numbers}{Lowercase}{21}{0}{+onum}
-\zf@define@feature@option{Numbers}{OldStyle}{21}{0}{+onum}
-\zf@define@feature@option{Numbers}{Uppercase}{21}{1}{+lnum}
-\zf@define@feature@option{Numbers}{Lining}{21}{1}{+lnum}
-\zf@define@feature@option{Numbers}{SlashedZero}{14}{5}{+zero}
-\zf@define@feature@option{Numbers}{NoSlashedZero}{14}{4}{-zero}
-% \end{macrocode}
-%
-% \subsubsection{Swashes}
-%
-% \begin{macrocode}
-\zf@define@font@feature{Swashes}
-\zf@define@feature@option{Swashes}{Contextual}{}{}{+cswh}
-\zf@define@feature@option{Swashes}{WordInitial}{8}{0}{+init}
-\zf@define@feature@option{Swashes}{NoWordInitial}{8}{1}{-init}
-\zf@define@feature@option{Swashes}{WordFinal}{8}{2}{+fina}
-\zf@define@feature@option{Swashes}{NoWordFinal}{8}{3}{-fina}
-\zf@define@feature@option{Swashes}{LineInitial}{8}{4}{}
-\zf@define@feature@option{Swashes}{NoLineInitial}{8}{5}{}
-\zf@define@feature@option{Swashes}{LineFinal}{8}{6}{+falt}
-\zf@define@feature@option{Swashes}{NoLineFinal}{8}{7}{-falt}
-\zf@define@feature@option{Swashes}{Inner}{8}{8}{}
-\zf@define@feature@option{Swashes}{NoInner}{8}{9}{}
-% \end{macrocode}
-%
-% \subsubsection{Diacritics}
-%
-% \begin{macrocode}
-\zf@define@font@feature{Diacritics}
-\zf@define@feature@option{Diacritics}{Show}{9}{0}{}
-\zf@define@feature@option{Diacritics}{Hide}{9}{1}{}
-\zf@define@feature@option{Diacritics}{Decompose}{9}{2}{}
-% \end{macrocode}
-%
-% \subsubsection{Vertical position}
-%
-% \begin{macrocode}
-\zf@define@font@feature{VerticalPosition}
-\zf@define@feature@option{VerticalPosition}{Normal}{10}{0}{}
-\zf@define@feature@option{VerticalPosition}{Superior}{10}{1}{+sups}
-\zf@define@feature@option{VerticalPosition}{Inferior}{10}{2}{+subs}
-\zf@define@feature@option{VerticalPosition}{ScientificInferior}{}{}{+sinf}
-\zf@define@feature@option{VerticalPosition}{Ordinal}{10}{3}{+ordn}
-\zf@define@feature@option{VerticalPosition}{Numerator}{}{}{+numr}
-\zf@define@feature@option{VerticalPosition}{Denominator}{}{}{+dnom}
-% \end{macrocode}
-%
-% \subsubsection{Fractions}
-% \changes{v1.6}{2005/03/05}{All AAT \feat{Fractions} features
-% offered.}
-% \changes{v1.7}{2005/03/25}{OpenType \opt{Alternate}
-% \feat{Fractions} feature.}
-% \begin{macrocode}
-\zf@define@font@feature{Fractions}
-\zf@define@feature@option{Fractions}{On}{11}{1}{+frac}
-\zf@define@feature@option{Fractions}{Off}{11}{0}{-frac}
-\zf@define@feature@option{Fractions}{Diagonal}{11}{2}{}
-\zf@define@feature@option{Fractions}{Alternate}{}{}{+afrc}
-% \end{macrocode}
-%
-% \subsubsection{Alternates (AAT) and variants}
-% Selected numerically because they don't have standard names. Very
-% easy to process, very annoying for the user!
-%
-% \changes{v1.6}{2005/03/05}{OpenType stylistic sets supports under
-% the \opt{Variant} option.}
-% \changes{v1.7}{2005/03/26}{OpenType \feat{Alternate} now only AAT.}
-%
-% \begin{macrocode}
-\define@key{zf}{Alternate}{\zf@make@feature{17}{#1}{}}
-\define@key{zf}{Variant}{\zf@make@feature{18}{#1}{%
- \ifnum #1 > 0
- \ifnum #1 < 100
- \ifnum #1 > 9
- +ss#1%
- \else
- +ss0#1%
- \fi
- \else
- \PackageWarning{fontspec}{OpenType variant number must be
- between 1 and 99 inclusive.}%
- \fi
- \else
- \PackageWarning{fontspec}{OpenType variant number must be between 1
- and 99 inclusive.}%
- \fi}}
-% \end{macrocode}
-%
-% \subsubsection{Style options}
-% \changes{v1.7}{2005/03/26}
-% {\feat{Style} feature renamed from \feat{StyleOptions}.}
-% \begin{macrocode}
-\zf@define@font@feature{Style}
-\aliasfeature{Style}{StyleOptions}
-\zf@define@feature@option{Style}{Alternate}{}{}{+salt}
-\zf@define@feature@option{Style}{Italic}{32}{2}{+ital}
-\zf@define@feature@option{Style}{Ruby}{28}{2}{+ruby}
-\zf@define@feature@option{Style}{Swash}{}{}{+swsh}
-\zf@define@feature@option{Style}{Display}{19}{1}{}
-\zf@define@feature@option{Style}{Engraved}{19}{2}{}
-\zf@define@feature@option{Style}{TitlingCaps}{19}{4}{+titl}
-\zf@define@feature@option{Style}{TallCaps}{19}{5}{}
-% \end{macrocode}
-%
-% \subsubsection{Character Shape}
-% \changes{v1.7}{2005/03/26}{New feature: \feat{CharacterShape}}
-% \begin{macrocode}
-\zf@define@font@feature{CharacterShape}
-\zf@define@feature@option{CharacterShape}{Traditional}{20}{0}{+trad}
-\zf@define@feature@option{CharacterShape}{Simplified}{20}{1}{+smpl}
-\zf@define@feature@option{CharacterShape}{JIS1978}{20}{2}{+jp78}
-\zf@define@feature@option{CharacterShape}{JIS1983}{20}{3}{+jp83}
-\zf@define@feature@option{CharacterShape}{JIS1990}{20}{4}{+jp90}
-\zf@define@feature@option{CharacterShape}{Expert}{20}{10}{+expt}
-\zf@define@feature@option{CharacterShape}{NLC}{20}{13}{+nlck}
-% \end{macrocode}
-%
-% \subsubsection{Text Spacing}
-% \changes{v1.7}{2005/04/18}{New feature: \feat{TextSpacing}}
-% \begin{macrocode}
-\zf@define@font@feature{TextSpacing}
-\zf@define@feature@option{TextSpacing}{Proportional}{22}{0}{+pwid}
-\zf@define@feature@option{TextSpacing}{FullWidth}{22}{1}{+fwid}
-\zf@define@feature@option{TextSpacing}{HalfWidth}{22}{2}{+hwid}
-\zf@define@feature@option{TextSpacing}{ThirdWidth}{22}{3}{+twid}
-\zf@define@feature@option{TextSpacing}{QuarterWidth}{22}{4}{+qwid}
-\zf@define@feature@option{TextSpacing}{AlternateProportional}{22}{5}{+palt}
-\zf@define@feature@option{TextSpacing}{AlternateHalfWidth}{22}{6}{+halt}
-\zf@define@feature@option{TextSpacing}{Default}{22}{7}{}
-% \end{macrocode}
-%
-% \subsubsection{Annotation}
-% \changes{v1.7}{2005/03/26}{New feature: \feat{Annotation}}
-% \begin{macrocode}
-\zf@define@font@feature{Annotation}
-\zf@define@feature@option{Annotation}{Off}{24}{0}{-nalt}
-\zf@define@feature@option{Annotation}{On}{}{}{+nalt}
-\zf@define@feature@option{Annotation}{Box}{24}{1}{}
-\zf@define@feature@option{Annotation}{RoundedBox}{24}{2}{}
-\zf@define@feature@option{Annotation}{Circle}{24}{3}{}
-\zf@define@feature@option{Annotation}{BlackCircle}{24}{4}{}
-\zf@define@feature@option{Annotation}{Parenthesis}{24}{5}{}
-\zf@define@feature@option{Annotation}{Period}{24}{6}{}
-\zf@define@feature@option{Annotation}{RomanNumerals}{24}{7}{}
-\zf@define@feature@option{Annotation}{Diamond}{24}{8}{}
-\zf@define@feature@option{Annotation}{BlackSquare}{24}{9}{}
-\zf@define@feature@option{Annotation}{BlackRoundSquare}{24}{10}{}
-\zf@define@feature@option{Annotation}{DoubleCircle}{24}{11}{}
-% \end{macrocode}
-%
-% \subsection{Italic small caps} \label{sec:sishape}
-% The following code for utilising italic small caps sensibly is taken
-% pretty much verbatim from Philip Lehman's \textit{Font Installation
-% Guide}. Note that |\upshape| needs to be used \emph{twice} to get
-% from italic small caps to regular upright (it always goes to small
-% caps, then regular upright).
-% \begin{macro}{\sishape}\begin{macro}{\textsi}
-% First, the commands for actually selecting italic small caps are
-% defined. I use |si| as the NFSS shape for italic small caps, but
-% I have seen |itsc| and |slsc| also used. |\sidefault| may be
-% redefined to one of these if required for compatibility.
-% \begin{macrocode}
-\providecommand*{\sidefault}{si}
-\DeclareRobustCommand{\sishape}{%
- \not@math@alphabet\sishape\relax
- \fontshape\sidefault\selectfont}
-\DeclareTextFontCommand{\textsi}{\sishape}
-% \end{macrocode}
-% \end{macro} \end{macro}
-% \begin{macro}{\zf@merge@shape}
-% This is the macro which enables the overload on the |\..shape|
-% commands. It takes three such arguments. In essence, the macro
-% selects the first argument, unless the second argument is already
-% selected, in which case it selects the third.
-% \begin{macrocode}
-\newcommand*{\zf@merge@shape}[3]{%
- \edef\@tempa{#1}%
- \edef\@tempb{#2}%
- \ifx\f@shape\@tempb
- \expandafter\ifx
- \csname\f@encoding/\f@family/\f@series/#3\endcsname
- \relax\else
- \edef\@tempa{#3}%
- \fi
- \fi
- \fontshape{\@tempa}\selectfont}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\itshape} \begin{macro}{\scshape} \begin{macro}{\upshape}
-% Here the original |\..shape| commands are redefined to use the
-% merge shape macro.
-% \begin{macrocode}
-\DeclareRobustCommand{\itshape}{%
- \not@math@alphabet\itshape\mathit
- \zf@merge@shape\itdefault\scdefault\sidefault}
-\DeclareRobustCommand{\scshape}{%
- \not@math@alphabet\scshape\relax
- \zf@merge@shape\scdefault\itdefault\sidefault}
-\DeclareRobustCommand{\upshape}{%
- \not@math@alphabet\upshape\relax
- \zf@merge@shape\updefault\sidefault\scdefault}
-% \end{macrocode}
-% \end{macro} \end{macro} \end{macro}
-%
-%
-% \subsection{Selecting maths fonts}
-% Here, the fonts used in math mode are redefined to correspond to the
-% default roman, sans serif and typewriter fonts. Unfortunately, you
-% can only define maths fonts in the preamble, otherwise I'd run this
-% code whenever \cs{setromanfont} and friends was run.
-%
-% \begin{macro}{\AtBeginDocument}
-% \changes{v1.4}{2004/11/25}{Selects the default \cs{mathXX} fonts.}
-% \changes{v1.5a}{2004/12/03}{Added fix for Computer Modern maths.}
-% \changes{v1.6}{2005/02/25}{Removed mathtime support since XeTeX
-% doesn't handle virtual fonts. Why did I put it in in the first place?}
-% \changes{v1.8}{2005/07/04}{Finally fixed legacy maths font
-% issues. Also checks that euler.sty is loaded in the right order.}
-% \changes{v1.8}{2005/07/04}{Added support for user-specified
-% \cmd\mathrm\ and others.}
-%
-% Everything here is performed \cs{AtBeginDocument} in order to
-% overwrite \pkg{euler}'s attempt. This means \pkg{fontspec} must be
-% loaded \emph{before} \pkg{euler}. We set up a conditional to return
-% an error if this rule is violated.
-%
-% Since every maths setup is slightly different, we also take
-% different paths for defining various math glyphs depending which
-% maths font package has been loaded. As far as I am aware, the only
-% two options for \XeTeX\ are \pkg{euler} and \pkg{lucbmath}. Unless
-% I've got all confused and the mathtime fonts are not virtual fonts
-% either. But I'm pretty sure they are.
-%
-% \begin{macrocode}
-\newif\ifzf@math@euler
-\newif\ifzf@math@lucida
-\newif\ifzf@euler@package@loaded
-\@ifpackageloaded{euler}{\zf@euler@package@loadedtrue}
- {\zf@euler@package@loadedfalse}
-\AtBeginDocument{%
- \@ifpackageloaded{euler}{%
- \ifzf@euler@package@loaded
- \zf@math@eulertrue
- \else
- \PackageError{fontspec}{The euler package must be loaded BEFORE fontspec}
- {fontspec only overwrites euler's attempt to\MessageBreak
- define the maths text fonts if fontspec is\MessageBreak
- loaded after euler. Type <return> to proceed\MessageBreak
- with incorrect \protect\mathit, \protect\mathbf, etc}
- \fi}{}
- \@ifpackageloaded{lucbmath}{\zf@math@lucidatrue}{}
- \@ifpackageloaded{lucidabr}{\zf@math@lucidatrue}{}
-% \end{macrocode}
-% Knuth's CM fonts fonts are all squashed together, combining letters,
-% accents, text symbols and maths symbols all in the one font,
-% \texttt{cmr}, plus other things in other fonts. Because we are
-% changing the roman font in the document, we need to redefine all of
-% the maths glyphs in \LaTeX's \texttt{operators} maths font to still
-% go back to the legacy \texttt{cmr} font for all these random glyphs,
-% unless a separate maths font package has been loaded instead.
-%
-% In every case, the maths accents are always taken from the
-% \texttt{operators} font, which is generally the main text
-% font. (Actually, there is a \cmd\hat\ accent in
-% \texttt{EulerFractur}, but it's \emph{ugly}. So I ignore it. Sorry
-% if this causes inconvenience.)
-% \begin{macrocode}
- \DeclareSymbolFont{legacymaths}{OT1}{cmr}{m}{n}
- \SetSymbolFont{legacymaths}{bold}{OT1}{cmr}{bx}{n}
- \DeclareMathAccent{\acute} {\mathalpha}{legacymaths}{"13}
- \DeclareMathAccent{\grave} {\mathalpha}{legacymaths}{"12}
- \DeclareMathAccent{\ddot} {\mathalpha}{legacymaths}{"7F}
- \DeclareMathAccent{\tilde} {\mathalpha}{legacymaths}{"7E}
- \DeclareMathAccent{\bar} {\mathalpha}{legacymaths}{"16}
- \DeclareMathAccent{\breve} {\mathalpha}{legacymaths}{"15}
- \DeclareMathAccent{\check} {\mathalpha}{legacymaths}{"14}
- \DeclareMathAccent{\hat} {\mathalpha}{legacymaths}{"5E} % too bad, euler
- \DeclareMathAccent{\dot} {\mathalpha}{legacymaths}{"5F}
- \DeclareMathAccent{\mathring}{\mathalpha}{legacymaths}{"17}
-% \end{macrocode}
-% The following symbols are only defined specifically in \pkg{euler}, so skip them
-% if that package is loaded.
-% \begin{macrocode}
- \ifzf@math@euler\else
- \DeclareMathSymbol{!}{\mathclose}{legacymaths}{"21}
- \DeclareMathSymbol{:}{\mathrel} {legacymaths}{"3A}
- \DeclareMathSymbol{;}{\mathpunct}{legacymaths}{"3B}
- \DeclareMathSymbol{?}{\mathclose}{legacymaths}{"3F}
-% \end{macrocode}
-% And these ones are defined both in \pkg{euler} and \pkg{lucbmath},
-% so we only need to run this code if no extra maths package has been
-% loaded.
-%
-% \changes{v1.8a}{2005/07/15}{Added conditional to \cmd\colon\ math symbol (incompatibility with lucida and amsmath)}
-%
-% \pkg{lucbmath} defines \cmd\colon\ as a math symbol, whereas \pkg{amsmath} creates a macro with the same name. We don't want to overwrite \pkg{amsmath}'s \cmd\colon, but we do need to fix up \pkg{lucbmath}'s if \pkg{amsmath} isn't loaded.
-%
-% \begin{macrocode}
- \ifzf@math@lucida
- \@ifpackageloaded{amsmath}{}{%
- \DeclareMathSymbol{\colon}{\mathpunct}{legacymaths}{"3A}}
- \else
- \DeclareMathSymbol{0}{\mathalpha}{legacymaths}{`0}
- \DeclareMathSymbol{1}{\mathalpha}{legacymaths}{`1}
- \DeclareMathSymbol{2}{\mathalpha}{legacymaths}{`2}
- \DeclareMathSymbol{3}{\mathalpha}{legacymaths}{`3}
- \DeclareMathSymbol{4}{\mathalpha}{legacymaths}{`4}
- \DeclareMathSymbol{5}{\mathalpha}{legacymaths}{`5}
- \DeclareMathSymbol{6}{\mathalpha}{legacymaths}{`6}
- \DeclareMathSymbol{7}{\mathalpha}{legacymaths}{`7}
- \DeclareMathSymbol{8}{\mathalpha}{legacymaths}{`8}
- \DeclareMathSymbol{9}{\mathalpha}{legacymaths}{`9}
- \DeclareMathSymbol{\Gamma}{\mathalpha}{legacymaths}{"00}
- \DeclareMathSymbol{\Delta}{\mathalpha}{legacymaths}{"01}
- \DeclareMathSymbol{\Theta}{\mathalpha}{legacymaths}{"02}
- \DeclareMathSymbol{\Lambda}{\mathalpha}{legacymaths}{"03}
- \DeclareMathSymbol{\Xi}{\mathalpha}{legacymaths}{"04}
- \DeclareMathSymbol{\Pi}{\mathalpha}{legacymaths}{"05}
- \DeclareMathSymbol{\Sigma}{\mathalpha}{legacymaths}{"06}
- \DeclareMathSymbol{\Upsilon}{\mathalpha}{legacymaths}{"07}
- \DeclareMathSymbol{\Phi}{\mathalpha}{legacymaths}{"08}
- \DeclareMathSymbol{\Psi}{\mathalpha}{legacymaths}{"09}
- \DeclareMathSymbol{\Omega}{\mathalpha}{legacymaths}{"0A}
- \DeclareMathSymbol{+}{\mathbin}{legacymaths}{"2B}
- \DeclareMathSymbol{=}{\mathrel}{legacymaths}{"3D}
- \DeclareMathDelimiter{(}{\mathopen} {legacymaths}{"28}{largesymbols}{"00}
- \DeclareMathDelimiter{)}{\mathclose}{legacymaths}{"29}{largesymbols}{"01}
- \DeclareMathDelimiter{[}{\mathopen} {legacymaths}{"5B}{largesymbols}{"02}
- \DeclareMathDelimiter{]}{\mathclose}{legacymaths}{"5D}{largesymbols}{"03}
- \DeclareMathDelimiter{/}{\mathord}{legacymaths}{"2F}{largesymbols}{"0E}
- \DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{"24}
- \fi
- \fi
-% \end{macrocode}
-% Finally, we change the font definitions for \cmd\mathrm\ and so
-% on. These are defined using the \cmd\zf@rmmaths\ (\dots) macros,
-% which default to \cmd\rmdefault\ but may be specified with the
-% \cmd\setmathrm\ (\dots) commands in the preamble.
-%
-% Since \LaTeX\ only generally defines one level of boldness, we omit
-% \cmd\mathbf\ in the \textsf{bold} maths series. It can be specified
-% as per usual with \cmd\setboldmathrm, which stores the appropriate
-% family name in \cmd\zf@rmboldmaths.
-% \begin{macrocode}
- \DeclareSymbolFont{operators}\zf@enc\zf@rmmaths\mddefault\updefault
- \SetSymbolFont{operators}{normal}\zf@enc\zf@rmmaths\mddefault\updefault
- \SetMathAlphabet\mathrm{normal}\zf@enc\zf@rmmaths\mddefault\updefault
- \SetMathAlphabet\mathit{normal}\zf@enc\zf@rmmaths\mddefault\itdefault
- \SetMathAlphabet\mathbf{normal}\zf@enc\zf@rmmaths\bfdefault\updefault
- \SetMathAlphabet\mathsf{normal}\zf@enc\zf@sfmaths\mddefault\updefault
- \SetMathAlphabet\mathtt{normal}\zf@enc\zf@ttmaths\mddefault\updefault
- \SetSymbolFont{operators}{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
- \expandafter\ifx\csname zf@rmboldmaths\endcsname\relax
- \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
- \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmmaths\bfdefault\itdefault
- \else
- \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmboldmaths\mddefault\updefault
- \SetMathAlphabet\mathbf{bold}\zf@enc\zf@rmboldmaths\bfdefault\updefault
- \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmboldmaths\mddefault\itdefault
- \fi
- \SetMathAlphabet\mathsf{bold}\zf@enc\zf@sfmaths\bfdefault\updefault
- \SetMathAlphabet\mathsf{bold}\zf@enc\zf@ttmaths\bfdefault\updefault}
-% \end{macrocode}
-% \end{macro}
-% The end! Thanks for coming.
-% \begin{macrocode}
-%</fontspec>
-% \end{macrocode}
-%
-% \setcounter{IndexColumns}{2}
-% \PrintIndex
-%
-% \Finale
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
-%
-% \typeout{*************************************************************}
-% \typeout{*}
-% \typeout{* To finish the installation you have to move the following}
-% \typeout{* file into a directory searched by XeTeX:}
-% \typeout{*}
-% \typeout{* \space\space\space fontspec.sty}
-% \typeout{*}
-% \typeout{*************************************************************}
-%
-\endinput
diff --git a/Master/texmf-dist/source/xetex/fontspec/fontspec.dtx b/Master/texmf-dist/source/xetex/fontspec/fontspec.dtx
new file mode 100644
index 00000000000..fd85b0232ce
--- /dev/null
+++ b/Master/texmf-dist/source/xetex/fontspec/fontspec.dtx
@@ -0,0 +1,3765 @@
+% \iffalse meta-comment
+%
+%!TEX encoding = UTF-8 Unicode
+%
+% Copyright 2005 by Will Robertson <wspr81@gmail.com>
+%
+% Distributable under the LaTeX Project Public License,
+% version 1.3a 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 the file fontspec.dtx
+% and the derived files fontspec.sty and fontspec.pdf.
+%
+%
+%<*batchfile>
+\begingroup
+\input docstrip.tex
+\keepsilent
+\usedir{xetex/latex/fontspec}
+\preamble
+
+ ________________________________
+ The fontspec package for XeLaTeX
+ (C) 2004--2006 Will Robertson
+
+ License information appended.
+
+
+\endpreamble
+\postamble
+
+Copyright 2005 by Will Robertson <wspr81@gmail.com>
+
+Distributable under the LaTeX Project Public License,
+version 1.3b 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 the file fontspec.dtx
+ and the derived files fontspec.sty and fontspec.pdf.
+
+\endpostamble
+\askforoverwritefalse
+\generate{\file{fontspec.sty}{\from{fontspec.dtx}{fontspec}}}
+\nopreamble\nopostamble
+\generate{\file{fontspec.cfg}{\from{fontspec.dtx}{cfg}}}
+\generate{\file{fontspec.ins}{\from{fontspec.dtx}{batchfile}}}
+\generate{\file{fontspec-example.tex}{\from{fontspec.dtx}{example}}}
+\generate{\file{fontspec-doc-style.sty}{\from{fontspec.dtx}{doc-style}}}
+\endgroup
+%</batchfile>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{fontspec-doc-style}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+%\OnlyDescription
+\begin{document}
+ \DocInput{fontspec.dtx}
+\end{document}
+%</driver>
+%
+%<*fontspec>
+\ProvidesPackage{fontspec}
+ [2006/06/07 v1.10 Advanced font selection for XeLaTeX]
+%</fontspec>
+%
+% \fi
+%
+% \CheckSum{2270}
+%
+% \makeatletter ^^A% To document @-cmds
+% \errorcontextlines=999 ^^A% Show up all my mistakes
+%
+% \GetFileInfo{fontspec.sty}
+%
+% \title{The \pkg{fontspec} package}
+% \author{Will Robertson}
+% \date{\filedate \qquad \fileversion}
+%
+% \maketitle
+% \tableofcontents
+%
+% \newpage
+% \section{Introduction}
+% With the introduction of \name{Jonathan Kew}'s
+% \XeTeX,\footnote{\texttt{http://scripts.sil.org/xetex}} users can
+% now easily access system-wide fonts directly in a \TeX\
+% variant, providing a best of both worlds environment. \XeTeX\
+% eliminates the need for all those files required for installing
+% fonts (|.tfm|, |.vf|, |.map|,\dots) and provides an easy
+% way to select fonts in Plain \TeX: |\font\tenrm="Times New Roman" at 10pt|.
+%
+% However, it was still necessary to write cumbersome font definition
+% files for \LaTeX, since the NFSS had a lot more going on behind the
+% scenes to allow easy commands like \cmd\emph\ or \cmd\bfseries.
+%
+% This package almost entirely eliminates this need by providing a
+% completely automatic way to select font families in \LaTeX\ for
+% arbitrary fonts. Furthermore, it allows (again, almost) total
+% control over the selection of rich font features such as number case
+% and fancy ligatures (and many more!) present in most modern fonts.
+%
+% \subsection{Usage}
+% For basic use, no package options are required:
+% \begin{Verbatim}[gobble=4]
+% \usepackage{fontspec}% provides font selecting commands
+% \usepackage{xunicode}% provides unicode character macros
+% \end{Verbatim}
+% \name{Ross Moore}'s \textsf{xunicode} package is highly recommended, as it
+% provides access \LaTeX's various methods for accessing extra
+% characters and accents (for example, |\%|, |\$|, |\textbullet|, |\"u|, and
+% so on), plus many more unicode characters.
+%
+% \emph{The \pkg{babel} package is not really supported!} Especially Vietnamese,
+% Greek, and Hebrew at least will all not work correctly, as far as I can tell.
+% Cyrillic and Latin-based languages, however, should at least be supported.
+%
+% \subsubsection{Configuration}
+% If you wish to customise any part of the \pkg{fontspec} interface (see later
+% in this manual, \vref{sec:newfeatures} and~\ref{sec:aliasfontfeature}),
+% this should be done by creating your own \texttt{fontspec.cfg} file,
+% \note{An example is distributed with the package.}
+% which will be automatically loaded if it is found by \XeTeX. Either place it
+% in the same folder as the main document for isolated cases, or in a location that
+% \XeTeX\ searches by default, \eg, \url{~/Library/texmf/xelatex/}.
+% The package option \texttt{[noconfig]} will suppress this behaviour
+% under all circumstances.
+%
+% \subsubsection{Warnings}\label{sec:quiet-warnings}
+% This package can give many warnings that can be
+% harmless if you know what you're doing.
+% Use the \texttt{[quiet]} package option to write
+% these warnings to the transcript (\texttt{.log}) file instead.
+%
+% \subsection{Warning}
+% I still consider this package to be experimental, so I'm not
+% ensuring backwards compatibility at all costs. I don't want to weigh
+% the package down with old ways of doing things, so unfortunately
+% this will mean that some old documents will need to be modified in
+% order to compile correctly after future updates.
+% It'll be worth it in the long run,
+% but you can curse at my lack of foresight as much as you wish in the
+% meantime.
+%
+% Such things, and some other comments, are noted in the margin like
+% this~\warn{v1.6}{An example warning!}, with a red arrow if the
+% change is relevant to the current release of the package.
+%
+% \subsection{About this manual}
+% This document has been typeset with \XeTeX\ using a variety of fonts
+% to display various features that the package supports. You will not
+% be able to typeset the documentation if you do not have all of these
+% fonts, although I've used as many Mac~OS~X pre-installed fonts as
+% possible. Running normal \LaTeX\ (\ie, with\emph{out} \XeTeX) on
+% this file will generate the \texttt{fontspec.sty} file if this is
+% required for some odd reason.
+%
+% Many examples are shown in this manual. These are typeset
+% side-by-side with their verbatim source code, although various
+% size-altering commands (\cs{large}, \cs{Huge}, \etc) are omitted for
+% clarity. Since the package supports font features for both AAT and
+% OpenType fonts (whose feature sets only overlap to some extent),
+% examples are distinguished by colour: blue and red, respectively.
+% Examples whose font type is irrelevant are typeset in green.
+%
+% \section{Brief overview}
+% This manual can get rather in-depth, as there are a lot of font features
+% to cover. A basic preamble set-up is shown below, to simply select some default
+% document fonts. See the file \url{fontspec-example.tex} for a more detailed
+% example.
+% \begin{Verbatim}[gobble=4]
+% \usepackage{fontspec}
+% \defaultfontfeatures{Scale=MatchLowercase}
+% \setromanfont[Mapping=tex-text]{Baskerville}
+% \setsansfont[Mapping=tex-text]{Skia}
+% \setmonofont{Courier}
+% \end{Verbatim}
+%
+% \section{Font selection}
+%
+% \DescribeMacro{\fontspec}
+% \cmd{\fontspec}\oarg{font features}\marg{font name}
+% is the base command of the package, used
+% for selecting the specified \meta{font name} in a \LaTeX\ family.
+% The font features argument
+% accepts comma separated \meta{font feature}=\meta{option} lists; these will
+% not be fully described until \vref{sec:features}.
+%
+% As our first example, look how easy it is to select the
+% Hoefler Text typeface with the \pkg{fontspec} package:
+% \begin{example}
+% \def\pangram{The five boxing
+% wizards jump quickly.\\}
+% \fontspec{Hoefler Text} \pangram
+% { \itshape \pangram }
+% { \scshape \pangram }
+% { \scshape\itshape \pangram }
+% \bfseries \pangram
+% { \itshape \pangram }
+% { \scshape \pangram }
+% { \itshape\scshape \pangram }
+% \end{example}
+% The \pkg{fontspec} package takes care of the necessary font
+% definitions for those shapes as shown above
+% \emph{automatically}. Furthermore, it is not necessary to install
+% the font for \XeTeX\ in any way whatsoever: every font that is
+% installed in the operating system may be accessed.
+%
+% \subsection{Font instances for efficiency}
+% For cases when a specific font with a specific feature set is going
+% to be re-used many times in a document, it is inefficient to keep
+% calling \cs{fontspec} for every use. While the command does not
+% define a new font instance after the first call, the feature options
+% must still be parsed and processed.
+%
+% \DescribeMacro{\newfontinstance} For this reason, \emph{instances}
+% of a font may be created with the \cs{newfontinstance} command, as
+% shown in the following example:
+% \begin{example}
+% \newfontinstance\secfont[Letters=SmallCaps]{Hoefler Text}
+% \secfont Font instances for efficiency
+% \end{example}
+%
+% \subsection{Default font families}\label{sec:setxxfont}
+% \DescribeMacro{\setromanfont} \DescribeMacro{\setsansfont}
+% \DescribeMacro{\setmonofont} The \cs{setromanfont},
+% \cs{setsansfont}, and \cs{setmonofont} commands are used to select
+% the default font families for the entire document. They take the
+% same arguments as \cmd{\fontspec}. For example:
+% \begin{example}
+% \def\pangram{Pack my box with five
+% dozen liquor jugs.}
+% \setromanfont{Baskerville}
+% \setsansfont[Scale=0.86]{Skia}
+% \setmonofont[Scale=0.8]{Monaco}
+% \rmfamily\pangram\par
+% \sffamily\pangram\par
+% \ttfamily\pangram
+% \end{example}
+% Here, the scales of the fonts have been chosen to equalise their
+% lowercase letter heights. The \feat{Scale} font feature will be discussed
+% further in \vref{sec:font-ind-features}, including methods for automatic
+% scaling.
+%
+% \subsection{Arbitrary bold/italic/small caps fonts} \label{sec:bfitfonts}
+% The automatic bold, italic, and bold italic font selections will not be
+% adequate for the needs of every font: while some fonts mayn't even
+% have bold or italic shapes, in which case a skilled (or lucky)
+% designer may be able to chose well-matching accompanying shapes from
+% a different font altogether, others can have a range of bold and
+% italic fonts to chose between. The \opt{BoldFont} and
+% \opt{ItalicFont} options~\warn{v1.6}{These options used to be called
+% \opt{Bold} and \opt{Italic}, and these shorter names may still be
+% used if you desire.} are provided for these situations. If only
+% one of these is used, the bold italic font is requested as the
+% default from the \emph{new} font.
+% \begin{example}
+% \fontspec[BoldFont={Helvetica Neue}]
+% {Helvetica Neue UltraLight}
+% Helvetica Neue UltraLight \\
+% {\itshape Helvetica Neue UltraLight Italic} \\
+% {\bfseries Helvetica Neue } \\
+% {\bfseries\itshape Helvetica Neue Italic} \\
+% \end{example}
+% If a bold italic shape is not defined, or you want to specify
+% \emph{both} custom bold and italic shapes, the \opt{BoldItalicFont}
+% option is provided~\warn{v1.6}{Yes, \opt{BoldItalic} also works}.
+%
+% For those cases that the base font name is repeated, you can
+% replace it with an asterisk (first character only). For example,
+% some space can be saved instead of writing `\texttt{Baskerville SemiBold}':
+% \begin{example}
+% \fontspec[BoldFont={* SemiBold}]{Baskerville}
+% Baskerville \textit{Italic}
+% \bfseries SemiBold \textit{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}
+%
+%
+% \subsection{Math(s) fonts}
+%
+% When \cmd\setromanfont, \cmd\setsansfont\ and \cmd\setmonofont\ are
+% used in the preamble, they also define the fonts to be used in maths
+% mode inside the \cmd\mathrm-type commands. This only occurs in the
+% preamble because \LaTeX\ freezes the maths fonts after this stage of
+% 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.)
+%
+% \DescribeMacro{\setmathrm} \DescribeMacro{\setboldmathrm}
+% \DescribeMacro{\setmathsf} \DescribeMacro{\setmathtt}
+% However, the default text fonts may not necessarily be the ones you
+% wish to use when typesetting maths (especially with the use of fancy
+% ligatures and so on). For this reason, you may optionally use those
+% commands listed in the margin (in the same way as our other
+% \cmd\fontspec-like commands) to explicitly state which fonts to use
+% inside such commands as \cmd\mathrm. Additionally, the
+% \cmd\setboldmathrm\ command allows you define the font used for
+% \cmd\mathrm\ when in bold maths mode (which is activated with, among
+% others, \cmd\boldmath).
+%
+% 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{fontspec,xunicode}
+% \setromanfont{Optima Regular}
+% \setmathrm{Optima}
+% \setboldmathrm[BoldFont=Optima ExtraBlack]{Optima Bold}
+% \end{Verbatim}
+% and this would allow you to typeset something like this:
+% \begingroup
+% \setromanfont{Optima Regular}
+% \begin{example}
+% $ X \rightarrow \mathrm{X} \rightarrow \mathbf{X} $
+% \\\boldmath
+% $ X \rightarrow \mathrm{X} \rightarrow \mathbf{X} $
+% \end{example}
+% \endgroup
+%
+%
+% \subsection{Miscellaneous font selecting details}
+%
+% By the way, from v1.9, \cmd\fontspec\ and \cmd\addfontfeatures\
+% will now ignore following spaces as if it were a `naked' control
+% sequence; \eg, `|M. \fontspec{...} N|' and `|M. \fontspec{...}N|'
+% are the same.
+%
+% Note that this package redefines the \cs{itshape} and \cs{scshape}
+% commands in order to allow them to select italic small caps in
+% conjunction. (This was implicitly shown in the first example,
+% but it's worth mentioning now, too.)
+%
+% In previous versions of \XeTeX,
+% nesting of \LaTeX's emphasis font switching was broken. To make it
+% more reliable, \pkg{fontspec} overrides it anyway, and copies a feature
+% from the \pkg{fixltx2e} package: \cmd\eminnershape\ defines how nested
+% emphasis should look:
+% \begin{example}
+% \renewcommand\eminnershape{\scshape}
+% \fontspec{Didot}
+% Nested {\em emphasis is \emph{now} fixed.}
+% \end{example}
+
+%
+%
+% \section{Selecting font features} \label{sec:selectingfeature}
+%
+% The commands discussed so far each take an optional argument for
+% accessing the font features of the requested font. These features
+% are generally unavailable or harder to access in regular \LaTeX. The
+% font features and their options are described in
+% \vref{sec:features}, but before we look at the range of available
+% font features, it is necessary to discuss how they can be applied.
+%
+% \subsection{Default settings} \label{sec:defaults}
+% \DescribeMacro{\defaultfontfeatures} It is desirable to define
+% options that are applied to every subsequent font selection command:
+% a default feature set, so to speak. This may be defined with the
+% \cmd{\defaultfontfeatures}\marg{font features} command.
+% New calls of \cs{defaultfontfeatures} overwrite previous ones.
+% \begin{example}
+% \fontspec{Didot}
+% Some `default' Didot 0123456789 \\
+% \defaultfontfeatures{Numbers=OldStyle, Colour=888888}
+% \fontspec{Didot}
+% Now grey, with old-style figures: 0123456789
+% \end{example}
+%
+% \subsection{Changing the currently selected features}
+% \label{sec:addfontfeatures}
+% \DescribeMacro{\addfontfeatures}
+% The \cs{addfontfeatures}\marg{font features}
+% command allows font features to be changed without
+% knowing what features are currently selected or even what font is
+% being used. A good example of this could be to add a hook to all
+% tabular material to use monospaced numbers, as shown in the
+% following example:
+% \begin{example}
+% \fontspec[Numbers=OldStyle]{Skia}
+% `In 1842, 999 people sailed 97 miles in
+% 13 boats. In 1923, 111 people sailed 54
+% miles in 56 boats.' \bigskip
+%
+% \addfontfeatures{Numbers={Monospaced,Lining}}
+% \begin{tabular}{@{} cccc @{}}
+% \toprule Year & People & Miles & Boats \\
+% \midrule 1842 & 999 & 75 & 13 \\
+% 1923 & 111 & 54 & 56 \\
+% \bottomrule
+% \end{tabular}
+% \end{example}
+% \DescribeMacro{\addfontfeature}
+% This command may also be executed under the alias \cmd{\addfontfeature}.
+%
+% \subsection{Priority of feature selection}
+% Features defined with \cs{addfontfeatures} override features
+% specified by \cs{fontspec}, which in turn override features
+% specified by \cs{defaultfontfeatures}. If in doubt, whenever a
+% new font is chosen for the first time, an entry is made in the
+% transcript (\texttt{.log}) file displaying the font name and the
+% features requested.
+%
+% \subsection{Different features for different font shapes}
+%
+% It is entirely possible that separate fonts in a family will require
+% separate options; \eg, Hoefler Text Italic contains various swash
+% feature options that are completely unavailable in the upright shapes.
+%
+% The font features defined at the top level of the optional \cmd\fontspec\
+% argument are applied to \emph{all} shapes of the family.
+% Using \feat{Upright-}, \feat{SmallCaps-}, \feat{Bold-},
+% \feat{Italic-}, and \feat{BoldItalicFeatures},
+% separate font features may be defined to their respective shapes
+% \emph{in addition} to, and with precedence over, the `global' font features.
+% \begin{aatexample}
+% \fontspec{Hoefler Text} \itshape \scshape
+% Attention All Martini Drinkers \\
+% \addfontfeature{ItalicFeatures={Alternate = 1}}
+% Attention All Martini Drinkers \\
+% \end{aatexample}
+% Combined with the options for selecting arbitrary \emph{fonts} for
+% the different shapes, these separate feature options allow the
+% selection of arbitrary weights in the Skia typeface, for example:
+% \begin{aatexample}
+% \fontspec[BoldFont={Skia},
+% BoldFeatures={Weight=2}]{Skia}
+% Skia \\ \bfseries Skia `Bold'
+% \end{aatexample}
+%
+% Note that because most fonts include their small caps glyphs
+% within the main font, these features are applied \emph{in addition} to
+% any other shape-specific features as defined above, and hence \feat{SmallCapsFeatures}
+% can be nested within \feat{ItalicFeatures} and friends. Every combination
+% of upright, italic, bold and small caps can thus be assigned individual
+% features, as shown in the following ludicrous example.
+% \begin{example}
+% \fontspec[
+% UprightFeatures={Colour = 220022,
+% SmallCapsFeatures = {Colour=115511}},
+% ItalicFeatures={Colour = 2244FF,
+% SmallCapsFeatures = {Colour=112299}},
+% BoldFeatures={Colour = FF4422,
+% SmallCapsFeatures = {Colour=992211}},
+% BoldItalicFeatures={Colour = 888844,
+% SmallCapsFeatures = {Colour=444422}},
+% ]{Hoefler Text}
+% Upright {\scshape Small Caps}\\
+% \itshape Italic {\scshape Italic Small Caps}\\
+% \upshape\bfseries Bold {\scshape Bold Small Caps}\\
+% \itshape Bold Italic {\scshape Bold Italic Small Caps}
+% \end{example}
+%
+%
+%
+%
+%
+% \section{Font independent options} \label{sec:font-ind-features}
+%
+% Features introduced in this section may be used with any font.
+%
+% \subsection{Scale}
+%
+% In its explicit form, \feat{Scale} takes a single
+% numeric argument for linearly scaling the font, as demonstrated
+% in \vref{sec:setxxfont}.
+% Since version 0.99 of \XeTeX, however, it is now possible to
+% measure the correct dimensions of the fonts loaded, and hence
+% calculate values to scale them automatically.
+%
+% The \feat{Scale} feature now \warn{v1.9}{As of Dec.\,2005}
+% also takes the options \opt{MatchLowercase}
+% and \opt{MatchUppercase}, which will scale the font being selected to match
+% the current default roman font to either the height of the lowercase or
+% uppercase letters, respectively.
+% \begin{example}
+% \setromanfont{Georgia}
+% \newfontinstance\lc[Scale=MatchLowercase]{Verdana}
+% The perfect match {\lc is hard to find.}\\
+% \newfontinstance\uc[Scale=MatchUppercase]{Arial}
+% L O G O \uc F O N T
+% \end{example}
+% The amount of scaling used in each instance is reported in the \texttt{.log} file.
+% Since there is some subjectivity about the exact scaling to be used, these values
+% should be used to fine-tune the results.
+%
+% \subsection{Mapping}
+%
+% \feat{Mapping} enables a \XeTeX\ text-mapping scheme.
+% \begin{example}
+% \fontspec[Mapping=tex-text]{Cochin}
+% ``!`A small amount of---text!''
+% \end{example}
+%
+% \subsection{Colour}
+%
+% \feat{Colour} (or \feat{Color}), also shown in \vref{sec:defaults} and
+% \vref{sec:features}, uses \XeTeX\ font specifications to set the colour of
+% the text. The colour is defined as a triplet of two-digit Hex RGB
+% values, with optionally another value for the transparency (where
+% |00| is completely transparent and |FF| is opaque.)
+% \begin{example}
+% \fontsize{48}{48}
+% \fontspec{Hoefler Text Black}
+% {\addfontfeature{Color=FF000099}W}\kern-1ex
+% {\addfontfeature{Color=0000FF99}S}\kern-0.8ex
+% {\addfontfeature{Color=DDBB2299}P}\kern-0.8ex
+% {\addfontfeature{Color=00BB3399}R}
+% \end{example}
+%
+% \subsection{Interword space}
+%
+% While the space between words can be varied on an individual
+% basis with the \TeX\ primitive \cmd\spaceskip\ command, it is
+% more convenient to specify this information when the font is
+% first defined.
+%
+% The space in between words in a paragraph will be chosen automatically
+% by \XeTeX, and generally will not need to be adjusted. For those
+% times when the precise details are important, the \feat{WordSpace}
+% features is
+% provided, which takes either a single scaling factor to scale the
+% value that \XeTeX\ has already chosen, or a triplet of comma-separated
+% values for the nominal value, the stretch, and the shrink of the
+% interword space, respectively. \Ie, |WordSpace=0.8| is the same as
+% |WordSpace={0.8,0.8,0.8}|.
+%
+% For example, I believe that the Cochin font, as distributed with \MacOSX,
+% is too widely spaced. Now, this can be rectified, as shown below.
+% \begingroup
+% \let\centering\relax
+% \def\fillertext{Some filler text for our example to take up some
+% space, and to demonstrate the large default interword space in \textit{Cochin}.}
+% \begin{example}
+% \fontspec{Cochin}
+% \fillertext
+% \vspace{1em}
+%
+% \fontspec[ WordSpace = {0.7 , 0.8 , 0.9} ]{Cochin}
+% \fillertext
+% \end{example}
+% \endgroup
+% Be careful with the unpredictable things that the AAT font renderer
+% can do with the text! Unlike \TeX, \MacOSX\ will allow
+% fonts to letterspace themselves, which can be seen above; OpenType fonts, however, will not
+% show this tendency, as they do not support this arguably dubious feature.
+%
+% \textbf{Beware!} A font at a single scaling can only have a single
+% set of interword space values, regardless of additional \pkg{fontspec} features.
+% To obtain, say, two Cochin fonts with different amounts of interword space,
+% it would be necessary to scale the second by a negligible amount, as in |Scale=0.9999|.
+%
+% \subsection{Post-punctuation space}
+%
+% If \cmd\frenchspacing\ is \emph{not} in effect, \TeX\ will allow extra
+% space after some punctuation in its goal of justifying the lines of text.
+% Generally, this is considered old-fashioned, but occasionally in small amounts the
+% effect can be justified, pardon the pun.
+%
+% The \feat{PunctuationSpace} feature takes a scaling factor by which to
+% adjust the nominal value chosen for the font. Note that |PunctuationSpace=0|
+% is \emph{not} equivalent to \cmd\frenchspacing, although the difference
+% will only be apparent when a line of text is under-full.
+% \begingroup
+% \let\centering\relax
+% \begin{example}
+% \nonfrenchspacing
+% \fontspec{Baskerville}
+% Letters, Words. Sentences. \par
+% \fontspec[PunctuationSpace=0.5]{Baskerville}
+% Letters, Words. Sentences. \par
+% \fontspec[PunctuationSpace=0]{Baskerville}
+% Letters, Words. Sentences.
+% \end{example}
+% \endgroup
+%
+% Also be aware that the above caveat for interword space also applies here,
+% so after the last line in the above example, the \feat{PunctuationSpace}
+% for \emph{all} Baskerville instances will be |0|.
+%
+% \subsection{Letter spacing}
+% Letter spacing, or tracking, is the term given to adding (or subtracting) a small amount of horizontal space in between adjacent characters. It is specified with the \feat{LetterSpace}, which takes a numeric argument.
+%
+% That the letter spacing parameter is a normalised additive factor (not a scaling factor); it is defined as a percentage of the font size. That is, for a 10\,pt font, a letter spacing parameter of `|1.0|' will add 0.1\,pt between each letter.
+% \begin{example}
+% \fontspec{Didot}
+% \addfontfeature{LetterSpace=0.0}
+% USE TRACKING FOR DISPLAY CAPS TEXT \\
+% \addfontfeature{LetterSpace=2.0}
+% USE TRACKING FOR DISPLAY CAPS TEXT
+% \end{example}
+% This functionality \emph{should not be used for lowercase text}, which is spacing correctly to begin with, but it can be very useful, in small amounts, when setting small caps or all caps titles.
+% Also see the OpenType \opt{Uppercase}
+% option of the \feat{Letters} feature (\vref*{sec:letters}).
+%
+%
+% \subsection{The hyphenation character}
+%
+% The letter used for hyphenation may be chosen with the \feat{HyphenChar}
+% feature. It takes three types of input, which are chosen according to some
+% simple rules. If the input is the string \opt{None}, then hyphenation is
+% suppressed for this font. If the input is a single character, then this
+% character is used. Finally, if the input is longer than a single character
+% it must be the UTF-8 slot number of the hyphen character you desire.
+%
+% Below, Adobe Garamond Pro's uppercase hyphenation character
+% \note{I found the character, and its number, in \MacOSX's Character Palette.}
+% is used to demonstrate a possible use for this feature.
+% The second example redundantly demonstrates the default behaviour
+% of using the hyphen as the hyphenation character.
+% \begingroup
+% \let\centering\relax
+% \begin{example}
+% \def\text
+% {A MULTITUDE OF OBSTREPEROUSLY HYPHENATED ENTITIES
+% \par\vspace{1ex}}
+% \fontspec[HyphenChar=None]{Adobe Garamond Pro} \text
+% \fontspec[HyphenChar={-}]{Adobe Garamond Pro} \text
+% \fontspec[HyphenChar="F6BA]{Adobe Garamond Pro} \text
+% \end{example}
+% \endgroup
+% Note that in an actual situation, the \opt{Uppercase} option of the \feat{Letters} feature
+% would probably supply this for you (see \vref{sec:letters}).
+%
+% The \pkg{xelatex} package redefines \LaTeX's \cmd\-\ macro
+% such that it adjusts along with the above changes.
+%
+% \section{Font-dependent features} \label{sec:features}
+%
+% This section covers each and every font feature catered for by this
+% package. Some, in fact, have already be seen in previous
+% sections. There are too many to list in this introduction, but for a
+% first taste of what is available, here is an example of the Apple
+% Chancery typeface:
+% \setexsize\Large
+% \begin{aatexample}
+% \fontspec[
+% Colour=CC00CC,
+% Numbers=OldStyle,
+% VerticalPosition=Ordinal,
+% Variant=2]{Apple Chancery}
+% My 1st example of\\ Apple Chancery
+% \end{aatexample}
+% Multiple options may be given to
+% any feature that accepts non-numerical input, although doing so will
+% not always work. Some options will override others in generally
+% obvious ways; \Verb|Numbers={OldStyle,Lining}| doesn't make much
+% sense because the two options are mutually exclusive, and \XeTeX\
+% will simply use the last option that is specified (in this case
+% using \opt{Lining} over \opt{OldStyle}).
+%
+% If a feature or an option is requested that the font does not have,
+% a warning is given in the console output. As mentioned in \vref{sec:quiet-warnings}
+% these warnings can be suppressed by selecting the \texttt{[quiet]} package option.
+%
+% \subsection{Different font technologies: AAT and ICU}\label{sec:renderer}
+%
+% \XeTeX\ supports two rendering technologies for typesetting, selected with
+% the \feat{Renderer} font feature. The first, \opt{AAT}, is
+% that provided (only) by \MacOSX\ itself. The second, \opt{ICU},
+% is an open source OpenType interpreter. It provides much greater support for
+% OpenType features, notably contextual arrangement, over \opt{AAT}.
+%
+% In general, this feature will not need to be explicitly called: for OpenType
+% fonts, the \opt{ICU} renderer is used automatically, and for AAT fonts,
+% \opt{AAT} is chosen by default. Some fonts, however, will contain font tables
+% for \emph{both} rendering technologies, such as the Hiragino Japanese fonts
+% distributed with \MacOSX, and in these cases the choice may be required.
+%
+% Among some other font features only available through a specific renderer,
+% \opt{ICU} provides for the \feat{Script} and \feat{Language} features, which allow
+% different font behaviour for different alphabets and languages; see \vref{sec:ot}
+% for the description of these features. {\em Because these font features can
+% change which features are able to be selected for the font instance, they are selected
+% by \pkg{fontspec} before all others and will automatically and without warning
+% select the \opt{ICU} renderer.}
+%
+%
+% \subsection{Optical font sizes} \label{sec:opticalsize}
+%
+% Optically scaled fonts thicken out as the font size decreases
+% in order to make the glyph shapes more robust (less prone to losing
+% detail), which improves legibility. Conversely, at large optical
+% sizes the serifs and other small details may be more delicately
+% rendered.
+%
+% Optically sized fonts can be seen in either OpenType or Multiple
+% Master varieties. The differences when dealing with these two are
+% quite significant. OpenType fonts with optical scaling will exist in
+% several discrete sizes, and these will be selected by \XeTeX\
+% \emph{automatically} determined by the current font size. The
+% \opt{OpticalSize} option may be used to specify a different optical
+% size.
+%
+% For the OpenType font Warnock Pro, we have three optically sized
+% variants: caption, subhead, and display. With \opt{OpticalSize} set
+% to zero, no optical size font substitution is performed:
+% \begin{opentypeexample}
+% \fontspec[OpticalSize=0]{Warnock Pro Caption}
+% Warnock Pro optical sizes \\
+% \fontspec[OpticalSize=0]{Warnock Pro}
+% Warnock Pro optical sizes \\
+% \fontspec[OpticalSize=0]{Warnock Pro Subhead}
+% Warnock Pro optical sizes \\
+% \fontspec[OpticalSize=0]{Warnock Pro Display}
+% Warnock Pro optical sizes
+% \end{opentypeexample}
+%
+% Automatic OpenType optical scaling is shown in the following
+% example, in which we've scaled down some large text in order to be
+% able to compare the difference for equivalent font sizes: (this
+% gives the same output as we saw in the previous example for Warnock
+% Pro Display)
+% \begin{opentypeexample}
+% \fontspec{Warnock Pro}
+% Automatic optical size \\
+% \scalebox{0.4}{\Huge
+% Automatic optical size}
+% \end{opentypeexample}
+%
+% Multiple Master fonts, on the other hand, are parameterised over
+% orthogonal font axes, allowing continuous selection along such
+% features as weight, width, and optical size~(see \vref{sec:mm} for
+% further details). Whereas an OpenType font will have only a few separate
+% optical sizes, a Multiple Master font's optical size can be
+% specified over a continuous range. Unfortunately, this flexibility makes
+% 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}
+%
+%
+%
+% \subsection{Ligatures}
+%
+% \feat{Ligatures} refer to the replacement of two separate characters
+% with a specially drawn glyph for functional or \ae sthetic reasons.
+% For AAT fonts, you may choose from any combination of \opt{Required},
+% \opt{Common}, \opt{Rare} (or \opt{Discretionary}), \opt{Logos}, \opt{Rebus},
+% \opt{Diphthong}, \opt{Squared}, \opt{AbbrevSquared}, and \opt{Icelandic}.
+%
+% The first three are also supported in OpenType fonts, which may also
+% use \opt{Historical} and \opt{Contextual}. To turn a ligature option
+% \emph{off}, prefix its name with \opt{No}: \eg, \opt{NoDiphthong}.
+% \setexsize\Large
+% \begin{example}
+% \fontspec[Ligatures=Rare]{Hoefler Text}
+% strict firefly \\
+% \fontspec[Ligatures=NoCommon]{Hoefler Text}
+% strict firefly
+% \end{example}
+% \setexsize\large
+% \begin{aatexample}
+% \fontspec
+% [Ligatures={Rare,Logos,Rebus,Diphthong}]
+% {Palatino}
+% Rare: Dh Th dh th \\
+% Logos: apple \\
+% Rebus: \%0 \\
+% Dipht\null hong: AE OE ae oe
+% \end{aatexample}
+% Some other Apple AAT fonts have those `Rare' ligatures contained in
+% the \opt{Icelandic} feature. Notice also that the old \TeX\ trick of
+% splitting up a ligature with an empty brace pair does not work in
+% \XeTeX; you must use a 0\,pt kern or \cs{hbox} (\eg, \cs{null}) to
+% split the characters up.
+%
+% \subsection{Letters} \label{sec:letters}
+% The \opt{Letters} feature~\warn{v1.6}{This feature has changed names
+% along with its options, \textbf{breaking} backwards
+% compatibility!} specifies how the letters in the current font
+% will look. For AAT fonts, you may choose from \opt{Normal},
+% \opt{Uppercase}, \opt{Lowercase}, \opt{SmallCaps}, and
+% \opt{InitialCaps}.
+% \begin{aatexample}
+% \fontspec[Letters=Uppercase]{Palatino}
+% THIS Sentence no verb \\
+% \fontspec[Letters=Lowercase]{Palatino}
+% THIS Sentence no verb \\
+% \fontspec[Letters=InitialCaps]{Palatino}
+% THIS Sentence no verb
+% \end{aatexample}
+% OpenType fonts have some different options:
+% \opt{Uppercase}, \opt{SmallCaps}, \opt{PetiteCaps}, \opt{UppercaseSmallCaps}, \opt{UppercasePetiteCaps}, and
+% \opt{Unicase}.
+% \warn{v1.9}{The \texttt{Uppercase...} variants have changed
+% (\eg, from \opt{SMALLCAPS}) to allow for more flexible
+% option handling in the future. The old forms still work, for now\dots}
+% Petite caps are smaller than small caps. Mixed case
+% commands turn lowercase letters into the smaller caps letters,
+% whereas uppercase options turn the capital letters to the smaller
+% caps (good, \eg, for applying to already uppercase acronyms like
+% `NASA'). `Unicase' is a weird hybrid of upper and lower case
+% letters.
+% \begin{opentypeexample}
+% \fontspec[Letters=SmallCaps]{Warnock Pro}
+% THIS SENTENCE no verb \\
+% \fontspec[Letters=UppercaseSmallCaps]{Warnock Pro}
+% THIS SENTENCE no verb
+% \end{opentypeexample}
+% The \opt{Uppercase} option is also provided \emph{but} it will (probably)
+% not actually map letters to uppercase.
+% \note{If you want automatic uppercase letters, look into the
+% \cmd\MakeUppercase\ command, as defined by \LaTeX.}
+% It will, however, select various
+% uppercase forms for glyphs such as accents and dashes.
+% \begin{opentypeexample}
+% \fontspec{Warnock Pro}
+% UPPER-CASE EXAMPLE \\
+% \addfontfeature{Letters=Uppercase}
+% UPPER-CASE EXAMPLE
+% \end{opentypeexample}
+% The \feat{Kerning} feature also contains an \opt{Uppercase} option,
+% which adds a small amount of spacing in between letters (see \vref{sec:kerning}).
+% This feature was originally planned to be included with the one above (so \feat{Letters=}\opt{Uppercase} would do both punctuation \emph{and} tracking), but I decided
+% that it would be a bad idea to break the one-to-one correspondence with \pkg{fontspec}
+% and OpenType features. (Sorry TUGboat readers!)
+%
+% \subsection{Numbers}
+% The \feat{Numbers} feature defines how numbers will look in the
+% selected font. For both AAT and OpenType fonts, they may be a
+% combination of \opt{Lining} or \opt{OldStyle} and \opt{Proportional} or
+% \opt{Monospaced} (the latter is good for tabular material). The synonyms
+% \opt{Uppercase} and \opt{Lowercase} are equivalent to \opt{Lining} and
+% \opt{OldStyle}, respectively. The differences have been shown previously
+% in \vref{sec:addfontfeatures}.
+%
+% For OpenType fonts, there is also the \opt{SlashedZero} option which
+% replaces the default zero with a slashed version to prevent
+% confusion with an uppercase `O'.
+% \begin{opentypeexample}
+% \fontspec[Numbers=Lining]{Warnock Pro}
+% 0123456789
+% \fontspec[Numbers=SlashedZero]{Warnock Pro}
+% 0123456789
+% \end{opentypeexample}
+%
+% \subsection{Contextuals}
+% This feature refers to glyph substitution that vary by their position;
+% things like contextual swashes are implemented here
+% \warn{v1.9}{This feature used to be called \feat{Swashes}. This name still works, for now.}.
+% The options for AAT fonts are
+% \opt{WordInitial}, \opt{WordFinal}, \opt{LineInitial},
+% \opt{LineFinal}, and \opt{Inner} (also called `non-final' sometimes). As
+% non-exclusive selectors, like the ligatures, you can turn them off
+% by prefixing their name with \opt{No}.
+% \begin{aatexample}
+% \fontspec
+% [Contextuals={WordInitial,WordFinal}]
+% {Hoefler Text Italic}
+% where is all the vegemite
+% \end{aatexample}
+% \begin{aatexample}
+% \fontspec[Contextuals=Inner]{Hoefler Text}
+% `Inner' swashes can \emph{sometimes} \\
+% contain the archaic long~s.
+% \end{aatexample}
+% For OpenType fonts, all features as above but the \opt{LineInitial} feature are supported,
+% and \opt{Swash} turns on contextual
+% swashes \warn{v1.9}{Used to be \opt{Contextual}; still works.}.
+% \begin{opentypeexample}
+% \fontspec{Warnock Pro} \itshape
+% Without Contextual Swashes \\
+% \fontspec[Contextuals=Swash]{Warnock Pro}
+% With Contextual Swashes; cf. W C S
+% \end{opentypeexample}
+% Historic forms (\eg, long~s as shown above) are accessed in OpenType
+% fonts via the feature \feat{Style=Historic}; this is generally \emph{not}
+% contextual in OpenType, which is why it is not included here.
+%
+%
+% \subsection{Diacritics}
+% Diacritics refer to characters that include extra marks that usually
+% indicate pronunciation; \eg, accented letters. You may either choose
+% to \opt{Show}, \opt{Hide} or \opt{Decompose} them in AAT fonts.
+%
+% Some fonts include |O/| \etc\ as diacritics for writing \O. You'll
+% want to turn this feature off (imagine typing |hello/goodbye| and
+% getting `hell\o goodbye' instead!) by decomposing the two characters
+% in the diacritic into the ones you actually
+% want. I would recommend using
+% the proper \TeX\ input conventions for obtaining such characters
+% instead.
+% \begin{aatexample}
+% \fontspec[Diacritics=Show]{Palatino}
+% O´ \quad O¨ \quad O/ \par
+% \fontspec[Diacritics=Decompose]{Palatino}
+% O´ \quad O¨ \quad O/ \par
+% Better: \'O \"O \O % (requires xunicode)
+% \end{aatexample}
+% The \opt{Hide} option is for Arabic-like fonts which may be
+% displayed either with or without vowel markings.
+%
+% No options for OpenType fonts.
+%
+% \subsection{Kerning}\label{sec:kerning}
+% Well designed fonts contain kerning information that controls the spacing between
+% letter pairs, on an individual basis. The \feat{Kerning} feature provides
+% options to control this, for OpenType fonts only.
+%
+% The options provided for now are \opt{On}, \opt{Off}, and \opt{Uppercase}.
+% \begin{opentypeexample}
+% \fontspec{Warnock Pro}
+% Ta AV \\
+% \fontspec[Kerning=Off]{Warnock Pro}
+% Ta AV
+% \end{opentypeexample}
+%
+% As briefly mentioned previously at the end of \vref{sec:letters},
+% the \opt{Uppercase} option will add a small amount of tracking between uppercase letters:
+% \begin{opentypeexample}
+% \fontspec{Warnock Pro}
+% UPPER-CASE EXAMPLE \\
+% \addfontfeature{Kerning=Uppercase}
+% UPPER-CASE EXAMPLE
+% \end{opentypeexample}
+%
+% \subsection{Vertical position}
+% Some subscript (\opt{Superior}) and superscript (\opt{Inferior}) numbers and
+% letters (and a small amount of punctuation, sometimes) are available
+% in various fonts. The \opt{Ordinal} feature is (supposed to be)
+% contextually sensitive to only raise characters that appear directly
+% after a number.
+% \begin{aatexample}
+% \fontspec{Skia}
+% Normal
+% \fontspec[VerticalPosition=Superior]{Skia}
+% Superior
+% \fontspec[VerticalPosition=Inferior]{Skia}
+% Inferior \\
+% \fontspec[VerticalPosition=Ordinal]{Skia}
+% 1st 2nd 3rd 4th 0th 8abcde
+% \end{aatexample}
+% OpenType fonts also have the option \opt{ScientificInferior} which
+% extends further below the baseline than \opt{Inferior}s, as well as
+% \opt{Numerator} and \opt{Denominator} for creating arbitrary fractions (see
+% next section). Beware, the \opt{Ordinal} feature will not work
+% correctly for all OpenType fonts!
+% \begin{opentypeexample}
+% \fontspec[VerticalPosition=Superior]{Warnock Pro}
+% Sup: abdehilmnorst (-\$12,345.67) \\
+% \fontspec[VerticalPosition=Numerator]{Warnock Pro}
+% Numerator: 12345 \\
+% \fontspec[VerticalPosition=Denominator]{Warnock Pro}
+% Denominator: 12345 \\
+% \fontspec[VerticalPosition=ScientificInferior]{Warnock Pro}
+% Scientific Inferior: 12345 \\
+% \fontspec[VerticalPosition=Ordinal]{Warnock Pro}
+% `Ordinals': 1st 2nd 3rd 4th 0th
+% \end{opentypeexample}
+%
+% The \pkg{xelatex} package redefines the \cmd\textsubscript\ and
+% \cmd\textsuperscript\ commands to use the above font features.
+%
+% \subsection{Fractions}
+% Many fonts come with the capability to typeset various forms of
+% fractional material. This is accessed in \pkg{fontspec} with the
+% \feat{Fractions} feature, which may be turned \opt{On} or \opt{Off}
+% in both AAT and OpenType fonts.~\warn{v1.7}{This feature has
+% changed: no backwards compatibility!}
+%
+% In AAT fonts, the `fraction slash' or solidus character, which may
+% be obtained by typing `{\fontspec{Lucida Grande}⌥⇧\,1}', is (supposed)
+% to be used to create fractions. When \feat{Fractions} are turned
+% \opt{On}, then (supposedly) only pre-drawn fractions will be used.
+% \setmonofont[Scale=0.8]{Monaco}
+% \begin{aatexample}
+% \fontspec[Fractions=On]{Palatino}
+% 1⁄2 \quad 5⁄6 \\ % fraction slash
+% 1/2 \quad 5/6 % regular slash
+% \end{aatexample}
+% Using the \opt{Diagonal} option (AAT only), the font will attempt
+% to create the fraction from superscript and subscript
+% characters. This is shown in the following example by Hoefler Text,
+% whose fraction support may actually not be turned off.
+% \begin{aatexample}
+% \fontspec{Hoefler Text}
+% 13579⁄24680 \\ % fraction slash
+% \quad 13579/24680 % regular slash
+% \end{aatexample}
+% \setmonofont[Scale=0.95]{Osaka-Mono}
+% OpenType fonts simply use a regular text slash to create fractions:
+% \begin{opentypeexample}
+% \fontspec{Hiragino Maru Gothic Pro W4}
+% 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
+% \addfontfeature{Fractions=On}
+% 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
+% \end{opentypeexample}
+% Some (Asian fonts predominantly, perhaps) also provide for the
+% \opt{Alternate} feature:
+% \begin{opentypeexample}
+% \fontspec{Hiragino Maru Gothic Pro W4}
+% 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
+% \addfontfeature{Fractions=Alternate}
+% 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
+% \end{opentypeexample}
+% The \pkg{xelatex} package provides a \cmd\vfrac\ command
+% for creating arbitrary so-called `vulgar' fractions:
+% \begin{opentypeexample}
+% \fontspec{Warnock Pro}
+% \vfrac{13579}{24680}
+% \end{opentypeexample}
+%
+%
+% \subsection{Variants}
+% The \feat{Variant} feature takes a single numerical input for
+% choosing different alphabetic shapes. Don't mind my fancy example
+% \texttt{:)} I'm just looping through the nine~(\,!\,) variants of
+% Zapfino.
+% \setexsize\Huge
+% \def\firstline{2}\def\lastline{9}
+% \begin{aatexample}
+% \rule{0pt}{2cm}%
+% \newcounter{var}\newcounter{trans}
+% \whiledo{\value{var}<9}{%
+% \stepcounter{trans}%
+% \fontspec[Variant=\thevar,
+% Colour=005599\thetrans\thetrans]{Zapfino}%
+% \makebox[0.75\width]{d}%
+% \stepcounter{var}}
+% \vspace{-1cm}
+% \end{aatexample}
+% For OpenType fonts, \opt{Variant} selects a `Stylistic Set', again
+% specified numerically. I don't have a font to
+% demonstrate this feature with, unfortunately.
+%
+% See \vref{sec:newfeatures} for a way to assign names to variants,
+% which should be done on a per-font basis.
+%
+% \subsection{AAT Alternates}
+%
+% Selection of \feat{Alternate}s in AAT fonts \emph{again}
+% must be done numerically.
+% \begin{aatexample}
+% \fontspec[Alternate=0]{Hoefler Text Italic}
+% Sphinx Of Black Quartz, {\scshape Judge My Vow} \\
+% \fontspec[Alternate=1]{Hoefler Text Italic}
+% Sphinx Of Black Quartz, {\scshape Judge My Vow}
+% \end{aatexample}
+% See \vref{sec:newfeatures} for a way to assign names to alternates,
+% which should be done on a per-font basis.
+%
+% \subsection{Style}
+% The options of the \feat{Style} feature
+% \warn{v1.7}{The old name, \feat{StyleOptions}, still works.}
+% are defined in AAT as one of the following: \opt{Display},
+% \opt{Engraved}, \opt{IlluminatedCaps}, \opt{Italic},
+% \opt{Ruby},\footnotemark\ \opt{TallCaps}, or \opt{TitlingCaps}.
+% \footnotetext{`Ruby' refers to a small optical size, used in
+% Japanese typography for annotations.}
+% \let\savemark\@thefnmark
+% \setexsize\Large
+% \begin{opentypeexample}
+% \fontspec{Warnock Pro}
+% K Q R k v w y \\
+% \addfontfeature{Style=Alternate}
+% K Q R k v w y
+% \end{opentypeexample}
+% \setexsize\huge
+% \begin{aatexample}
+% \fontspec[Style=Engraved]{Hoefler Text}
+% [ABCD\dots WXYZ]
+% \end{aatexample}
+% ICU supported options are \opt{Alternate},
+% \opt{Italic}, \opt{Historic}, \opt{Ruby},\footnotemark[\savemark]
+% \opt{Swash}, \opt{TitlingCaps}, \opt{HorizontalKana}, and \opt{VerticalKana}.
+% \setexsize\Large
+% \begin{opentypeexample}
+% \fontspec{Adobe Jenson Pro}
+% M Q Z \\
+% \addfontfeature{Style=Historic}
+% M Q Z
+% \end{opentypeexample}
+% \setexsize\Large
+% \begin{example}
+% \fontspec{Adobe Garamond Pro}
+% TITLING CAPS \\
+% \addfontfeature{Style=TitlingCaps}
+% TITLING CAPS
+% \end{example}
+% \setexsize\Large
+% \begin{opentypeexample}
+% \fontspec{Hiragino Mincho Pro W3}
+% Latin ようこそ ワカヨタレソ \\
+% \addfontfeature{Style={Italic, Ruby}}
+% Latin ようこそ ワカヨタレソ
+% \end{opentypeexample}
+% \setexsize\Large
+% \begin{aatexample}
+% \fontspec{Hiragino Mincho Pro}
+% ようこそ ワカヨタレソ \\
+% {\addfontfeature{Style=HorizontalKana}
+% ようこそ ワカヨタレソ} \\
+% {\addfontfeature{Style=VerticalKana}
+% ようこそ ワカヨタレソ}
+% \end{aatexample}
+%
+% \subsection{CJK shape}
+% There have been many standards for how CJK ideographic
+% glyphs are `supposed' to look. Some fonts will contain many alternate
+% glyphs available in order to be able to display these gylphs
+% correctly in whichever form is appropriate. Both AAT and OpenType
+% fonts support the following \feat{CJKShape} options
+% \warn{v1.9}{Was \feat{CharacterShape}, which wasn't very descriptive.
+% \textbf{No} backwards compatibility.}:
+% \opt{Traditional}, \opt{Simplified}, \opt{JIS1978}, \opt{JIS1983},
+% \opt{JIS1990}, and \opt{Expert}. OpenType also supports the \opt{NLC} option.
+% \setexsize\LARGE
+% \begin{opentypeexample}
+% \fontspec{Hiragino Mincho Pro}
+% {\addfontfeature{CJKShape=Traditional}
+% 唖噛躯 妍并訝 } \\
+% {\addfontfeature{CJKShape=NLC}
+% 唖噛躯 妍并訝 } \\
+% {\addfontfeature{CJKShape=Expert}
+% 唖噛躯 妍并訝 }
+% \end{opentypeexample}
+%
+% \subsection{Character width}\label{sec:CharacterWidth}
+% Many Asian fonts are equipped with variously spaced characters for
+% shoe-horning into their generally monospaced text.
+% These are
+% accessed through the \feat{CharacterWidth} feature.
+% \note{Apple
+% seems to be adapting its AAT features in this regard (at least in
+% the fonts it distributes with \MacOSX) to have a one-to-one
+% correspondence with the equivalent OpenType features. Previously
+% AAT was more fine grained, but naturally they're not documenting
+% their AAT tables any more, so if the following features don't work
+% for a specific font let me know and I'll try and see if anything
+% can be salvaged from the situation.}
+% \warn{v1.9}{Was \feat{TextSpacing}, which wasn't very descriptive.
+% \textbf{No} backwards compatibility.}
+% For now, OpenType and AAT
+% share the same six options for this feature: \opt{Proportional},
+% \opt{Full}, \opt{Half}, \opt{Third},
+% \opt{Quarter}, \opt{AlternateProportional}, and
+% \opt{AlternateHalf}. AAT also allows \opt{Default} to return to
+% whatever was originally specified.
+%
+% Japanese alphabetic glyphs (in Hiragana or Katakana) may be typeset
+% proportionally, to better fit horizontal measures, or monospaced, to
+% fit into the rigid grid imposed by ideographic typesetting. In this
+% latter case, there are also half-width forms for squeezing more kana
+% glyphs (which are less complex than the kanji they are amongst) into
+% a given block of space. The same features are given to roman letters
+% in Japanese fonts, for typesetting foreign words in the same style
+% as the surrounding text.
+% \begin{opentypeexample}
+% \def\test{\makebox[2cm][l]{ようこそ}%
+% \makebox[2.5cm][l]{ワカヨタレソ}%
+% \makebox[2.5cm][l]{abcdef}}
+% \fontspec{Hiragino Mincho Pro}
+% {\addfontfeature{CharacterWidth=Proportional}\test}\\
+% {\addfontfeature{CharacterWidth=Full}\test}\\
+% {\addfontfeature{CharacterWidth=Half}\test}
+% \end{opentypeexample}
+% The same situation occurs with numbers, which are provided in
+% increasingly illegible compressed forms:
+% \setexsize\large
+% \begin{aatexample}
+% \fontspec[Renderer=AAT]{Hiragino Mincho Pro}
+% {\addfontfeature{CharacterWidth=Full}
+% ---12321---}\\
+% {\addfontfeature{CharacterWidth=Half}
+% ---1234554321---}\\
+% {\addfontfeature{CharacterWidth=Third}
+% ---123456787654321---}\\
+% {\addfontfeature{CharacterWidth=Quarter}
+% ---12345678900987654321---}
+% \end{aatexample}
+% The option \opt{CharacterWidth=Full} doesn't work with the
+% default OpenType font renderer (ICU) due to a bug in the Hiragino fonts.
+%
+%
+% \subsection{Annotation}
+% Various Asian fonts are equipped with a more extensive range of
+% numbers and numerals in different forms. These are accessed through
+% the \feat{Annotation} feature with the following options: \opt{Off},
+% \opt{Box}, \opt{RoundedBox}, \opt{Circle}, \opt{BlackCircle},
+% \opt{Parenthesis}, \opt{Period}, \opt{RomanNumerals}, \opt{Diamond},
+% \opt{BlackSquare}, \opt{BlackRoundSquare}, and \opt{DoubleCircle}.
+% \begin{aatexample}
+% \fontspec{Hei Regular}
+% 1 2 3 4 5 6 7 8 9 \\
+% \fontspec[Annotation=Circle]{Hei Regular}
+% 1 2 3 4 5 6 7 8 9 \\
+% \fontspec[Annotation=Parenthesis]{Hei Regular}
+% 1 2 3 4 5 6 7 8 9 \\
+% \fontspec[Annotation=Period]{Hei Regular}
+% 1 2 3 4 5 6 7 8 9
+% \end{aatexample}
+% For OpenType fonts, the only option supported is \opt{On} and \opt{Off}:
+% \begin{opentypeexample}
+% \fontspec{Hiragino Maru Gothic Pro}
+% 1 2 3 4 5 6 7 8 9 \\
+% \addfontfeature{Annotation=On}
+% 1 2 3 4 5 6 7 8 9
+% \end{opentypeexample}
+% I'm not sure if \XeTeX\ can access alternate annotation
+% forms, even if they exist (as in this case) in the font.
+%
+% \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.
+%
+% \begin{aatexample}
+% \fontspec{Hiragino Mincho Pro}
+% 共産主義者は
+%
+% \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
+% example provided in the \XeTeX\ documentation.
+%
+% \subsection{AAT \& Multiple Master font axes} \label{sec:mm}
+%
+% Multiple Master and AAT font specifications both provide continuous
+% variation along font parameters. For example, they don't have just
+% regular and bold weights, they can have any bold weight you like between
+% the two extremes.
+%
+% \opt{Weight}, \opt{Width}, and \opt{OpticalSize} are supported by this
+% package. Skia, which is distributed with
+% Mac~OS~X, has two of these variable parameters, allowing for a
+% demonstration:
+% \begin{aatexample}
+% \fontspec[Weight=0.5,Width=3]{Skia}
+% Really light and extended Skia \\
+% \fontspec[Weight=2,Width=0.5]{Skia}
+% Really fat and condensed Skia
+% \end{aatexample}
+% Variations along a multiple master font's optical size axis has been
+% shown previously in \vref{sec:opticalsize}.
+%
+%
+% \subsection{OpenType scripts and languages}\label{sec:ot}
+%
+% When dealing with fonts that include glyphs for various languages,
+% they may contain different font features for the different character
+% sets and languages it supports. These may be selected with the
+% \feat{Script} and \feat{Language} features. The possible options are
+% tabulated in \vref{tab:ot-scpt} and \vref{tab:ot-lang},
+% respectively. When a script or language is requested that is not
+% supported by the current font, a warning is printed in the console output.
+%
+% Because these font features can
+% change which features are able to be selected for the font, they are selected
+% by \pkg{fontspec} before all others and will specifically select the \opt{ICU}
+% renderer for this font, as described in \vref{sec:renderer}.
+%
+% In the following examples, the same font is used to typeset the
+% verbatim input and the \XeTeX\ output. Because the \opt{Script} is
+% only specified for the output, the text is rendered incorrectly in
+% the verbatim input. Many examples of incorrect diacritic spacing as
+% well as a lack of contextual ligatures and rearrangement can be
+% seen. Thanks to \name{Jonathan Kew}, \name{Yves Codet} and
+% \name{Gildas Hamel} for their contributions towards these examples.
+%
+% \begingroup\setmonofont{Code2000}
+% \setverbwidth{0.5\textwidth}
+% \begin{opentypeexample}
+% \fontspec[Script=Arabic]{Code2000}
+% العربي
+% \end{opentypeexample}
+% \begin{opentypeexample}
+% \fontspec[Script=Devanagari]{Code2000}
+% हिन्दी
+% \end{opentypeexample}
+% \begin{opentypeexample}
+% \fontspec[Script=Bengali]{Code2000}
+% লেখ
+% \end{opentypeexample}
+% \begin{opentypeexample}
+% \fontspec[Script=Gujarati]{Code2000}
+% મર્યાદા-સૂચક નિવેદન
+% \end{opentypeexample}
+% \begin{opentypeexample}
+% \fontspec[Script=Malayalam]{Code2000}
+% നമ്മുടെ പാരബര്യ
+% \end{opentypeexample}
+% \begin{opentypeexample}
+% \fontspec[Script=Gurmukhi]{Code2000}
+% ਆਦਿ ਸਚੁ ਜੁਗਾਦਿ ਸਚੁ
+% \end{opentypeexample}
+% \begin{opentypeexample}
+% \fontspec[Script=Tamil]{Code2000}
+% தமிழ் தேடி
+% \end{opentypeexample}
+% \begin{opentypeexample}
+% \fontspec[Script=Hebrew]{Code2000}
+% רִדְתָּֽהּ
+% \end{opentypeexample}
+% \endgroup
+%
+% And an example of the differences caused by the Vietnamese \feat{Language} feature: (thanks, JK)
+%\begingroup
+%\setmonofont[Scale=MatchLowercase]{Monaco}
+% \begin{opentypeexample}
+% \def\viet{cung cấp một con số
+% duy nhất cho mỗi ký tự}
+% \fontspec{Doulos SIL}
+% \viet\\
+% \fontspec[Language=Vietnamese]{Doulos SIL}
+% \viet
+% \end{opentypeexample}
+%\endgroup
+%
+% \DescribeMacro{\newfontscript}
+% \DescribeMacro{\newfontlanguage}
+% Further scripts and languages may be added with the \cmd\newfontscript\
+% and \cmd\newfontlanguage\ commands. For example,
+% \begin{Verbatim}[gobble=4]
+% \newfontscript{Arabic}{arab}
+% \newfontlanguage{Turkish}{TUR}
+% \end{Verbatim}
+% The first argument is the \pkg{fontspec} name, the second the OpenType
+% definition. The advantage to using these commands rather than \cmd\newfontfeature\
+% (see \vref{sec:newfeatures}) is the error-checking that is performed when
+% the script or language is requested.
+%
+% \begin{table}[!hbp]
+% \def\dup{\makebox[0pt][r]{\textcolor{red}{\P}}}%
+% \setlength\columnseprule{0pt}
+% \hrule
+% \begin{multicols}{4}\setlength\parindent{0pt}
+% \sffamily\scriptsize
+% Arabic \par Armenian \par Balinese \par Bengali \par Bopomofo \par Braille \par Buginese \par Buhid \par Byzantine Music \par Canadian Syllabics \par Cherokee \par \dup CJK \par \dup CJK Ideographic \par Coptic \par Cypriot Syllabary \par Cyrillic \par Default \par Deseret \par Devanagari \par Ethiopic \par Georgian \par Glagolitic \par Gothic \par Greek \par Gujarati \par Gurmukhi \par Hangul Jamo \par Hangul \par Hanunoo \par Hebrew \par \dup Hiragana and Katakana \par \dup Kana \par Javanese \par Kannada \par Kharosthi \par Khmer \par Lao \par Latin \par Limbu \par Linear B \par Malayalam \par \dup Math \par \dup Maths \par Mongolian \par Musical Symbols \par Myanmar \par N'ko \par Ogham \par Old Italic \par Old Persian Cuneiform \par Oriya \par Osmanya \par Phags-pa \par Phoenician \par Runic \par Shavian \par Sinhala \par Sumero-Akkadian Cuneiform \par Syloti Nagri \par Syriac \par Tagalog \par Tagbanwa \par Tai Le \par Tai Lu \par Tamil \par Telugu \par Thaana \par Thai \par Tibetan \par Tifinagh \par Ugaritic Cuneiform \par Yi
+% \end{multicols}
+% \hrule
+% \caption{Defined \opt{Script}s for OpenType fonts. Aliased names are shown in adjacent positions marked with red pilcrows ({\sffamily\textcolor{red}{\P}}), defined in \texttt{fontspec.cfg}.}
+% \label{tab:ot-scpt}
+% \end{table}
+%
+% \begin{table}[p]
+% \vspace*{-3cm}
+% \hspace{-3cm}
+% \begin{minipage}{\linewidth+4cm}
+% \setlength\columnseprule{0pt}
+% \hrule
+% \begin{multicols}{6}
+% \everypar{\setlength\parindent{0pt}\setlength\hangindent{2em}}
+% \sffamily\footnotesize\raggedright
+% Abaza \par Abkhazian \par Adyghe \par Afrikaans \par Afar \par Agaw \par Altai \par Amharic \par Arabic \par Aari \par Arakanese \par Assamese \par Athapaskan \par Avar \par Awadhi \par Aymara \par Azeri \par Badaga \par Baghelkhandi \par Balkar \par Baule \par Berber \par Bench \par Bible Cree \par Belarussian \par Bemba \par Bengali \par Bulgarian \par Bhili \par Bhojpuri \par Bikol \par Bilen \par Blackfoot \par Balochi \par Balante \par Balti \par Bambara \par Bamileke \par Breton \par Brahui \par Braj Bhasha \par Burmese \par Bashkir \par Beti \par Catalan \par Cebuano \par Chechen \par Chaha Gurage \par Chattisgarhi \par Chichewa \par Chukchi \par Chipewyan \par Cherokee \par Chuvash \par Comorian \par Coptic \par Cree \par Carrier \par Crimean Tatar \par Church Slavonic \par Czech \par Danish \par Dargwa \par Woods Cree \par German \par Default \par Dogri \par Divehi \par Djerma \par Dangme \par Dinka \par Dungan \par Dzongkha \par Ebira \par Eastern Cree \par Edo \par Efik \par Greek \par English \par Erzya \par Spanish \par Estonian \par Basque \par Evenki \par Even \par Ewe \par French Antillean \par Farsi \par Finnish \par Fijian \par Flemish \par Forest Nenets \par Fon \par Faroese \par French \par Frisian \par Friulian \par Futa \par Fulani \par Ga \par Gaelic \par Gagauz \par Galician \par Garshuni \par Garhwali \par Ge'ez \par Gilyak \par Gumuz \par Gondi \par Greenlandic \par Garo \par Guarani \par Gujarati \par Haitian \par Halam \par Harauti \par Hausa \par Hawaiin \par Hammer-Banna \par Hiligaynon \par Hindi \par High Mari \par Hindko \par Ho \par Harari \par Croatian \par Hungarian \par Armenian \par Igbo \par Ijo \par Ilokano \par Indonesian \par Ingush \par Inuktitut \par Irish \par Irish Traditional \par Icelandic \par Inari Sami \par Italian \par Hebrew \par Javanese \par Yiddish \par Japanese \par Judezmo \par Jula \par Kabardian \par Kachchi \par Kalenjin \par Kannada \par Karachay \par Georgian \par Kazakh \par Kebena \par Khutsuri Georgian \par Khakass \par Khanty-Kazim \par Khmer \par Khanty-Shurishkar \par Khanty-Vakhi \par Khowar \par Kikuyu \par Kirghiz \par Kisii \par Kokni \par Kalmyk \par Kamba \par Kumaoni \par Komo \par Komso \par Kanuri \par Kodagu \par Korean Old Hangul \par Konkani \par Kikongo \par Komi-Permyak \par Korean \par Komi-Zyrian \par Kpelle \par Krio \par Karakalpak \par Karelian \par Karaim \par Karen \par Koorete \par Kashmiri \par Khasi \par Kildin Sami \par Kui \par Kulvi \par Kumyk \par Kurdish \par Kurukh \par Kuy \par Koryak \par Ladin \par Lahuli \par Lak \par Lambani \par Lao \par Latin \par Laz \par L-Cree \par Ladakhi \par Lezgi \par Lingala \par Low Mari \par Limbu \par Lomwe \par Lower Sorbian \par Lule Sami \par Lithuanian \par Luba \par Luganda \par Luhya \par Luo \par Latvian \par Majang \par Makua \par Malayalam Traditional \par Mansi \par Marathi \par Marwari \par Mbundu \par Manchu \par Moose Cree \par Mende \par Me'en \par Mizo \par Macedonian \par Male \par Malagasy \par Malinke \par Malayalam Reformed \par Malay \par Mandinka \par Mongolian \par Manipuri \par Maninka \par Manx Gaelic \par Moksha \par Moldavian \par Mon \par Moroccan \par Maori \par Maithili \par Maltese \par Mundari \par Naga-Assamese \par Nanai \par Naskapi \par N-Cree \par Ndebele \par Ndonga \par Nepali \par Newari \par Nagari \par Norway House Cree \par Nisi \par Niuean \par Nkole \par N'ko \par Dutch \par Nogai \par Norwegian \par Northern Sami \par Northern Tai \par Esperanto \par Nynorsk \par Oji-Cree \par Ojibway \par Oriya \par Oromo \par Ossetian \par Palestinian Aramaic \par Pali \par Punjabi \par Palpa \par Pashto \par Polytonic Greek \par Pilipino \par Palaung \par Polish \par Provencal \par Portuguese \par Chin \par Rajasthani \par R-Cree \par Russian Buriat \par Riang \par Rhaeto-Romanic \par Romanian \par Romany \par Rusyn \par Ruanda \par Russian \par Sadri \par Sanskrit \par Santali \par Sayisi \par Sekota \par Selkup \par Sango \par Shan \par Sibe \par Sidamo \par Silte Gurage \par Skolt Sami \par Slovak \par Slavey \par Slovenian \par Somali \par Samoan \par Sena \par Sindhi \par Sinhalese \par Soninke \par Sodo Gurage \par Sotho \par Albanian \par Serbian \par Saraiki \par Serer \par South Slavey \par Southern Sami \par Suri \par Svan \par Swedish \par Swadaya Aramaic \par Swahili \par Swazi \par Sutu \par Syriac \par Tabasaran \par Tajiki \par Tamil \par Tatar \par TH-Cree \par Telugu \par Tongan \par Tigre \par Tigrinya \par Thai \par Tahitian \par Tibetan \par Turkmen \par Temne \par Tswana \par Tundra Nenets \par Tonga \par Todo \par Turkish \par Tsonga \par Turoyo Aramaic \par Tulu \par Tuvin \par Twi \par Udmurt \par Ukrainian \par Urdu \par Upper Sorbian \par Uyghur \par Uzbek \par Venda \par Vietnamese \par Wa \par Wagdi \par West-Cree \par Welsh \par Wolof \par Tai Lue \par Xhosa \par Yakut \par Yoruba \par Y-Cree \par Yi Classic \par Yi Modern \par Chinese Hong Kong \par Chinese Phonetic \par Chinese Simplified \par Chinese Traditional \par Zande \par Zulu
+% \end{multicols}
+% \hspace{4pt}
+% \hrule
+% \caption{Defined \opt{Language}s for OpenType fonts.
+% Note that they are sorted alphabetically \emph{not}
+% by name but by OpenType tag, which is a little irritating, really.}
+% \label{tab:ot-lang}
+% \end{minipage}
+% \end{table}
+%
+% \section{Defining new features} \label{sec:newfeatures}
+% This package cannot hope to contain every possible font
+% feature. Three commands are provided for selecting font features
+% that are not provided for out of the box. If you are using
+% them a lot, chances are I've left something out, so please let me
+% know.
+%
+% \DescribeMacro{\newAATfeature}
+% New AAT features may be created with this command:\par
+% {\centering\cmd\newAATfeature\marg{feature}\marg{option}\marg{feature code}\marg{selector code}\par}\noindent
+% Use the \XeTeX\ file \path{AAT-info.tex} to obtain the code numbers. For example:
+% \begin{aatexample}
+% \newAATfeature{Alternate}{HoeflerSwash}{17}{1}
+% \fontspec[Alternate=HoeflerSwash]{Hoefler Text Italic}
+% This is XeTeX by Jonathan Kew.
+% \end{aatexample}
+% This command replaces \cmd\newfeaturecode, which is provided
+% for backwards compatibility via \texttt{fontspec.cfg}.
+%
+% \DescribeMacro{\newICUfeature}
+% New OpenType features may be created with this command:\par
+% {\centering\cmd\newICUfeature\marg{feature}\marg{option}\marg{feature tag}\par}
+% \begin{opentypeexample}
+% \newICUfeature{Example}{NoKern}{-kern}
+% \fontspec[Example=NoKern]{Warnock Pro} Ta AVA
+% \end{opentypeexample}
+%
+% \DescribeMacro{\newfontfeature}
+% In case the above commands do not accommodate the desired font feature
+% (perhaps a new \XeTeX\ feature that \pkg{fontspec} hasn't been updated
+% to support), a command is provided to pass arbitrary input into the
+% font selection string:\par
+% {\centering\cmd{\newfontfeature}\marg{name}\marg{input string}\par}
+%
+% For example, Zapfino
+% contains the feature `Avoid d-collisions'. To access it
+% with this package, you could do the following:
+% \begin{aatexample}
+% \newfontfeature{AvoidD}{Special=Avoid d-collisions}
+% \newfontfeature{NoAvoidD}{Special=!Avoid d-collisions}
+% \fontspec[AvoidD,Variant=1]{Zapfino}
+% sockdolager rubdown \\
+% \fontspec[NoAvoidD,Variant=1]{Zapfino}
+% sockdolager rubdown
+% \end{aatexample}
+%
+% The advantage to using the \cmd\newAATfeature\ and \cmd\newICUfeature\
+% commands is that they check if the selected font actually contains the font
+% feature. By contrast, \cmd\newfontfeature\ will not give a warning
+% for improper input.
+%
+% \subsection{Renaming existing features \& options}\label{sec:aliasfontfeature}
+%
+% \DescribeMacro{\aliasfontfeature}
+% If you don't like the name of a particular font feature,
+% it may be aliased to another with the
+% \cs{aliasfontfeature}\marg{existing name}\marg{new name} command:
+% \begin{aatexample}
+% \aliasfontfeature{ItalicFeatures}{IF}
+% \fontspec[IF = {Alternate=1}]{Hoefler Text}
+% Roman Letters \itshape And Swash
+% \end{aatexample}
+%
+% Spaces in feature (and option names, see below) \emph{are} allowed. (You may have
+% noticed this already in the lists of OpenType scripts and languages).
+%
+% \DescribeMacro{\aliasfontfeatureoption}
+% If you wish to change the name of a font feature option,
+% it can be aliased to another with the command
+% \cs{aliasfontfeatureoption}\marg{font feature}\marg{existing name}\marg{new name}:
+% \begin{opentypeexample}
+% \aliasfontfeature{VerticalPosition}{Vert Pos}
+% \aliasfontfeatureoption{VerticalPosition}{ScientificInferior}{Sci Inf}
+% \fontspec[Vert Pos=Sci Inf]{Warnock Pro}
+% Scientific~Inferior: 12345
+% \end{opentypeexample}
+% This example demonstrates an important point: when aliasing the feature
+% options, the \emph{original} feature name must be used when declaring
+% to which feature the option belongs.
+%
+% Only feature options that exist as sets of fixed strings may be altered in
+% this way. That is, \opt{Proportional} can be aliased to \opt{Prop} in the
+% \feat{Letters} feature, but \opt{550099BB} cannot be substituted for \opt{Purple}
+% in a \feat{Colour} specification. For this type of thing, the \cmd\newfontfeature\
+% command should be used to declare a new, \eg, \feat{PurpleColour} feature:
+% \begin{Verbatim}[gobble=4]
+% \newfontfeature{PurpleColour}{color=550099BB}
+% \end{Verbatim}
+%
+% \StopEventually{}
+%
+% \clearpage
+% \part{fontspec.sty}
+% \section{Implementation}
+% Herein lie the implementation details of this package. Welcome!
+% It's my first.
+%
+% \changes{v1.0}{2004/10/16}{Initial version.}
+% \changes{v1.1}{2004/10/18}{Name change to fontspec.}
+% \changes{v1.2}{2004/10/22}{Initial OpenType support.}
+% \changes{v1.3}{2004/10/25}{More OpenType support.}
+%
+% For some reason, I decided to prefix all the package internal
+% command names and variables with |zf|. I don't know why I chose
+% those letters, but I guess I just liked the look/feel of them
+% together at the time.
+%
+% \iffalse
+%<*fontspec>
+% \fi
+% Only proceed if it is \XeTeX\ that is doing the typesetting.
+% \begin{macrocode}
+\unless\ifdefined\XeTeXversion
+ \@latex@error{^^J
+ *************************************************^^J
+ *** Sorry! ^^J
+ *** The fontspec package only works with XeTeX. ^^J
+ *************************************************}
+\fi
+% \end{macrocode}
+% \subsection{Bits and pieces}
+% Counters, conditionals, \dots
+% \begin{macrocode}
+\newif\ifzf@firsttime
+\newif\ifzf@tfm
+\newif\ifzf@atsui
+\newif\ifzf@icu
+\newif\ifzf@mm
+\newif\ifzf@math@euler
+\newif\ifzf@math@lucida
+\newif\ifzf@euler@package@loaded
+\newif\ifzf@package@babel@loaded
+\newcount\c@zf@newff
+\newcount\c@zf@index
+\newcount\c@zf@script
+\newcount\c@zf@language
+% \end{macrocode}
+% \pkg{fontspec} shorthands:
+% \begin{macrocode}
+\newcommand\zf@PackageError[2]{\PackageError{fontspec}{#1}{#2}}
+\newcommand\zf@PackageWarning[1]{\PackageWarning{fontspec}{#1}}
+\newcommand\zf@PackageInfo[1]{\PackageInfo{fontspec}{#1}}
+% \end{macrocode}
+% \subsection{Packages}
+% We require the \pkg{calc} package for autoscaling and a recent version of the
+% \pkg{xkeyval} package for option processing.
+% \begin{macrocode}
+\RequirePackage{calc}
+\RequirePackage{xkeyval}[2005/05/07]
+% \end{macrocode}
+% \changes{v1.6}{2005/03/03}{\textsf{utf8accents} is no longer loaded
+% by this package!}
+%
+% \subsection{Encodings}
+% While the business of encoding names is up in the air, I'll continue
+% to use the |U| encoding.
+% \begin{macrocode}
+\def\zf@enc{U}
+%\RequirePackage[\zf@enc]{fontenc}
+\renewcommand\encodingdefault{\zf@enc}
+% \end{macrocode}
+% Dealing with \pkg{babel}:
+% \begin{macrocode}
+\def\cyrillicencoding{U}%
+\def\latinencoding{U}%
+\g@addto@macro\document{%
+ \def\cyrillicencoding{U}%
+ \def\latinencoding{U}}
+% \end{macrocode}
+% That latin encoding definition is repeated to suppress font warnings.
+% Something to do with \cmd\select@language\ ending up in the \texttt{.aux}
+% file which is read at the beginning of the document.
+% \changes{v1.10}{2006/05/04}{Some \pkg{babel} encoding problems resolved.}
+% \subsection{User commands}\label{sec:codeuser}
+%
+%
+% This section contains the definitions of the commands detailed in
+% the user documentation. Only the `top level' definitions of the
+% commands are contained herein; they all use or define macros which
+% are defined or used later on in \vref{sec:codeinternal}.
+%
+%
+% \subsubsection{Font selection}
+% \begin{macro}{\fontspec}
+% This is the main command of the package that
+% selects fonts with various features. It takes two arguments: the
+% Mac OS X font name and the optional requested features of that
+% font. It simply runs \cs{zf@fontspec}, which takes the same
+% arguments as the top level macro and puts the new-fangled font
+% family name into the global \cmd{\zf@family}. Then this new font
+% family is selected.
+% \begin{macrocode}
+\newcommand*\fontspec[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \fontfamily\zf@family\selectfont
+ \ignorespaces}
+% \end{macrocode}
+% \changes{v1.6}{2005/01/25}{Removed \cs{zf@currfont} (unnecessary)}
+% \changes{v1.9}{2005/12/14}{Added \cs{ignorespaces} to make it invisible.}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\setromanfont}
+% \begin{macro}{\setsansfont}
+% \begin{macro}{\setmonofont}
+% The following three macros perform equivalent operations setting
+% the default font (using \cs{let} rather than \cs{renewcommand}
+% because \cs{zf@family} will change in the future) for a
+% particular family: roman, sans serif, or typewriter
+% (monospaced). I end them with |\normalfont| so that if they're
+% used in the document, the change registers immediately.
+% \begin{macrocode}
+\newcommand*\setromanfont[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\rmdefault\zf@family
+ \normalfont}
+\newcommand*\setsansfont[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\sfdefault\zf@family
+ \normalfont}
+\newcommand*\setmonofont[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\ttdefault\zf@family
+ \normalfont}
+% \end{macrocode}
+% \end{macro} \end{macro}
+% \changes{v1.1}{2004/10/18}{Implemented (with friends).}
+% \changes{v1.6}{2005/01/25}{Changed \cs{rmdefault}, etc., assigning to use \cs{let} directly.}
+% \end{macro}
+%
+% \begin{macro}{\setmathrm}
+% \begin{macro}{\setmathsf}
+% \begin{macro}{\setboldmathrm}
+% \begin{macro}{\setmathtt}
+% These commands are analogous to \cmd\setromanfont\ and others,
+% but for selecting the font used for \cmd\mathrm, \etc. They
+% can only be used in the preamble of the
+% document. \cmd\setboldmathrm\ is used for specifying which
+% fonts should be used in \cmd\boldmath.
+% \begin{macrocode}
+\newcommand*\setmathrm[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\zf@rmmaths\zf@family}
+\newcommand*\setboldmathrm[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\zf@rmboldmaths\zf@family}
+\newcommand*\setmathsf[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\zf@sfmaths\zf@family}
+\newcommand*\setmathtt[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\zf@ttmaths\zf@family}
+\@onlypreamble\setmathrm
+\@onlypreamble\setboldmathrm
+\@onlypreamble\setmathsf
+\@onlypreamble\setmathtt
+% \end{macrocode}
+% If the commands above are not executed, then \cmd\rmdefault\ (etc.)
+% will be used.
+% \begin{macrocode}
+\def\zf@rmmaths{\rmdefault}
+\def\zf@sfmaths{\sfdefault}
+\def\zf@ttmaths{\ttdefault}
+% \end{macrocode}
+% \end{macro} \end{macro} \end{macro}
+% \changes{v1.8}{2005/07/04}{Implemented (with friends).}
+% \end{macro}
+%
+% \begin{macro}{\newfontinstance}
+% This macro takes the arguments of \cs{fontspec} with a prepended
+% \meta{instance cmd} (code for middle optional argument generated
+% by \name{Scott Pakin}'s \textsf{newcommand.py}). This command is used
+% when a specific font instance needs to be referred to repetitively
+% (\eg, in a section heading) since continuously calling
+% \cs{zf@fontspec} is inefficient because it must parse the
+% option arguments every time.
+%
+% \cs{zf@fontspec} defines a font family and saves its name in
+% \cs{zf@family}. So then this value is expanded in a temporary
+% macro also containing the \emph{unexpanded} commands to later
+% select the font family to which it refers. Finally, the requested
+% name for the font instance is \cs{let}ed from the temporary macro.
+% \begin{macrocode}
+\newcommand*\newfontinstance[1]{%
+ \@ifnextchar[{\newfontinstance@i#1}{\newfontinstance@i#1[]}}
+\def\newfontinstance@i#1[#2]#3{%
+ \zf@fontspec{#2}{#3}%
+ \edef#1{\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}
+% \end{macrocode}
+% \changes{v1.6}{2005/01/02}{Implemented.}
+% \end{macro}
+%
+% \subsubsection{Font feature selection}
+%
+% \begin{macro}{\defaultfontfeatures}
+% This macro takes one argument that consists of all of feature
+% options that will be applied by default to all subsequent
+% \cs{fontspec}, et al., commands. It stores its value in
+% \cs{zf@default@options} (initialised empty), which is
+% concatenated with the individual macro choices in the
+% \cs{zf@get@feature@requests} macro.
+% \begin{macrocode}
+\newcommand*\defaultfontfeatures[1]{\def\zf@default@options{#1,}}
+\let\zf@default@options\@empty
+% \end{macrocode}
+% \changes{v1.3}{2004/10/25}{Implemented.}
+% \changes{v1.4}{2004/11/25}{Name changed from \cs{setdefaultoptions}.}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\addfontfeatures}
+% In order to be able to extend the feature selection of
+% a given font, two things need to be known: the currently selected
+% features, and the currently selected font. Every time a font
+% family is created, this information is saved inside a control
+% sequence with the name of the font family itself.
+%
+% This macro extracts this information, then appends the requested
+% font features to add to the already existing ones, and calls the
+% font again with the top level \cs{fontspec} command.
+%
+% The default options are \emph{not} applied (which is why they're
+% saved and restored with \cs{zf@default@options@old}), so this
+% means that the only added features to the font are strictly those
+% specified by this command.
+%
+% \cs{addfontfeature} is defined as an alias, as I found that I
+% often typed this instead when adding only a single font feature.
+% \begin{macrocode}
+\newcommand*\addfontfeatures[1]{%
+ \let\zf@default@options@old\zf@default@options
+ \let\zf@default@options\@empty
+ \edef\zf@thisinfo{}%
+ \edef\@tempa{%
+ \noexpand\zf@fontspec
+ {\csname zf@family@options\f@family\endcsname,#1}%
+ {\csname zf@family@fontname\f@family\endcsname}}%
+ \@tempa
+ \fontfamily\zf@family\selectfont
+ \let\zf@default@options\zf@default@options@old
+ \ignorespaces}
+\let\addfontfeature\addfontfeatures
+% \end{macrocode}
+% \changes{v1.5}{2004/11/29}{Implemented.}
+% \changes{v1.6}{2005/02/03}{Removed \cs{relax}ing of temporary macros.}
+% \changes{v1.9}{2005/12/14}{Added \cs{ignorespaces} to make it invisible.}
+% \changes{v1.9}{2005/12/14}{Changed \cs{fontspec} call to \cs{@fontspec} so that \cs{ignorespaces} isn't called unnecessarily.}
+% \changes{v1.9}{2005/12/15}{Removed space in \texttt{, \#1}; can't believe I made this mistake again!}
+% \changes{v1.10}{2006/04/14}{Saved family information macro changes.}
+% \end{macro}
+%
+%
+% \subsubsection{Defining new font features}
+%
+% \begin{macro}{\newfontfeature}
+% \cs{newfontfeature} takes two arguments: the name of the feature
+% tag by which to reference it, and the string that is used to
+% select the font feature. It uses a counter to keep track of the
+% number of new features introduced; every time a new feature is
+% defined, a control sequence is defined made up of the
+% concatenation of |+zf-| and the new feature tag. This long-winded
+% control sequence is then called upon to update the font family
+% string when a new instance is requested.
+% \begin{macrocode}
+\newcommand*\newfontfeature[2]{%
+ \stepcounter{zf@newff}%
+ \def@cx{+zf-#1}{+zf-\the\c@zf@newff}%
+ \define@key[zf]{options}{#1}[]{%
+ \zf@update@family{\csname+zf-#1\endcsname}%
+ \zf@update@ff{#2}}}
+% \end{macrocode}
+% \changes{v1.3}{2004/10/25}{Implemented.}
+% \changes{v1.6}{2005/01/25}{\textsf{newff} counter now uses LaTeX
+% methods rather than primitive TeX. I don't know if there is any
+% advantage to this.}
+% \end{macro}
+%
+%
+% \begin{macro}{\newAATfeature}
+% This command assigns a new AAT feature by its code (|#2|,|#3|) to a new name (|#1|).
+% Better than \cmd\newfontfeature\ because it checks if the feature exists in the
+% font it's being used for.
+% \begin{macrocode}
+\newcommand*\newAATfeature[4]{%
+ \unless\ifcsname zf@options@#1\endcsname
+ \zf@define@font@feature{#1}%
+ \fi
+ \key@ifundefined[zf]{#1}{#2}{}{%
+ \zf@PackageWarning{Option '#2' of font feature '#1' overwritten.}}%
+ \zf@define@feature@option{#1}{#2}{#3}{#4}{}}
+% \end{macrocode}
+% \changes{v1.3}{2004/10/25}{Implemented.}
+% \changes{v1.9}{2006/02/12}{Replacement for \cmd\newfeaturecode.}
+% \end{macro}
+%
+% \begin{macro}{\newICUfeature}
+% This command assigns a new OpenType feature by its abbreviation (|#2|) to a new name (|#1|).
+% Better than \cmd\newfontfeature\ because it checks if the feature exists in the
+% font it's being used for.
+% \begin{macrocode}
+\newcommand*\newICUfeature[3]{%
+ \unless\ifcsname zf@options@#1\endcsname
+ \zf@define@font@feature{#1}%
+ \fi
+ \key@ifundefined[zf]{#1}{#2}{}{%
+ \zf@PackageWarning{Option '#2' of font feature '#1' overwritten.}}%
+ \zf@define@feature@option{#1}{#2}{}{}{#3}}
+% \end{macrocode}
+% \changes{v1.9}{2006/02/12}{Implemented.}
+% \end{macro}
+%
+%
+% \begin{macro}{\aliasfontfeature}
+% \changes{v1.9}{2005/12/09}{Implemented.}
+% \begin{macro}{\aliasfontfeatureoption}
+% \changes{v1.9}{2005/12/09}{Implemented.}
+% User commands for renaming font features and font feature options.
+% Provided I've been consistent, they should work for everything.
+% \begin{macrocode}
+\newcommand*\aliasfontfeature[2]{\multi@alias@key{#1}{#2}}
+\newcommand*\aliasfontfeatureoption[3]{\keyval@alias@key[zf@feat]{#1}{#2}{#3}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\newfontscript}
+% \begin{macrocode}
+\newcommand*\newfontscript[2]{%
+ \define@key[zf@feat]{Script}{#1}[]{%
+ \zf@check@ot@script{#2}%
+ \if@tempswa
+ \c@zf@script\@tempcnta\relax
+ \xdef\zf@script@name{#1}%
+ \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'}%
+ \fi}}
+% \end{macrocode}
+% \changes{v1.9}{2006/02/12}{Implemented.}
+% \end{macro}
+%
+% \begin{macro}{\newfontlanguage}
+% \begin{macrocode}
+\newcommand*\newfontlanguage[2]{%
+ \define@key[zf@feat]{Lang}{#1}[]{%
+ \zf@check@ot@lang{#2}%
+ \if@tempswa
+ \c@zf@language\@tempcnta\relax
+ \xdef\zf@language@name{#1}%
+ \xdef\zf@family@long{\zf@family@long+lang=#1}%
+ \xdef\zf@pre@ff{\zf@pre@ff language=#2,}%
+ \else
+ \zf@PackageWarning{Font \fontname\zf@basefont does not contain
+ language '#1' for script '\zf@script@name'}%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Internal macros}\label{sec:codeinternal}
+%
+% \begin{macro}{\def@cx}
+% \begin{macro}{\gdef@cx}
+% Natural counterparts to \cmd\@namedef.
+% \begin{macrocode}
+\providecommand\def@cx[2]{\expandafter\edef\csname#1\endcsname{#2}}
+\providecommand\gdef@cx[2]{\expandafter\xdef\csname#1\endcsname{#2}}
+\providecommand\let@cc[2]{\expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\zf@fontspec}
+% This is the command that defines font families for use. Given a
+% list of font features for a requested font (|#2|, stored
+% in \cs{zf@fontname} globally for the
+% \cs{zf@make@aat@feature@string} macro), it will define an NFSS
+% family for that font and put the family name into \cs{zf@family}.
+%
+% Then we check with \cs{zf@set@font@type} whether the font is AAT
+% or OpenType, and convert the requested features to font definition
+% strings. This is performed with \cs{zf@get@feature@requests}, in
+% which \cs{setkeys} retrieves the requested font features and
+% processes them. To build up the complex family name, it
+% concatenates each font feature with the family name of the
+% font. So since \cs{setkeys} is run more than once (since different
+% font faces may have different feature names), we only want the
+% complex family name to be built up once, hence the \cs{zf@firsttime}
+% conditionals.
+%
+% In the future, this will be replaced by a dedicated \texttt{makefamily}
+% \pkg{xkeyval} \cmd\setkeys\ declaration. Probably.
+%
+% This macro does its processing inside a group, but it's a bit worthless coz
+% there's all sorts of \cmd\global\ action going on. Pity.
+%
+% Finally, lots of things are branched out for the pure reason of splitting
+% the code up into logical chunks. Some of it is never even re-used, so it
+% all might be a bit worthless. (\Eg, \cmd\zf@init\ and \cmd\zf@set@font@type.)
+% \begin{macrocode}
+\newcommand*\zf@fontspec[2]{%
+ \begingroup
+ \zf@init
+ \edef\zf@fontname{#2}%
+ \let\zf@family@long\zf@fontname
+ \setkeys*[zf]{preparse}{#1}%
+ \edef\zf@font@feat{\zf@font@feat\XKV@rm}%
+ \unless\ifdefined\zf@basefont
+ \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \fi
+ \zf@set@font@type
+ \zf@firsttimetrue
+ \zf@get@feature@requests{\zf@font@feat}%
+ \zf@firsttimefalse
+% \end{macrocode}
+% Now we have a unique (in fact, too unique!) string that contains
+% the family name and every option in abbreviated form. This is used
+% with a counter to create a simple NFSS family name for the font we're
+% selecting.
+% \begin{macrocode}
+ \unless\ifcsname zf@UID@\zf@family@long\endcsname
+ \ifcsname c@zf@famc@#2\endcsname
+ \expandafter\stepcounter\else
+ \expandafter\newcounter\fi
+ {zf@famc@#2}%
+ \def@cx{zf@UID@\zf@family@long}{%
+ \zap@space#2 \@empty
+ (\expandafter\the\csname c@zf@famc@#2\endcsname)}%
+ \fi
+ \xdef\zf@family{\@nameuse{zf@UID@\zf@family@long}}%
+% \end{macrocode}
+% Now that we have the family name, we
+% can check to see if the family has already been defined, and if not,
+% do so. Once the family name is created, use it to create global
+% macros to save the user
+% string of the requested options and font name, primarily for use with
+% \cs{addfontfeatures}.
+% \begin{macrocode}
+ \unless\ifcsname zf@family@fontname\zf@family\endcsname
+ \zf@PackageInfo{Defining font family for "#2"
+ with options [\zf@default@options #1]}%
+ \gdef@cx{zf@family@fontname\zf@family}{\zf@fontname}%
+ \gdef@cx{zf@family@options\zf@family}{\zf@default@options #1}%
+ \gdef@cx{zf@family@fontdef\zf@family}{\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff}%
+% \end{macrocode}
+% Next the font family and its shapes are defined in the NFSS.
+%
+% All NFSS specifications take their default values, so if any of them
+% are redefined, the shapes will be selected to fit in with the
+% current state. For example, if \cmd\bfdefault\ is redefined to |b|, all
+% bold shapes defined by this package will also be assigned to |b|.
+%
+% The macros \cs{zf@bf}, et al., are used to store the name of the
+% custom bold, et al., font, if requested as user options. If they are
+% empty, the default fonts are used.
+%
+% First we define the font family and define the normal shape: (the
+% specified options are used implicitly)
+% \begin{macrocode}
+ \DeclareFontFamily{\zf@enc}{\zf@family}{}%
+ \zf@make@font@shapes{\zf@fontname}{\mddefault}{\updefault}{\zf@font@feat\zf@up@feat}%
+% \end{macrocode}
+% Secondly, bold. Start out by saving the current font features and
+% appending to them, if any, the extra bold options defined with
+% \feat{BoldFeatures}. Then, the bold font is defined either as the ATS
+% default (\cs{zf@make@font@shapes}' optional argument is to check if
+% there actually is one; if not, the bold NFSS series is left
+% undefined) or with the font specified with the \feat{BoldFont} feature.
+% \begin{macrocode}
+ \ifx\zf@bf\@empty
+ \zf@make@font@shapes[\zf@fontname]{/B}{\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
+ \else
+ \zf@make@font@shapes{\zf@bf}{\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
+ \fi
+% \end{macrocode}
+% And italic in the same way:
+% \begin{macrocode}
+ \ifx\zf@it\@empty
+ \zf@make@font@shapes[\zf@fontname]{/I}{\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
+ \else
+ \zf@make@font@shapes{\zf@it}{\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
+ \fi
+% \end{macrocode}
+% If requested, the custom fonts take precedence when choosing the
+% bold italic font. When both italic and bold fonts are requested and
+% the bold italic font hasn't been explicitly specified (a rare
+% occurance, presumably), the new bold font is used to define the new
+% bold italic font.
+% \begin{macrocode}
+ \ifx\zf@bfit\@empty
+ \ifx\zf@bf\@empty
+ \ifx\zf@it\@empty
+ \zf@make@font@shapes[\zf@fontname]{/BI}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \else
+ \zf@make@font@shapes[\zf@it]{/B}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \fi
+ \else
+ \zf@make@font@shapes[\zf@bf]{/I}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \fi
+ \else
+ \zf@make@font@shapes{\zf@bfit}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \fi
+ \fi
+ \endgroup
+ }
+% \end{macrocode}
+% \changes{v1.5}{2004/11/29}{NFSS specifiers now take the default values.}
+% \changes{v1.5}{2004/11/29}{Added code for choosing arbitrary bold/italic fonts.}
+% \changes{v1.5}{2004/12/01}{Checks if the font family has already been defined.}
+% \changes{v1.6}{2005/01/25}{Writes some info to the \texttt{.log} file}
+% \changes{v1.6}{2005/02/09}{Added code for choosing arbitrary bold/italic font features.}
+% \changes{v1.7}{2005/03/22}{Optional argument now mandatory.}
+% \changes{v1.9}{2005/08/07}{Incorporated \cmd{\zf@get@feature@requests} argument change.}
+% \changes{v1.9}{2005/08/07}{Incorporated \cmd{\zf@make@font@shapes} change; removed \cmd{\zf@options} storage macro.}
+% \changes{v1.9}{2005/08/07}{\cmd{\zf@current@options} -> \cs{zf@default@options #1}}
+% \changes{v1.9}{2005/08/07}{Absorbed the comma into \cmd{\zf@..@options} as to be more efficient when they are not defined.}
+% \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}
+%
+%
+% \subsubsection{Fonts}
+%
+% \begin{macro}{\zf@set@font@type}
+% This macro sets \cs{zf@atsui} or \cs{zf@icu} or \cs{zf@mm} booleans
+% accordingly depending if the font in \cmd\zf@basefont\ is an AAT
+% font or an OpenType font or a font with feature axes (either AAT or
+% Multiple Master), respectively.
+% \begin{macrocode}
+\newcommand*\zf@set@font@type{%
+ \zf@tfmfalse \zf@atsuifalse \zf@icufalse \zf@mmfalse
+ \ifcase\XeTeXfonttype\zf@basefont
+ \zf@tfm
+ \or
+ \zf@atsuitrue
+ \ifnum\XeTeXcountvariations\zf@basefont > 0
+ \zf@mmtrue
+ \fi
+ \or
+ \zf@icutrue
+ \fi}
+% \end{macrocode}
+% \changes{v1.7}{2005/04/18}{Removed exclusivity from font type
+% (AAT, OpenType) check, since fonts can be both.}
+% \changes{v1.7}{2005/06/18}{Added `MM' font type; tests true, \eg,
+% with Skia \& Minion MM. Used with the \feat{OpticalSize} feature.}
+% \changes{v1.7}{2005/06/18}{Removed various \cmd{\count255}s.}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\zf@make@font@shapes}
+% This macro uses \cs{DeclareFontShape} to define the font shape in
+% question. The arguments are:
+% \begin{itemize}\itemsep0pt\parsep0pt
+% \item |#1#2|~the font name, \item |#3|~the font series,
+% \item |#4|~the font shape, and \item |#5|~the font features.
+% \end{itemize}
+% 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.
+% \begin{macrocode}
+\newcommand*\zf@make@font@shapes[5][]{%
+ \bgroup
+ \edef\@tempa{#1}%
+ \ifx\@tempa\@empty\else
+ \font\@tempfonta="#1\zf@suffix" at \f@size pt
+ \edef\@tempa{\fontname\@tempfonta}%
+ \fi
+ \font\@tempfontb="#1#2\zf@suffix" at \f@size pt
+ \edef\@tempb{\fontname\@tempfontb}%
+ \ifx\@tempa\@tempb
+ \zf@PackageInfo{Could not resolve font #1#2 (it might not exist)}%
+ \else
+ \edef\zf@fontname{#1#2}%
+ \let\zf@basefont\@tempfontb
+ \zf@DeclareFontShape{#3}{#4}{#5}%
+% \end{macrocode}
+% Next, the small caps are defined. \cs{zf@make@smallcaps} 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}
+ \ifx\zf@sc\@empty
+ \zf@make@smallcaps
+ \ifx\zf@smallcaps\@empty\else
+ \zf@DeclareFontShape[\zf@smallcaps]{#3}
+ {\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
+ \fi
+ \else
+ \edef\zf@fontname{\zf@sc}%
+ \zf@DeclareFontShape{#3}
+ {\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
+ \fi
+ \fi
+ \egroup}
+% \end{macrocode}
+% Note that the test for italics to choose the \cmd\sidefault\ shape
+% only works while \cmd\zf@fontspec\ passes single tokens to this macro\dots
+% \changes{v1.5}{2004/11/29}{Absorbed font-checking from \cs{zf@fontspec}.}
+% \changes{v1.7}{2005/03/22}{Changed some \cs{edef}s to \cs{let}.}
+% \changes{v1.7}{2005/04/02}{Support for the \feat{OpticalSize} feature.}
+% \changes{v1.9}{2005/08/07}{Absorbed \cs{IfEqFonts}.}
+% \changes{v1.9}{2005/08/07}{Changed input syntax.}
+% \changes{v1.9}{2005/08/07}{Added argument for \cs{zf@get@feature@requests} change.}
+% \changes{v1.9}{2005/12/08}
+% {Added logging of \texttt{/B}, \texttt{/I}, \texttt{/BI} failure.}
+% \changes{v1.9}{2005/12/08}{Removed \cs{nfss@catcodes} wrapper.}
+% \changes{v1.9}{2005/12/09}{\cs{zf@scale@str} eliminated.}
+% \changes{v1.9}{2005/08/07}{Removed \cmd{\zf@scshape} macro.}
+% \changes{v1.9}{2005/12/11}{Incorporated \cmd\sidefault\ test into the
+% \cmd\DeclareFontShape\ argument directly now that it's fully expanded.}
+% \changes{v1.9}{2005/12/11}{Added code for \feat{SmallCaps...} features.}
+% \changes{v1.9}{2005/12/20}{Made local to hide \cs{zf@fontname} changes.}
+% \end{macro}
+%
+% \begin{macro}{\zf@DeclareFontShape}
+% Wrapper for \cmd\DeclareFontShape. Among omitting common arguments, it also
+% fully expands its input upon execution. This is mostly (or only?) useful
+% for the contents of \cmd\zf@adjust.
+%
+% The extra stuff for the slanted shape substitution is a little bit awkward,
+% but I'd rather have it here than break out yet another macro.
+% \begin{macrocode}
+\newcommand\zf@DeclareFontShape[4][]{%
+ \zf@get@feature@requests{#4}%
+ \def\@tempb{"\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff#1"}%
+ \zf@PackageInfo{\string\font\space is \@tempb}%
+ \edef\@tempa{\noexpand
+ \DeclareFontShape{\zf@enc}{\zf@family}{#2}{#3}
+ {<->\zf@scale\@tempb}{\zf@adjust}}%
+ \@tempa
+ \edef\@tempa{#3}\edef\@tempb{\itdefault}%
+ \ifx\@tempa\@tempb
+ \edef\@tempa{\noexpand
+ \DeclareFontShape{\zf@enc}{\zf@family}{#2}{\sldefault}
+ {<->sub*\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.}
+% \end{macro}
+%
+%
+% \begin{macro}{\zf@update@family}
+% This macro is used to build up a complex family name based on its
+% features.
+%
+% \cmd{\zf@firsttime} is set true in \cmd{\zf@fontspec} only the first
+% time \cmd{zf@get@feature@requests} is called, so that the family
+% name is only created once.
+% \begin{macrocode}
+\newcommand*{\zf@update@family}[1]{%
+ \ifzf@firsttime
+ \xdef\zf@family@long{\zf@family@long#1}%
+ \fi}
+% \end{macrocode}
+% \changes{v1.9}{2005/12/09}{Now fully expands arguments.}
+% \end{macro}
+%
+%
+% \subsubsection{Features}
+%
+% \begin{macro}{\zf@get@feature@requests}
+% This macro is a wrapper for |\setkeys| which expands and adds a
+% default specification to the original passed options. It begins by
+% initialising the commands used to hold font-feature specific
+% strings.
+% \begin{macrocode}
+\newcommand*\zf@get@feature@requests[1]{%
+ \let\zf@ff \@empty
+ \let\zf@scale \@empty
+ \let\zf@adjust \@empty
+ \edef\@tempa{\noexpand\setkeys[zf]{options}{\zf@default@options#1}}%
+ \@tempa}
+% \end{macrocode}
+% \changes{v1.6}{2005/01/25}{Removed the space between the comma and
+% \cs{zf@options} when it's concatenated with the defaults.}
+% \changes{v1.9}{2005/08/07}{Added an argument to eliminate the \cs{zf@options} macro.}
+% \changes{v1.9}{2005/08/07}{Absorbed comma into \cmd{\zf@default@options},
+% making \cmd{\zf@current@options} redundant.}
+% \changes{v1.9}{2005/12/20}{Removed init stuff.}
+%
+% \end{macro}
+%
+% \begin{macro}{\zf@init}
+% This functionality has been removed from \cmd\zf@get@feature@requests\
+% because it's no longer the first thing that can affect these things.
+% \begin{macrocode}
+\newcommand*\zf@init{%
+ \let\zf@pre@ff \@empty
+ \let\zf@font@feat \@empty
+ \let\zf@suffix \@empty
+ \let\zf@bf \@empty
+ \let\zf@it \@empty
+ \let\zf@bfit \@empty
+ \let\zf@sc \@empty
+ \let\zf@up@feat \@empty
+ \let\zf@bf@feat \@empty
+ \let\zf@it@feat \@empty
+ \let\zf@bfit@feat \@empty
+ \let\zf@sc@feat \@empty
+ \c@zf@script 1818326126\relax
+ \def\zf@script@name{Latin}%
+ \c@zf@language 0\relax
+ \def\zf@language@name{Default}%
+}
+% \end{macrocode}
+% \changes{v1.9}{2005/12/20}{Taken from \cs{zf@get@feature@requests}.}
+% \end{macro}
+%
+% \begin{macro}{\zf@make@smallcaps}
+% This macro checks if the font contains small caps, and if so
+% creates the string for accessing them in \cmd{\zf@smallcaps}.
+% \begin{macrocode}
+\newcommand*\zf@make@smallcaps{%
+ \let\zf@smallcaps\@empty
+ \ifzf@atsui
+ \zf@make@aat@feature@string{3}{3}%
+ \unless\ifx\zf@thisfontfeature\@empty
+ \edef\zf@smallcaps{\zf@thisfontfeature;}%
+ \fi
+ \fi
+ \ifzf@icu
+ \zf@check@ot@feat{+smcp}%
+ \if@tempswa
+ \edef\zf@smallcaps{+smcp,}%
+ \fi
+ \fi}
+% \end{macrocode}
+% \changes{v1.7}{2005/03/27}{Accommodation of the \cs{zf@thisfontfeature} change.}
+% \changes{v1.9}{2005/12/15}{Now uses \cs{zf@check@ot@feat}.}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\zf@update@ff}
+% \cmd{\zf@ff} is the string used to define the list of specific
+% font features. Each time another font feature is requested, this
+% macro is used to add that feature to the list. AAT features are
+% separated by semicolons, OpenType features by commas.
+% \begin{macrocode}
+\newcommand*\zf@update@ff[1]{%
+ \unless\ifzf@firsttime
+ \xdef\zf@ff{\zf@ff #1\ifzf@icu,\else;\fi}%
+ \fi}
+% \end{macrocode}
+% \changes{v1.7}{2005/05/30}{Fix for featureless fonts (\eg, the MS fonts) being ignored.}
+% \changes{v1.9}{2006/02/12}{Removed ridiculous \cs{zf@feature@separator} code.}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\zf@make@feature}
+% This macro is called by each feature key selected, and runs
+% according to which type of font is selected.
+% \begin{macrocode}
+\newcommand*\zf@make@feature[3]{%
+ \ifzf@atsui
+ \zf@make@aat@feature@string{#1}{#2}%
+ \ifx\zf@thisfontfeature\@empty
+ \zf@PackageWarning{%
+ AAT feature '\XKV@tfam=\XKV@tkey'
+ (#1,#2) not available in font \fontname\zf@basefont}%
+ \else
+ \zf@update@family{+#1,#2}%
+ \zf@update@ff\zf@thisfontfeature
+ \fi
+ \fi
+ \ifzf@icu
+ \zf@check@ot@feat{#3}%
+ \if@tempswa
+ \zf@update@family{#3}%
+ \zf@update@ff{#3}%
+ \else
+ \zf@PackageWarning{%
+ OpenType feature '\XKV@tfam=\XKV@tkey' (#3)
+ not available in font \fontname\zf@basefont, script
+ '\zf@script@name', language '\zf@language@name'}%
+ \fi
+ \fi}
+% \end{macrocode}
+% \changes{v1.7}{2005/03/27}{Accommodation of the \cs{zf@thisfontfeature} change.}
+% \changes{v1.9}{2006/02/12}{Now checks for OpenType feature.}
+% \changes{v1.10}{2006/04/04}{Removed embarrassing space after warnings.}
+% \end{macro}
+%
+% \begin{macro}{\zf@define@font@feature}
+% \begin{macro}{\zf@define@feature@option}
+% These macros are used in order to simplify font feature definition later on.
+% \begin{macrocode}
+\newcommand*\zf@define@font@feature[1]{%
+ \define@key[zf]{options}{#1}{{\setkeys[zf@feat]{#1}{##1}}}}
+\newcommand*\zf@define@feature@option[5]{%
+ \define@key[zf@feat]{#1}{#2}[]{\zf@make@feature{#3}{#4}{#5}}}
+% \end{macrocode}
+% \changes{v1.7}{2005/03/27}{Implemented for the bulk of the feature processing code.}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\keyval@alias@key}
+% This macro maps one \pkg{xkeyval} key to another.
+% \begin{macrocode}
+\newcommand*\keyval@alias@key[4][KV]{%
+ \let@cc{#1@#2@#4}{#1@#2@#3}%
+ \let@cc{#1@#2@#4@default}{#1@#2@#3@default}}
+% \end{macrocode}
+% \changes{v1.9}{2005/12/09}{Implemented.}
+% \end{macro}
+%
+% \begin{macro}{\multi@alias@key}
+% This macro iterates through families to map one key to another,
+% regardless of which family it's contained within.
+% \begin{macrocode}
+\newcommand*\multi@alias@key[2]{
+ \key@ifundefined[zf]{preparse}{#1}
+ {\key@ifundefined[zf]{options}{#1}
+ {\zf@PackageError{The feature #1 doesn't appear to be defined}
+ {It looks like you're trying to rename a feature that doesn't exist.}}
+ {\keyval@alias@key[zf]{options}{#1}{#2}}}
+ {\keyval@alias@key[zf]{preparse}{#1}{#2}}}
+% \end{macrocode}
+% \changes{v1.9}{2005/12/20}{Implemented for \cmd\aliasfontfeature.}
+% \end{macro}
+%
+% \begin{macro}{\zf@make@aat@feature@string}
+% This macro takes the numerical codes for a font feature and
+% creates a specified macro containing the string required in the
+% font definition to turn that feature on or off. Used primarily in
+% |\zf@make@aat@feature|, but also used to check if small caps
+% exists in the requested font.
+% \begin{macrocode}
+\newcommand*\zf@make@aat@feature@string[2]{%
+ \edef\zf@this@featurename{\XeTeXfeaturename\zf@basefont #1}%
+ \ifx\zf@this@featurename\@empty
+ \let\zf@thisfontfeature\@empty
+ \else
+ \edef\zf@this@selectionname{\XeTeXselectorname\zf@basefont #1 #2}%
+ \ifx\zf@this@selectionname\@empty
+ \let\zf@thisfontfeature\@empty
+ \else
+ \edef\zf@thisfontfeature{%
+ \ifnum\XeTeXisexclusivefeature\zf@basefont #1 > 0
+ \zf@this@featurename=\zf@this@selectionname
+ \else
+ \ifodd #2
+ \zf@this@featurename=!\zf@this@selectionname
+ \else
+ \zf@this@featurename=\zf@this@selectionname
+ \fi
+ \fi}%
+ \fi
+ \fi}
+% \end{macrocode}
+% \changes{v1.7}{2005/03/22}{Changed some \cs{edef}s to \cs{let}}
+% \changes{v1.7}{2005/03/27}{Removed third argument; always saves
+% the feature string in \cs{zf@thisfontfeature}}
+% \end{macro}
+%
+% \begin{macro}{\zf@iv@strnum}
+% \begin{macro}{\zf@v@strnum}
+% This macro takes a four character string and converts it to the
+% numerical representation required for \XeTeX\ OpenType script/language/feature
+% purposes. The output is stored in \cmd\@tempcnta.
+%
+% The reason it's ugly is because the input can be of the form of any of these:
+% `|abcd|', `|abc|', `|abc |', `|ab|', `|ab |', \etc.
+% (It is assumed the first two chars are \emph{always} not spaces.) So this macro
+% reads in the string, delimited by a space; this input is padded with \cmd\@empty s
+% and anything beyond four chars is snipped. The \cmd\@empty s then are used to reconstruct
+% the spaces in the string to number calculation.
+%
+% The variant \cmd\zf@v@strnum\ is used when looking at features, which are passed around
+% with prepended plus and minus signs (\eg, \texttt{+liga}, \texttt{-dlig}); it
+% simply strips off the first char of the input before calling the normal \cmd\zf@iv@strnum.
+%
+% It's probable that all OpenType features \emph{are} in fact four characters long, but
+% not impossible that they aren't. So I'll leave the less efficient parsing stage in there
+% even though it's not strictly necessary for now.
+% \begin{macrocode}
+\newcommand\zf@iv@strnum[1]{%
+ \zf@iv@strnum@i#1 \@nil}
+\def\zf@iv@strnum@i#1 \@nil{%
+ \zf@iv@strnum@ii#1\@empty\@empty\@nil}
+\def\zf@iv@strnum@ii#1#2#3#4#5\@nil{%
+ \@tempcnta\z@
+ \@tempcntb`#1\relax
+ \multiply\@tempcntb"1000000\advance\@tempcnta\@tempcntb
+ \@tempcntb`#2
+ \multiply\@tempcntb"10000\advance\@tempcnta\@tempcntb
+ \expandafter\@tempcntb\ifx\@empty#332\else`#3\fi
+ \multiply\@tempcntb"100\advance\@tempcnta\@tempcntb
+ \expandafter\@tempcntb\ifx\@empty#432\else`#4\fi
+ \advance\@tempcnta\@tempcntb}
+\newcommand\zf@v@strnum[1]{%
+ \expandafter\zf@iv@strnum@i\@gobble#1 \@nil}
+% \end{macrocode}
+% \changes{v1.9}{2005/12/24}{Implemented.}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\zf@check@ot@script}
+% This macro takes an OpenType script tag and checks if it exists in the current
+% font. The output boolean is \cmd\@tempswatrue. \cmd\@tempcnta\ is used to store
+% the number corresponding to the script tag string.
+% \begin{macrocode}
+\newcommand\zf@check@ot@script[1]{%
+ \zf@iv@strnum{#1}%
+ \@tempcntb\XeTeXOTcountscripts\zf@basefont
+ \c@zf@index\z@ \@tempswafalse
+ \loop\ifnum\c@zf@index<\@tempcntb
+ \ifnum\XeTeXOTscripttag\zf@basefont\c@zf@index=\@tempcnta
+ \@tempswatrue
+ \c@zf@index\@tempcntb
+ \else
+ \advance\c@zf@index\@ne
+ \fi
+ \repeat}
+% \end{macrocode}
+% \changes{v1.9}{2006/02/12}{Implemented.}
+% \end{macro}
+%
+% \begin{macro}{\zf@check@ot@lang}
+% This macro takes an OpenType language tag and checks if it exists in the current
+% font/script. The output boolean is \cmd\@tempswatrue. \cmd\@tempcnta\ is used to store
+% the number corresponding to the language tag string.
+% The script used is whatever's held in \cmd\c@zf@script. By default, that's the
+% number corresponding to `|latn|'.
+% \begin{macrocode}
+\newcommand\zf@check@ot@lang[1]{%
+ \zf@iv@strnum{#1}%
+ \@tempcntb\XeTeXOTcountlanguages\zf@basefont\c@zf@script
+ \c@zf@index\z@ \@tempswafalse
+ \loop\ifnum\c@zf@index<\@tempcntb
+ \ifnum\XeTeXOTlanguagetag\zf@basefont\c@zf@script\c@zf@index=\@tempcnta
+ \@tempswatrue
+ \c@zf@index\@tempcntb
+ \else
+ \advance\c@zf@index\@ne
+ \fi
+ \repeat}
+% \end{macrocode}
+% \changes{v1.9}{2006/02/12}{Implemented.}
+% \end{macro}
+%
+% \begin{macro}{\zf@check@ot@feat}
+% This macro takes an OpenType feature tag and checks if it exists in the current
+% font/script/language.
+% The output boolean is \cmd\@tempswa. \cmd\@tempcnta\ is used to store
+% the number corresponding to the feature tag string.
+% The script used is whatever's held in \cmd\c@zf@script. By default, that's the
+% number corresponding to `|latn|'. The language used is \cmd\c@zf@language,
+% by default |0|, the `default language'.
+% \begin{macrocode}
+\newcommand*\zf@check@ot@feat[1]{%
+ \@tempcntb\XeTeXOTcountfeatures\zf@basefont\c@zf@script\c@zf@language
+ \zf@v@strnum{#1}%
+ \c@zf@index\z@ \@tempswafalse
+ \loop\ifnum\c@zf@index<\@tempcntb
+ \ifnum\XeTeXOTfeaturetag\zf@basefont\c@zf@script\c@zf@language\c@zf@index=\@tempcnta
+ \@tempswatrue
+ \c@zf@index\@tempcntb
+ \else
+ \advance\c@zf@index\@ne
+ \fi
+ \repeat}
+% \end{macrocode}
+% \changes{v1.9}{2006/02/12}{Implemented.}
+% \end{macro}
+%
+% \subsection{\pkg{keyval} definitions}
+%
+% This is the tedious section where we correlate all possible
+% (eventually) font feature requests with their \XeTeX\ representations.
+%
+% \subsubsection{Bold/italic choosing options}
+%
+% The \opt{Bold}, \opt{Italic}, and \opt{BoldItalic}
+% features are for defining explicitly the bold and italic fonts used
+% in a font family. \textsf{v1.6} introduced arbitrary font features
+% for these shapes (\opt{BoldFeatures}, etc.), so the names of the
+% shape-selecting options were appended with \opt{Font} for
+% consistency.
+%
+% \changes{v1.5}{2004/11/29}{New options for arbitrary bold/italic shapes.}
+% \changes{v1.6}{2005/02/09}{\opt{Bold} option aliased to \opt{BoldFont}.}
+% \changes{v1.9}{2005/12/11}{New feature \feat{UprightFeatures}.}
+% \changes{v1.9}{2005/12/11}{New features \feat{SmallCapsFont} and \feat{SmallCapsFeatures}.}
+%
+% \paragraph{Fonts}
+% \begin{macrocode}
+\define@key[zf]{preparse}{BoldFont}{%
+ \zf@partial@fontname#1\@nil
+ \let\zf@bf\@tempa
+ \edef\zf@family@long{\zf@family@long bf:#1}}
+\define@key[zf]{preparse}{ItalicFont}{%
+ \zf@partial@fontname#1\@nil
+ \let\zf@it\@tempa
+ \edef\zf@family@long{\zf@family@long it:#1}}
+\define@key[zf]{preparse}{BoldItalicFont}{%
+ \zf@partial@fontname#1\@nil
+ \let\zf@bfit\@tempa
+ \edef\zf@family@long{\zf@family@long bfit:#1}}
+\define@key[zf]{options}{SmallCapsFont}{%
+ \zf@partial@fontname#1\@nil
+ \let\zf@sc\@tempa
+ \zf@update@family{sc:\zap@space #1 \@empty}}
+% \end{macrocode}
+%
+% \begin{macro}{\zf@partial@fontname}
+% This macro takes the next token and ends up defining \cmd\@tempa\
+% to the name of the font depending if it's been specified in full
+% (``\texttt{Baskerville Semibold}'') or in abbreviation (``\texttt{* Semibold}'').
+% \begin{macrocode}
+\def\zf@partial@fontname#1#2\@nil{%
+ \if#1*\relax
+ \edef\@tempa{\zf@fontname#2}%
+ \else
+ \edef\@tempa{#1#2}%
+ \fi}
+% \end{macrocode}
+% \changes{v1.9}{2006/02/03}{Implemented.}
+% \end{macro}
+%
+% \paragraph{Features}
+% Note that small caps features can vary by shape, so these in fact \emph{aren't} pre-parsed.
+% \begin{macrocode}
+\define@key[zf]{preparse}{UprightFeatures}{%
+ \def\zf@up@feat{,#1}%
+ \edef\zf@family@long{\zf@family@long rmfeat:#1}}
+\define@key[zf]{preparse}{BoldFeatures}{%
+ \def\zf@bf@feat{,#1}%
+ \edef\zf@family@long{\zf@family@long bffeat:#1}}
+\define@key[zf]{preparse}{ItalicFeatures}{%
+ \def\zf@it@feat{,#1}%
+ \edef\zf@family@long{\zf@family@long itfeat:#1}}
+\define@key[zf]{preparse}{BoldItalicFeatures}{%
+ \def\zf@bfit@feat{,#1}%
+ \edef\zf@family@long{\zf@family@long bfitfeat:#1}}
+\define@key[zf]{options}{SmallCapsFeatures}{%
+ \unless\ifzf@firsttime\def\zf@sc@feat{,#1}\fi
+ \zf@update@family{scfeat:\zap@space #1 \@empty}}
+% \end{macrocode}
+%
+% \subsubsection{The \feat{Renderer} pre-parsed feature}
+% 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}
+\define@choicekey[zf]{preparse}{Renderer}{AAT,ICU}{%
+ \edef\zf@suffix{\zf@suffix/#1}%
+ \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +rend:#1}}
+% \end{macrocode}
+%
+% \paragraph{OpenType script/language}
+% See later for the resolutions from \pkg{fontspec} features to OpenType definitions.
+% \begin{macrocode}
+\define@key[zf]{preparse}{Script}{%
+ \edef\zf@suffix{\zf@suffix/ICU}%
+ \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +script:#1}
+ {\setkeys[zf@feat]{Script}{#1}}}
+% \end{macrocode}
+% Exactly the same:
+% \begin{macrocode}
+\define@key[zf]{preparse}{Language}{%
+ \edef\zf@suffix{\zf@suffix/ICU}%
+ \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +language:#1}
+ {\setkeys[zf@feat]{Lang}{#1}}}
+% \end{macrocode}
+%
+% \subsubsection{Font-independent features}
+%
+% These features can be applied to any font.
+%
+% \paragraph{Scale}
+% \changes{v1.2}{2004/10/22}{Support for \feat{Scale}.}
+% \changes{v1.6}{2005/01/04}{\feat{Scale} feature now updates family name.}
+% \changes{v1.9}{2005/12/09}{New \feat{Scale} options: \opt{MatchLowercase} and \opt{MatchUppercase}.}
+% If the input isn't one of the pre-defined string options, then
+% it's gotta be numerical. \cmd\zf@calc@scale\ does all the work in
+% the auto-scaling cases.
+% \begin{macrocode}
+\define@key[zf]{options}{Scale}{%
+ \edef\@tempa{#1}%
+ \edef\@tempb{MatchLowercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{5}%
+ \else
+ \edef\@tempb{MatchUppercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{8}%
+ \else
+ \edef\zf@scale{#1}%
+ \fi
+ \fi
+ \zf@update@family{+scale:\zf@scale}%
+ \edef\zf@scale{s*[\zf@scale]}}
+% \end{macrocode}
+%
+% \begin{macro}{\zf@calc@scale}
+% This macro calculates the amount of scaling between the default
+% roman font and the (default shape of) the font being selected such
+% that the font dimension that is input is equal for both. The only
+% font dimensions that justify this are 5 (lowercase height)
+% and 8 (uppercase height in \XeTeX).
+%
+% This script is executed for every extra shape, which seems wasteful,
+% but allows alternate italic shapes from a separate font, say, to
+% be loaded and to be auto-scaled correctly. Even if this would be ugly.
+% \begin{macrocode}
+\newcommand\zf@calc@scale[1]{%
+ \begingroup
+ \rmfamily
+ \setlength\@tempdima{\fontdimen#1\font}%
+ \setlength\@tempdimb{\fontdimen#1\zf@basefont}%
+ \setlength\@tempdimc{1pt*\ratio{\@tempdima}{\@tempdimb}}%
+ \xdef\zf@scale{\strip@pt\@tempdimc}
+ \zf@PackageInfo{\zf@fontname\space scale = \zf@scale}%
+ \endgroup}
+% \end{macrocode}
+% \changes{v1.9}{2005/12/09}{Implemented for auto-scaling options.}
+% \end{macro}
+%
+% \paragraph{Inter-word space}
+% \changes{v1.9}{2005/12/09}{New feature \feat{WordSpace}.}
+% These options set the relevant \cmd\fontdimen s for the
+% font being loaded.
+% \begin{macrocode}
+\define@key[zf]{options}{WordSpace}{%
+ \zf@update@family{+wordspace:#1}%
+ \unless\ifzf@firsttime
+ \zf@wordspace@parse#1,\zf@@ii,\zf@@iii,\zf@@
+ \fi}
+% \end{macrocode}
+%
+% \begin{macro}{\zf@wordspace@parse}
+% This macro determines if the input to \feat{WordSpace} is
+% of the form |{X}| or |{X,Y,Z}| and executes the font scaling.
+% If the former input, it executes |{X,X,X}|.
+% \begin{macrocode}
+\def\zf@wordspace@parse#1,#2,#3,#4\zf@@{%
+ \def\@tempa{#4}%
+ \ifx\@tempa\@empty
+ \g@addto@macro\zf@adjust{%
+ \fontdimen2\font#1\fontdimen2\font
+ \fontdimen3\font#1\fontdimen3\font
+ \fontdimen4\font#1\fontdimen4\font}%
+ \else
+ \g@addto@macro\zf@adjust{%
+ \fontdimen2\font#1\fontdimen2\font
+ \fontdimen3\font#2\fontdimen3\font
+ \fontdimen4\font#3\fontdimen4\font}%
+ \fi}
+% \end{macrocode}
+% \changes{v1.9}{2005/12/12}{Implemented.}
+% \end{macro}
+%
+% \paragraph{Punctuation space}
+% \changes{v1.9}{2005/12/11}{New feature \feat{PunctuationSpace}.}
+% Scaling factor for the nominal \cmd\fontdimen \#7.
+% \begin{macrocode}
+\define@key[zf]{options}{PunctuationSpace}{%
+ \zf@update@family{+punctspace:#1}%
+ \g@addto@macro\zf@adjust{%
+ \fontdimen7\font#1\fontdimen7\font}}
+% \end{macrocode}
+%
+% \paragraph{Letterspacing}
+% \changes{v1.10}{2006/06/07}{New feature \feat{LetterSpacing}.}
+% \begin{macrocode}
+\define@key[zf]{options}{LetterSpace}{%
+ \zf@update@family{+tracking:#1}%
+ \zf@update@ff{letterspace=#1}}
+% \end{macrocode}
+%
+% \paragraph{Hyphenation character}
+% \changes{v1.9}{2005/12/11}{New feature \feat{HyphenChar}.}
+% This feature takes one of three arguments: `\opt{None}',
+% \meta{glyph}, or \meta{slot}. If the input isn't the first,
+% and it's one character, then it's the second; otherwise, it's
+% the third.
+% \begin{macrocode}
+\define@key[zf]{options}{HyphenChar}{%
+ \zf@update@family{+hyphenchar:#1}%
+ \edef\@tempa{#1}%
+ \edef\@tempb{None}%
+ \ifx\@tempa\@tempb
+ \g@addto@macro\zf@adjust{\hyphenchar\font-1\relax}%
+ \else
+ \zf@check@one@char#1\zf@@
+ \ifx\@tempb\@empty
+ \g@addto@macro\zf@adjust{%
+ {\expandafter\hyphenchar\expandafter
+ \font\expandafter`#1}}%
+ \else
+ \g@addto@macro\zf@adjust{\hyphenchar\font#1\relax}
+ \fi
+ \fi}
+\def\zf@check@one@char#1#2\zf@@{\def\@tempb{#2}}
+% \end{macrocode}
+%
+% \paragraph{Colour}
+% \changes{v1.3}{2004/10/25}{Support for \feat{Mapping} and \feat{Colour}.}
+% \changes{v1.10}{2006/02/17}{\feat{Color} brought back into the \texttt{.sty}}
+% \begin{macrocode}
+\define@key[zf]{options}{Colour}{%
+ \zf@update@family{+col:#1}%
+ \zf@update@ff{color=#1}}
+\keyval@alias@key[zf]{options}{Colour}{Color}
+% \end{macrocode}
+%
+% \paragraph{Mapping}
+% \begin{macrocode}
+\define@key[zf]{options}{Mapping}{%
+ \zf@update@family{+map:#1}%
+ \zf@update@ff{mapping=#1}}
+% \end{macrocode}
+%
+%
+% \subsubsection{Continuous font axes}
+%
+% \changes{v1.4}{2004/11/25}{Support for \opt{Weight} and \opt{Width}
+% AAT features.}
+% \changes{v1.7}{2005/04/18}{Removed AAT check for weight/width axes
+% (could also be Multiple Master)}
+% \changes{v1.7}{2005/04/02}{New feature: \feat{OpticalSize}; works
+% with both OpenType and MM fonts.}
+%
+% \begin{macrocode}
+\define@key[zf]{options}{Weight}{%
+ \zf@update@family{+weight:#1}%
+ \zf@update@ff{weight=#1}}
+\define@key[zf]{options}{Width}{%
+ \zf@update@family{+width:#1}%
+ \zf@update@ff{width=#1}}
+\define@key[zf]{options}{OpticalSize}{%
+ \ifzf@icu
+ \edef\zf@suffix{\zf@suffix/S=#1}%
+ \zf@update@family{+size:#1}
+ \fi
+ \ifzf@mm
+ \zf@update@family{+size:#1}%
+ \zf@update@ff{optical size=#1}
+ \fi
+ \ifzf@icu\else
+ \ifzf@mm\else
+ \ifzf@firsttime
+ \zf@PackageWarning
+ {\fontname\zf@basefont\space doesn't appear to have an Optical Size axis}
+ \fi
+ \fi
+ \fi}
+% \end{macrocode}
+%
+%
+% \subsubsection{Ligatures}
+% The call to the nested keyval family must be wrapped in braces to
+% hide the parent list (this later requires the use of global
+% definitions (|\xdef|) in |\zf@update@...|). Both AAT and OpenType
+% names are offered to chose |Rare|/|Discretionary| ligatures.
+% \changes{v1.6}{2004/12/07}{OpenType ligature features: \opt{Contextual}
+% and \opt{Historical}.}
+% \begin{macrocode}
+\zf@define@font@feature{Ligatures}
+\zf@define@feature@option{Ligatures}{Required} {1}{0}{+rlig}
+\zf@define@feature@option{Ligatures}{NoRequired} {1}{1}{-rlig}
+\zf@define@feature@option{Ligatures}{Common} {1}{2}{+liga}
+\zf@define@feature@option{Ligatures}{NoCommon} {1}{3}{-liga}
+\zf@define@feature@option{Ligatures}{Rare} {1}{4}{+dlig}
+\zf@define@feature@option{Ligatures}{NoRare} {1}{5}{-dlig}
+\zf@define@feature@option{Ligatures}{Discretionary} {1}{4}{+dlig}
+\zf@define@feature@option{Ligatures}{NoDiscretionary}{1}{5}{-dlig}
+\zf@define@feature@option{Ligatures}{Contextual} {}{} {+clig}
+\zf@define@feature@option{Ligatures}{NoContextual} {}{} {-clig}
+\zf@define@feature@option{Ligatures}{Historical} {}{} {+hlig}
+\zf@define@feature@option{Ligatures}{NoHistorical} {}{} {-hlig}
+\zf@define@feature@option{Ligatures}{Logos} {1}{6} {}
+\zf@define@feature@option{Ligatures}{NoLogos} {1}{7} {}
+\zf@define@feature@option{Ligatures}{Rebus} {1}{8} {}
+\zf@define@feature@option{Ligatures}{NoRebus} {1}{9} {}
+\zf@define@feature@option{Ligatures}{Diphthong} {1}{10}{}
+\zf@define@feature@option{Ligatures}{NoDiphthong} {1}{11}{}
+\zf@define@feature@option{Ligatures}{Squared} {1}{12}{}
+\zf@define@feature@option{Ligatures}{NoSquared} {1}{13}{}
+\zf@define@feature@option{Ligatures}{AbbrevSquared} {1}{14}{}
+\zf@define@feature@option{Ligatures}{NoAbbrevSquared}{1}{15}{}
+\zf@define@feature@option{Ligatures}{Icelandic} {1}{32}{}
+\zf@define@feature@option{Ligatures}{NoIcelandic} {1}{33}{}
+% \end{macrocode}
+%
+% \subsubsection{Letters}
+% \changes{v1.3a}{2004/10/29}{Bug fix for OpenType small caps.}
+% \changes{v1.6}{2005/01/02}{\feat{LetterCase} is now \feat{Letters}
+% and options changed appropriately.}
+% \changes{v1.6}{2004/12/01}{OpenType letters features:
+% \opt{PetiteCaps} and \opt{PETITECAPS}.}
+% \changes{v1.9}{2005/12/07}{\opt{SMALLCAPS} option changed to \opt{UppercaseSmallCaps}
+% to facilitate option normalisation (to come). Similarly for \opt{PETITECAPS}.}
+% \begin{macrocode}
+\zf@define@font@feature{Letters}
+\zf@define@feature@option{Letters}{Normal}{3}{0}{}
+\zf@define@feature@option{Letters}{Uppercase}{3}{1}{+case}
+\zf@define@feature@option{Letters}{Lowercase}{3}{2}{}
+\zf@define@feature@option{Letters}{SmallCaps}{3}{3}{+smcp}
+\zf@define@feature@option{Letters}{PetiteCaps}{}{}{+pcap}
+\zf@define@feature@option{Letters}{UppercaseSmallCaps}{}{}{+c2sc}
+\zf@define@feature@option{Letters}{UppercasePetiteCaps}{}{}{+c2pc}
+\zf@define@feature@option{Letters}{InitialCaps}{3}{4}{}
+\zf@define@feature@option{Letters}{Unicase}{}{}{+unic}
+% \end{macrocode}
+%
+% \subsubsection{Numbers}
+%
+% These were originally separated into \feat{NumberCase} and
+% \feat{NumberSpacing} following AAT, but it makes more sense to
+% combine them.
+%
+% Both naming conventions are offered to select the number case.
+%
+% \changes{v1.7}{2005/04/18}{AAT \feat{Numbers}:\opt{SlashedZero}.}
+% \begin{macrocode}
+\zf@define@font@feature{Numbers}
+\zf@define@feature@option{Numbers}{Monospaced}{6}{0}{+tnum}
+\zf@define@feature@option{Numbers}{Proportional}{6}{1}{+pnum}
+\zf@define@feature@option{Numbers}{Lowercase}{21}{0}{+onum}
+\zf@define@feature@option{Numbers}{OldStyle}{21}{0}{+onum}
+\zf@define@feature@option{Numbers}{Uppercase}{21}{1}{+lnum}
+\zf@define@feature@option{Numbers}{Lining}{21}{1}{+lnum}
+\zf@define@feature@option{Numbers}{SlashedZero}{14}{5}{+zero}
+\zf@define@feature@option{Numbers}{NoSlashedZero}{14}{4}{-zero}
+% \end{macrocode}
+%
+% \subsubsection{Contextuals}
+% \changes{v1.9}{2005/12/21}{\feat{Swashes} feature changed to \feat{Contextuals}. Option of this feature \opt{Contextual} changed to \opt{Swash}, for obvious reasons.}
+% \begin{macrocode}
+\zf@define@font@feature{Contextuals}
+\zf@define@feature@option{Contextuals}{Swash}{}{}{+cswh}
+\zf@define@feature@option{Contextuals}{NoSwash}{}{}{-cswh}
+\zf@define@feature@option{Contextuals}{WordInitial}{8}{0}{+init}
+\zf@define@feature@option{Contextuals}{NoWordInitial}{8}{1}{-init}
+\zf@define@feature@option{Contextuals}{WordFinal}{8}{2}{+fina}
+\zf@define@feature@option{Contextuals}{NoWordFinal}{8}{3}{-fina}
+\zf@define@feature@option{Contextuals}{LineInitial}{8}{4}{}
+\zf@define@feature@option{Contextuals}{NoLineInitial}{8}{5}{}
+\zf@define@feature@option{Contextuals}{LineFinal}{8}{6}{+falt}
+\zf@define@feature@option{Contextuals}{NoLineFinal}{8}{7}{-falt}
+\zf@define@feature@option{Contextuals}{Inner}{8}{8}{+medi}
+\zf@define@feature@option{Contextuals}{NoInner}{8}{9}{-medi}
+% \end{macrocode}
+%
+% \subsubsection{Diacritics}
+% \begin{macrocode}
+\zf@define@font@feature{Diacritics}
+\zf@define@feature@option{Diacritics}{Show}{9}{0}{}
+\zf@define@feature@option{Diacritics}{Hide}{9}{1}{}
+\zf@define@feature@option{Diacritics}{Decompose}{9}{2}{}
+% \end{macrocode}
+%
+% \subsubsection{Kerning}
+% \changes{v1.9}{2006/02/12}{New feature \feat{Kerning}.}
+% \begin{macrocode}
+\zf@define@font@feature{Kerning}
+\zf@define@feature@option{Kerning}{Uppercase}{}{}{+cpsp}
+\zf@define@feature@option{Kerning}{On}{}{}{+kern}
+\zf@define@feature@option{Kerning}{Off}{}{}{-kern}
+%\zf@define@feature@option{Kerning}{Vertical}{}{}{+vkrn}
+%\zf@define@feature@option{Kerning}{VerticalAlternateProportional}{}{}{+vpal}
+%\zf@define@feature@option{Kerning}{VerticalAlternateHalfWidth}{}{}{+vhal}
+% \end{macrocode}
+%
+% \subsubsection{Vertical position}
+% \begin{macrocode}
+\zf@define@font@feature{VerticalPosition}
+\zf@define@feature@option{VerticalPosition}{Normal}{10}{0}{}
+\zf@define@feature@option{VerticalPosition}{Superior}{10}{1}{+sups}
+\zf@define@feature@option{VerticalPosition}{Inferior}{10}{2}{+subs}
+\zf@define@feature@option{VerticalPosition}{ScientificInferior}{}{}{+sinf}
+\zf@define@feature@option{VerticalPosition}{Ordinal}{10}{3}{+ordn}
+\zf@define@feature@option{VerticalPosition}{Numerator}{}{}{+numr}
+\zf@define@feature@option{VerticalPosition}{Denominator}{}{}{+dnom}
+% \end{macrocode}
+%
+% \subsubsection{Fractions}
+% \changes{v1.6}{2005/03/05}{All AAT \feat{Fractions} features offered.}
+% \changes{v1.7}{2005/03/25}{OpenType \opt{Alternate} \feat{Fractions} feature.}
+% \begin{macrocode}
+\zf@define@font@feature{Fractions}
+\zf@define@feature@option{Fractions}{On}{11}{1}{+frac}
+\zf@define@feature@option{Fractions}{Off}{11}{0}{-frac}
+\zf@define@feature@option{Fractions}{Diagonal}{11}{2}{}
+\zf@define@feature@option{Fractions}{Alternate}{}{}{+afrc}
+% \end{macrocode}
+%
+% \subsubsection{Alternates and variants}
+% Selected numerically because they don't have standard names. Very
+% easy to process, very annoying for the user!
+%
+% \changes{v1.6}{2005/03/05}{OpenType stylistic sets supports under the \opt{Variant} option.}
+% \changes{v1.7}{2005/03/26}{OpenType \feat{Alternate} now only AAT.}
+% \changes{v1.9}{2006/02/12}{Alternate/Variant options can be assigned names.}
+%
+% \begin{macrocode}
+\define@key[zf]{options}{Alternate}{%
+ \setkeys*[zf@feat]{Alternate}{#1}%
+ \unless\ifx\XKV@rm\@empty
+ \zf@make@feature{17}{#1}{}%
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\define@key[zf]{options}{Variant}{%
+ \setkeys*[zf@feat]{Variant}{#1}%
+ \unless\ifx\XKV@rm\@empty
+ \zf@make@feature{18}{#1}{+ss\two@digits{#1}}%
+ \fi}
+% \end{macrocode}
+%
+% \subsubsection{Style}
+% \changes{v1.7}{2005/03/26}
+% {\feat{Style} feature renamed from \feat{StyleOptions}.}
+% \begin{macrocode}
+\zf@define@font@feature{Style}
+\zf@define@feature@option{Style}{Alternate}{}{}{+salt}
+\zf@define@feature@option{Style}{Italic}{32}{2}{+ital}
+\zf@define@feature@option{Style}{Ruby}{28}{2}{+ruby}
+\zf@define@feature@option{Style}{Swash}{}{}{+swsh}
+\zf@define@feature@option{Style}{Historic}{}{}{+hist}
+\zf@define@feature@option{Style}{Display}{19}{1}{}
+\zf@define@feature@option{Style}{Engraved}{19}{2}{}
+\zf@define@feature@option{Style}{TitlingCaps}{19}{4}{+titl}
+\zf@define@feature@option{Style}{TallCaps}{19}{5}{}
+\zf@define@feature@option{Style}{HorizontalKana}{}{}{+hkna}
+\zf@define@feature@option{Style}{VerticalKana}{}{}{+vkna}
+% \end{macrocode}
+%
+% \subsubsection{CJK shape}
+% \changes{v1.7}{2005/03/26}{New feature: \feat{CharacterShape}}
+% \changes{v1.9}{2006/02/12}{\feat{CharacterShape} now \feat{CJKShape}}
+% \begin{macrocode}
+\zf@define@font@feature{CJKShape}
+\zf@define@feature@option{CJKShape}{Traditional}{20}{0}{+trad}
+\zf@define@feature@option{CJKShape}{Simplified}{20}{1}{+smpl}
+\zf@define@feature@option{CJKShape}{JIS1978}{20}{2}{+jp78}
+\zf@define@feature@option{CJKShape}{JIS1983}{20}{3}{+jp83}
+\zf@define@feature@option{CJKShape}{JIS1990}{20}{4}{+jp90}
+\zf@define@feature@option{CJKShape}{Expert}{20}{10}{+expt}
+\zf@define@feature@option{CJKShape}{NLC}{20}{13}{+nlck}
+% \end{macrocode}
+%
+% \subsubsection{Character width}
+% \changes{v1.7}{2005/04/18}{New feature: \feat{CharacterWidth}}
+% \changes{v1.9}{2006/02/12}{\feat{TextSpacing} now \feat{CharacterWidth}, with associated option names' change.}
+% \begin{macrocode}
+\zf@define@font@feature{CharacterWidth}
+\zf@define@feature@option{CharacterWidth}{Proportional}{22}{0}{+pwid}
+\zf@define@feature@option{CharacterWidth}{Full}{22}{1}{+fwid}
+\zf@define@feature@option{CharacterWidth}{Half}{22}{2}{+hwid}
+\zf@define@feature@option{CharacterWidth}{Third}{22}{3}{+twid}
+\zf@define@feature@option{CharacterWidth}{Quarter}{22}{4}{+qwid}
+\zf@define@feature@option{CharacterWidth}{AlternateProportional}{22}{5}{+palt}
+\zf@define@feature@option{CharacterWidth}{AlternateHalf}{22}{6}{+halt}
+\zf@define@feature@option{CharacterWidth}{Default}{22}{7}{}
+% \end{macrocode}
+%
+% \subsubsection{Annotation}
+% \changes{v1.7}{2005/03/26}{New feature: \feat{Annotation}}
+% \begin{macrocode}
+\zf@define@font@feature{Annotation}
+\zf@define@feature@option{Annotation}{Off}{24}{0}{-nalt}
+\zf@define@feature@option{Annotation}{On}{}{}{+nalt}
+\zf@define@feature@option{Annotation}{Box}{24}{1}{}
+\zf@define@feature@option{Annotation}{RoundedBox}{24}{2}{}
+\zf@define@feature@option{Annotation}{Circle}{24}{3}{}
+\zf@define@feature@option{Annotation}{BlackCircle}{24}{4}{}
+\zf@define@feature@option{Annotation}{Parenthesis}{24}{5}{}
+\zf@define@feature@option{Annotation}{Period}{24}{6}{}
+\zf@define@feature@option{Annotation}{RomanNumerals}{24}{7}{}
+\zf@define@feature@option{Annotation}{Diamond}{24}{8}{}
+\zf@define@feature@option{Annotation}{BlackSquare}{24}{9}{}
+\zf@define@feature@option{Annotation}{BlackRoundSquare}{24}{10}{}
+\zf@define@feature@option{Annotation}{DoubleCircle}{24}{11}{}
+% \end{macrocode}
+%
+%
+% \subsubsection{Vertical}
+% \changes{v1.9}{2006/02/12}{New feature \feat{Vertical}.}
+% \begin{macrocode}
+\zf@define@font@feature{Vertical}
+\define@key[zf@feat]{Vertical}{RotatedGlyphs}[]{%
+ \ifzf@icu
+ \zf@make@feature{}{}{+vrt2}%
+ \else
+ \zf@update@family{+vert}%
+ \zf@update@ff{vertical}%
+ \fi}
+% \end{macrocode}
+%
+% \subsubsection{Script}
+% \changes{v1.6}{2005/02/28}{New OpenType feature: \opt{Script}}
+% \begin{macrocode}
+\newfontscript{Arabic}{arab} \newfontscript{Armenian}{armn}
+\newfontscript{Balinese}{bali} \newfontscript{Bengali}{beng}
+\newfontscript{Bopomofo}{bopo} \newfontscript{Braille}{brai}
+\newfontscript{Buginese}{bugi} \newfontscript{Buhid}{buhd}
+\newfontscript{Byzantine Music}{byzm} \newfontscript{Canadian Syllabics}{cans}
+\newfontscript{Cherokee}{cher}
+\newfontscript{CJK Ideographic}{hani} \newfontscript{Coptic}{copt}
+\newfontscript{Cypriot Syllabary}{cprt} \newfontscript{Cyrillic}{cyrl}
+\newfontscript{Default}{DFLT} \newfontscript{Deseret}{dsrt}
+\newfontscript{Devanagari}{deva} \newfontscript{Ethiopic}{ethi}
+\newfontscript{Georgian}{geor} \newfontscript{Glagolitic}{glag}
+\newfontscript{Gothic}{goth} \newfontscript{Greek}{grek}
+\newfontscript{Gujarati}{gujr} \newfontscript{Gurmukhi}{guru}
+\newfontscript{Hangul Jamo}{jamo} \newfontscript{Hangul}{hang}
+\newfontscript{Hanunoo}{hano} \newfontscript{Hebrew}{hebr}
+\newfontscript{Hiragana and Katakana}{kana}
+\newfontscript{Javanese}{java} \newfontscript{Kannada}{knda}
+\newfontscript{Kharosthi}{khar} \newfontscript{Khmer}{khmr}
+\newfontscript{Lao}{lao } \newfontscript{Latin}{latn}
+\newfontscript{Limbu}{limb} \newfontscript{Linear B}{linb}
+\newfontscript{Malayalam}{mlym} \newfontscript{Math}{math}
+\newfontscript{Mongolian}{mong}
+\newfontscript{Musical Symbols}{musc} \newfontscript{Myanmar}{mymr}
+\newfontscript{N'ko}{nko } \newfontscript{Ogham}{ogam}
+\newfontscript{Old Italic}{ital} \newfontscript{Old Persian Cuneiform}{xpeo}
+\newfontscript{Oriya}{orya} \newfontscript{Osmanya}{osma}
+\newfontscript{Phags-pa}{phag} \newfontscript{Phoenician}{phnx}
+\newfontscript{Runic}{runr} \newfontscript{Shavian}{shaw}
+\newfontscript{Sinhala}{sinh} \newfontscript{Sumero-Akkadian Cuneiform}{xsux}
+\newfontscript{Syloti Nagri}{sylo} \newfontscript{Syriac}{syrc}
+\newfontscript{Tagalog}{tglg} \newfontscript{Tagbanwa}{tagb}
+\newfontscript{Tai Le}{tale} \newfontscript{Tai Lu}{talu}
+\newfontscript{Tamil}{taml} \newfontscript{Telugu}{telu}
+\newfontscript{Thaana}{thaa} \newfontscript{Thai}{thai}
+\newfontscript{Tibetan}{tibt} \newfontscript{Tifinagh}{tfng}
+\newfontscript{Ugaritic Cuneiform}{ugar}\newfontscript{Yi}{yi }
+% \end{macrocode}
+%
+% \subsubsection{Language}
+% \changes{v1.6}{2005/03/02}{New OpenType feature: \opt{Language}}
+% \begin{macrocode}
+\newfontlanguage{Abaza}{ABA}\newfontlanguage{Abkhazian}{ABK}\newfontlanguage{Adyghe}{ADY}
+\newfontlanguage{Afrikaans}{AFK}\newfontlanguage{Afar}{AFR}\newfontlanguage{Agaw}{AGW}
+\newfontlanguage{Altai}{ALT}\newfontlanguage{Amharic}{AMH}\newfontlanguage{Arabic}{ARA}
+\newfontlanguage{Aari}{ARI}\newfontlanguage{Arakanese}{ARK}\newfontlanguage{Assamese}{ASM}
+\newfontlanguage{Athapaskan}{ATH}\newfontlanguage{Avar}{AVR}\newfontlanguage{Awadhi}{AWA}
+\newfontlanguage{Aymara}{AYM}\newfontlanguage{Azeri}{AZE}\newfontlanguage{Badaga}{BAD}
+\newfontlanguage{Baghelkhandi}{BAG}\newfontlanguage{Balkar}{BAL}\newfontlanguage{Baule}{BAU}
+\newfontlanguage{Berber}{BBR}\newfontlanguage{Bench}{BCH}\newfontlanguage{Bible Cree}{BCR}
+\newfontlanguage{Belarussian}{BEL}\newfontlanguage{Bemba}{BEM}\newfontlanguage{Bengali}{BEN}
+\newfontlanguage{Bulgarian}{BGR}\newfontlanguage{Bhili}{BHI}\newfontlanguage{Bhojpuri}{BHO}
+\newfontlanguage{Bikol}{BIK}\newfontlanguage{Bilen}{BIL}\newfontlanguage{Blackfoot}{BKF}
+\newfontlanguage{Balochi}{BLI}\newfontlanguage{Balante}{BLN}\newfontlanguage{Balti}{BLT}
+\newfontlanguage{Bambara}{BMB}\newfontlanguage{Bamileke}{BML}\newfontlanguage{Breton}{BRE}
+\newfontlanguage{Brahui}{BRH}\newfontlanguage{Braj Bhasha}{BRI}\newfontlanguage{Burmese}{BRM}
+\newfontlanguage{Bashkir}{BSH}\newfontlanguage{Beti}{BTI}\newfontlanguage{Catalan}{CAT}
+\newfontlanguage{Cebuano}{CEB}\newfontlanguage{Chechen}{CHE}\newfontlanguage{Chaha Gurage}{CHG}
+\newfontlanguage{Chattisgarhi}{CHH}\newfontlanguage{Chichewa}{CHI}\newfontlanguage{Chukchi}{CHK}
+\newfontlanguage{Chipewyan}{CHP}\newfontlanguage{Cherokee}{CHR}\newfontlanguage{Chuvash}{CHU}
+\newfontlanguage{Comorian}{CMR}\newfontlanguage{Coptic}{COP}\newfontlanguage{Cree}{CRE}
+\newfontlanguage{Carrier}{CRR}\newfontlanguage{Crimean Tatar}{CRT}\newfontlanguage{Church Slavonic}{CSL}
+\newfontlanguage{Czech}{CSY}\newfontlanguage{Danish}{DAN}\newfontlanguage{Dargwa}{DAR}
+\newfontlanguage{Woods Cree}{DCR}\newfontlanguage{German}{DEU}\newfontlanguage{Default}{DFLT}
+\newfontlanguage{Dogri}{DGR}\newfontlanguage{Divehi}{DIV}\newfontlanguage{Djerma}{DJR}
+\newfontlanguage{Dangme}{DNG}\newfontlanguage{Dinka}{DNK}\newfontlanguage{Dungan}{DUN}
+\newfontlanguage{Dzongkha}{DZN}\newfontlanguage{Ebira}{EBI}\newfontlanguage{Eastern Cree}{ECR}
+\newfontlanguage{Edo}{EDO}\newfontlanguage{Efik}{EFI}\newfontlanguage{Greek}{ELL}
+\newfontlanguage{English}{ENG}\newfontlanguage{Erzya}{ERZ}\newfontlanguage{Spanish}{ESP}
+\newfontlanguage{Estonian}{ETI}\newfontlanguage{Basque}{EUQ}\newfontlanguage{Evenki}{EVK}
+\newfontlanguage{Even}{EVN}\newfontlanguage{Ewe}{EWE}\newfontlanguage{French Antillean}{FAN}
+\newfontlanguage{Farsi}{FAR}\newfontlanguage{Finnish}{FIN}\newfontlanguage{Fijian}{FJI}
+\newfontlanguage{Flemish}{FLE}\newfontlanguage{Forest Nenets}{FNE}\newfontlanguage{Fon}{FON}
+\newfontlanguage{Faroese}{FOS}\newfontlanguage{French}{FRA}\newfontlanguage{Frisian}{FRI}
+\newfontlanguage{Friulian}{FRL}\newfontlanguage{Futa}{FTA}\newfontlanguage{Fulani}{FUL}
+\newfontlanguage{Ga}{GAD}\newfontlanguage{Gaelic}{GAE}\newfontlanguage{Gagauz}{GAG}
+\newfontlanguage{Galician}{GAL}\newfontlanguage{Garshuni}{GAR}\newfontlanguage{Garhwali}{GAW}
+\newfontlanguage{Ge'ez}{GEZ}\newfontlanguage{Gilyak}{GIL}\newfontlanguage{Gumuz}{GMZ}
+\newfontlanguage{Gondi}{GON}\newfontlanguage{Greenlandic}{GRN}\newfontlanguage{Garo}{GRO}
+\newfontlanguage{Guarani}{GUA}\newfontlanguage{Gujarati}{GUJ}\newfontlanguage{Haitian}{HAI}
+\newfontlanguage{Halam}{HAL}\newfontlanguage{Harauti}{HAR}\newfontlanguage{Hausa}{HAU}
+\newfontlanguage{Hawaiin}{HAW}\newfontlanguage{Hammer-Banna}{HBN}\newfontlanguage{Hiligaynon}{HIL}
+\newfontlanguage{Hindi}{HIN}\newfontlanguage{High Mari}{HMA}\newfontlanguage{Hindko}{HND}
+\newfontlanguage{Ho}{HO}\newfontlanguage{Harari}{HRI}\newfontlanguage{Croatian}{HRV}
+\newfontlanguage{Hungarian}{HUN}\newfontlanguage{Armenian}{HYE}\newfontlanguage{Igbo}{IBO}
+\newfontlanguage{Ijo}{IJO}\newfontlanguage{Ilokano}{ILO}\newfontlanguage{Indonesian}{IND}
+\newfontlanguage{Ingush}{ING}\newfontlanguage{Inuktitut}{INU}\newfontlanguage{Irish}{IRI}
+\newfontlanguage{Irish Traditional}{IRT}\newfontlanguage{Icelandic}{ISL}\newfontlanguage{Inari Sami}{ISM}
+\newfontlanguage{Italian}{ITA}\newfontlanguage{Hebrew}{IWR}\newfontlanguage{Javanese}{JAV}
+\newfontlanguage{Yiddish}{JII}\newfontlanguage{Japanese}{JAN}\newfontlanguage{Judezmo}{JUD}
+\newfontlanguage{Jula}{JUL}\newfontlanguage{Kabardian}{KAB}\newfontlanguage{Kachchi}{KAC}
+\newfontlanguage{Kalenjin}{KAL}\newfontlanguage{Kannada}{KAN}\newfontlanguage{Karachay}{KAR}
+\newfontlanguage{Georgian}{KAT}\newfontlanguage{Kazakh}{KAZ}\newfontlanguage{Kebena}{KEB}
+\newfontlanguage{Khutsuri Georgian}{KGE}\newfontlanguage{Khakass}{KHA}\newfontlanguage{Khanty-Kazim}{KHK}
+\newfontlanguage{Khmer}{KHM}\newfontlanguage{Khanty-Shurishkar}{KHS}\newfontlanguage{Khanty-Vakhi}{KHV}
+\newfontlanguage{Khowar}{KHW}\newfontlanguage{Kikuyu}{KIK}\newfontlanguage{Kirghiz}{KIR}
+\newfontlanguage{Kisii}{KIS}\newfontlanguage{Kokni}{KKN}\newfontlanguage{Kalmyk}{KLM}
+\newfontlanguage{Kamba}{KMB}\newfontlanguage{Kumaoni}{KMN}\newfontlanguage{Komo}{KMO}
+\newfontlanguage{Komso}{KMS}\newfontlanguage{Kanuri}{KNR}\newfontlanguage{Kodagu}{KOD}
+\newfontlanguage{Korean Old Hangul}{KOH}\newfontlanguage{Konkani}{KOK}\newfontlanguage{Kikongo}{KON}
+\newfontlanguage{Komi-Permyak}{KOP}\newfontlanguage{Korean}{KOR}\newfontlanguage{Komi-Zyrian}{KOZ}
+\newfontlanguage{Kpelle}{KPL}\newfontlanguage{Krio}{KRI}\newfontlanguage{Karakalpak}{KRK}
+\newfontlanguage{Karelian}{KRL}\newfontlanguage{Karaim}{KRM}\newfontlanguage{Karen}{KRN}
+\newfontlanguage{Koorete}{KRT}\newfontlanguage{Kashmiri}{KSH}\newfontlanguage{Khasi}{KSI}
+\newfontlanguage{Kildin Sami}{KSM}\newfontlanguage{Kui}{KUI}\newfontlanguage{Kulvi}{KUL}
+\newfontlanguage{Kumyk}{KUM}\newfontlanguage{Kurdish}{KUR}\newfontlanguage{Kurukh}{KUU}
+\newfontlanguage{Kuy}{KUY}\newfontlanguage{Koryak}{KYK}\newfontlanguage{Ladin}{LAD}
+\newfontlanguage{Lahuli}{LAH}\newfontlanguage{Lak}{LAK}\newfontlanguage{Lambani}{LAM}
+\newfontlanguage{Lao}{LAO}\newfontlanguage{Latin}{LAT}\newfontlanguage{Laz}{LAZ}
+\newfontlanguage{L-Cree}{LCR}\newfontlanguage{Ladakhi}{LDK}\newfontlanguage{Lezgi}{LEZ}
+\newfontlanguage{Lingala}{LIN}\newfontlanguage{Low Mari}{LMA}\newfontlanguage{Limbu}{LMB}
+\newfontlanguage{Lomwe}{LMW}\newfontlanguage{Lower Sorbian}{LSB}\newfontlanguage{Lule Sami}{LSM}
+\newfontlanguage{Lithuanian}{LTH}\newfontlanguage{Luba}{LUB}\newfontlanguage{Luganda}{LUG}
+\newfontlanguage{Luhya}{LUH}\newfontlanguage{Luo}{LUO}\newfontlanguage{Latvian}{LVI}
+\newfontlanguage{Majang}{MAJ}\newfontlanguage{Makua}{MAK}\newfontlanguage{Malayalam Traditional}{MAL}
+\newfontlanguage{Mansi}{MAN}\newfontlanguage{Marathi}{MAR}\newfontlanguage{Marwari}{MAW}
+\newfontlanguage{Mbundu}{MBN}\newfontlanguage{Manchu}{MCH}\newfontlanguage{Moose Cree}{MCR}
+\newfontlanguage{Mende}{MDE}\newfontlanguage{Me'en}{MEN}\newfontlanguage{Mizo}{MIZ}
+\newfontlanguage{Macedonian}{MKD}\newfontlanguage{Male}{MLE}\newfontlanguage{Malagasy}{MLG}
+\newfontlanguage{Malinke}{MLN}\newfontlanguage{Malayalam Reformed}{MLR}\newfontlanguage{Malay}{MLY}
+\newfontlanguage{Mandinka}{MND}\newfontlanguage{Mongolian}{MNG}\newfontlanguage{Manipuri}{MNI}
+\newfontlanguage{Maninka}{MNK}\newfontlanguage{Manx Gaelic}{MNX}\newfontlanguage{Moksha}{MOK}
+\newfontlanguage{Moldavian}{MOL}\newfontlanguage{Mon}{MON}\newfontlanguage{Moroccan}{MOR}
+\newfontlanguage{Maori}{MRI} \newfontlanguage{Maithili}{MTH} \newfontlanguage{Maltese}{MTS}
+\newfontlanguage{Mundari}{MUN} \newfontlanguage{Naga-Assamese}{NAG} \newfontlanguage{Nanai}{NAN}
+\newfontlanguage{Naskapi}{NAS} \newfontlanguage{N-Cree}{NCR} \newfontlanguage{Ndebele}{NDB}
+\newfontlanguage{Ndonga}{NDG} \newfontlanguage{Nepali}{NEP} \newfontlanguage{Newari}{NEW}
+\newfontlanguage{Nagari}{NGR} \newfontlanguage{Norway House Cree}{NHC} \newfontlanguage{Nisi}{NIS}
+\newfontlanguage{Niuean}{NIU} \newfontlanguage{Nkole}{NKL} \newfontlanguage{N'ko}{NKO}
+\newfontlanguage{Dutch}{NLD} \newfontlanguage{Nogai}{NOG} \newfontlanguage{Norwegian}{NOR}
+\newfontlanguage{Northern Sami}{NSM} \newfontlanguage{Northern Tai}{NTA} \newfontlanguage{Esperanto}{NTO}
+\newfontlanguage{Nynorsk}{NYN} \newfontlanguage{Oji-Cree}{OCR} \newfontlanguage{Ojibway}{OJB}
+\newfontlanguage{Oriya}{ORI} \newfontlanguage{Oromo}{ORO} \newfontlanguage{Ossetian}{OSS}
+\newfontlanguage{Palestinian Aramaic}{PAA} \newfontlanguage{Pali}{PAL} \newfontlanguage{Punjabi}{PAN}
+\newfontlanguage{Palpa}{PAP} \newfontlanguage{Pashto}{PAS} \newfontlanguage{Polytonic Greek}{PGR}
+\newfontlanguage{Pilipino}{PIL} \newfontlanguage{Palaung}{PLG} \newfontlanguage{Polish}{PLK}
+\newfontlanguage{Provencal}{PRO} \newfontlanguage{Portuguese}{PTG} \newfontlanguage{Chin}{QIN}
+\newfontlanguage{Rajasthani}{RAJ} \newfontlanguage{R-Cree}{RCR} \newfontlanguage{Russian Buriat}{RBU}
+\newfontlanguage{Riang}{RIA} \newfontlanguage{Rhaeto-Romanic}{RMS} \newfontlanguage{Romanian}{ROM}
+\newfontlanguage{Romany}{ROY} \newfontlanguage{Rusyn}{RSY} \newfontlanguage{Ruanda}{RUA}
+\newfontlanguage{Russian}{RUS} \newfontlanguage{Sadri}{SAD} \newfontlanguage{Sanskrit}{SAN}
+\newfontlanguage{Santali}{SAT} \newfontlanguage{Sayisi}{SAY} \newfontlanguage{Sekota}{SEK}
+\newfontlanguage{Selkup}{SEL} \newfontlanguage{Sango}{SGO} \newfontlanguage{Shan}{SHN}
+\newfontlanguage{Sibe}{SIB} \newfontlanguage{Sidamo}{SID} \newfontlanguage{Silte Gurage}{SIG}
+\newfontlanguage{Skolt Sami}{SKS} \newfontlanguage{Slovak}{SKY} \newfontlanguage{Slavey}{SLA}
+\newfontlanguage{Slovenian}{SLV} \newfontlanguage{Somali}{SML} \newfontlanguage{Samoan}{SMO}
+\newfontlanguage{Sena}{SNA} \newfontlanguage{Sindhi}{SND} \newfontlanguage{Sinhalese}{SNH}
+\newfontlanguage{Soninke}{SNK} \newfontlanguage{Sodo Gurage}{SOG} \newfontlanguage{Sotho}{SOT}
+\newfontlanguage{Albanian}{SQI} \newfontlanguage{Serbian}{SRB} \newfontlanguage{Saraiki}{SRK}
+\newfontlanguage{Serer}{SRR} \newfontlanguage{South Slavey}{SSL} \newfontlanguage{Southern Sami}{SSM}
+\newfontlanguage{Suri}{SUR} \newfontlanguage{Svan}{SVA} \newfontlanguage{Swedish}{SVE}
+\newfontlanguage{Swadaya Aramaic}{SWA} \newfontlanguage{Swahili}{SWK} \newfontlanguage{Swazi}{SWZ}
+\newfontlanguage{Sutu}{SXT} \newfontlanguage{Syriac}{SYR} \newfontlanguage{Tabasaran}{TAB}
+\newfontlanguage{Tajiki}{TAJ} \newfontlanguage{Tamil}{TAM} \newfontlanguage{Tatar}{TAT}
+\newfontlanguage{TH-Cree}{TCR} \newfontlanguage{Telugu}{TEL} \newfontlanguage{Tongan}{TGN}
+\newfontlanguage{Tigre}{TGR} \newfontlanguage{Tigrinya}{TGY} \newfontlanguage{Thai}{THA}
+\newfontlanguage{Tahitian}{THT} \newfontlanguage{Tibetan}{TIB} \newfontlanguage{Turkmen}{TKM}
+\newfontlanguage{Temne}{TMN} \newfontlanguage{Tswana}{TNA} \newfontlanguage{Tundra Nenets}{TNE}
+\newfontlanguage{Tonga}{TNG} \newfontlanguage{Todo}{TOD} \newfontlanguage{Turkish}{TUR}
+\newfontlanguage{Tsonga}{TSG} \newfontlanguage{Turoyo Aramaic}{TUA} \newfontlanguage{Tulu}{TUL}
+\newfontlanguage{Tuvin}{TUV} \newfontlanguage{Twi}{TWI} \newfontlanguage{Udmurt}{UDM}
+\newfontlanguage{Ukrainian}{UKR} \newfontlanguage{Urdu}{URD} \newfontlanguage{Upper Sorbian}{USB}
+\newfontlanguage{Uyghur}{UYG} \newfontlanguage{Uzbek}{UZB} \newfontlanguage{Venda}{VEN}
+\newfontlanguage{Vietnamese}{VIT} \newfontlanguage{Wa}{WA} \newfontlanguage{Wagdi}{WAG}
+\newfontlanguage{West-Cree}{WCR} \newfontlanguage{Welsh}{WEL} \newfontlanguage{Wolof}{WLF}
+\newfontlanguage{Tai Lue}{XBD} \newfontlanguage{Xhosa}{XHS} \newfontlanguage{Yakut}{YAK}
+\newfontlanguage{Yoruba}{YBA} \newfontlanguage{Y-Cree}{YCR} \newfontlanguage{Yi Classic}{YIC}
+\newfontlanguage{Yi Modern}{YIM} \newfontlanguage{Chinese Hong Kong}{ZHH}
+\newfontlanguage{Chinese Phonetic}{ZHP} \newfontlanguage{Chinese Simplified}{ZHS}
+\newfontlanguage{Chinese Traditional}{ZHT} \newfontlanguage{Zande}{ZND} \newfontlanguage{Zulu}{ZUL}
+% \end{macrocode}
+%
+% \subsection{Italic small caps} \label{sec:sishape}
+% The following code for utilising italic small caps sensibly is
+% inspired from Philip Lehman's \textit{The Font Installation
+% Guide}. Note that |\upshape| needs to be used \emph{twice} to get
+% from italic small caps to regular upright (it always goes to small
+% caps, then regular upright).
+% \begin{macro}{\sishape}
+% \begin{macro}{\textsi}
+% First, the commands for actually selecting italic small caps are
+% defined. I use |si| as the NFSS shape for italic small caps, but
+% I have seen |itsc| and |slsc| also used. |\sidefault| may be
+% redefined to one of these if required for compatibility.
+% \begin{macrocode}
+\providecommand*{\sidefault}{si}
+\DeclareRobustCommand{\sishape}{%
+ \not@math@alphabet\sishape\relax
+ \fontshape\sidefault\selectfont}
+\DeclareTextFontCommand{\textsi}{\sishape}
+% \end{macrocode}
+% \end{macro} \end{macro}
+% \begin{macro}{\zf@merge@shape}
+% This is the macro which enables the overload on the |\..shape|
+% commands. It takes three such arguments. In essence, the macro
+% selects the first argument, unless the second argument is already
+% selected, in which case it selects the third.
+% \begin{macrocode}
+\newcommand*{\zf@merge@shape}[3]{%
+ \edef\@tempa{#1}%
+ \edef\@tempb{#2}%
+ \ifx\f@shape\@tempb
+ \ifcsname\f@encoding/\f@family/\f@series/#3\endcsname
+ \edef\@tempa{#3}%
+ \fi
+ \fi
+ \fontshape{\@tempa}\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\itshape} \begin{macro}{\scshape} \begin{macro}{\upshape}
+% Here the original |\..shape| commands are redefined to use the
+% merge shape macro.
+% \begin{macrocode}
+\DeclareRobustCommand{\itshape}{%
+ \not@math@alphabet\itshape\mathit
+ \zf@merge@shape\itdefault\scdefault\sidefault}
+\DeclareRobustCommand{\slshape}{%
+ \not@math@alphabet\slshape\relax
+ \zf@merge@shape\sldefault\scdefault\sidefault}
+\DeclareRobustCommand{\scshape}{%
+ \not@math@alphabet\scshape\relax
+ \zf@merge@shape\scdefault\itdefault\sidefault}
+\DeclareRobustCommand{\upshape}{%
+ \not@math@alphabet\upshape\relax
+ \zf@merge@shape\updefault\sidefault\scdefault}
+% \end{macrocode}
+% \end{macro} \end{macro} \end{macro}
+%
+% \begin{macro}{\em}
+% \begin{macro}{\emph}
+% It's not 100\% reliable to use the \cmd\fontdimen\ of the italic shapes defined
+% by \XeTeX, I think, so copy \cmd\em's definition from \pkg{fixltx2e}.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \DeclareRobustCommand\em
+ {\@nomath\em
+ \edef\@tempa{\f@shape}%
+ \edef\@tempb{\itdefault}%
+ \ifx\@tempa\@tempb
+ \eminnershape
+ \else
+ \emshape
+ \fi}}
+\DeclareTextFontCommand{\emph}{\em}
+\let\emshape\itshape
+\let\eminnershape\upshape
+% \end{macrocode}
+% \changes{v1.9}{2005/10/27}{Redefined \cmd\em\ in order for nested emphases to work.}
+% \end{macro} \end{macro}
+%
+% \subsection{Selecting maths fonts}
+% Here, the fonts used in math mode are redefined to correspond to the
+% default roman, sans serif and typewriter fonts. Unfortunately, you
+% can only define maths fonts in the preamble, otherwise I'd run this
+% code whenever \cs{setromanfont} and friends was run.
+%
+% \begin{macro}{\AtBeginDocument}
+% \changes{v1.4}{2004/11/25}{Selects the default \cs{mathXX} fonts.}
+% \changes{v1.5a}{2004/12/03}{Added fix for Computer Modern maths.}
+% \changes{v1.6}{2005/02/25}{Removed mathtime support since XeTeX
+% doesn't handle virtual fonts. Why did I put it in in the first place?}
+% \changes{v1.8}{2005/07/04}{Finally fixed legacy maths font
+% issues. Also checks that euler.sty is loaded in the right order.}
+% \changes{v1.8}{2005/07/04}{Added support for user-specified
+% \cmd\mathrm\ and others.}
+% \changes{v1.8a}{2005/07/15}{Added conditional to \cmd\colon\ math symbol (incompatibility with lucida and amsmath)}
+% \changes{v1.9}{2005/07/18}{Maths hex numbers converted to decimal.}
+% \changes{v1.10}{2006/04/25}{Added \pkg{lucimatx} checking. (Not really tested, though.)}
+% \changes{v1.10}{2006/04/25}{Fixed Lucida bug (missing \cmd\else!)}
+%
+% Everything here is performed \cs{AtBeginDocument} in order to
+% overwrite \pkg{euler}'s attempt. This means \pkg{fontspec} must be
+% loaded \emph{before} \pkg{euler}. We set up a conditional to return
+% an error if this rule is violated.
+%
+% Since every maths setup is slightly different, we also take
+% different paths for defining various math glyphs depending which
+% maths font package has been loaded. As far as I am aware, the only
+% two options for \XeTeX\ are \pkg{euler} and \pkg{lucbmath}. Unless
+% I've got all confused and the mathtime fonts are not virtual fonts
+% either. But I'm pretty sure they are.
+%
+% \begin{macrocode}
+\@ifpackageloaded{euler}{\zf@euler@package@loadedtrue}
+ {\zf@euler@package@loadedfalse}
+\AtBeginDocument{%
+ \let\zf@font@warning\@font@warning
+ \let\@font@warning\@font@info
+ \@ifpackageloaded{euler}{%
+ \ifzf@euler@package@loaded
+ \zf@math@eulertrue
+ \else
+ \zf@PackageError{The euler package must be loaded BEFORE fontspec}
+ {fontspec only overwrites euler's attempt to \MessageBreak
+ define the maths text fonts if fontspec is \MessageBreak
+ loaded after euler. Type <return> to proceed\MessageBreak
+ with incorrect \protect\mathit, \protect\mathbf, etc}
+ \fi}{}
+ \@ifpackageloaded{lucbmath}{\zf@math@lucidatrue}{}
+ \@ifpackageloaded{lucidabr}{\zf@math@lucidatrue}{}
+ \@ifpackageloaded{lucimatx}{\zf@math@lucidatrue}{}
+% \end{macrocode}
+% Knuth's CM fonts fonts are all squashed together, combining letters,
+% accents, text symbols and maths symbols all in the one font,
+% \texttt{cmr}, plus other things in other fonts. Because we are
+% changing the roman font in the document, we need to redefine all of
+% the maths glyphs in \LaTeX's \texttt{operators} maths font to still
+% go back to the legacy \texttt{cmr} font for all these random glyphs,
+% unless a separate maths font package has been loaded instead.
+%
+% In every case, the maths accents are always taken from the
+% \texttt{operators} font, which is generally the main text
+% font. (Actually, there is a \cmd\hat\ accent in
+% \texttt{EulerFractur}, but it's \emph{ugly}. So I ignore it. Sorry
+% if this causes inconvenience.)
+% \begin{macrocode}
+ \DeclareSymbolFont{legacymaths}{OT1}{cmr}{m}{n}
+ \SetSymbolFont{legacymaths}{bold}{OT1}{cmr}{bx}{n}
+ \DeclareMathAccent{\acute} {\mathalpha}{legacymaths}{19}
+ \DeclareMathAccent{\grave} {\mathalpha}{legacymaths}{18}
+ \DeclareMathAccent{\ddot} {\mathalpha}{legacymaths}{127}
+ \DeclareMathAccent{\tilde} {\mathalpha}{legacymaths}{126}
+ \DeclareMathAccent{\bar} {\mathalpha}{legacymaths}{22}
+ \DeclareMathAccent{\breve} {\mathalpha}{legacymaths}{21}
+ \DeclareMathAccent{\check} {\mathalpha}{legacymaths}{20}
+ \DeclareMathAccent{\hat} {\mathalpha}{legacymaths}{94} % too bad, euler
+ \DeclareMathAccent{\dot} {\mathalpha}{legacymaths}{95}
+ \DeclareMathAccent{\mathring}{\mathalpha}{legacymaths}{23}
+% \end{macrocode}
+% \paragraph{\cmd\colon: what's going on?} Okay, so \verb":" and \cmd\colon\ in maths mode are defined in a few places, so I need to work out what does what. Respectively, we have:
+% \begin{Verbatim}[gobble=2]
+% % fontmath.ltx:
+% \DeclareMathSymbol{\colon}{\mathpunct}{operators}{"3A}
+% \DeclareMathSymbol{:}{\mathrel}{operators}{"3A}
+%
+% % amsmath.sty:
+% \renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
+% \mkern-\thinmuskip{:}\mskip6muplus1mu\relax}
+%
+% % euler.sty:
+% \DeclareMathSymbol{:}\mathrel {EulerFraktur}{"3A}
+%
+% % lucbmath.sty:
+% \DeclareMathSymbol{\@tempb}{\mathpunct}{operators}{58}
+% \ifx\colon\@tempb
+% \DeclareMathSymbol{\colon}{\mathpunct}{operators}{58}
+% \fi
+% \DeclareMathSymbol{:}{\mathrel}{operators}{58}
+% \end{Verbatim}
+% ($\mathrm{3A_{16}}=\mathrm{58_{10}}$) So I think, based on this summary, that it is fair to tell \pkg{fontspec} to `replace' the operators font with legacymaths for this symbol, except when \pkg{amsmath} is loaded since we want to keep its definition.
+%
+%
+% \begin{macrocode}
+ \begingroup
+ \mathchardef\@tempa="603A %
+ \let\next\egroup
+ \ifx\colon\@tempa
+ \DeclareMathSymbol{\colon}{\mathpunct}{legacymaths}{58}
+ \fi
+ \endgroup
+% \end{macrocode}
+% The following symbols are only defined specifically in \pkg{euler}, so skip them
+% if that package is loaded.
+% \begin{macrocode}
+ \ifzf@math@euler\else
+ \DeclareMathSymbol{!}{\mathclose}{legacymaths}{33}
+ \DeclareMathSymbol{:}{\mathrel} {legacymaths}{58}
+ \DeclareMathSymbol{;}{\mathpunct}{legacymaths}{59}
+ \DeclareMathSymbol{?}{\mathclose}{legacymaths}{63}
+% \end{macrocode}
+% And these ones are defined both in \pkg{euler} and \pkg{lucbmath},
+% so we only need to run this code if no extra maths package has been
+% loaded.
+% \begin{macrocode}
+ \ifzf@math@lucida\else
+ \DeclareMathSymbol{0}{\mathalpha}{legacymaths}{`0}
+ \DeclareMathSymbol{1}{\mathalpha}{legacymaths}{`1}
+ \DeclareMathSymbol{2}{\mathalpha}{legacymaths}{`2}
+ \DeclareMathSymbol{3}{\mathalpha}{legacymaths}{`3}
+ \DeclareMathSymbol{4}{\mathalpha}{legacymaths}{`4}
+ \DeclareMathSymbol{5}{\mathalpha}{legacymaths}{`5}
+ \DeclareMathSymbol{6}{\mathalpha}{legacymaths}{`6}
+ \DeclareMathSymbol{7}{\mathalpha}{legacymaths}{`7}
+ \DeclareMathSymbol{8}{\mathalpha}{legacymaths}{`8}
+ \DeclareMathSymbol{9}{\mathalpha}{legacymaths}{`9}
+ \DeclareMathSymbol{\Gamma}{\mathalpha}{legacymaths}{0}
+ \DeclareMathSymbol{\Delta}{\mathalpha}{legacymaths}{1}
+ \DeclareMathSymbol{\Theta}{\mathalpha}{legacymaths}{2}
+ \DeclareMathSymbol{\Lambda}{\mathalpha}{legacymaths}{3}
+ \DeclareMathSymbol{\Xi}{\mathalpha}{legacymaths}{4}
+ \DeclareMathSymbol{\Pi}{\mathalpha}{legacymaths}{5}
+ \DeclareMathSymbol{\Sigma}{\mathalpha}{legacymaths}{6}
+ \DeclareMathSymbol{\Upsilon}{\mathalpha}{legacymaths}{7}
+ \DeclareMathSymbol{\Phi}{\mathalpha}{legacymaths}{8}
+ \DeclareMathSymbol{\Psi}{\mathalpha}{legacymaths}{9}
+ \DeclareMathSymbol{\Omega}{\mathalpha}{legacymaths}{10}
+ \DeclareMathSymbol{+}{\mathbin}{legacymaths}{43}
+ \DeclareMathSymbol{=}{\mathrel}{legacymaths}{61}
+ \DeclareMathDelimiter{(}{\mathopen} {legacymaths}{40}{largesymbols}{0}
+ \DeclareMathDelimiter{)}{\mathclose}{legacymaths}{41}{largesymbols}{1}
+ \DeclareMathDelimiter{[}{\mathopen} {legacymaths}{91}{largesymbols}{2}
+ \DeclareMathDelimiter{]}{\mathclose}{legacymaths}{93}{largesymbols}{3}
+ \DeclareMathDelimiter{/}{\mathord}{legacymaths}{47}{largesymbols}{14}
+ \DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{36}
+ \fi
+ \fi
+% \end{macrocode}
+% Finally, we change the font definitions for \cmd\mathrm\ and so
+% on. These are defined using the \cmd\zf@rmmaths\ (\dots) macros,
+% which default to \cmd\rmdefault\ but may be specified with the
+% \cmd\setmathrm\ (\dots) commands in the preamble.
+%
+% Since \LaTeX\ only generally defines one level of boldness, we omit
+% \cmd\mathbf\ in the \textsf{bold} maths series. It can be specified
+% as per usual with \cmd\setboldmathrm, which stores the appropriate
+% family name in \cmd\zf@rmboldmaths.
+% \begin{macrocode}
+ \DeclareSymbolFont{operators}\zf@enc\zf@rmmaths\mddefault\updefault
+ \SetSymbolFont{operators}{normal}\zf@enc\zf@rmmaths\mddefault\updefault
+ \SetMathAlphabet\mathrm{normal}\zf@enc\zf@rmmaths\mddefault\updefault
+ \SetMathAlphabet\mathit{normal}\zf@enc\zf@rmmaths\mddefault\itdefault
+ \SetMathAlphabet\mathbf{normal}\zf@enc\zf@rmmaths\bfdefault\updefault
+ \SetMathAlphabet\mathsf{normal}\zf@enc\zf@sfmaths\mddefault\updefault
+ \SetMathAlphabet\mathtt{normal}\zf@enc\zf@ttmaths\mddefault\updefault
+ \SetSymbolFont{operators}{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
+ \ifdefined\zf@rmboldmaths
+ \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmboldmaths\mddefault\updefault
+ \SetMathAlphabet\mathbf{bold}\zf@enc\zf@rmboldmaths\bfdefault\updefault
+ \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmboldmaths\mddefault\itdefault
+ \else
+ \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
+ \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmmaths\bfdefault\itdefault
+ \fi
+ \SetMathAlphabet\mathsf{bold}\zf@enc\zf@sfmaths\bfdefault\updefault
+ \SetMathAlphabet\mathtt{bold}\zf@enc\zf@ttmaths\bfdefault\updefault
+ \let\font@warning\zf@font@warning}
+% \end{macrocode}
+% \changes{v1.9}{2006/01/31}{Suppresses harmless maths font encoding warnings.}
+% \end{macro}
+% \subsection{Option processing}
+% Now we just want to set up loading the \texttt{.cfg} file, if it exists.
+% \begin{macrocode}
+\DeclareOption{config}{%
+ \InputIfFileExists{fontspec.cfg}
+ {\typeout{fontspec.cfg loaded.}}
+ {\typeout{fontspec.cfg would be loaded now if it existed.}}}
+\DeclareOption{noconfig}{}
+\DeclareOption{quiet}{\let\zf@PackageWarning\zf@PackageInfo}
+\ExecuteOptions{config}
+\ProcessOptions
+% \end{macrocode}
+% \changes{v1.9}{2006/01/31}{Package options \opt{(no)config}, \opt{quiet} implemented.}
+% The end! Thanks for coming.
+%
+% \iffalse
+%</fontspec>
+%<*cfg>
+% \fi
+%
+% \clearpage
+% \part{fontspec.cfg}
+% As an example, and to avoid upsetting people as much as possible,
+% I'm populating the default \texttt{fontspec.cfg} file with
+% backwards compatibility feature aliases.
+% \begin{macrocode}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% FOR BACKWARDS COMPATIBILITY WITH PREVIOUS VERSIONS %%%
+
+\newcommand\newfeaturecode[3]{%
+ \define@key{zf}{#1}[]{\zf@make@feature{#2}{#3}{}}}
+
+\aliasfontfeature{BoldFont}{Bold}
+\aliasfontfeature{ItalicFont}{Italic}
+\aliasfontfeature{BoldItalicFont}{BoldItalic}
+\aliasfontfeature{SmallCapsFont}{SmallCaps}
+\aliasfontfeature{Style}{StyleOptions}
+\aliasfontfeature{Contextuals}{Swashes}
+\aliasfontfeatureoption{Contextuals}{Swash}{Contextual}
+\aliasfontfeatureoption{Letters}{UppercaseSmallCaps}{SMALLCAPS}
+\aliasfontfeatureoption{Letters}{UppercasePetiteCaps}{PETITECAPS}
+
+%%%%%%%%%%%%%%%%%%%%%%%
+%%% FOR CONVENIENCE %%%
+
+\newfontscript{Kana}{kana}
+\newfontscript{Maths}{math}
+\newfontscript{CJK}{hani}
+
+% \end{macrocode}
+%
+% \iffalse
+%</cfg>
+%<*example>
+% \fi
+%
+% \part{fontspec-example.tex}
+%
+% \begin{macrocode}
+%!TEX TS-program =xelatex
+\documentclass[12pt]{article}
+
+\usepackage{euler,fontspec,graphicx}
+
+\defaultfontfeatures{Scale=MatchLowercase ,Mapping=tex-text}
+\setromanfont{Hoefler Text}
+\setsansfont{Gill Sans}
+\setmonofont{Lucida Sans Typewriter}
+
+%% Define the \XeTeX logo:
+\DeclareRobustCommand\XeTeX{%
+ \mbox{\smash{%
+ X\lower.5ex\hbox{\kern-.12em\reflectbox{E}}\kern-.1667em
+ T\kern -.1667em\lower .5ex\hbox {E}\kern -.12em X}}\@}
+%% The logo should be defined on a per-document basis
+%% so that its parameters may be fine tuned for the fonts used.
+
+\begin{document}
+\pagestyle{empty}
+
+\section{The basics of the \textsf{fontspec} package}
+
+The \textsf{fontspec} package enables automatic font selection for \LaTeX{} documents typeset with \XeTeX{}. The basic command is\\
+\indent \verb|\fontspec[font features]{Mac OS X font display name}|.\\
+As an example:
+
+\begin{center}
+ \Large
+ \fontspec[
+ Colour = 0000CC,
+ Numbers = OldStyle,
+ VerticalPosition = Ordinal,
+ Variant = 2
+ ]{Apple Chancery}
+ My 1st example of Apple Chancery
+\end{center}
+
+The default roman, sans serif, and typewriter fonts may be set with the \verb|\setromanfont|, \verb|\setsansfont| and \verb|\setmonofont| commands, respectively, as shown in the preamble. They take the same syntax as the \verb|\fontspec| package. All expected font shapes are available:
+
+\begin{center}
+ {\scshape Small caps and \itshape small caps italic\dots}\\
+ {\sffamily\bfseries Bold sans serif and \itshape bold italic sans serif\dots}
+\end{center}
+
+With the roman and sans serif fonts set in the preamble, text fonts in math mode are also changed: $\cos(n\pi)=\pm 1$. The maths typeface `Euler' has been used in this document (with the \textsf{euler} package---note that the \textsf{eulervm} package will not work in \XeTeX{} because it uses virtual fonts), since the default Computer Modern maths font is rather light.
+\[
+ \mathcal F(s) = \int^\infty_0\! f(t) e^{-st}\,\mathrm{d}t
+\]
+
+You'll also notice the \verb|\defaultfontfeatures| command in the preamble. This command takes a single argument of font features that are then applied to every subsequent instance of font selection. The first argument in this case, \verb|Mapping=tex-text|, enables regular \TeX{} ligatures like \verb|``---''| for ``---''. The second automatically scales the fonts to the same x-height.
+
+Please see the documentation for font feature explanation and further package niceties.
+
+\end{document}
+% \end{macrocode}
+%
+% \iffalse
+%</example>
+% \fi
+%
+% \clearpage
+% \PrintChanges
+%
+% \clearpage
+% \setcounter{IndexColumns}{2}
+% \PrintIndex
+%
+% \Finale
+%
+% \iffalse
+%<*doc-style>
+% \begin{macrocode}
+\ProvidesPackage{fontspec-doc-style}
+
+\RequirePackage{booktabs,calc,color,euler,fancyvrb,fontspec,
+ graphicx,ifthen,url,varioref,xelatex,xunicode}
+
+%% Titlepage
+\renewcommand\maketitle{%
+ \begin{titlepage}%
+ \null\vfil
+ \vskip 60\p@
+ \begin{center}%
+ {\LARGE \@title \par}%
+ \vskip 3em%
+ {\large
+ \lineskip .75em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1.5em%
+ {\large \@date \par}%
+ \end{center}\par
+ \vfil\null
+ \end{titlepage}%
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+ \global\let\title\relax
+ \global\let\author\relax
+ \global\let\date\relax
+ \global\let\and\relax}
+
+%% ToC
+\def\@dotsep{1000}
+\setcounter{tocdepth}{2}
+\setlength\columnseprule{0.4pt}
+\renewcommand\tableofcontents{%
+ \begin{multicols}{2}[\section*{\contentsname}]%
+ \small
+ \@starttoc{toc}%
+ \end{multicols}}
+
+%% Index
+\renewenvironment{theglossary}
+ {\small\list{}{}
+ \item\relax
+ \glossary@prologue\GlossaryParms
+ \let\item\@idxitem \ignorespaces
+ \def\pfill{\hspace*{\fill}}}
+ {\endlist}
+
+%% varioref definitions:
+\labelformat{table}{Table~#1}
+\labelformat{section}{Section~#1}
+\labelformat{subsection}{Section~#1}
+
+%% verbatim examples:
+\newlength\examplewidth\newlength\verbatimwidth
+\newlength\exoutdent \newlength\exverbgap
+\setlength\exverbgap{1em}
+\setlength\exoutdent{-0.15\textwidth}
+\newsavebox\verbatimbox
+\edef\examplefilename{\jobname.example}
+
+\newenvironment{example}
+ {\VerbatimEnvironment
+ \begingroup
+ \begin{VerbatimOut}[gobble=4]{\examplefilename}}
+ {\end{VerbatimOut}
+ \defaultfontfeatures{Mapping=tex-text,Colour=228833}%
+ \typesetexample
+ \endgroup}
+\newenvironment{aatexample}
+ {\VerbatimEnvironment
+ \begingroup
+ \begin{VerbatimOut}[gobble=4]{\examplefilename}}
+ {\end{VerbatimOut}
+ \defaultfontfeatures{Mapping=tex-text,Colour=005599}%
+ \typesetexample
+ \endgroup}
+\newenvironment{opentypeexample}
+ {\VerbatimEnvironment
+ \begingroup
+ \begin{VerbatimOut}[gobble=4]{\examplefilename}}
+ {\end{VerbatimOut}
+ \defaultfontfeatures{Mapping=tex-text,Colour=AA0000}%
+ \typesetexample
+ \endgroup}
+
+\newcommand\typesetexample{%
+ \begin{lrbox}{\verbatimbox}%
+ \BVerbatimInput[fontsize=\small,firstline=\firstline,lastline=\lastline]{\examplefilename}\relax
+ \end{lrbox}
+ \begin{list}{}{\setlength\itemindent{0pt}
+ \setlength\leftmargin\exoutdent
+ \setlength\rightmargin{0pt}}\item
+ \ifx\auxwidth\relax
+ \setlength\verbatimwidth{\wd\verbatimbox}%
+ \else
+ \setlength\verbatimwidth{\auxwidth}%
+ \let\auxwidth\relax
+ \fi
+ \begin{minipage}[c]{\textwidth-\exoutdent-\verbatimwidth-\exverbgap}
+ \catcode`\%=14\centering\examplesize\input\examplefilename\relax
+ \end{minipage}\hfill
+ \begin{minipage}[c]{\verbatimwidth}
+ \usebox\verbatimbox
+ \end{minipage}
+ \end{list}
+ \global\let\examplesize\normalsize
+ \gdef\firstline{1}\gdef\lastline{}}
+
+\let\examplesize\normalsize
+\let\auxwidth\relax
+\def\firstline{1}
+\def\lastline{}
+
+\newcommand*\setexsize[1]{\let\examplesize#1}
+\newcommand*\setverbwidth[1]{\def\auxwidth{#1}}
+
+%% Sidenotes:
+\newcommand\warn[2]{%
+ \edef\thisversion{#1}%
+ \ifhmode\unskip~\fi({\ifx\thisversion\fileversion\color{red}\fi
+ $\leftarrow$})%
+ \marginpar{\raggedleft
+ \scriptsize({\ifx\thisversion\fileversion\color{red}\fi
+ $\rightarrow$}\,\notefont #1:~#2)}}
+
+%% Sidenote font
+\newfontinstance\notefont[
+ Width=1.3,
+ BoldFont={Skia},
+ BoldFeatures={Width=1.3,Weight=1.5}
+ ]{Skia}
+
+%% Various labelling commands:
+\newcommand*\name[1]{{#1}}
+\newcommand*\pkg[1]{\textsf{#1}}
+\newcommand*\opt[1]{\texttt{#1}}
+\newcommand*\feat[1]{\texttt{#1}}
+
+\let\latin\textit
+\def\eg{\latin{e.g.}}
+\def\ie{\latin{i.e.}}
+\def\Eg{\latin{E.g.}}
+\def\Ie{\latin{I.e.}}
+\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}}
+
+\newcommand\note[1]{\unskip\footnote{#1}}
+
+%% LOGOS, tuned for Palatino:
+\def\TeX{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X\spacefactor1000\relax}
+\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0
+ \special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}}
+\def\XeTeX{\raisebox{0pt}[0pt][0pt]
+ {X\lower.5ex\hbox{\kern-.07em\reflect{E}}\kern-.15em \TeX}}
+\def\MacOSX{Mac~OS~X}
+\let\oldTeX\TeX\def\TeX{\raisebox{0pt}[0pt][0pt]{\oldTeX}}
+\let\oldLaTeX\LaTeX\def\LaTeX{\raisebox{0pt}[0pt][0pt]{\oldLaTeX}}
+
+%% fontspec declarations:
+\setromanfont[Diacritics=Decompose,Mapping=tex-text]{Palatino}
+\defaultfontfeatures{Scale=MatchLowercase}
+\setsansfont[Weight=1.2, Width=1.1,
+ Mapping=tex-text,
+ BoldFont={Skia},
+ BoldFeatures={Weight=1.7}]{Skia}
+\setmonofont{Osaka-Mono}
+\setmathrm{Optima Regular}
+\setboldmathrm[BoldFont=Optima ExtraBlack]{Optima Bold}
+\defaultfontfeatures{Mapping=tex-text}
+
+%% (La)TeX font-related declarations:
+\linespread{1.05} % Palatino needs more space between lines
+\lineskiplimit=-5pt % Osaka is really tall so this prevents ugly lines
+\frenchspacing % Remove ugly extra space after punctuation
+
+% \end{macrocode}
+%</doc-style>
+% \fi
+% \typeout{*************************************************************}
+% \typeout{*}
+% \typeout{* To finish the installation you have to move the following}
+% \typeout{* file into a directory searched by XeTeX:}
+% \typeout{*}
+% \typeout{* \space\space\space fontspec.sty}
+% \typeout{*}
+% \typeout{*************************************************************}
+\endinput
diff --git a/Master/texmf-dist/source/xetex/fontspec/fontspec.ins b/Master/texmf-dist/source/xetex/fontspec/fontspec.ins
new file mode 100644
index 00000000000..ba4f02eae57
--- /dev/null
+++ b/Master/texmf-dist/source/xetex/fontspec/fontspec.ins
@@ -0,0 +1,37 @@
+\begingroup
+\input docstrip.tex
+\keepsilent
+\usedir{xetex/latex/fontspec}
+\preamble
+
+ ________________________________
+ The fontspec package for XeLaTeX
+ (C) 2004--2006 Will Robertson
+
+ License information appended.
+
+\endpreamble
+\postamble
+
+Copyright 2005 by Will Robertson <will@guerilla.net.au>
+
+Distributable under the LaTeX Project Public License,
+version 1.3b 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 the file fontspec.dtx
+ and the derived files fontspec.sty and fontspec.pdf.
+
+\endpostamble
+\askforoverwritefalse
+\generate{\file{fontspec.sty}{\from{fontspec.dtx}{fontspec}}}
+\nopreamble\nopostamble
+\generate{\file{fontspec.cfg}{\from{fontspec.dtx}{cfg}}}
+\generate{\file{fontspec.ins}{\from{fontspec.dtx}{batchfile}}}
+\generate{\file{fontspec-example.tex}{\from{fontspec.dtx}{example}}}
+\generate{\file{fontspec-doc-style.sty}{\from{fontspec.dtx}{doc-style}}}
+\endgroup
+
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
deleted file mode 100644
index 2436f15daca..00000000000
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec.sty
+++ /dev/null
@@ -1,1070 +0,0 @@
-%%
-%% This is file `fontspec.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% fontspec.dtx (with options: `fontspec')
-%%
-%% ________________________________
-%% The fontspec package for XeLaTeX
-%% (C) 2004, 2005 Will Robertson
-%%
-%% License information appended.
-%%
-%%
-\ProvidesPackage{fontspec}[2005/07/15 v1.8a Advanced font selection for XeLaTeX]
-\expandafter\ifx\csname XeTeXversion\endcsname\relax
- \@latex@error{^^J
- *************************************************^^J
- *** Sorry! ^^J
- *** The fontspec package only works with XeTeX. ^^J
- *************************************************}
-\fi
-\def\zf@enc{U}
-\renewcommand\encodingdefault{\zf@enc}
-\RequirePackage{keyval}
-\newcommand*\fontspec[2][]{%
- \zf@fontspec{#1}{#2}%
- \fontfamily\zf@family\selectfont}
-\newcommand*\setromanfont[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\rmdefault\zf@family
- \normalfont}
-\newcommand*\setsansfont[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\sfdefault\zf@family
- \normalfont}
-\newcommand*\setmonofont[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\ttdefault\zf@family
- \normalfont}
-\newcommand*\setmathrm[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\zf@rmmaths\zf@family}
-\newcommand*\setboldmathrm[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\zf@rmboldmaths\zf@family}
-\newcommand*\setmathsf[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\zf@sfmaths\zf@family}
-\newcommand*\setmathtt[2][]{%
- \zf@fontspec{#1}{#2}%
- \let\zf@ttmaths\zf@family}
-\@onlypreamble\setmathrm
-\@onlypreamble\setboldmathrm
-\@onlypreamble\setmathsf
-\@onlypreamble\setmathtt
-\def\zf@rmmaths{\rmdefault}
-\def\zf@sfmaths{\sfdefault}
-\def\zf@ttmaths{\ttdefault}
-\newcommand*\newfontinstance[1]{%
- \@ifnextchar[{\newfontinstance@i#1}{\newfontinstance@i#1[]}}
-\def\newfontinstance@i#1[#2]#3{%
- \zf@fontspec{#2}{#3}%
- \edef\zf@tempinst{\noexpand\fontfamily{\zf@family}\noexpand\selectfont}%
- \let#1\zf@tempinst}
-\newcommand*\defaultfontfeatures[1]{\def\zf@default@options{#1}}
-\let\zf@default@options\@empty
-\newcommand*\addfontfeatures[1]{%
- \let\zf@default@options@old\zf@default@options
- \let\zf@default@options\@empty
- \edef\zf@thisinfo{\csname\f@family\endcsname}%
- \fontspec
- [\expandafter\@firstoftwo\zf@thisinfo, #1]%
- {\expandafter\@secondoftwo\zf@thisinfo}%
- \let\zf@default@options\zf@default@options@old}
-\let\addfontfeature\addfontfeatures
-\newcounter{newff}
-\newcommand*\newfontfeature[2]{%
- \stepcounter{newff}%
- \expandafter\edef\csname +zf-#1\endcsname{+zf-\thenewff}%
- \define@key{zf}{#1}[]{%
- \zf@update@family{\csname +zf-#1\endcsname}%
- \zf@update@ff{#2}}}
-\newcommand*\newfeaturecode[3]{%
- \define@key{zf}{#1}[]{\zf@make@feature{#2}{#3}{}}}
-\newcommand*\zf@fontspec[2]{%
- \edef\zf@options{#1}%
- \edef\zf@macname{#2}%
- \edef\zf@family{\zap@space #2 \@empty}%
- \zf@set@font@type{#2}%
- \zf@firsttimetrue
- \zf@get@feature@requests
- \zf@firsttimefalse
- \expandafter\ifx\csname\zf@family\endcsname\relax
- \wlog{fontspec: Defining font family for "#2"
- with options [\zf@current@options]}%
- \edef\zf@info{{\zf@current@options}{#2}}%
- \expandafter\let\csname\zf@family\endcsname\zf@info
- \DeclareFontFamily{\zf@enc}{\zf@family}{}%
- \zf@make@font@shapes{#2}{\mddefault}{\updefault}%
- \let\zf@options@old\zf@options
- \def\zf@options{\zf@options@old,\zf@bf@options}%
- \ifx\zf@bf\@empty
- \zf@make@font@shapes[#2]{#2/B}{\bfdefault}{\updefault}%
- \else
- \zf@make@font@shapes\zf@bf\bfdefault\updefault
- \fi
- \let\zf@options\zf@options@old
- \let\zf@options@old\zf@options
- \def\zf@options{\zf@options@old,\zf@it@options}%
- \ifx\zf@it\@empty
- \zf@make@font@shapes[#2]{#2/I}{\mddefault}{\itdefault}%
- \else
- \zf@make@font@shapes\zf@it\mddefault\itdefault
- \fi
- \let\zf@options\zf@options@old
- \let\zf@options@old\zf@options
- \def\zf@options{\zf@options@old,\zf@bfit@options}%
- \ifx\zf@bfit\@empty
- \ifx\zf@bf\@empty
- \ifx\zf@it\@empty
- \zf@make@font@shapes[#2]{#2/BI}{\bfdefault}{\itdefault}%
- \else
- \zf@make@font@shapes[\zf@it]{\zf@it/B}{\bfdefault}{\itdefault}%
- \fi
- \else
- \zf@make@font@shapes[\zf@bf]{\zf@bf/I}{\bfdefault}{\itdefault}%
- \fi
- \else
- \zf@make@font@shapes\zf@bfit\bfdefault\itdefault
- \fi
- \let\zf@options\zf@options@old
- \fi}
-\newcommand*\zf@set@font@type[1]{%
- \font\zf@testfont = "#1" at 10pt
- \zf@aatfalse \zf@opentypefalse \zf@mmfalse
- \expandafter\ifnum\XeTeXcountfeatures\zf@testfont > 0
- \zf@aattrue
- \fi
- \expandafter\ifnum\XeTeXOTcountscripts\zf@testfont > 0
- \zf@opentypetrue
- \fi
- \expandafter\ifnum\XeTeXcountvariations\zf@testfont > 0
- \zf@mmtrue
- \fi}
-\newif\ifzf@aat \newif\ifzf@opentype \newif\ifzf@mm
-\begingroup
- \nfss@catcodes
- \globaldefs=1
- \newcommand*\zf@make@font@shapes[4][]{%
- \ifEqFonts{#1}{#2}\then\else
- \edef\zf@macname{#2}%
- \zf@get@feature@requests
- \ifx\zf@scale\@empty
- \let\zf@scale@str\@empty
- \else
- \edef\zf@scale@str{s*[\zf@scale]}%
- \fi
- \DeclareFontShape{\zf@enc}{\zf@family}{#3}{#4}%
- {<-> \zf@scale@str "#2\zf@suffix:\zf@ff"}{}%
- \zf@test@smallcaps
- \ifx\zf@smallcaps\@empty\else
- \ifx #4\updefault
- \let\zf@scshape\scdefault
- \fi
- \ifx #4\itdefault
- \let\zf@scshape\sidefault
- \fi
- \DeclareFontShape
- {\zf@enc}{\zf@family}{#3}{\zf@scshape}%
- {<-> \zf@scale@str "#2\zf@suffix:\zf@ff\zf@smallcaps"}{}%
- \fi
- \fi}
-\endgroup
-\newcommand*{\zf@update@family}[1]{%
- \ifzf@firsttime
- \g@addto@macro\zf@family{#1}%
- \fi}
-\newif\ifzf@firsttime
-\newcommand*\zf@get@feature@requests{%
- \ifzf@firsttime
- \let\zf@scale \@empty
- \let\zf@suffix \@empty
- \let\zf@bf \@empty
- \let\zf@it \@empty
- \let\zf@bfit \@empty
- \let\zf@bf@options \@empty
- \let\zf@it@options \@empty
- \let\zf@bfit@options\@empty
- \fi
- \let\zf@ff\@empty
- \ifx\zf@default@options\@empty
- \let\zf@current@options\zf@options
- \else
- \edef\zf@current@options{\zf@default@options,\zf@options}%
- \fi
- \edef\zf@process@options
- {\noexpand\setkeys{zf}{\zf@current@options}}%
- \zf@process@options}
-\newcommand*\zf@test@smallcaps{%
- \let\zf@smallcaps\@empty
- \ifzf@aat
- \zf@make@aat@feature@string{3}{3}%
- \ifx\zf@thisfontfeature\@empty\else
- \edef\zf@smallcaps{\zf@thisfontfeature;}%
- \fi
- \fi
- \ifzf@opentype
- \font\zf@testfont="\zf@macname" at 10pt
- \count255 = \XeTeXOTcountscripts\zf@testfont
- \ifnum\count255 > 0
- \count255 = 0
- \zf@featurecount = \XeTeXOTcountfeatures\zf@testfont "6C61746E "0
- \loop\ifnum\count255 < \zf@featurecount
- \ifnum\XeTeXOTfeaturetag\zf@testfont "6C61746E "0
- \count255 = "736D6370 % 'smcp'
- \edef\zf@smallcaps{+smcp,}%
- \count255 = \zf@featurecount
- \else
- \advance\count255 by 1
- \fi
- \repeat
- \fi
- \fi}
-\newcount\zf@featurecount
-\newcommand*\zf@update@ff[1]{%
- \begingroup
- \def\zf@feature@separator{;}%
- \ifzf@opentype
- \def\zf@feature@separator{,}%
- \fi
- \let\@tempa\zf@ff
- \xdef\zf@ff{\@tempa #1\zf@feature@separator}%
- \endgroup}
-\newcommand*\zf@make@feature[3]{%
- \ifzf@aat
- \zf@make@aat@feature@string{#1}{#2}%
- \ifx\zf@thisfontfeature\@empty\else
- \zf@update@family{+#1,#2}%
- \zf@update@ff\zf@thisfontfeature
- \fi
- \fi
- \ifzf@opentype
- \zf@update@family{#3}%
- \zf@update@ff{#3}%
- \fi}
-\newcommand*\zf@define@font@feature[1]{%
- \define@key{zf}{#1}{{\setkeys{zf@feat@#1}{##1}}}}
-\newcommand*\zf@define@feature@option[5]{%
- \define@key{zf@feat@#1}{#2}[]{\zf@make@feature{#3}{#4}{#5}}}
-\newcommand*\aliasfeature[2]{%
- \define@key{zf}{#2}{{\setkeys{zf@feat@#1}{##1}}}}
-\newcommand*\zf@make@aat@feature@string[2]{%
- \font\zf@fontone="\zf@macname" at 10pt
- \edef\zf@this@featurename{\XeTeXfeaturename\zf@fontone #1}%
- \ifx\zf@this@featurename\@empty
- \let\zf@thisfontfeature\@empty
- \else
- \edef\zf@this@selectionname{\XeTeXselectorname\zf@fontone #1 #2}%
- \ifx\zf@this@selectionname\@empty
- \let\zf@thisfontfeature\@empty
- \else
- \edef\zf@thisfontfeature{%
- \ifnum\XeTeXisexclusivefeature\zf@fontone #1 > 0
- \zf@this@featurename=\zf@this@selectionname
- \else
- \ifodd #2
- \zf@this@featurename=!\zf@this@selectionname
- \else
- \zf@this@featurename=\zf@this@selectionname
- \fi
- \fi}%
- \fi
- \fi}
-\let\then\iftrue
-\def\ifEqFonts#1#2\then{%
- \ifx#1\@empty\else
- \font\zf@fontone = "#1" at 10pt
- \edef\@tempa{\fontname\zf@fontone}%
- \fi
- \font\zf@fonttwo = "#2" at 10pt
- \edef\@tempb{\fontname\zf@fonttwo}%
- \ifx\@tempa\@tempb}
-\define@key{zf}{Bold}{%
- \def\zf@bf{#1}%
- \zf@update@family{bf:\zap@space #1 \@empty}}
-\define@key{zf}{Italic}{%
- \def\zf@it{#1}%
- \zf@update@family{it:\zap@space #1 \@empty}}
-\define@key{zf}{BoldItalic}{%
- \def\zf@bfit{#1}%
- \zf@update@family{bfit:\zap@space #1 \@empty}}
-\define@key{zf}{BoldFont}{%
- \def\zf@bf{#1}%
- \zf@update@family{bf:\zap@space #1 \@empty}}
-\define@key{zf}{ItalicFont}{%
- \def\zf@it{#1}%
- \zf@update@family{it:\zap@space #1 \@empty}}
-\define@key{zf}{BoldItalicFont}{%
- \def\zf@bfit{#1}%
- \zf@update@family{bfit:\zap@space #1 \@empty}}
-
-\define@key{zf}{BoldFeatures}{%
- \def\zf@bf@options{#1}%
- \zf@update@family{bffeat:\zap@space #1 \@empty}}
-\define@key{zf}{ItalicFeatures}{%
- \def\zf@it@options{#1}%
- \zf@update@family{itfeat:\zap@space #1 \@empty}}
-\define@key{zf}{BoldItalicFeatures}{%
- \def\zf@bfit@options{#1}%
- \zf@update@family{bfitfeat:\zap@space #1 \@empty}}
-\define@key{zf}{Scale}{%
- \zf@update@family{+scale:#1}%
- \edef\zf@scale{#1}}
-\define@key{zf}{Colour}{%
- \zf@update@family{+col:#1}%
- \zf@update@ff{color=#1}}
-\define@key{zf}{Color}{%
- \zf@update@family{+col:#1}%
- \zf@update@ff{color=#1}}
-\define@key{zf}{Mapping}{%
- \zf@update@family{+map:#1}%
- \zf@update@ff{mapping=#1}}
-\define@key{zf}{Weight}{%
- \zf@update@family{+weight:#1}%
- \zf@update@ff{weight=#1}}
-\define@key{zf}{Width}{%
- \zf@update@family{+width:#1}%
- \zf@update@ff{width=#1}}
-\define@key{zf}{OpticalSize}{%
- \ifzf@opentype
- \g@addto@macro\zf@suffix{/S=#1}%
- \zf@update@family{+size:#1}
- \fi
- \ifzf@mm
- \zf@update@family{+size:#1}%
- \zf@update@ff{optical size=#1}
- \fi
- \ifzf@opentype\else
- \ifzf@mm\else
- \ifzf@firsttime
- \PackageWarning{fontspec}{\zf@macname doesn't appear to have an Optical Size axis}
- \fi
- \fi
- \fi}
-\define@key{zf}{Script}{\ifzf@opentype\bgroup\setkeys{zf@scpt}{#1}\egroup\fi}
-\newcommand*\zf@make@scpt@feature[2]{%
- \define@key{zf@scpt}{#1}[]{%
- \zf@update@family{+scpt:#2}%
- \zf@update@ff{script=#2}}}
-\zf@make@scpt@feature{Arabic}{arab}
-\zf@make@scpt@feature{Armenian}{armn}
-\zf@make@scpt@feature{Balinese}{bali}
-\zf@make@scpt@feature{Bengali}{beng}
-\zf@make@scpt@feature{Bopomofo}{bopo}
-\zf@make@scpt@feature{Braille}{brai}
-\zf@make@scpt@feature{Buginese}{bugi}
-\zf@make@scpt@feature{Buhid}{buhd}
-\zf@make@scpt@feature{Byzantine Music}{byzm}
-\zf@make@scpt@feature{Canadian Syllabics}{cans}
-\zf@make@scpt@feature{Cherokee}{cher}
-\zf@make@scpt@feature{CJK}{hani}
-\zf@make@scpt@feature{CJK Ideographic}{hani}
-\zf@make@scpt@feature{Coptic}{copt}
-\zf@make@scpt@feature{Cypriot Syllabary}{cprt}
-\zf@make@scpt@feature{Cyrillic}{cyrl}
-\zf@make@scpt@feature{Default}{DFLT}
-\zf@make@scpt@feature{Deseret}{dsrt}
-\zf@make@scpt@feature{Devanagari}{deva}
-\zf@make@scpt@feature{Ethiopic}{ethi}
-\zf@make@scpt@feature{Georgian}{geor}
-\zf@make@scpt@feature{Glagolitic}{glag}
-\zf@make@scpt@feature{Gothic}{goth}
-\zf@make@scpt@feature{Greek}{grek}
-\zf@make@scpt@feature{Gujarati}{gujr}
-\zf@make@scpt@feature{Gurmukhi}{guru}
-\zf@make@scpt@feature{Hangul Jamo}{jamo}
-\zf@make@scpt@feature{Hangul}{hang}
-\zf@make@scpt@feature{Hanunoo}{hano}
-\zf@make@scpt@feature{Hebrew}{hebr}
-\zf@make@scpt@feature{Hiragana and Katakana}{kana}
-\zf@make@scpt@feature{Kana}{kana}
-\zf@make@scpt@feature{Javanese}{java}
-\zf@make@scpt@feature{Kannada}{knda}
-\zf@make@scpt@feature{Kharosthi}{khar}
-\zf@make@scpt@feature{Khmer}{khmr}
-\zf@make@scpt@feature{Lao}{lao }
-\zf@make@scpt@feature{Latin}{latn}
-\zf@make@scpt@feature{Limbu}{limb}
-\zf@make@scpt@feature{Linear B}{linb}
-\zf@make@scpt@feature{Malayalam}{mlym}
-\zf@make@scpt@feature{Math}{math}
-\zf@make@scpt@feature{Maths}{math}
-\zf@make@scpt@feature{Mongolian}{mong}
-\zf@make@scpt@feature{Musical Symbols}{musc}
-\zf@make@scpt@feature{Myanmar}{mymr}
-\zf@make@scpt@feature{N'ko}{nko }
-\zf@make@scpt@feature{Ogham}{ogam}
-\zf@make@scpt@feature{Old Italic}{ital}
-\zf@make@scpt@feature{Old Persian Cuneiform}{xpeo}
-\zf@make@scpt@feature{Oriya}{orya}
-\zf@make@scpt@feature{Osmanya}{osma}
-\zf@make@scpt@feature{Phags-pa}{phag}
-\zf@make@scpt@feature{Phoenician}{phnx}
-\zf@make@scpt@feature{Runic}{runr}
-\zf@make@scpt@feature{Shavian}{shaw}
-\zf@make@scpt@feature{Sinhala}{sinh}
-\zf@make@scpt@feature{Sumero-Akkadian Cuneiform}{xsux}
-\zf@make@scpt@feature{Syloti Nagri}{sylo}
-\zf@make@scpt@feature{Syriac}{syrc}
-\zf@make@scpt@feature{Tagalog}{tglg}
-\zf@make@scpt@feature{Tagbanwa}{tagb}
-\zf@make@scpt@feature{Tai Le}{tale}
-\zf@make@scpt@feature{Tai Lu}{talu}
-\zf@make@scpt@feature{Tamil}{taml}
-\zf@make@scpt@feature{Telugu}{telu}
-\zf@make@scpt@feature{Thaana}{thaa}
-\zf@make@scpt@feature{Thai}{thai}
-\zf@make@scpt@feature{Tibetan}{tibt}
-\zf@make@scpt@feature{Tifinagh}{tfng}
-\zf@make@scpt@feature{Ugaritic Cuneiform}{ugar}
-\zf@make@scpt@feature{Yi}{yi }
-
-\define@key{zf}{Language}{\ifzf@opentype\bgroup\setkeys{zf@lang}{#1}\egroup\fi}
-\newcommand*\zf@make@lang@feature[2]{%
- \define@key{zf@lang}{#1}[]{%
- \zf@update@family{+lang:#2}%
- \zf@update@ff{language=#2}}}
-\zf@make@lang@feature{Abaza}{ABA}
-\zf@make@lang@feature{Abkhazian}{ABK}
-\zf@make@lang@feature{Adyghe}{ADY}
-\zf@make@lang@feature{Afrikaans}{AFK}
-\zf@make@lang@feature{Afar}{AFR}
-\zf@make@lang@feature{Agaw}{AGW}
-\zf@make@lang@feature{Altai}{ALT}
-\zf@make@lang@feature{Amharic}{AMH}
-\zf@make@lang@feature{Arabic}{ARA}
-\zf@make@lang@feature{Aari}{ARI}
-\zf@make@lang@feature{Arakanese}{ARK}
-\zf@make@lang@feature{Assamese}{ASM}
-\zf@make@lang@feature{Athapaskan}{ATH}
-\zf@make@lang@feature{Avar}{AVR}
-\zf@make@lang@feature{Awadhi}{AWA}
-\zf@make@lang@feature{Aymara}{AYM}
-\zf@make@lang@feature{Azeri}{AZE}
-\zf@make@lang@feature{Badaga}{BAD}
-\zf@make@lang@feature{Baghelkhandi}{BAG}
-\zf@make@lang@feature{Balkar}{BAL}
-\zf@make@lang@feature{Baule}{BAU}
-\zf@make@lang@feature{Berber}{BBR}
-\zf@make@lang@feature{Bench}{BCH}
-\zf@make@lang@feature{Bible Cree}{BCR}
-\zf@make@lang@feature{Belarussian}{BEL}
-\zf@make@lang@feature{Bemba}{BEM}
-\zf@make@lang@feature{Bengali}{BEN}
-\zf@make@lang@feature{Bulgarian}{BGR}
-\zf@make@lang@feature{Bhili}{BHI}
-\zf@make@lang@feature{Bhojpuri}{BHO}
-\zf@make@lang@feature{Bikol}{BIK}
-\zf@make@lang@feature{Bilen}{BIL}
-\zf@make@lang@feature{Blackfoot}{BKF}
-\zf@make@lang@feature{Balochi}{BLI}
-\zf@make@lang@feature{Balante}{BLN}
-\zf@make@lang@feature{Balti}{BLT}
-\zf@make@lang@feature{Bambara}{BMB}
-\zf@make@lang@feature{Bamileke}{BML}
-\zf@make@lang@feature{Breton}{BRE}
-\zf@make@lang@feature{Brahui}{BRH}
-\zf@make@lang@feature{Braj Bhasha}{BRI}
-\zf@make@lang@feature{Burmese}{BRM}
-\zf@make@lang@feature{Bashkir}{BSH}
-\zf@make@lang@feature{Beti}{BTI}
-\zf@make@lang@feature{Catalan}{CAT}
-\zf@make@lang@feature{Cebuano}{CEB}
-\zf@make@lang@feature{Chechen}{CHE}
-\zf@make@lang@feature{Chaha Gurage}{CHG}
-\zf@make@lang@feature{Chattisgarhi}{CHH}
-\zf@make@lang@feature{Chichewa}{CHI}
-\zf@make@lang@feature{Chukchi}{CHK}
-\zf@make@lang@feature{Chipewyan}{CHP}
-\zf@make@lang@feature{Cherokee}{CHR}
-\zf@make@lang@feature{Chuvash}{CHU}
-\zf@make@lang@feature{Comorian}{CMR}
-\zf@make@lang@feature{Coptic}{COP}
-\zf@make@lang@feature{Cree}{CRE}
-\zf@make@lang@feature{Carrier}{CRR}
-\zf@make@lang@feature{Crimean Tatar}{CRT}
-\zf@make@lang@feature{Church Slavonic}{CSL}
-\zf@make@lang@feature{Czech}{CSY}
-\zf@make@lang@feature{Danish}{DAN}
-\zf@make@lang@feature{Dargwa}{DAR}
-\zf@make@lang@feature{Woods Cree}{DCR}
-\zf@make@lang@feature{German}{DEU}
-\zf@make@lang@feature{Default}{DFLT}
-\zf@make@lang@feature{Dogri}{DGR}
-\zf@make@lang@feature{Divehi}{DIV}
-\zf@make@lang@feature{Djerma}{DJR}
-\zf@make@lang@feature{Dangme}{DNG}
-\zf@make@lang@feature{Dinka}{DNK}
-\zf@make@lang@feature{Dungan}{DUN}
-\zf@make@lang@feature{Dzongkha}{DZN}
-\zf@make@lang@feature{Ebira}{EBI}
-\zf@make@lang@feature{Eastern Cree}{ECR}
-\zf@make@lang@feature{Edo}{EDO}
-\zf@make@lang@feature{Efik}{EFI}
-\zf@make@lang@feature{Greek}{ELL}
-\zf@make@lang@feature{English}{ENG}
-\zf@make@lang@feature{Erzya}{ERZ}
-\zf@make@lang@feature{Spanish}{ESP}
-\zf@make@lang@feature{Estonian}{ETI}
-\zf@make@lang@feature{Basque}{EUQ}
-\zf@make@lang@feature{Evenki}{EVK}
-\zf@make@lang@feature{Even}{EVN}
-\zf@make@lang@feature{Ewe}{EWE}
-\zf@make@lang@feature{French Antillean}{FAN}
-\zf@make@lang@feature{Farsi}{FAR}
-\zf@make@lang@feature{Finnish}{FIN}
-\zf@make@lang@feature{Fijian}{FJI}
-\zf@make@lang@feature{Flemish}{FLE}
-\zf@make@lang@feature{Forest Nenets}{FNE}
-\zf@make@lang@feature{Fon}{FON}
-\zf@make@lang@feature{Faroese}{FOS}
-\zf@make@lang@feature{French}{FRA}
-\zf@make@lang@feature{Frisian}{FRI}
-\zf@make@lang@feature{Friulian}{FRL}
-\zf@make@lang@feature{Futa}{FTA}
-\zf@make@lang@feature{Fulani}{FUL}
-\zf@make@lang@feature{Ga}{GAD}
-\zf@make@lang@feature{Gaelic}{GAE}
-\zf@make@lang@feature{Gagauz}{GAG}
-\zf@make@lang@feature{Galician}{GAL}
-\zf@make@lang@feature{Garshuni}{GAR}
-\zf@make@lang@feature{Garhwali}{GAW}
-\zf@make@lang@feature{Ge'ez}{GEZ}
-\zf@make@lang@feature{Gilyak}{GIL}
-\zf@make@lang@feature{Gumuz}{GMZ}
-\zf@make@lang@feature{Gondi}{GON}
-\zf@make@lang@feature{Greenlandic}{GRN}
-\zf@make@lang@feature{Garo}{GRO}
-\zf@make@lang@feature{Guarani}{GUA}
-\zf@make@lang@feature{Gujarati}{GUJ}
-\zf@make@lang@feature{Haitian}{HAI}
-\zf@make@lang@feature{Halam}{HAL}
-\zf@make@lang@feature{Harauti}{HAR}
-\zf@make@lang@feature{Hausa}{HAU}
-\zf@make@lang@feature{Hawaiin}{HAW}
-\zf@make@lang@feature{Hammer-Banna}{HBN}
-\zf@make@lang@feature{Hiligaynon}{HIL}
-\zf@make@lang@feature{Hindi}{HIN}
-\zf@make@lang@feature{High Mari}{HMA}
-\zf@make@lang@feature{Hindko}{HND}
-\zf@make@lang@feature{Ho}{HO}
-\zf@make@lang@feature{Harari}{HRI}
-\zf@make@lang@feature{Croatian}{HRV}
-\zf@make@lang@feature{Hungarian}{HUN}
-\zf@make@lang@feature{Armenian}{HYE}
-\zf@make@lang@feature{Igbo}{IBO}
-\zf@make@lang@feature{Ijo}{IJO}
-\zf@make@lang@feature{Ilokano}{ILO}
-\zf@make@lang@feature{Indonesian}{IND}
-\zf@make@lang@feature{Ingush}{ING}
-\zf@make@lang@feature{Inuktitut}{INU}
-\zf@make@lang@feature{Irish}{IRI}
-\zf@make@lang@feature{Irish Traditional}{IRT}
-\zf@make@lang@feature{Icelandic}{ISL}
-\zf@make@lang@feature{Inari Sami}{ISM}
-\zf@make@lang@feature{Italian}{ITA}
-\zf@make@lang@feature{Hebrew}{IWR}
-\zf@make@lang@feature{Javanese}{JAV}
-\zf@make@lang@feature{Yiddish}{JII}
-\zf@make@lang@feature{Japanese}{JAN}
-\zf@make@lang@feature{Judezmo}{JUD}
-\zf@make@lang@feature{Jula}{JUL}
-\zf@make@lang@feature{Kabardian}{KAB}
-\zf@make@lang@feature{Kachchi}{KAC}
-\zf@make@lang@feature{Kalenjin}{KAL}
-\zf@make@lang@feature{Kannada}{KAN}
-\zf@make@lang@feature{Karachay}{KAR}
-\zf@make@lang@feature{Georgian}{KAT}
-\zf@make@lang@feature{Kazakh}{KAZ}
-\zf@make@lang@feature{Kebena}{KEB}
-\zf@make@lang@feature{Khutsuri Georgian}{KGE}
-\zf@make@lang@feature{Khakass}{KHA}
-\zf@make@lang@feature{Khanty-Kazim}{KHK}
-\zf@make@lang@feature{Khmer}{KHM}
-\zf@make@lang@feature{Khanty-Shurishkar}{KHS}
-\zf@make@lang@feature{Khanty-Vakhi}{KHV}
-\zf@make@lang@feature{Khowar}{KHW}
-\zf@make@lang@feature{Kikuyu}{KIK}
-\zf@make@lang@feature{Kirghiz}{KIR}
-\zf@make@lang@feature{Kisii}{KIS}
-\zf@make@lang@feature{Kokni}{KKN}
-\zf@make@lang@feature{Kalmyk}{KLM}
-\zf@make@lang@feature{Kamba}{KMB}
-\zf@make@lang@feature{Kumaoni}{KMN}
-\zf@make@lang@feature{Komo}{KMO}
-\zf@make@lang@feature{Komso}{KMS}
-\zf@make@lang@feature{Kanuri}{KNR}
-\zf@make@lang@feature{Kodagu}{KOD}
-\zf@make@lang@feature{Korean Old Hangul}{KOH}
-\zf@make@lang@feature{Konkani}{KOK}
-\zf@make@lang@feature{Kikongo}{KON}
-\zf@make@lang@feature{Komi-Permyak}{KOP}
-\zf@make@lang@feature{Korean}{KOR}
-\zf@make@lang@feature{Komi-Zyrian}{KOZ}
-\zf@make@lang@feature{Kpelle}{KPL}
-\zf@make@lang@feature{Krio}{KRI}
-\zf@make@lang@feature{Karakalpak}{KRK}
-\zf@make@lang@feature{Karelian}{KRL}
-\zf@make@lang@feature{Karaim}{KRM}
-\zf@make@lang@feature{Karen}{KRN}
-\zf@make@lang@feature{Koorete}{KRT}
-\zf@make@lang@feature{Kashmiri}{KSH}
-\zf@make@lang@feature{Khasi}{KSI}
-\zf@make@lang@feature{Kildin Sami}{KSM}
-\zf@make@lang@feature{Kui}{KUI}
-\zf@make@lang@feature{Kulvi}{KUL}
-\zf@make@lang@feature{Kumyk}{KUM}
-\zf@make@lang@feature{Kurdish}{KUR}
-\zf@make@lang@feature{Kurukh}{KUU}
-\zf@make@lang@feature{Kuy}{KUY}
-\zf@make@lang@feature{Koryak}{KYK}
-\zf@make@lang@feature{Ladin}{LAD}
-\zf@make@lang@feature{Lahuli}{LAH}
-\zf@make@lang@feature{Lak}{LAK}
-\zf@make@lang@feature{Lambani}{LAM}
-\zf@make@lang@feature{Lao}{LAO}
-\zf@make@lang@feature{Latin}{LAT}
-\zf@make@lang@feature{Laz}{LAZ}
-\zf@make@lang@feature{L-Cree}{LCR}
-\zf@make@lang@feature{Ladakhi}{LDK}
-\zf@make@lang@feature{Lezgi}{LEZ}
-\zf@make@lang@feature{Lingala}{LIN}
-\zf@make@lang@feature{Low Mari}{LMA}
-\zf@make@lang@feature{Limbu}{LMB}
-\zf@make@lang@feature{Lomwe}{LMW}
-\zf@make@lang@feature{Lower Sorbian}{LSB}
-\zf@make@lang@feature{Lule Sami}{LSM}
-\zf@make@lang@feature{Lithuanian}{LTH}
-\zf@make@lang@feature{Luba}{LUB}
-\zf@make@lang@feature{Luganda}{LUG}
-\zf@make@lang@feature{Luhya}{LUH}
-\zf@make@lang@feature{Luo}{LUO}
-\zf@make@lang@feature{Latvian}{LVI}
-\zf@make@lang@feature{Majang}{MAJ}
-\zf@make@lang@feature{Makua}{MAK}
-\zf@make@lang@feature{Malayalam Traditional}{MAL}
-\zf@make@lang@feature{Mansi}{MAN}
-\zf@make@lang@feature{Marathi}{MAR}
-\zf@make@lang@feature{Marwari}{MAW}
-\zf@make@lang@feature{Mbundu}{MBN}
-\zf@make@lang@feature{Manchu}{MCH}
-\zf@make@lang@feature{Moose Cree}{MCR}
-\zf@make@lang@feature{Mende}{MDE}
-\zf@make@lang@feature{Me'en}{MEN}
-\zf@make@lang@feature{Mizo}{MIZ}
-\zf@make@lang@feature{Macedonian}{MKD}
-\zf@make@lang@feature{Male}{MLE}
-\zf@make@lang@feature{Malagasy}{MLG}
-\zf@make@lang@feature{Malinke}{MLN}
-\zf@make@lang@feature{Malayalam Reformed}{MLR}
-\zf@make@lang@feature{Malay}{MLY}
-\zf@make@lang@feature{Mandinka}{MND}
-\zf@make@lang@feature{Mongolian}{MNG}
-\zf@make@lang@feature{Manipuri}{MNI}
-\zf@make@lang@feature{Maninka}{MNK}
-\zf@make@lang@feature{Manx Gaelic}{MNX}
-\zf@make@lang@feature{Moksha}{MOK}
-\zf@make@lang@feature{Moldavian}{MOL}
-\zf@make@lang@feature{Mon}{MON}
-\zf@make@lang@feature{Moroccan}{MOR}
-\zf@make@lang@feature{Maori}{MRI}
-\zf@make@lang@feature{Maithili}{MTH}
-\zf@make@lang@feature{Maltese}{MTS}
-\zf@make@lang@feature{Mundari}{MUN}
-\zf@make@lang@feature{Naga-Assamese}{NAG}
-\zf@make@lang@feature{Nanai}{NAN}
-\zf@make@lang@feature{Naskapi}{NAS}
-\zf@make@lang@feature{N-Cree}{NCR}
-\zf@make@lang@feature{Ndebele}{NDB}
-\zf@make@lang@feature{Ndonga}{NDG}
-\zf@make@lang@feature{Nepali}{NEP}
-\zf@make@lang@feature{Newari}{NEW}
-\zf@make@lang@feature{Nagari}{NGR}
-\zf@make@lang@feature{Norway House Cree}{NHC}
-\zf@make@lang@feature{Nisi}{NIS}
-\zf@make@lang@feature{Niuean}{NIU}
-\zf@make@lang@feature{Nkole}{NKL}
-\zf@make@lang@feature{N'ko}{NKO}
-\zf@make@lang@feature{Dutch}{NLD}
-\zf@make@lang@feature{Nogai}{NOG}
-\zf@make@lang@feature{Norwegian}{NOR}
-\zf@make@lang@feature{Northern Sami}{NSM}
-\zf@make@lang@feature{Northern Tai}{NTA}
-\zf@make@lang@feature{Esperanto}{NTO}
-\zf@make@lang@feature{Nynorsk}{NYN}
-\zf@make@lang@feature{Oji-Cree}{OCR}
-\zf@make@lang@feature{Ojibway}{OJB}
-\zf@make@lang@feature{Oriya}{ORI}
-\zf@make@lang@feature{Oromo}{ORO}
-\zf@make@lang@feature{Ossetian}{OSS}
-\zf@make@lang@feature{Palestinian Aramaic}{PAA}
-\zf@make@lang@feature{Pali}{PAL}
-\zf@make@lang@feature{Punjabi}{PAN}
-\zf@make@lang@feature{Palpa}{PAP}
-\zf@make@lang@feature{Pashto}{PAS}
-\zf@make@lang@feature{Polytonic Greek}{PGR}
-\zf@make@lang@feature{Pilipino}{PIL}
-\zf@make@lang@feature{Palaung}{PLG}
-\zf@make@lang@feature{Polish}{PLK}
-\zf@make@lang@feature{Provencal}{PRO}
-\zf@make@lang@feature{Portuguese}{PTG}
-\zf@make@lang@feature{Chin}{QIN}
-\zf@make@lang@feature{Rajasthani}{RAJ}
-\zf@make@lang@feature{R-Cree}{RCR}
-\zf@make@lang@feature{Russian Buriat}{RBU}
-\zf@make@lang@feature{Riang}{RIA}
-\zf@make@lang@feature{Rhaeto-Romanic}{RMS}
-\zf@make@lang@feature{Romanian}{ROM}
-\zf@make@lang@feature{Romany}{ROY}
-\zf@make@lang@feature{Rusyn}{RSY}
-\zf@make@lang@feature{Ruanda}{RUA}
-\zf@make@lang@feature{Russian}{RUS}
-\zf@make@lang@feature{Sadri}{SAD}
-\zf@make@lang@feature{Sanskrit}{SAN}
-\zf@make@lang@feature{Santali}{SAT}
-\zf@make@lang@feature{Sayisi}{SAY}
-\zf@make@lang@feature{Sekota}{SEK}
-\zf@make@lang@feature{Selkup}{SEL}
-\zf@make@lang@feature{Sango}{SGO}
-\zf@make@lang@feature{Shan}{SHN}
-\zf@make@lang@feature{Sibe}{SIB}
-\zf@make@lang@feature{Sidamo}{SID}
-\zf@make@lang@feature{Silte Gurage}{SIG}
-\zf@make@lang@feature{Skolt Sami}{SKS}
-\zf@make@lang@feature{Slovak}{SKY}
-\zf@make@lang@feature{Slavey}{SLA}
-\zf@make@lang@feature{Slovenian}{SLV}
-\zf@make@lang@feature{Somali}{SML}
-\zf@make@lang@feature{Samoan}{SMO}
-\zf@make@lang@feature{Sena}{SNA}
-\zf@make@lang@feature{Sindhi}{SND}
-\zf@make@lang@feature{Sinhalese}{SNH}
-\zf@make@lang@feature{Soninke}{SNK}
-\zf@make@lang@feature{Sodo Gurage}{SOG}
-\zf@make@lang@feature{Sotho}{SOT}
-\zf@make@lang@feature{Albanian}{SQI}
-\zf@make@lang@feature{Serbian}{SRB}
-\zf@make@lang@feature{Saraiki}{SRK}
-\zf@make@lang@feature{Serer}{SRR}
-\zf@make@lang@feature{South Slavey}{SSL}
-\zf@make@lang@feature{Southern Sami}{SSM}
-\zf@make@lang@feature{Suri}{SUR}
-\zf@make@lang@feature{Svan}{SVA}
-\zf@make@lang@feature{Swedish}{SVE}
-\zf@make@lang@feature{Swadaya Aramaic}{SWA}
-\zf@make@lang@feature{Swahili}{SWK}
-\zf@make@lang@feature{Swazi}{SWZ}
-\zf@make@lang@feature{Sutu}{SXT}
-\zf@make@lang@feature{Syriac}{SYR}
-\zf@make@lang@feature{Tabasaran}{TAB}
-\zf@make@lang@feature{Tajiki}{TAJ}
-\zf@make@lang@feature{Tamil}{TAM}
-\zf@make@lang@feature{Tatar}{TAT}
-\zf@make@lang@feature{TH-Cree}{TCR}
-\zf@make@lang@feature{Telugu}{TEL}
-\zf@make@lang@feature{Tongan}{TGN}
-\zf@make@lang@feature{Tigre}{TGR}
-\zf@make@lang@feature{Tigrinya}{TGY}
-\zf@make@lang@feature{Thai}{THA}
-\zf@make@lang@feature{Tahitian}{THT}
-\zf@make@lang@feature{Tibetan}{TIB}
-\zf@make@lang@feature{Turkmen}{TKM}
-\zf@make@lang@feature{Temne}{TMN}
-\zf@make@lang@feature{Tswana}{TNA}
-\zf@make@lang@feature{Tundra Nenets}{TNE}
-\zf@make@lang@feature{Tonga}{TNG}
-\zf@make@lang@feature{Todo}{TOD}
-\zf@make@lang@feature{Turkish}{TRK}
-\zf@make@lang@feature{Tsonga}{TSG}
-\zf@make@lang@feature{Turoyo Aramaic}{TUA}
-\zf@make@lang@feature{Tulu}{TUL}
-\zf@make@lang@feature{Tuvin}{TUV}
-\zf@make@lang@feature{Twi}{TWI}
-\zf@make@lang@feature{Udmurt}{UDM}
-\zf@make@lang@feature{Ukrainian}{UKR}
-\zf@make@lang@feature{Urdu}{URD}
-\zf@make@lang@feature{Upper Sorbian}{USB}
-\zf@make@lang@feature{Uyghur}{UYG}
-\zf@make@lang@feature{Uzbek}{UZB}
-\zf@make@lang@feature{Venda}{VEN}
-\zf@make@lang@feature{Vietnamese}{VIT}
-\zf@make@lang@feature{Wa}{WA}
-\zf@make@lang@feature{Wagdi}{WAG}
-\zf@make@lang@feature{West-Cree}{WCR}
-\zf@make@lang@feature{Welsh}{WEL}
-\zf@make@lang@feature{Wolof}{WLF}
-\zf@make@lang@feature{Tai Lue}{XBD}
-\zf@make@lang@feature{Xhosa}{XHS}
-\zf@make@lang@feature{Yakut}{YAK}
-\zf@make@lang@feature{Yoruba}{YBA}
-\zf@make@lang@feature{Y-Cree}{YCR}
-\zf@make@lang@feature{Yi Classic}{YIC}
-\zf@make@lang@feature{Yi Modern}{YIM}
-\zf@make@lang@feature{Chinese Hong Kong}{ZHH}
-\zf@make@lang@feature{Chinese Phonetic}{ZHP}
-\zf@make@lang@feature{Chinese Simplified}{ZHS}
-\zf@make@lang@feature{Chinese Traditional}{ZHT}
-\zf@make@lang@feature{Zande}{ZND}
-\zf@make@lang@feature{Zulu}{ZUL}
-\zf@define@font@feature{Ligatures}
-\zf@define@feature@option{Ligatures}{Required}{1}{0}{+rlig}
-\zf@define@feature@option{Ligatures}{NoRequired} {1}{1} {-rlig}
-\zf@define@feature@option{Ligatures}{Common} {1}{2} {+liga}
-\zf@define@feature@option{Ligatures}{NoCommon} {1}{3} {-liga}
-\zf@define@feature@option{Ligatures}{Rare} {1}{4} {+dlig}
-\zf@define@feature@option{Ligatures}{NoRare} {1}{5} {-dlig}
-\zf@define@feature@option{Ligatures}{Discretionary} {1}{4} {+dlig}
-\zf@define@feature@option{Ligatures}{NoDiscretionary}{1}{5} {-dlig}
-\zf@define@feature@option{Ligatures}{Contextual} {}{} {+clig}
-\zf@define@feature@option{Ligatures}{NoContextual} {}{} {-clig}
-\zf@define@feature@option{Ligatures}{Historical} {}{} {+hlig}
-\zf@define@feature@option{Ligatures}{NoHistorical} {}{} {-hlig}
-\zf@define@feature@option{Ligatures}{Logos} {1}{6} {}
-\zf@define@feature@option{Ligatures}{NoLogos} {1}{7} {}
-\zf@define@feature@option{Ligatures}{Rebus} {1}{8} {}
-\zf@define@feature@option{Ligatures}{NoRebus} {1}{9} {}
-\zf@define@feature@option{Ligatures}{Diphthong} {1}{10}{}
-\zf@define@feature@option{Ligatures}{NoDiphthong} {1}{11}{}
-\zf@define@feature@option{Ligatures}{Squared} {1}{12}{}
-\zf@define@feature@option{Ligatures}{NoSquared} {1}{13}{}
-\zf@define@feature@option{Ligatures}{AbbrevSquared} {1}{14}{}
-\zf@define@feature@option{Ligatures}{NoAbbrevSquared}{1}{15}{}
-\zf@define@feature@option{Ligatures}{Icelandic} {1}{32}{}
-\zf@define@feature@option{Ligatures}{NoIcelandic} {1}{33}{}
-\zf@define@font@feature{Letters}
-\zf@define@feature@option{Letters}{Normal}{3}{0}{}
-\zf@define@feature@option{Letters}{Uppercase}{3}{1}{+cpsp}
-\zf@define@feature@option{Letters}{Lowercase}{3}{2}{}
-\zf@define@feature@option{Letters}{SmallCaps}{3}{3}{+smcp}
-\zf@define@feature@option{Letters}{PetiteCaps}{}{}{+pcap}
-\zf@define@feature@option{Letters}{SMALLCAPS}{}{}{+c2sc}
-\zf@define@feature@option{Letters}{PETITECAPS}{}{}{+c2pc}
-\zf@define@feature@option{Letters}{InitialCaps}{3}{4}{}
-\zf@define@feature@option{Letters}{Unicase}{}{}{+unic}
-\zf@define@font@feature{Numbers}
-\zf@define@feature@option{Numbers}{Monospaced}{6}{0}{+tnum}
-\zf@define@feature@option{Numbers}{Proportional}{6}{1}{+pnum}
-\zf@define@feature@option{Numbers}{Lowercase}{21}{0}{+onum}
-\zf@define@feature@option{Numbers}{OldStyle}{21}{0}{+onum}
-\zf@define@feature@option{Numbers}{Uppercase}{21}{1}{+lnum}
-\zf@define@feature@option{Numbers}{Lining}{21}{1}{+lnum}
-\zf@define@feature@option{Numbers}{SlashedZero}{14}{5}{+zero}
-\zf@define@feature@option{Numbers}{NoSlashedZero}{14}{4}{-zero}
-\zf@define@font@feature{Swashes}
-\zf@define@feature@option{Swashes}{Contextual}{}{}{+cswh}
-\zf@define@feature@option{Swashes}{WordInitial}{8}{0}{+init}
-\zf@define@feature@option{Swashes}{NoWordInitial}{8}{1}{-init}
-\zf@define@feature@option{Swashes}{WordFinal}{8}{2}{+fina}
-\zf@define@feature@option{Swashes}{NoWordFinal}{8}{3}{-fina}
-\zf@define@feature@option{Swashes}{LineInitial}{8}{4}{}
-\zf@define@feature@option{Swashes}{NoLineInitial}{8}{5}{}
-\zf@define@feature@option{Swashes}{LineFinal}{8}{6}{+falt}
-\zf@define@feature@option{Swashes}{NoLineFinal}{8}{7}{-falt}
-\zf@define@feature@option{Swashes}{Inner}{8}{8}{}
-\zf@define@feature@option{Swashes}{NoInner}{8}{9}{}
-\zf@define@font@feature{Diacritics}
-\zf@define@feature@option{Diacritics}{Show}{9}{0}{}
-\zf@define@feature@option{Diacritics}{Hide}{9}{1}{}
-\zf@define@feature@option{Diacritics}{Decompose}{9}{2}{}
-\zf@define@font@feature{VerticalPosition}
-\zf@define@feature@option{VerticalPosition}{Normal}{10}{0}{}
-\zf@define@feature@option{VerticalPosition}{Superior}{10}{1}{+sups}
-\zf@define@feature@option{VerticalPosition}{Inferior}{10}{2}{+subs}
-\zf@define@feature@option{VerticalPosition}{ScientificInferior}{}{}{+sinf}
-\zf@define@feature@option{VerticalPosition}{Ordinal}{10}{3}{+ordn}
-\zf@define@feature@option{VerticalPosition}{Numerator}{}{}{+numr}
-\zf@define@feature@option{VerticalPosition}{Denominator}{}{}{+dnom}
-\zf@define@font@feature{Fractions}
-\zf@define@feature@option{Fractions}{On}{11}{1}{+frac}
-\zf@define@feature@option{Fractions}{Off}{11}{0}{-frac}
-\zf@define@feature@option{Fractions}{Diagonal}{11}{2}{}
-\zf@define@feature@option{Fractions}{Alternate}{}{}{+afrc}
-\define@key{zf}{Alternate}{\zf@make@feature{17}{#1}{}}
-\define@key{zf}{Variant}{\zf@make@feature{18}{#1}{%
- \ifnum #1 > 0
- \ifnum #1 < 100
- \ifnum #1 > 9
- +ss#1%
- \else
- +ss0#1%
- \fi
- \else
- \PackageWarning{fontspec}{OpenType variant number must be
- between 1 and 99 inclusive.}%
- \fi
- \else
- \PackageWarning{fontspec}{OpenType variant number must be between 1
- and 99 inclusive.}%
- \fi}}
-\zf@define@font@feature{Style}
-\aliasfeature{Style}{StyleOptions}
-\zf@define@feature@option{Style}{Alternate}{}{}{+salt}
-\zf@define@feature@option{Style}{Italic}{32}{2}{+ital}
-\zf@define@feature@option{Style}{Ruby}{28}{2}{+ruby}
-\zf@define@feature@option{Style}{Swash}{}{}{+swsh}
-\zf@define@feature@option{Style}{Display}{19}{1}{}
-\zf@define@feature@option{Style}{Engraved}{19}{2}{}
-\zf@define@feature@option{Style}{TitlingCaps}{19}{4}{+titl}
-\zf@define@feature@option{Style}{TallCaps}{19}{5}{}
-\zf@define@font@feature{CharacterShape}
-\zf@define@feature@option{CharacterShape}{Traditional}{20}{0}{+trad}
-\zf@define@feature@option{CharacterShape}{Simplified}{20}{1}{+smpl}
-\zf@define@feature@option{CharacterShape}{JIS1978}{20}{2}{+jp78}
-\zf@define@feature@option{CharacterShape}{JIS1983}{20}{3}{+jp83}
-\zf@define@feature@option{CharacterShape}{JIS1990}{20}{4}{+jp90}
-\zf@define@feature@option{CharacterShape}{Expert}{20}{10}{+expt}
-\zf@define@feature@option{CharacterShape}{NLC}{20}{13}{+nlck}
-\zf@define@font@feature{TextSpacing}
-\zf@define@feature@option{TextSpacing}{Proportional}{22}{0}{+pwid}
-\zf@define@feature@option{TextSpacing}{FullWidth}{22}{1}{+fwid}
-\zf@define@feature@option{TextSpacing}{HalfWidth}{22}{2}{+hwid}
-\zf@define@feature@option{TextSpacing}{ThirdWidth}{22}{3}{+twid}
-\zf@define@feature@option{TextSpacing}{QuarterWidth}{22}{4}{+qwid}
-\zf@define@feature@option{TextSpacing}{AlternateProportional}{22}{5}{+palt}
-\zf@define@feature@option{TextSpacing}{AlternateHalfWidth}{22}{6}{+halt}
-\zf@define@feature@option{TextSpacing}{Default}{22}{7}{}
-\zf@define@font@feature{Annotation}
-\zf@define@feature@option{Annotation}{Off}{24}{0}{-nalt}
-\zf@define@feature@option{Annotation}{On}{}{}{+nalt}
-\zf@define@feature@option{Annotation}{Box}{24}{1}{}
-\zf@define@feature@option{Annotation}{RoundedBox}{24}{2}{}
-\zf@define@feature@option{Annotation}{Circle}{24}{3}{}
-\zf@define@feature@option{Annotation}{BlackCircle}{24}{4}{}
-\zf@define@feature@option{Annotation}{Parenthesis}{24}{5}{}
-\zf@define@feature@option{Annotation}{Period}{24}{6}{}
-\zf@define@feature@option{Annotation}{RomanNumerals}{24}{7}{}
-\zf@define@feature@option{Annotation}{Diamond}{24}{8}{}
-\zf@define@feature@option{Annotation}{BlackSquare}{24}{9}{}
-\zf@define@feature@option{Annotation}{BlackRoundSquare}{24}{10}{}
-\zf@define@feature@option{Annotation}{DoubleCircle}{24}{11}{}
-\providecommand*{\sidefault}{si}
-\DeclareRobustCommand{\sishape}{%
- \not@math@alphabet\sishape\relax
- \fontshape\sidefault\selectfont}
-\DeclareTextFontCommand{\textsi}{\sishape}
-\newcommand*{\zf@merge@shape}[3]{%
- \edef\@tempa{#1}%
- \edef\@tempb{#2}%
- \ifx\f@shape\@tempb
- \expandafter\ifx
- \csname\f@encoding/\f@family/\f@series/#3\endcsname
- \relax\else
- \edef\@tempa{#3}%
- \fi
- \fi
- \fontshape{\@tempa}\selectfont}
-\DeclareRobustCommand{\itshape}{%
- \not@math@alphabet\itshape\mathit
- \zf@merge@shape\itdefault\scdefault\sidefault}
-\DeclareRobustCommand{\scshape}{%
- \not@math@alphabet\scshape\relax
- \zf@merge@shape\scdefault\itdefault\sidefault}
-\DeclareRobustCommand{\upshape}{%
- \not@math@alphabet\upshape\relax
- \zf@merge@shape\updefault\sidefault\scdefault}
-\newif\ifzf@math@euler
-\newif\ifzf@math@lucida
-\newif\ifzf@euler@package@loaded
-\@ifpackageloaded{euler}{\zf@euler@package@loadedtrue}
- {\zf@euler@package@loadedfalse}
-\AtBeginDocument{%
- \@ifpackageloaded{euler}{%
- \ifzf@euler@package@loaded
- \zf@math@eulertrue
- \else
- \PackageError{fontspec}{The euler package must be loaded BEFORE fontspec}
- {fontspec only overwrites euler's attempt to\MessageBreak
- define the maths text fonts if fontspec is\MessageBreak
- loaded after euler. Type <return> to proceed\MessageBreak
- with incorrect \protect\mathit, \protect\mathbf, etc}
- \fi}{}
- \@ifpackageloaded{lucbmath}{\zf@math@lucidatrue}{}
- \@ifpackageloaded{lucidabr}{\zf@math@lucidatrue}{}
- \DeclareSymbolFont{legacymaths}{OT1}{cmr}{m}{n}
- \SetSymbolFont{legacymaths}{bold}{OT1}{cmr}{bx}{n}
- \DeclareMathAccent{\acute} {\mathalpha}{legacymaths}{"13}
- \DeclareMathAccent{\grave} {\mathalpha}{legacymaths}{"12}
- \DeclareMathAccent{\ddot} {\mathalpha}{legacymaths}{"7F}
- \DeclareMathAccent{\tilde} {\mathalpha}{legacymaths}{"7E}
- \DeclareMathAccent{\bar} {\mathalpha}{legacymaths}{"16}
- \DeclareMathAccent{\breve} {\mathalpha}{legacymaths}{"15}
- \DeclareMathAccent{\check} {\mathalpha}{legacymaths}{"14}
- \DeclareMathAccent{\hat} {\mathalpha}{legacymaths}{"5E} % too bad, euler
- \DeclareMathAccent{\dot} {\mathalpha}{legacymaths}{"5F}
- \DeclareMathAccent{\mathring}{\mathalpha}{legacymaths}{"17}
- \ifzf@math@euler\else
- \DeclareMathSymbol{!}{\mathclose}{legacymaths}{"21}
- \DeclareMathSymbol{:}{\mathrel} {legacymaths}{"3A}
- \DeclareMathSymbol{;}{\mathpunct}{legacymaths}{"3B}
- \DeclareMathSymbol{?}{\mathclose}{legacymaths}{"3F}
- \ifzf@math@lucida
- \@ifpackageloaded{amsmath}{}{%
- \DeclareMathSymbol{\colon}{\mathpunct}{legacymaths}{"3A}}
- \else
- \DeclareMathSymbol{0}{\mathalpha}{legacymaths}{`0}
- \DeclareMathSymbol{1}{\mathalpha}{legacymaths}{`1}
- \DeclareMathSymbol{2}{\mathalpha}{legacymaths}{`2}
- \DeclareMathSymbol{3}{\mathalpha}{legacymaths}{`3}
- \DeclareMathSymbol{4}{\mathalpha}{legacymaths}{`4}
- \DeclareMathSymbol{5}{\mathalpha}{legacymaths}{`5}
- \DeclareMathSymbol{6}{\mathalpha}{legacymaths}{`6}
- \DeclareMathSymbol{7}{\mathalpha}{legacymaths}{`7}
- \DeclareMathSymbol{8}{\mathalpha}{legacymaths}{`8}
- \DeclareMathSymbol{9}{\mathalpha}{legacymaths}{`9}
- \DeclareMathSymbol{\Gamma}{\mathalpha}{legacymaths}{"00}
- \DeclareMathSymbol{\Delta}{\mathalpha}{legacymaths}{"01}
- \DeclareMathSymbol{\Theta}{\mathalpha}{legacymaths}{"02}
- \DeclareMathSymbol{\Lambda}{\mathalpha}{legacymaths}{"03}
- \DeclareMathSymbol{\Xi}{\mathalpha}{legacymaths}{"04}
- \DeclareMathSymbol{\Pi}{\mathalpha}{legacymaths}{"05}
- \DeclareMathSymbol{\Sigma}{\mathalpha}{legacymaths}{"06}
- \DeclareMathSymbol{\Upsilon}{\mathalpha}{legacymaths}{"07}
- \DeclareMathSymbol{\Phi}{\mathalpha}{legacymaths}{"08}
- \DeclareMathSymbol{\Psi}{\mathalpha}{legacymaths}{"09}
- \DeclareMathSymbol{\Omega}{\mathalpha}{legacymaths}{"0A}
- \DeclareMathSymbol{+}{\mathbin}{legacymaths}{"2B}
- \DeclareMathSymbol{=}{\mathrel}{legacymaths}{"3D}
- \DeclareMathDelimiter{(}{\mathopen} {legacymaths}{"28}{largesymbols}{"00}
- \DeclareMathDelimiter{)}{\mathclose}{legacymaths}{"29}{largesymbols}{"01}
- \DeclareMathDelimiter{[}{\mathopen} {legacymaths}{"5B}{largesymbols}{"02}
- \DeclareMathDelimiter{]}{\mathclose}{legacymaths}{"5D}{largesymbols}{"03}
- \DeclareMathDelimiter{/}{\mathord}{legacymaths}{"2F}{largesymbols}{"0E}
- \DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{"24}
- \fi
- \fi
- \DeclareSymbolFont{operators}\zf@enc\zf@rmmaths\mddefault\updefault
- \SetSymbolFont{operators}{normal}\zf@enc\zf@rmmaths\mddefault\updefault
- \SetMathAlphabet\mathrm{normal}\zf@enc\zf@rmmaths\mddefault\updefault
- \SetMathAlphabet\mathit{normal}\zf@enc\zf@rmmaths\mddefault\itdefault
- \SetMathAlphabet\mathbf{normal}\zf@enc\zf@rmmaths\bfdefault\updefault
- \SetMathAlphabet\mathsf{normal}\zf@enc\zf@sfmaths\mddefault\updefault
- \SetMathAlphabet\mathtt{normal}\zf@enc\zf@ttmaths\mddefault\updefault
- \SetSymbolFont{operators}{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
- \expandafter\ifx\csname zf@rmboldmaths\endcsname\relax
- \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
- \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmmaths\bfdefault\itdefault
- \else
- \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmboldmaths\mddefault\updefault
- \SetMathAlphabet\mathbf{bold}\zf@enc\zf@rmboldmaths\bfdefault\updefault
- \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmboldmaths\mddefault\itdefault
- \fi
- \SetMathAlphabet\mathsf{bold}\zf@enc\zf@sfmaths\bfdefault\updefault
- \SetMathAlphabet\mathsf{bold}\zf@enc\zf@ttmaths\bfdefault\updefault}
-%%
-%% Copyright 2005 by Will Robertson <will@guerilla.net.au>
-%%
-%% Distributable under the LaTeX Project Public License,
-%% version 1.3a 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 the file fontspec.dtx
-%% and the derived files fontspec.sty and fontspec.pdf.
-%%
-%%
-%% End of file `fontspec.sty'.
diff --git a/Master/texmf-dist/tex/xetex/fontspec/fontspec.cfg b/Master/texmf-dist/tex/xetex/fontspec/fontspec.cfg
new file mode 100644
index 00000000000..1741bba6d7d
--- /dev/null
+++ b/Master/texmf-dist/tex/xetex/fontspec/fontspec.cfg
@@ -0,0 +1,25 @@
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% FOR BACKWARDS COMPATIBILITY WITH PREVIOUS VERSIONS %%%
+
+\newcommand\newfeaturecode[3]{%
+ \define@key{zf}{#1}[]{\zf@make@feature{#2}{#3}{}}}
+
+\aliasfontfeature{BoldFont}{Bold}
+\aliasfontfeature{ItalicFont}{Italic}
+\aliasfontfeature{BoldItalicFont}{BoldItalic}
+\aliasfontfeature{SmallCapsFont}{SmallCaps}
+\aliasfontfeature{Style}{StyleOptions}
+\aliasfontfeature{Contextuals}{Swashes}
+\aliasfontfeatureoption{Contextuals}{Swash}{Contextual}
+\aliasfontfeatureoption{Letters}{UppercaseSmallCaps}{SMALLCAPS}
+\aliasfontfeatureoption{Letters}{UppercasePetiteCaps}{PETITECAPS}
+
+%%%%%%%%%%%%%%%%%%%%%%%
+%%% FOR CONVENIENCE %%%
+
+\newfontscript{Kana}{kana}
+\newfontscript{Maths}{math}
+\newfontscript{CJK}{hani}
+
diff --git a/Master/texmf-dist/tex/xetex/fontspec/fontspec.sty b/Master/texmf-dist/tex/xetex/fontspec/fontspec.sty
new file mode 100644
index 00000000000..86e8e054a71
--- /dev/null
+++ b/Master/texmf-dist/tex/xetex/fontspec/fontspec.sty
@@ -0,0 +1,1028 @@
+%%
+%% This is file `fontspec.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fontspec.dtx (with options: `fontspec')
+%%
+%% ________________________________
+%% The fontspec package for XeLaTeX
+%% (C) 2004--2006 Will Robertson
+%%
+%% License information appended.
+%%
+%%
+\ProvidesPackage{fontspec}
+ [2006/06/07 v1.10 Advanced font selection for XeLaTeX]
+
+\unless\ifdefined\XeTeXversion
+ \@latex@error{^^J
+ *************************************************^^J
+ *** Sorry! ^^J
+ *** The fontspec package only works with XeTeX. ^^J
+ *************************************************}
+\fi
+\newif\ifzf@firsttime
+\newif\ifzf@tfm
+\newif\ifzf@atsui
+\newif\ifzf@icu
+\newif\ifzf@mm
+\newif\ifzf@math@euler
+\newif\ifzf@math@lucida
+\newif\ifzf@euler@package@loaded
+\newif\ifzf@package@babel@loaded
+\newcount\c@zf@newff
+\newcount\c@zf@index
+\newcount\c@zf@script
+\newcount\c@zf@language
+\newcommand\zf@PackageError[2]{\PackageError{fontspec}{#1}{#2}}
+\newcommand\zf@PackageWarning[1]{\PackageWarning{fontspec}{#1}}
+\newcommand\zf@PackageInfo[1]{\PackageInfo{fontspec}{#1}}
+\RequirePackage{calc}
+\RequirePackage{xkeyval}[2005/05/07]
+\def\zf@enc{U}
+\renewcommand\encodingdefault{\zf@enc}
+\def\cyrillicencoding{U}%
+\def\latinencoding{U}%
+\g@addto@macro\document{%
+ \def\cyrillicencoding{U}%
+ \def\latinencoding{U}}
+\newcommand*\fontspec[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \fontfamily\zf@family\selectfont
+ \ignorespaces}
+\newcommand*\setromanfont[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\rmdefault\zf@family
+ \normalfont}
+\newcommand*\setsansfont[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\sfdefault\zf@family
+ \normalfont}
+\newcommand*\setmonofont[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\ttdefault\zf@family
+ \normalfont}
+\newcommand*\setmathrm[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\zf@rmmaths\zf@family}
+\newcommand*\setboldmathrm[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\zf@rmboldmaths\zf@family}
+\newcommand*\setmathsf[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\zf@sfmaths\zf@family}
+\newcommand*\setmathtt[2][]{%
+ \zf@fontspec{#1}{#2}%
+ \let\zf@ttmaths\zf@family}
+\@onlypreamble\setmathrm
+\@onlypreamble\setboldmathrm
+\@onlypreamble\setmathsf
+\@onlypreamble\setmathtt
+\def\zf@rmmaths{\rmdefault}
+\def\zf@sfmaths{\sfdefault}
+\def\zf@ttmaths{\ttdefault}
+\newcommand*\newfontinstance[1]{%
+ \@ifnextchar[{\newfontinstance@i#1}{\newfontinstance@i#1[]}}
+\def\newfontinstance@i#1[#2]#3{%
+ \zf@fontspec{#2}{#3}%
+ \edef#1{\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}
+\newcommand*\defaultfontfeatures[1]{\def\zf@default@options{#1,}}
+\let\zf@default@options\@empty
+\newcommand*\addfontfeatures[1]{%
+ \let\zf@default@options@old\zf@default@options
+ \let\zf@default@options\@empty
+ \edef\zf@thisinfo{}%
+ \edef\@tempa{%
+ \noexpand\zf@fontspec
+ {\csname zf@family@options\f@family\endcsname,#1}%
+ {\csname zf@family@fontname\f@family\endcsname}}%
+ \@tempa
+ \fontfamily\zf@family\selectfont
+ \let\zf@default@options\zf@default@options@old
+ \ignorespaces}
+\let\addfontfeature\addfontfeatures
+\newcommand*\newfontfeature[2]{%
+ \stepcounter{zf@newff}%
+ \def@cx{+zf-#1}{+zf-\the\c@zf@newff}%
+ \define@key[zf]{options}{#1}[]{%
+ \zf@update@family{\csname+zf-#1\endcsname}%
+ \zf@update@ff{#2}}}
+\newcommand*\newAATfeature[4]{%
+ \unless\ifcsname zf@options@#1\endcsname
+ \zf@define@font@feature{#1}%
+ \fi
+ \key@ifundefined[zf]{#1}{#2}{}{%
+ \zf@PackageWarning{Option '#2' of font feature '#1' overwritten.}}%
+ \zf@define@feature@option{#1}{#2}{#3}{#4}{}}
+\newcommand*\newICUfeature[3]{%
+ \unless\ifcsname zf@options@#1\endcsname
+ \zf@define@font@feature{#1}%
+ \fi
+ \key@ifundefined[zf]{#1}{#2}{}{%
+ \zf@PackageWarning{Option '#2' of font feature '#1' overwritten.}}%
+ \zf@define@feature@option{#1}{#2}{}{}{#3}}
+\newcommand*\aliasfontfeature[2]{\multi@alias@key{#1}{#2}}
+\newcommand*\aliasfontfeatureoption[3]{\keyval@alias@key[zf@feat]{#1}{#2}{#3}}
+\newcommand*\newfontscript[2]{%
+ \define@key[zf@feat]{Script}{#1}[]{%
+ \zf@check@ot@script{#2}%
+ \if@tempswa
+ \c@zf@script\@tempcnta\relax
+ \xdef\zf@script@name{#1}%
+ \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'}%
+ \fi}}
+\newcommand*\newfontlanguage[2]{%
+ \define@key[zf@feat]{Lang}{#1}[]{%
+ \zf@check@ot@lang{#2}%
+ \if@tempswa
+ \c@zf@language\@tempcnta\relax
+ \xdef\zf@language@name{#1}%
+ \xdef\zf@family@long{\zf@family@long+lang=#1}%
+ \xdef\zf@pre@ff{\zf@pre@ff language=#2,}%
+ \else
+ \zf@PackageWarning{Font \fontname\zf@basefont does not contain
+ language '#1' for script '\zf@script@name'}%
+ \fi}}
+\providecommand\def@cx[2]{\expandafter\edef\csname#1\endcsname{#2}}
+\providecommand\gdef@cx[2]{\expandafter\xdef\csname#1\endcsname{#2}}
+\providecommand\let@cc[2]{\expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
+\newcommand*\zf@fontspec[2]{%
+ \begingroup
+ \zf@init
+ \edef\zf@fontname{#2}%
+ \let\zf@family@long\zf@fontname
+ \setkeys*[zf]{preparse}{#1}%
+ \edef\zf@font@feat{\zf@font@feat\XKV@rm}%
+ \unless\ifdefined\zf@basefont
+ \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \fi
+ \zf@set@font@type
+ \zf@firsttimetrue
+ \zf@get@feature@requests{\zf@font@feat}%
+ \zf@firsttimefalse
+ \unless\ifcsname zf@UID@\zf@family@long\endcsname
+ \ifcsname c@zf@famc@#2\endcsname
+ \expandafter\stepcounter\else
+ \expandafter\newcounter\fi
+ {zf@famc@#2}%
+ \def@cx{zf@UID@\zf@family@long}{%
+ \zap@space#2 \@empty
+ (\expandafter\the\csname c@zf@famc@#2\endcsname)}%
+ \fi
+ \xdef\zf@family{\@nameuse{zf@UID@\zf@family@long}}%
+ \unless\ifcsname zf@family@fontname\zf@family\endcsname
+ \zf@PackageInfo{Defining font family for "#2"
+ with options [\zf@default@options #1]}%
+ \gdef@cx{zf@family@fontname\zf@family}{\zf@fontname}%
+ \gdef@cx{zf@family@options\zf@family}{\zf@default@options #1}%
+ \gdef@cx{zf@family@fontdef\zf@family}{\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff}%
+ \DeclareFontFamily{\zf@enc}{\zf@family}{}%
+ \zf@make@font@shapes{\zf@fontname}{\mddefault}{\updefault}{\zf@font@feat\zf@up@feat}%
+ \ifx\zf@bf\@empty
+ \zf@make@font@shapes[\zf@fontname]{/B}{\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
+ \else
+ \zf@make@font@shapes{\zf@bf}{\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
+ \fi
+ \ifx\zf@it\@empty
+ \zf@make@font@shapes[\zf@fontname]{/I}{\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
+ \else
+ \zf@make@font@shapes{\zf@it}{\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
+ \fi
+ \ifx\zf@bfit\@empty
+ \ifx\zf@bf\@empty
+ \ifx\zf@it\@empty
+ \zf@make@font@shapes[\zf@fontname]{/BI}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \else
+ \zf@make@font@shapes[\zf@it]{/B}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \fi
+ \else
+ \zf@make@font@shapes[\zf@bf]{/I}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \fi
+ \else
+ \zf@make@font@shapes{\zf@bfit}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \fi
+ \fi
+ \endgroup
+ }
+\newcommand*\zf@set@font@type{%
+ \zf@tfmfalse \zf@atsuifalse \zf@icufalse \zf@mmfalse
+ \ifcase\XeTeXfonttype\zf@basefont
+ \zf@tfm
+ \or
+ \zf@atsuitrue
+ \ifnum\XeTeXcountvariations\zf@basefont > 0
+ \zf@mmtrue
+ \fi
+ \or
+ \zf@icutrue
+ \fi}
+\newcommand*\zf@make@font@shapes[5][]{%
+ \bgroup
+ \edef\@tempa{#1}%
+ \ifx\@tempa\@empty\else
+ \font\@tempfonta="#1\zf@suffix" at \f@size pt
+ \edef\@tempa{\fontname\@tempfonta}%
+ \fi
+ \font\@tempfontb="#1#2\zf@suffix" at \f@size pt
+ \edef\@tempb{\fontname\@tempfontb}%
+ \ifx\@tempa\@tempb
+ \zf@PackageInfo{Could not resolve font #1#2 (it might not exist)}%
+ \else
+ \edef\zf@fontname{#1#2}%
+ \let\zf@basefont\@tempfontb
+ \zf@DeclareFontShape{#3}{#4}{#5}%
+ \ifx\zf@sc\@empty
+ \zf@make@smallcaps
+ \ifx\zf@smallcaps\@empty\else
+ \zf@DeclareFontShape[\zf@smallcaps]{#3}
+ {\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
+ \fi
+ \else
+ \edef\zf@fontname{\zf@sc}%
+ \zf@DeclareFontShape{#3}
+ {\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
+ \fi
+ \fi
+ \egroup}
+\newcommand\zf@DeclareFontShape[4][]{%
+ \zf@get@feature@requests{#4}%
+ \def\@tempb{"\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff#1"}%
+ \zf@PackageInfo{\string\font\space is \@tempb}%
+ \edef\@tempa{\noexpand
+ \DeclareFontShape{\zf@enc}{\zf@family}{#2}{#3}
+ {<->\zf@scale\@tempb}{\zf@adjust}}%
+ \@tempa
+ \edef\@tempa{#3}\edef\@tempb{\itdefault}%
+ \ifx\@tempa\@tempb
+ \edef\@tempa{\noexpand
+ \DeclareFontShape{\zf@enc}{\zf@family}{#2}{\sldefault}
+ {<->sub*\zf@family/#2/\itdefault}{\zf@adjust}}%
+ \@tempa
+ \fi}
+\newcommand*{\zf@update@family}[1]{%
+ \ifzf@firsttime
+ \xdef\zf@family@long{\zf@family@long#1}%
+ \fi}
+\newcommand*\zf@get@feature@requests[1]{%
+ \let\zf@ff \@empty
+ \let\zf@scale \@empty
+ \let\zf@adjust \@empty
+ \edef\@tempa{\noexpand\setkeys[zf]{options}{\zf@default@options#1}}%
+ \@tempa}
+\newcommand*\zf@init{%
+ \let\zf@pre@ff \@empty
+ \let\zf@font@feat \@empty
+ \let\zf@suffix \@empty
+ \let\zf@bf \@empty
+ \let\zf@it \@empty
+ \let\zf@bfit \@empty
+ \let\zf@sc \@empty
+ \let\zf@up@feat \@empty
+ \let\zf@bf@feat \@empty
+ \let\zf@it@feat \@empty
+ \let\zf@bfit@feat \@empty
+ \let\zf@sc@feat \@empty
+ \c@zf@script 1818326126\relax
+ \def\zf@script@name{Latin}%
+ \c@zf@language 0\relax
+ \def\zf@language@name{Default}%
+}
+\newcommand*\zf@make@smallcaps{%
+ \let\zf@smallcaps\@empty
+ \ifzf@atsui
+ \zf@make@aat@feature@string{3}{3}%
+ \unless\ifx\zf@thisfontfeature\@empty
+ \edef\zf@smallcaps{\zf@thisfontfeature;}%
+ \fi
+ \fi
+ \ifzf@icu
+ \zf@check@ot@feat{+smcp}%
+ \if@tempswa
+ \edef\zf@smallcaps{+smcp,}%
+ \fi
+ \fi}
+\newcommand*\zf@update@ff[1]{%
+ \unless\ifzf@firsttime
+ \xdef\zf@ff{\zf@ff #1\ifzf@icu,\else;\fi}%
+ \fi}
+\newcommand*\zf@make@feature[3]{%
+ \ifzf@atsui
+ \zf@make@aat@feature@string{#1}{#2}%
+ \ifx\zf@thisfontfeature\@empty
+ \zf@PackageWarning{%
+ AAT feature '\XKV@tfam=\XKV@tkey'
+ (#1,#2) not available in font \fontname\zf@basefont}%
+ \else
+ \zf@update@family{+#1,#2}%
+ \zf@update@ff\zf@thisfontfeature
+ \fi
+ \fi
+ \ifzf@icu
+ \zf@check@ot@feat{#3}%
+ \if@tempswa
+ \zf@update@family{#3}%
+ \zf@update@ff{#3}%
+ \else
+ \zf@PackageWarning{%
+ OpenType feature '\XKV@tfam=\XKV@tkey' (#3)
+ not available in font \fontname\zf@basefont, script
+ '\zf@script@name', language '\zf@language@name'}%
+ \fi
+ \fi}
+\newcommand*\zf@define@font@feature[1]{%
+ \define@key[zf]{options}{#1}{{\setkeys[zf@feat]{#1}{##1}}}}
+\newcommand*\zf@define@feature@option[5]{%
+ \define@key[zf@feat]{#1}{#2}[]{\zf@make@feature{#3}{#4}{#5}}}
+\newcommand*\keyval@alias@key[4][KV]{%
+ \let@cc{#1@#2@#4}{#1@#2@#3}%
+ \let@cc{#1@#2@#4@default}{#1@#2@#3@default}}
+\newcommand*\multi@alias@key[2]{
+ \key@ifundefined[zf]{preparse}{#1}
+ {\key@ifundefined[zf]{options}{#1}
+ {\zf@PackageError{The feature #1 doesn't appear to be defined}
+ {It looks like you're trying to rename a feature that doesn't exist.}}
+ {\keyval@alias@key[zf]{options}{#1}{#2}}}
+ {\keyval@alias@key[zf]{preparse}{#1}{#2}}}
+\newcommand*\zf@make@aat@feature@string[2]{%
+ \edef\zf@this@featurename{\XeTeXfeaturename\zf@basefont #1}%
+ \ifx\zf@this@featurename\@empty
+ \let\zf@thisfontfeature\@empty
+ \else
+ \edef\zf@this@selectionname{\XeTeXselectorname\zf@basefont #1 #2}%
+ \ifx\zf@this@selectionname\@empty
+ \let\zf@thisfontfeature\@empty
+ \else
+ \edef\zf@thisfontfeature{%
+ \ifnum\XeTeXisexclusivefeature\zf@basefont #1 > 0
+ \zf@this@featurename=\zf@this@selectionname
+ \else
+ \ifodd #2
+ \zf@this@featurename=!\zf@this@selectionname
+ \else
+ \zf@this@featurename=\zf@this@selectionname
+ \fi
+ \fi}%
+ \fi
+ \fi}
+\newcommand\zf@iv@strnum[1]{%
+ \zf@iv@strnum@i#1 \@nil}
+\def\zf@iv@strnum@i#1 \@nil{%
+ \zf@iv@strnum@ii#1\@empty\@empty\@nil}
+\def\zf@iv@strnum@ii#1#2#3#4#5\@nil{%
+ \@tempcnta\z@
+ \@tempcntb`#1\relax
+ \multiply\@tempcntb"1000000\advance\@tempcnta\@tempcntb
+ \@tempcntb`#2
+ \multiply\@tempcntb"10000\advance\@tempcnta\@tempcntb
+ \expandafter\@tempcntb\ifx\@empty#332\else`#3\fi
+ \multiply\@tempcntb"100\advance\@tempcnta\@tempcntb
+ \expandafter\@tempcntb\ifx\@empty#432\else`#4\fi
+ \advance\@tempcnta\@tempcntb}
+\newcommand\zf@v@strnum[1]{%
+ \expandafter\zf@iv@strnum@i\@gobble#1 \@nil}
+\newcommand\zf@check@ot@script[1]{%
+ \zf@iv@strnum{#1}%
+ \@tempcntb\XeTeXOTcountscripts\zf@basefont
+ \c@zf@index\z@ \@tempswafalse
+ \loop\ifnum\c@zf@index<\@tempcntb
+ \ifnum\XeTeXOTscripttag\zf@basefont\c@zf@index=\@tempcnta
+ \@tempswatrue
+ \c@zf@index\@tempcntb
+ \else
+ \advance\c@zf@index\@ne
+ \fi
+ \repeat}
+\newcommand\zf@check@ot@lang[1]{%
+ \zf@iv@strnum{#1}%
+ \@tempcntb\XeTeXOTcountlanguages\zf@basefont\c@zf@script
+ \c@zf@index\z@ \@tempswafalse
+ \loop\ifnum\c@zf@index<\@tempcntb
+ \ifnum\XeTeXOTlanguagetag\zf@basefont\c@zf@script\c@zf@index=\@tempcnta
+ \@tempswatrue
+ \c@zf@index\@tempcntb
+ \else
+ \advance\c@zf@index\@ne
+ \fi
+ \repeat}
+\newcommand*\zf@check@ot@feat[1]{%
+ \@tempcntb\XeTeXOTcountfeatures\zf@basefont\c@zf@script\c@zf@language
+ \zf@v@strnum{#1}%
+ \c@zf@index\z@ \@tempswafalse
+ \loop\ifnum\c@zf@index<\@tempcntb
+ \ifnum\XeTeXOTfeaturetag\zf@basefont\c@zf@script\c@zf@language\c@zf@index=\@tempcnta
+ \@tempswatrue
+ \c@zf@index\@tempcntb
+ \else
+ \advance\c@zf@index\@ne
+ \fi
+ \repeat}
+\define@key[zf]{preparse}{BoldFont}{%
+ \zf@partial@fontname#1\@nil
+ \let\zf@bf\@tempa
+ \edef\zf@family@long{\zf@family@long bf:#1}}
+\define@key[zf]{preparse}{ItalicFont}{%
+ \zf@partial@fontname#1\@nil
+ \let\zf@it\@tempa
+ \edef\zf@family@long{\zf@family@long it:#1}}
+\define@key[zf]{preparse}{BoldItalicFont}{%
+ \zf@partial@fontname#1\@nil
+ \let\zf@bfit\@tempa
+ \edef\zf@family@long{\zf@family@long bfit:#1}}
+\define@key[zf]{options}{SmallCapsFont}{%
+ \zf@partial@fontname#1\@nil
+ \let\zf@sc\@tempa
+ \zf@update@family{sc:\zap@space #1 \@empty}}
+\def\zf@partial@fontname#1#2\@nil{%
+ \if#1*\relax
+ \edef\@tempa{\zf@fontname#2}%
+ \else
+ \edef\@tempa{#1#2}%
+ \fi}
+\define@key[zf]{preparse}{UprightFeatures}{%
+ \def\zf@up@feat{,#1}%
+ \edef\zf@family@long{\zf@family@long rmfeat:#1}}
+\define@key[zf]{preparse}{BoldFeatures}{%
+ \def\zf@bf@feat{,#1}%
+ \edef\zf@family@long{\zf@family@long bffeat:#1}}
+\define@key[zf]{preparse}{ItalicFeatures}{%
+ \def\zf@it@feat{,#1}%
+ \edef\zf@family@long{\zf@family@long itfeat:#1}}
+\define@key[zf]{preparse}{BoldItalicFeatures}{%
+ \def\zf@bfit@feat{,#1}%
+ \edef\zf@family@long{\zf@family@long bfitfeat:#1}}
+\define@key[zf]{options}{SmallCapsFeatures}{%
+ \unless\ifzf@firsttime\def\zf@sc@feat{,#1}\fi
+ \zf@update@family{scfeat:\zap@space #1 \@empty}}
+\define@choicekey[zf]{preparse}{Renderer}{AAT,ICU}{%
+ \edef\zf@suffix{\zf@suffix/#1}%
+ \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +rend:#1}}
+\define@key[zf]{preparse}{Script}{%
+ \edef\zf@suffix{\zf@suffix/ICU}%
+ \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +script:#1}
+ {\setkeys[zf@feat]{Script}{#1}}}
+\define@key[zf]{preparse}{Language}{%
+ \edef\zf@suffix{\zf@suffix/ICU}%
+ \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +language:#1}
+ {\setkeys[zf@feat]{Lang}{#1}}}
+\define@key[zf]{options}{Scale}{%
+ \edef\@tempa{#1}%
+ \edef\@tempb{MatchLowercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{5}%
+ \else
+ \edef\@tempb{MatchUppercase}%
+ \ifx\@tempa\@tempb
+ \zf@calc@scale{8}%
+ \else
+ \edef\zf@scale{#1}%
+ \fi
+ \fi
+ \zf@update@family{+scale:\zf@scale}%
+ \edef\zf@scale{s*[\zf@scale]}}
+\newcommand\zf@calc@scale[1]{%
+ \begingroup
+ \rmfamily
+ \setlength\@tempdima{\fontdimen#1\font}%
+ \setlength\@tempdimb{\fontdimen#1\zf@basefont}%
+ \setlength\@tempdimc{1pt*\ratio{\@tempdima}{\@tempdimb}}%
+ \xdef\zf@scale{\strip@pt\@tempdimc}
+ \zf@PackageInfo{\zf@fontname\space scale = \zf@scale}%
+ \endgroup}
+\define@key[zf]{options}{WordSpace}{%
+ \zf@update@family{+wordspace:#1}%
+ \unless\ifzf@firsttime
+ \zf@wordspace@parse#1,\zf@@ii,\zf@@iii,\zf@@
+ \fi}
+\def\zf@wordspace@parse#1,#2,#3,#4\zf@@{%
+ \def\@tempa{#4}%
+ \ifx\@tempa\@empty
+ \g@addto@macro\zf@adjust{%
+ \fontdimen2\font#1\fontdimen2\font
+ \fontdimen3\font#1\fontdimen3\font
+ \fontdimen4\font#1\fontdimen4\font}%
+ \else
+ \g@addto@macro\zf@adjust{%
+ \fontdimen2\font#1\fontdimen2\font
+ \fontdimen3\font#2\fontdimen3\font
+ \fontdimen4\font#3\fontdimen4\font}%
+ \fi}
+\define@key[zf]{options}{PunctuationSpace}{%
+ \zf@update@family{+punctspace:#1}%
+ \g@addto@macro\zf@adjust{%
+ \fontdimen7\font#1\fontdimen7\font}}
+\define@key[zf]{options}{LetterSpace}{%
+ \zf@update@family{+tracking:#1}%
+ \zf@update@ff{letterspace=#1}}
+\define@key[zf]{options}{HyphenChar}{%
+ \zf@update@family{+hyphenchar:#1}%
+ \edef\@tempa{#1}%
+ \edef\@tempb{None}%
+ \ifx\@tempa\@tempb
+ \g@addto@macro\zf@adjust{\hyphenchar\font-1\relax}%
+ \else
+ \zf@check@one@char#1\zf@@
+ \ifx\@tempb\@empty
+ \g@addto@macro\zf@adjust{%
+ {\expandafter\hyphenchar\expandafter
+ \font\expandafter`#1}}%
+ \else
+ \g@addto@macro\zf@adjust{\hyphenchar\font#1\relax}
+ \fi
+ \fi}
+\def\zf@check@one@char#1#2\zf@@{\def\@tempb{#2}}
+\define@key[zf]{options}{Colour}{%
+ \zf@update@family{+col:#1}%
+ \zf@update@ff{color=#1}}
+\keyval@alias@key[zf]{options}{Colour}{Color}
+\define@key[zf]{options}{Mapping}{%
+ \zf@update@family{+map:#1}%
+ \zf@update@ff{mapping=#1}}
+\define@key[zf]{options}{Weight}{%
+ \zf@update@family{+weight:#1}%
+ \zf@update@ff{weight=#1}}
+\define@key[zf]{options}{Width}{%
+ \zf@update@family{+width:#1}%
+ \zf@update@ff{width=#1}}
+\define@key[zf]{options}{OpticalSize}{%
+ \ifzf@icu
+ \edef\zf@suffix{\zf@suffix/S=#1}%
+ \zf@update@family{+size:#1}
+ \fi
+ \ifzf@mm
+ \zf@update@family{+size:#1}%
+ \zf@update@ff{optical size=#1}
+ \fi
+ \ifzf@icu\else
+ \ifzf@mm\else
+ \ifzf@firsttime
+ \zf@PackageWarning
+ {\fontname\zf@basefont\space doesn't appear to have an Optical Size axis}
+ \fi
+ \fi
+ \fi}
+\zf@define@font@feature{Ligatures}
+\zf@define@feature@option{Ligatures}{Required} {1}{0}{+rlig}
+\zf@define@feature@option{Ligatures}{NoRequired} {1}{1}{-rlig}
+\zf@define@feature@option{Ligatures}{Common} {1}{2}{+liga}
+\zf@define@feature@option{Ligatures}{NoCommon} {1}{3}{-liga}
+\zf@define@feature@option{Ligatures}{Rare} {1}{4}{+dlig}
+\zf@define@feature@option{Ligatures}{NoRare} {1}{5}{-dlig}
+\zf@define@feature@option{Ligatures}{Discretionary} {1}{4}{+dlig}
+\zf@define@feature@option{Ligatures}{NoDiscretionary}{1}{5}{-dlig}
+\zf@define@feature@option{Ligatures}{Contextual} {}{} {+clig}
+\zf@define@feature@option{Ligatures}{NoContextual} {}{} {-clig}
+\zf@define@feature@option{Ligatures}{Historical} {}{} {+hlig}
+\zf@define@feature@option{Ligatures}{NoHistorical} {}{} {-hlig}
+\zf@define@feature@option{Ligatures}{Logos} {1}{6} {}
+\zf@define@feature@option{Ligatures}{NoLogos} {1}{7} {}
+\zf@define@feature@option{Ligatures}{Rebus} {1}{8} {}
+\zf@define@feature@option{Ligatures}{NoRebus} {1}{9} {}
+\zf@define@feature@option{Ligatures}{Diphthong} {1}{10}{}
+\zf@define@feature@option{Ligatures}{NoDiphthong} {1}{11}{}
+\zf@define@feature@option{Ligatures}{Squared} {1}{12}{}
+\zf@define@feature@option{Ligatures}{NoSquared} {1}{13}{}
+\zf@define@feature@option{Ligatures}{AbbrevSquared} {1}{14}{}
+\zf@define@feature@option{Ligatures}{NoAbbrevSquared}{1}{15}{}
+\zf@define@feature@option{Ligatures}{Icelandic} {1}{32}{}
+\zf@define@feature@option{Ligatures}{NoIcelandic} {1}{33}{}
+\zf@define@font@feature{Letters}
+\zf@define@feature@option{Letters}{Normal}{3}{0}{}
+\zf@define@feature@option{Letters}{Uppercase}{3}{1}{+case}
+\zf@define@feature@option{Letters}{Lowercase}{3}{2}{}
+\zf@define@feature@option{Letters}{SmallCaps}{3}{3}{+smcp}
+\zf@define@feature@option{Letters}{PetiteCaps}{}{}{+pcap}
+\zf@define@feature@option{Letters}{UppercaseSmallCaps}{}{}{+c2sc}
+\zf@define@feature@option{Letters}{UppercasePetiteCaps}{}{}{+c2pc}
+\zf@define@feature@option{Letters}{InitialCaps}{3}{4}{}
+\zf@define@feature@option{Letters}{Unicase}{}{}{+unic}
+\zf@define@font@feature{Numbers}
+\zf@define@feature@option{Numbers}{Monospaced}{6}{0}{+tnum}
+\zf@define@feature@option{Numbers}{Proportional}{6}{1}{+pnum}
+\zf@define@feature@option{Numbers}{Lowercase}{21}{0}{+onum}
+\zf@define@feature@option{Numbers}{OldStyle}{21}{0}{+onum}
+\zf@define@feature@option{Numbers}{Uppercase}{21}{1}{+lnum}
+\zf@define@feature@option{Numbers}{Lining}{21}{1}{+lnum}
+\zf@define@feature@option{Numbers}{SlashedZero}{14}{5}{+zero}
+\zf@define@feature@option{Numbers}{NoSlashedZero}{14}{4}{-zero}
+\zf@define@font@feature{Contextuals}
+\zf@define@feature@option{Contextuals}{Swash}{}{}{+cswh}
+\zf@define@feature@option{Contextuals}{NoSwash}{}{}{-cswh}
+\zf@define@feature@option{Contextuals}{WordInitial}{8}{0}{+init}
+\zf@define@feature@option{Contextuals}{NoWordInitial}{8}{1}{-init}
+\zf@define@feature@option{Contextuals}{WordFinal}{8}{2}{+fina}
+\zf@define@feature@option{Contextuals}{NoWordFinal}{8}{3}{-fina}
+\zf@define@feature@option{Contextuals}{LineInitial}{8}{4}{}
+\zf@define@feature@option{Contextuals}{NoLineInitial}{8}{5}{}
+\zf@define@feature@option{Contextuals}{LineFinal}{8}{6}{+falt}
+\zf@define@feature@option{Contextuals}{NoLineFinal}{8}{7}{-falt}
+\zf@define@feature@option{Contextuals}{Inner}{8}{8}{+medi}
+\zf@define@feature@option{Contextuals}{NoInner}{8}{9}{-medi}
+\zf@define@font@feature{Diacritics}
+\zf@define@feature@option{Diacritics}{Show}{9}{0}{}
+\zf@define@feature@option{Diacritics}{Hide}{9}{1}{}
+\zf@define@feature@option{Diacritics}{Decompose}{9}{2}{}
+\zf@define@font@feature{Kerning}
+\zf@define@feature@option{Kerning}{Uppercase}{}{}{+cpsp}
+\zf@define@feature@option{Kerning}{On}{}{}{+kern}
+\zf@define@feature@option{Kerning}{Off}{}{}{-kern}
+\zf@define@font@feature{VerticalPosition}
+\zf@define@feature@option{VerticalPosition}{Normal}{10}{0}{}
+\zf@define@feature@option{VerticalPosition}{Superior}{10}{1}{+sups}
+\zf@define@feature@option{VerticalPosition}{Inferior}{10}{2}{+subs}
+\zf@define@feature@option{VerticalPosition}{ScientificInferior}{}{}{+sinf}
+\zf@define@feature@option{VerticalPosition}{Ordinal}{10}{3}{+ordn}
+\zf@define@feature@option{VerticalPosition}{Numerator}{}{}{+numr}
+\zf@define@feature@option{VerticalPosition}{Denominator}{}{}{+dnom}
+\zf@define@font@feature{Fractions}
+\zf@define@feature@option{Fractions}{On}{11}{1}{+frac}
+\zf@define@feature@option{Fractions}{Off}{11}{0}{-frac}
+\zf@define@feature@option{Fractions}{Diagonal}{11}{2}{}
+\zf@define@feature@option{Fractions}{Alternate}{}{}{+afrc}
+\define@key[zf]{options}{Alternate}{%
+ \setkeys*[zf@feat]{Alternate}{#1}%
+ \unless\ifx\XKV@rm\@empty
+ \zf@make@feature{17}{#1}{}%
+ \fi}
+\define@key[zf]{options}{Variant}{%
+ \setkeys*[zf@feat]{Variant}{#1}%
+ \unless\ifx\XKV@rm\@empty
+ \zf@make@feature{18}{#1}{+ss\two@digits{#1}}%
+ \fi}
+\zf@define@font@feature{Style}
+\zf@define@feature@option{Style}{Alternate}{}{}{+salt}
+\zf@define@feature@option{Style}{Italic}{32}{2}{+ital}
+\zf@define@feature@option{Style}{Ruby}{28}{2}{+ruby}
+\zf@define@feature@option{Style}{Swash}{}{}{+swsh}
+\zf@define@feature@option{Style}{Historic}{}{}{+hist}
+\zf@define@feature@option{Style}{Display}{19}{1}{}
+\zf@define@feature@option{Style}{Engraved}{19}{2}{}
+\zf@define@feature@option{Style}{TitlingCaps}{19}{4}{+titl}
+\zf@define@feature@option{Style}{TallCaps}{19}{5}{}
+\zf@define@feature@option{Style}{HorizontalKana}{}{}{+hkna}
+\zf@define@feature@option{Style}{VerticalKana}{}{}{+vkna}
+\zf@define@font@feature{CJKShape}
+\zf@define@feature@option{CJKShape}{Traditional}{20}{0}{+trad}
+\zf@define@feature@option{CJKShape}{Simplified}{20}{1}{+smpl}
+\zf@define@feature@option{CJKShape}{JIS1978}{20}{2}{+jp78}
+\zf@define@feature@option{CJKShape}{JIS1983}{20}{3}{+jp83}
+\zf@define@feature@option{CJKShape}{JIS1990}{20}{4}{+jp90}
+\zf@define@feature@option{CJKShape}{Expert}{20}{10}{+expt}
+\zf@define@feature@option{CJKShape}{NLC}{20}{13}{+nlck}
+\zf@define@font@feature{CharacterWidth}
+\zf@define@feature@option{CharacterWidth}{Proportional}{22}{0}{+pwid}
+\zf@define@feature@option{CharacterWidth}{Full}{22}{1}{+fwid}
+\zf@define@feature@option{CharacterWidth}{Half}{22}{2}{+hwid}
+\zf@define@feature@option{CharacterWidth}{Third}{22}{3}{+twid}
+\zf@define@feature@option{CharacterWidth}{Quarter}{22}{4}{+qwid}
+\zf@define@feature@option{CharacterWidth}{AlternateProportional}{22}{5}{+palt}
+\zf@define@feature@option{CharacterWidth}{AlternateHalf}{22}{6}{+halt}
+\zf@define@feature@option{CharacterWidth}{Default}{22}{7}{}
+\zf@define@font@feature{Annotation}
+\zf@define@feature@option{Annotation}{Off}{24}{0}{-nalt}
+\zf@define@feature@option{Annotation}{On}{}{}{+nalt}
+\zf@define@feature@option{Annotation}{Box}{24}{1}{}
+\zf@define@feature@option{Annotation}{RoundedBox}{24}{2}{}
+\zf@define@feature@option{Annotation}{Circle}{24}{3}{}
+\zf@define@feature@option{Annotation}{BlackCircle}{24}{4}{}
+\zf@define@feature@option{Annotation}{Parenthesis}{24}{5}{}
+\zf@define@feature@option{Annotation}{Period}{24}{6}{}
+\zf@define@feature@option{Annotation}{RomanNumerals}{24}{7}{}
+\zf@define@feature@option{Annotation}{Diamond}{24}{8}{}
+\zf@define@feature@option{Annotation}{BlackSquare}{24}{9}{}
+\zf@define@feature@option{Annotation}{BlackRoundSquare}{24}{10}{}
+\zf@define@feature@option{Annotation}{DoubleCircle}{24}{11}{}
+\zf@define@font@feature{Vertical}
+\define@key[zf@feat]{Vertical}{RotatedGlyphs}[]{%
+ \ifzf@icu
+ \zf@make@feature{}{}{+vrt2}%
+ \else
+ \zf@update@family{+vert}%
+ \zf@update@ff{vertical}%
+ \fi}
+\newfontscript{Arabic}{arab} \newfontscript{Armenian}{armn}
+\newfontscript{Balinese}{bali} \newfontscript{Bengali}{beng}
+\newfontscript{Bopomofo}{bopo} \newfontscript{Braille}{brai}
+\newfontscript{Buginese}{bugi} \newfontscript{Buhid}{buhd}
+\newfontscript{Byzantine Music}{byzm} \newfontscript{Canadian Syllabics}{cans}
+\newfontscript{Cherokee}{cher}
+\newfontscript{CJK Ideographic}{hani} \newfontscript{Coptic}{copt}
+\newfontscript{Cypriot Syllabary}{cprt} \newfontscript{Cyrillic}{cyrl}
+\newfontscript{Default}{DFLT} \newfontscript{Deseret}{dsrt}
+\newfontscript{Devanagari}{deva} \newfontscript{Ethiopic}{ethi}
+\newfontscript{Georgian}{geor} \newfontscript{Glagolitic}{glag}
+\newfontscript{Gothic}{goth} \newfontscript{Greek}{grek}
+\newfontscript{Gujarati}{gujr} \newfontscript{Gurmukhi}{guru}
+\newfontscript{Hangul Jamo}{jamo} \newfontscript{Hangul}{hang}
+\newfontscript{Hanunoo}{hano} \newfontscript{Hebrew}{hebr}
+\newfontscript{Hiragana and Katakana}{kana}
+\newfontscript{Javanese}{java} \newfontscript{Kannada}{knda}
+\newfontscript{Kharosthi}{khar} \newfontscript{Khmer}{khmr}
+\newfontscript{Lao}{lao } \newfontscript{Latin}{latn}
+\newfontscript{Limbu}{limb} \newfontscript{Linear B}{linb}
+\newfontscript{Malayalam}{mlym} \newfontscript{Math}{math}
+\newfontscript{Mongolian}{mong}
+\newfontscript{Musical Symbols}{musc} \newfontscript{Myanmar}{mymr}
+\newfontscript{N'ko}{nko } \newfontscript{Ogham}{ogam}
+\newfontscript{Old Italic}{ital} \newfontscript{Old Persian Cuneiform}{xpeo}
+\newfontscript{Oriya}{orya} \newfontscript{Osmanya}{osma}
+\newfontscript{Phags-pa}{phag} \newfontscript{Phoenician}{phnx}
+\newfontscript{Runic}{runr} \newfontscript{Shavian}{shaw}
+\newfontscript{Sinhala}{sinh} \newfontscript{Sumero-Akkadian Cuneiform}{xsux}
+\newfontscript{Syloti Nagri}{sylo} \newfontscript{Syriac}{syrc}
+\newfontscript{Tagalog}{tglg} \newfontscript{Tagbanwa}{tagb}
+\newfontscript{Tai Le}{tale} \newfontscript{Tai Lu}{talu}
+\newfontscript{Tamil}{taml} \newfontscript{Telugu}{telu}
+\newfontscript{Thaana}{thaa} \newfontscript{Thai}{thai}
+\newfontscript{Tibetan}{tibt} \newfontscript{Tifinagh}{tfng}
+\newfontscript{Ugaritic Cuneiform}{ugar}\newfontscript{Yi}{yi }
+\newfontlanguage{Abaza}{ABA}\newfontlanguage{Abkhazian}{ABK}\newfontlanguage{Adyghe}{ADY}
+\newfontlanguage{Afrikaans}{AFK}\newfontlanguage{Afar}{AFR}\newfontlanguage{Agaw}{AGW}
+\newfontlanguage{Altai}{ALT}\newfontlanguage{Amharic}{AMH}\newfontlanguage{Arabic}{ARA}
+\newfontlanguage{Aari}{ARI}\newfontlanguage{Arakanese}{ARK}\newfontlanguage{Assamese}{ASM}
+\newfontlanguage{Athapaskan}{ATH}\newfontlanguage{Avar}{AVR}\newfontlanguage{Awadhi}{AWA}
+\newfontlanguage{Aymara}{AYM}\newfontlanguage{Azeri}{AZE}\newfontlanguage{Badaga}{BAD}
+\newfontlanguage{Baghelkhandi}{BAG}\newfontlanguage{Balkar}{BAL}\newfontlanguage{Baule}{BAU}
+\newfontlanguage{Berber}{BBR}\newfontlanguage{Bench}{BCH}\newfontlanguage{Bible Cree}{BCR}
+\newfontlanguage{Belarussian}{BEL}\newfontlanguage{Bemba}{BEM}\newfontlanguage{Bengali}{BEN}
+\newfontlanguage{Bulgarian}{BGR}\newfontlanguage{Bhili}{BHI}\newfontlanguage{Bhojpuri}{BHO}
+\newfontlanguage{Bikol}{BIK}\newfontlanguage{Bilen}{BIL}\newfontlanguage{Blackfoot}{BKF}
+\newfontlanguage{Balochi}{BLI}\newfontlanguage{Balante}{BLN}\newfontlanguage{Balti}{BLT}
+\newfontlanguage{Bambara}{BMB}\newfontlanguage{Bamileke}{BML}\newfontlanguage{Breton}{BRE}
+\newfontlanguage{Brahui}{BRH}\newfontlanguage{Braj Bhasha}{BRI}\newfontlanguage{Burmese}{BRM}
+\newfontlanguage{Bashkir}{BSH}\newfontlanguage{Beti}{BTI}\newfontlanguage{Catalan}{CAT}
+\newfontlanguage{Cebuano}{CEB}\newfontlanguage{Chechen}{CHE}\newfontlanguage{Chaha Gurage}{CHG}
+\newfontlanguage{Chattisgarhi}{CHH}\newfontlanguage{Chichewa}{CHI}\newfontlanguage{Chukchi}{CHK}
+\newfontlanguage{Chipewyan}{CHP}\newfontlanguage{Cherokee}{CHR}\newfontlanguage{Chuvash}{CHU}
+\newfontlanguage{Comorian}{CMR}\newfontlanguage{Coptic}{COP}\newfontlanguage{Cree}{CRE}
+\newfontlanguage{Carrier}{CRR}\newfontlanguage{Crimean Tatar}{CRT}\newfontlanguage{Church Slavonic}{CSL}
+\newfontlanguage{Czech}{CSY}\newfontlanguage{Danish}{DAN}\newfontlanguage{Dargwa}{DAR}
+\newfontlanguage{Woods Cree}{DCR}\newfontlanguage{German}{DEU}\newfontlanguage{Default}{DFLT}
+\newfontlanguage{Dogri}{DGR}\newfontlanguage{Divehi}{DIV}\newfontlanguage{Djerma}{DJR}
+\newfontlanguage{Dangme}{DNG}\newfontlanguage{Dinka}{DNK}\newfontlanguage{Dungan}{DUN}
+\newfontlanguage{Dzongkha}{DZN}\newfontlanguage{Ebira}{EBI}\newfontlanguage{Eastern Cree}{ECR}
+\newfontlanguage{Edo}{EDO}\newfontlanguage{Efik}{EFI}\newfontlanguage{Greek}{ELL}
+\newfontlanguage{English}{ENG}\newfontlanguage{Erzya}{ERZ}\newfontlanguage{Spanish}{ESP}
+\newfontlanguage{Estonian}{ETI}\newfontlanguage{Basque}{EUQ}\newfontlanguage{Evenki}{EVK}
+\newfontlanguage{Even}{EVN}\newfontlanguage{Ewe}{EWE}\newfontlanguage{French Antillean}{FAN}
+\newfontlanguage{Farsi}{FAR}\newfontlanguage{Finnish}{FIN}\newfontlanguage{Fijian}{FJI}
+\newfontlanguage{Flemish}{FLE}\newfontlanguage{Forest Nenets}{FNE}\newfontlanguage{Fon}{FON}
+\newfontlanguage{Faroese}{FOS}\newfontlanguage{French}{FRA}\newfontlanguage{Frisian}{FRI}
+\newfontlanguage{Friulian}{FRL}\newfontlanguage{Futa}{FTA}\newfontlanguage{Fulani}{FUL}
+\newfontlanguage{Ga}{GAD}\newfontlanguage{Gaelic}{GAE}\newfontlanguage{Gagauz}{GAG}
+\newfontlanguage{Galician}{GAL}\newfontlanguage{Garshuni}{GAR}\newfontlanguage{Garhwali}{GAW}
+\newfontlanguage{Ge'ez}{GEZ}\newfontlanguage{Gilyak}{GIL}\newfontlanguage{Gumuz}{GMZ}
+\newfontlanguage{Gondi}{GON}\newfontlanguage{Greenlandic}{GRN}\newfontlanguage{Garo}{GRO}
+\newfontlanguage{Guarani}{GUA}\newfontlanguage{Gujarati}{GUJ}\newfontlanguage{Haitian}{HAI}
+\newfontlanguage{Halam}{HAL}\newfontlanguage{Harauti}{HAR}\newfontlanguage{Hausa}{HAU}
+\newfontlanguage{Hawaiin}{HAW}\newfontlanguage{Hammer-Banna}{HBN}\newfontlanguage{Hiligaynon}{HIL}
+\newfontlanguage{Hindi}{HIN}\newfontlanguage{High Mari}{HMA}\newfontlanguage{Hindko}{HND}
+\newfontlanguage{Ho}{HO}\newfontlanguage{Harari}{HRI}\newfontlanguage{Croatian}{HRV}
+\newfontlanguage{Hungarian}{HUN}\newfontlanguage{Armenian}{HYE}\newfontlanguage{Igbo}{IBO}
+\newfontlanguage{Ijo}{IJO}\newfontlanguage{Ilokano}{ILO}\newfontlanguage{Indonesian}{IND}
+\newfontlanguage{Ingush}{ING}\newfontlanguage{Inuktitut}{INU}\newfontlanguage{Irish}{IRI}
+\newfontlanguage{Irish Traditional}{IRT}\newfontlanguage{Icelandic}{ISL}\newfontlanguage{Inari Sami}{ISM}
+\newfontlanguage{Italian}{ITA}\newfontlanguage{Hebrew}{IWR}\newfontlanguage{Javanese}{JAV}
+\newfontlanguage{Yiddish}{JII}\newfontlanguage{Japanese}{JAN}\newfontlanguage{Judezmo}{JUD}
+\newfontlanguage{Jula}{JUL}\newfontlanguage{Kabardian}{KAB}\newfontlanguage{Kachchi}{KAC}
+\newfontlanguage{Kalenjin}{KAL}\newfontlanguage{Kannada}{KAN}\newfontlanguage{Karachay}{KAR}
+\newfontlanguage{Georgian}{KAT}\newfontlanguage{Kazakh}{KAZ}\newfontlanguage{Kebena}{KEB}
+\newfontlanguage{Khutsuri Georgian}{KGE}\newfontlanguage{Khakass}{KHA}\newfontlanguage{Khanty-Kazim}{KHK}
+\newfontlanguage{Khmer}{KHM}\newfontlanguage{Khanty-Shurishkar}{KHS}\newfontlanguage{Khanty-Vakhi}{KHV}
+\newfontlanguage{Khowar}{KHW}\newfontlanguage{Kikuyu}{KIK}\newfontlanguage{Kirghiz}{KIR}
+\newfontlanguage{Kisii}{KIS}\newfontlanguage{Kokni}{KKN}\newfontlanguage{Kalmyk}{KLM}
+\newfontlanguage{Kamba}{KMB}\newfontlanguage{Kumaoni}{KMN}\newfontlanguage{Komo}{KMO}
+\newfontlanguage{Komso}{KMS}\newfontlanguage{Kanuri}{KNR}\newfontlanguage{Kodagu}{KOD}
+\newfontlanguage{Korean Old Hangul}{KOH}\newfontlanguage{Konkani}{KOK}\newfontlanguage{Kikongo}{KON}
+\newfontlanguage{Komi-Permyak}{KOP}\newfontlanguage{Korean}{KOR}\newfontlanguage{Komi-Zyrian}{KOZ}
+\newfontlanguage{Kpelle}{KPL}\newfontlanguage{Krio}{KRI}\newfontlanguage{Karakalpak}{KRK}
+\newfontlanguage{Karelian}{KRL}\newfontlanguage{Karaim}{KRM}\newfontlanguage{Karen}{KRN}
+\newfontlanguage{Koorete}{KRT}\newfontlanguage{Kashmiri}{KSH}\newfontlanguage{Khasi}{KSI}
+\newfontlanguage{Kildin Sami}{KSM}\newfontlanguage{Kui}{KUI}\newfontlanguage{Kulvi}{KUL}
+\newfontlanguage{Kumyk}{KUM}\newfontlanguage{Kurdish}{KUR}\newfontlanguage{Kurukh}{KUU}
+\newfontlanguage{Kuy}{KUY}\newfontlanguage{Koryak}{KYK}\newfontlanguage{Ladin}{LAD}
+\newfontlanguage{Lahuli}{LAH}\newfontlanguage{Lak}{LAK}\newfontlanguage{Lambani}{LAM}
+\newfontlanguage{Lao}{LAO}\newfontlanguage{Latin}{LAT}\newfontlanguage{Laz}{LAZ}
+\newfontlanguage{L-Cree}{LCR}\newfontlanguage{Ladakhi}{LDK}\newfontlanguage{Lezgi}{LEZ}
+\newfontlanguage{Lingala}{LIN}\newfontlanguage{Low Mari}{LMA}\newfontlanguage{Limbu}{LMB}
+\newfontlanguage{Lomwe}{LMW}\newfontlanguage{Lower Sorbian}{LSB}\newfontlanguage{Lule Sami}{LSM}
+\newfontlanguage{Lithuanian}{LTH}\newfontlanguage{Luba}{LUB}\newfontlanguage{Luganda}{LUG}
+\newfontlanguage{Luhya}{LUH}\newfontlanguage{Luo}{LUO}\newfontlanguage{Latvian}{LVI}
+\newfontlanguage{Majang}{MAJ}\newfontlanguage{Makua}{MAK}\newfontlanguage{Malayalam Traditional}{MAL}
+\newfontlanguage{Mansi}{MAN}\newfontlanguage{Marathi}{MAR}\newfontlanguage{Marwari}{MAW}
+\newfontlanguage{Mbundu}{MBN}\newfontlanguage{Manchu}{MCH}\newfontlanguage{Moose Cree}{MCR}
+\newfontlanguage{Mende}{MDE}\newfontlanguage{Me'en}{MEN}\newfontlanguage{Mizo}{MIZ}
+\newfontlanguage{Macedonian}{MKD}\newfontlanguage{Male}{MLE}\newfontlanguage{Malagasy}{MLG}
+\newfontlanguage{Malinke}{MLN}\newfontlanguage{Malayalam Reformed}{MLR}\newfontlanguage{Malay}{MLY}
+\newfontlanguage{Mandinka}{MND}\newfontlanguage{Mongolian}{MNG}\newfontlanguage{Manipuri}{MNI}
+\newfontlanguage{Maninka}{MNK}\newfontlanguage{Manx Gaelic}{MNX}\newfontlanguage{Moksha}{MOK}
+\newfontlanguage{Moldavian}{MOL}\newfontlanguage{Mon}{MON}\newfontlanguage{Moroccan}{MOR}
+\newfontlanguage{Maori}{MRI} \newfontlanguage{Maithili}{MTH} \newfontlanguage{Maltese}{MTS}
+\newfontlanguage{Mundari}{MUN} \newfontlanguage{Naga-Assamese}{NAG} \newfontlanguage{Nanai}{NAN}
+\newfontlanguage{Naskapi}{NAS} \newfontlanguage{N-Cree}{NCR} \newfontlanguage{Ndebele}{NDB}
+\newfontlanguage{Ndonga}{NDG} \newfontlanguage{Nepali}{NEP} \newfontlanguage{Newari}{NEW}
+\newfontlanguage{Nagari}{NGR} \newfontlanguage{Norway House Cree}{NHC} \newfontlanguage{Nisi}{NIS}
+\newfontlanguage{Niuean}{NIU} \newfontlanguage{Nkole}{NKL} \newfontlanguage{N'ko}{NKO}
+\newfontlanguage{Dutch}{NLD} \newfontlanguage{Nogai}{NOG} \newfontlanguage{Norwegian}{NOR}
+\newfontlanguage{Northern Sami}{NSM} \newfontlanguage{Northern Tai}{NTA} \newfontlanguage{Esperanto}{NTO}
+\newfontlanguage{Nynorsk}{NYN} \newfontlanguage{Oji-Cree}{OCR} \newfontlanguage{Ojibway}{OJB}
+\newfontlanguage{Oriya}{ORI} \newfontlanguage{Oromo}{ORO} \newfontlanguage{Ossetian}{OSS}
+\newfontlanguage{Palestinian Aramaic}{PAA} \newfontlanguage{Pali}{PAL} \newfontlanguage{Punjabi}{PAN}
+\newfontlanguage{Palpa}{PAP} \newfontlanguage{Pashto}{PAS} \newfontlanguage{Polytonic Greek}{PGR}
+\newfontlanguage{Pilipino}{PIL} \newfontlanguage{Palaung}{PLG} \newfontlanguage{Polish}{PLK}
+\newfontlanguage{Provencal}{PRO} \newfontlanguage{Portuguese}{PTG} \newfontlanguage{Chin}{QIN}
+\newfontlanguage{Rajasthani}{RAJ} \newfontlanguage{R-Cree}{RCR} \newfontlanguage{Russian Buriat}{RBU}
+\newfontlanguage{Riang}{RIA} \newfontlanguage{Rhaeto-Romanic}{RMS} \newfontlanguage{Romanian}{ROM}
+\newfontlanguage{Romany}{ROY} \newfontlanguage{Rusyn}{RSY} \newfontlanguage{Ruanda}{RUA}
+\newfontlanguage{Russian}{RUS} \newfontlanguage{Sadri}{SAD} \newfontlanguage{Sanskrit}{SAN}
+\newfontlanguage{Santali}{SAT} \newfontlanguage{Sayisi}{SAY} \newfontlanguage{Sekota}{SEK}
+\newfontlanguage{Selkup}{SEL} \newfontlanguage{Sango}{SGO} \newfontlanguage{Shan}{SHN}
+\newfontlanguage{Sibe}{SIB} \newfontlanguage{Sidamo}{SID} \newfontlanguage{Silte Gurage}{SIG}
+\newfontlanguage{Skolt Sami}{SKS} \newfontlanguage{Slovak}{SKY} \newfontlanguage{Slavey}{SLA}
+\newfontlanguage{Slovenian}{SLV} \newfontlanguage{Somali}{SML} \newfontlanguage{Samoan}{SMO}
+\newfontlanguage{Sena}{SNA} \newfontlanguage{Sindhi}{SND} \newfontlanguage{Sinhalese}{SNH}
+\newfontlanguage{Soninke}{SNK} \newfontlanguage{Sodo Gurage}{SOG} \newfontlanguage{Sotho}{SOT}
+\newfontlanguage{Albanian}{SQI} \newfontlanguage{Serbian}{SRB} \newfontlanguage{Saraiki}{SRK}
+\newfontlanguage{Serer}{SRR} \newfontlanguage{South Slavey}{SSL} \newfontlanguage{Southern Sami}{SSM}
+\newfontlanguage{Suri}{SUR} \newfontlanguage{Svan}{SVA} \newfontlanguage{Swedish}{SVE}
+\newfontlanguage{Swadaya Aramaic}{SWA} \newfontlanguage{Swahili}{SWK} \newfontlanguage{Swazi}{SWZ}
+\newfontlanguage{Sutu}{SXT} \newfontlanguage{Syriac}{SYR} \newfontlanguage{Tabasaran}{TAB}
+\newfontlanguage{Tajiki}{TAJ} \newfontlanguage{Tamil}{TAM} \newfontlanguage{Tatar}{TAT}
+\newfontlanguage{TH-Cree}{TCR} \newfontlanguage{Telugu}{TEL} \newfontlanguage{Tongan}{TGN}
+\newfontlanguage{Tigre}{TGR} \newfontlanguage{Tigrinya}{TGY} \newfontlanguage{Thai}{THA}
+\newfontlanguage{Tahitian}{THT} \newfontlanguage{Tibetan}{TIB} \newfontlanguage{Turkmen}{TKM}
+\newfontlanguage{Temne}{TMN} \newfontlanguage{Tswana}{TNA} \newfontlanguage{Tundra Nenets}{TNE}
+\newfontlanguage{Tonga}{TNG} \newfontlanguage{Todo}{TOD} \newfontlanguage{Turkish}{TUR}
+\newfontlanguage{Tsonga}{TSG} \newfontlanguage{Turoyo Aramaic}{TUA} \newfontlanguage{Tulu}{TUL}
+\newfontlanguage{Tuvin}{TUV} \newfontlanguage{Twi}{TWI} \newfontlanguage{Udmurt}{UDM}
+\newfontlanguage{Ukrainian}{UKR} \newfontlanguage{Urdu}{URD} \newfontlanguage{Upper Sorbian}{USB}
+\newfontlanguage{Uyghur}{UYG} \newfontlanguage{Uzbek}{UZB} \newfontlanguage{Venda}{VEN}
+\newfontlanguage{Vietnamese}{VIT} \newfontlanguage{Wa}{WA} \newfontlanguage{Wagdi}{WAG}
+\newfontlanguage{West-Cree}{WCR} \newfontlanguage{Welsh}{WEL} \newfontlanguage{Wolof}{WLF}
+\newfontlanguage{Tai Lue}{XBD} \newfontlanguage{Xhosa}{XHS} \newfontlanguage{Yakut}{YAK}
+\newfontlanguage{Yoruba}{YBA} \newfontlanguage{Y-Cree}{YCR} \newfontlanguage{Yi Classic}{YIC}
+\newfontlanguage{Yi Modern}{YIM} \newfontlanguage{Chinese Hong Kong}{ZHH}
+\newfontlanguage{Chinese Phonetic}{ZHP} \newfontlanguage{Chinese Simplified}{ZHS}
+\newfontlanguage{Chinese Traditional}{ZHT} \newfontlanguage{Zande}{ZND} \newfontlanguage{Zulu}{ZUL}
+\providecommand*{\sidefault}{si}
+\DeclareRobustCommand{\sishape}{%
+ \not@math@alphabet\sishape\relax
+ \fontshape\sidefault\selectfont}
+\DeclareTextFontCommand{\textsi}{\sishape}
+\newcommand*{\zf@merge@shape}[3]{%
+ \edef\@tempa{#1}%
+ \edef\@tempb{#2}%
+ \ifx\f@shape\@tempb
+ \ifcsname\f@encoding/\f@family/\f@series/#3\endcsname
+ \edef\@tempa{#3}%
+ \fi
+ \fi
+ \fontshape{\@tempa}\selectfont}
+\DeclareRobustCommand{\itshape}{%
+ \not@math@alphabet\itshape\mathit
+ \zf@merge@shape\itdefault\scdefault\sidefault}
+\DeclareRobustCommand{\slshape}{%
+ \not@math@alphabet\slshape\relax
+ \zf@merge@shape\sldefault\scdefault\sidefault}
+\DeclareRobustCommand{\scshape}{%
+ \not@math@alphabet\scshape\relax
+ \zf@merge@shape\scdefault\itdefault\sidefault}
+\DeclareRobustCommand{\upshape}{%
+ \not@math@alphabet\upshape\relax
+ \zf@merge@shape\updefault\sidefault\scdefault}
+\AtBeginDocument{%
+ \DeclareRobustCommand\em
+ {\@nomath\em
+ \edef\@tempa{\f@shape}%
+ \edef\@tempb{\itdefault}%
+ \ifx\@tempa\@tempb
+ \eminnershape
+ \else
+ \emshape
+ \fi}}
+\DeclareTextFontCommand{\emph}{\em}
+\let\emshape\itshape
+\let\eminnershape\upshape
+\@ifpackageloaded{euler}{\zf@euler@package@loadedtrue}
+ {\zf@euler@package@loadedfalse}
+\AtBeginDocument{%
+ \let\zf@font@warning\@font@warning
+ \let\@font@warning\@font@info
+ \@ifpackageloaded{euler}{%
+ \ifzf@euler@package@loaded
+ \zf@math@eulertrue
+ \else
+ \zf@PackageError{The euler package must be loaded BEFORE fontspec}
+ {fontspec only overwrites euler's attempt to \MessageBreak
+ define the maths text fonts if fontspec is \MessageBreak
+ loaded after euler. Type <return> to proceed\MessageBreak
+ with incorrect \protect\mathit, \protect\mathbf, etc}
+ \fi}{}
+ \@ifpackageloaded{lucbmath}{\zf@math@lucidatrue}{}
+ \@ifpackageloaded{lucidabr}{\zf@math@lucidatrue}{}
+ \@ifpackageloaded{lucimatx}{\zf@math@lucidatrue}{}
+ \DeclareSymbolFont{legacymaths}{OT1}{cmr}{m}{n}
+ \SetSymbolFont{legacymaths}{bold}{OT1}{cmr}{bx}{n}
+ \DeclareMathAccent{\acute} {\mathalpha}{legacymaths}{19}
+ \DeclareMathAccent{\grave} {\mathalpha}{legacymaths}{18}
+ \DeclareMathAccent{\ddot} {\mathalpha}{legacymaths}{127}
+ \DeclareMathAccent{\tilde} {\mathalpha}{legacymaths}{126}
+ \DeclareMathAccent{\bar} {\mathalpha}{legacymaths}{22}
+ \DeclareMathAccent{\breve} {\mathalpha}{legacymaths}{21}
+ \DeclareMathAccent{\check} {\mathalpha}{legacymaths}{20}
+ \DeclareMathAccent{\hat} {\mathalpha}{legacymaths}{94} % too bad, euler
+ \DeclareMathAccent{\dot} {\mathalpha}{legacymaths}{95}
+ \DeclareMathAccent{\mathring}{\mathalpha}{legacymaths}{23}
+ \begingroup
+ \mathchardef\@tempa="603A %
+ \let\next\egroup
+ \ifx\colon\@tempa
+ \DeclareMathSymbol{\colon}{\mathpunct}{legacymaths}{58}
+ \fi
+ \endgroup
+ \ifzf@math@euler\else
+ \DeclareMathSymbol{!}{\mathclose}{legacymaths}{33}
+ \DeclareMathSymbol{:}{\mathrel} {legacymaths}{58}
+ \DeclareMathSymbol{;}{\mathpunct}{legacymaths}{59}
+ \DeclareMathSymbol{?}{\mathclose}{legacymaths}{63}
+ \ifzf@math@lucida\else
+ \DeclareMathSymbol{0}{\mathalpha}{legacymaths}{`0}
+ \DeclareMathSymbol{1}{\mathalpha}{legacymaths}{`1}
+ \DeclareMathSymbol{2}{\mathalpha}{legacymaths}{`2}
+ \DeclareMathSymbol{3}{\mathalpha}{legacymaths}{`3}
+ \DeclareMathSymbol{4}{\mathalpha}{legacymaths}{`4}
+ \DeclareMathSymbol{5}{\mathalpha}{legacymaths}{`5}
+ \DeclareMathSymbol{6}{\mathalpha}{legacymaths}{`6}
+ \DeclareMathSymbol{7}{\mathalpha}{legacymaths}{`7}
+ \DeclareMathSymbol{8}{\mathalpha}{legacymaths}{`8}
+ \DeclareMathSymbol{9}{\mathalpha}{legacymaths}{`9}
+ \DeclareMathSymbol{\Gamma}{\mathalpha}{legacymaths}{0}
+ \DeclareMathSymbol{\Delta}{\mathalpha}{legacymaths}{1}
+ \DeclareMathSymbol{\Theta}{\mathalpha}{legacymaths}{2}
+ \DeclareMathSymbol{\Lambda}{\mathalpha}{legacymaths}{3}
+ \DeclareMathSymbol{\Xi}{\mathalpha}{legacymaths}{4}
+ \DeclareMathSymbol{\Pi}{\mathalpha}{legacymaths}{5}
+ \DeclareMathSymbol{\Sigma}{\mathalpha}{legacymaths}{6}
+ \DeclareMathSymbol{\Upsilon}{\mathalpha}{legacymaths}{7}
+ \DeclareMathSymbol{\Phi}{\mathalpha}{legacymaths}{8}
+ \DeclareMathSymbol{\Psi}{\mathalpha}{legacymaths}{9}
+ \DeclareMathSymbol{\Omega}{\mathalpha}{legacymaths}{10}
+ \DeclareMathSymbol{+}{\mathbin}{legacymaths}{43}
+ \DeclareMathSymbol{=}{\mathrel}{legacymaths}{61}
+ \DeclareMathDelimiter{(}{\mathopen} {legacymaths}{40}{largesymbols}{0}
+ \DeclareMathDelimiter{)}{\mathclose}{legacymaths}{41}{largesymbols}{1}
+ \DeclareMathDelimiter{[}{\mathopen} {legacymaths}{91}{largesymbols}{2}
+ \DeclareMathDelimiter{]}{\mathclose}{legacymaths}{93}{largesymbols}{3}
+ \DeclareMathDelimiter{/}{\mathord}{legacymaths}{47}{largesymbols}{14}
+ \DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{36}
+ \fi
+ \fi
+ \DeclareSymbolFont{operators}\zf@enc\zf@rmmaths\mddefault\updefault
+ \SetSymbolFont{operators}{normal}\zf@enc\zf@rmmaths\mddefault\updefault
+ \SetMathAlphabet\mathrm{normal}\zf@enc\zf@rmmaths\mddefault\updefault
+ \SetMathAlphabet\mathit{normal}\zf@enc\zf@rmmaths\mddefault\itdefault
+ \SetMathAlphabet\mathbf{normal}\zf@enc\zf@rmmaths\bfdefault\updefault
+ \SetMathAlphabet\mathsf{normal}\zf@enc\zf@sfmaths\mddefault\updefault
+ \SetMathAlphabet\mathtt{normal}\zf@enc\zf@ttmaths\mddefault\updefault
+ \SetSymbolFont{operators}{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
+ \ifdefined\zf@rmboldmaths
+ \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmboldmaths\mddefault\updefault
+ \SetMathAlphabet\mathbf{bold}\zf@enc\zf@rmboldmaths\bfdefault\updefault
+ \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmboldmaths\mddefault\itdefault
+ \else
+ \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
+ \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmmaths\bfdefault\itdefault
+ \fi
+ \SetMathAlphabet\mathsf{bold}\zf@enc\zf@sfmaths\bfdefault\updefault
+ \SetMathAlphabet\mathtt{bold}\zf@enc\zf@ttmaths\bfdefault\updefault
+ \let\font@warning\zf@font@warning}
+\DeclareOption{config}{%
+ \InputIfFileExists{fontspec.cfg}
+ {\typeout{fontspec.cfg loaded.}}
+ {\typeout{fontspec.cfg would be loaded now if it existed.}}}
+\DeclareOption{noconfig}{}
+\DeclareOption{quiet}{\let\zf@PackageWarning\zf@PackageInfo}
+\ExecuteOptions{config}
+\ProcessOptions
+%%
+%% Copyright 2005 by Will Robertson <will@guerilla.net.au>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3b 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 the file fontspec.dtx
+%% and the derived files fontspec.sty and fontspec.pdf.
+%%
+%%
+%% End of file `fontspec.sty'.
diff --git a/Master/texmf-dist/tpm/fontspec.tpm b/Master/texmf-dist/tpm/fontspec.tpm
index 2115ec09d76..57aa0099c19 100644
--- a/Master/texmf-dist/tpm/fontspec.tpm
+++ b/Master/texmf-dist/tpm/fontspec.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/fontspec.zip">
<TPM:Name>fontspec</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/01/11 23:53:31</TPM:Date>
+ <TPM:Date>1970/01/01 00:00:00</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>
@@ -21,16 +21,19 @@ and can access system fonts directly.
<TPM:Author>Will Robertson</TPM:Author>
<TPM:Size>1350766</TPM:Size>
<TPM:Build/>
- <TPM:RunFiles size="42325">
-texmf-dist/tex/latex/fontspec/fontspec.sty
+ <TPM:RunFiles size="49579">
+texmf-dist/tex/xetex/fontspec/fontspec.cfg
+texmf-dist/tex/xetex/fontspec/fontspec.sty
texmf-dist/tpm/fontspec.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="1182236">
-texmf-dist/doc/latex/fontspec/README
-texmf-dist/doc/latex/fontspec/fontspec.pdf
+ <TPM:DocFiles size="1976543">
+texmf-dist/doc/xetex/fontspec/README
+texmf-dist/doc/xetex/fontspec/fontspec-example.tex
+texmf-dist/doc/xetex/fontspec/fontspec.pdf
</TPM:DocFiles>
- <TPM:SourceFiles size="126205">
-texmf-dist/source/latex/fontspec/fontspec.dtx
+ <TPM:SourceFiles size="166819">
+texmf-dist/source/xetex/fontspec/fontspec.dtx
+texmf-dist/source/xetex/fontspec/fontspec.ins
</TPM:SourceFiles>
<TPM:Provides>Package/fontspec</TPM:Provides>
</rdf:Description>
diff --git a/Master/texmf/lists/fontspec b/Master/texmf/lists/fontspec
index 0c296dad51e..1f29834e70f 100644
--- a/Master/texmf/lists/fontspec
+++ b/Master/texmf/lists/fontspec
@@ -1,7 +1,10 @@
-texmf-dist/doc/latex/fontspec/README
-texmf-dist/doc/latex/fontspec/fontspec.pdf
-texmf-dist/source/latex/fontspec/fontspec.dtx
-texmf-dist/tex/latex/fontspec/fontspec.sty
+texmf-dist/doc/xetex/fontspec/README
+texmf-dist/doc/xetex/fontspec/fontspec-example.tex
+texmf-dist/doc/xetex/fontspec/fontspec.pdf
+texmf-dist/source/xetex/fontspec/fontspec.dtx
+texmf-dist/source/xetex/fontspec/fontspec.ins
+texmf-dist/tex/xetex/fontspec/fontspec.cfg
+texmf-dist/tex/xetex/fontspec/fontspec.sty
texmf-dist/tpm/fontspec.tpm
texmf/lists/fontspec
diff --git a/Master/texmf/tpm/collection-latexextra.tpm b/Master/texmf/tpm/collection-latexextra.tpm
index 3ad141c7512..42377844ff1 100644
--- a/Master/texmf/tpm/collection-latexextra.tpm
+++ b/Master/texmf/tpm/collection-latexextra.tpm
@@ -192,7 +192,6 @@ A large collection of add-on packages for LaTeX.
<TPM:Package name="fnbreak"/>
<TPM:Package name="fncychap"/>
<TPM:Package name="foilhtml"/>
- <TPM:Package name="fontspec"/>
<TPM:Package name="footmisc"/>
<TPM:Package name="footnpag"/>
<TPM:Package name="formlett"/>