The Fontspec Package
The Fontspec Package
The Fontspec Package
Will Robertson
2006/12/24 v1.14
Contents
1 Introduction 2 6.6 Contextuals 18
1.1 Usage 2 6.7 Vertical position 19
1.2 About this manual 3 6.8 Fractions 19
6.9 Variants 20
2 Brief overview 4 6.10 AAT Alternates 21
6.11 Style 21
3 Font selection 4
6.12 Diacritics 22
3.1 Default font families 5
6.13 Kerning 22
3.2 Font instances for efficiency 5
6.14 CJK shape 23
3.3 Arbitrary bold/italic/small
6.15 Character width 23
caps fonts 6
6.16 Annotation 24
3.4 Math(s) fonts 6
6.17 Vertical typesetting 24
3.5 External fonts 7
6.18 AAT & Multiple Master font
3.6 Miscellaneous font selecting
axes 25
details 8
6.19 OpenType scripts and lan-
4 Selecting font features 8 guages 25
4.1 Default settings 8
7 Defining new features 27
4.2 Changing the currently se-
7.1 Renaming existing features
lected features 8
& options 29
4.3 Priority of feature selection 9
7.2 Going behind fontspec’s back 30
4.4 Different features for differ-
ent font shapes 9
4.5 Different features for differ- I fontspec.sty 31
ent font sizes 10
8 Implementation 31
5 Font independent options 11 8.1 Bits and pieces 31
5.1 Scale 11 8.2 Option processing 32
5.2 Mapping 11 8.3 Packages 32
5.3 Colour 12 8.4 Encodings 32
5.4 Interword space 12 8.5 User commands 33
5.5 Post-punctuation space 13 8.6 Internal macros 37
5.6 Letter spacing 13 8.7 keyval definitions 49
5.7 The hyphenation character 13 8.8 Italic small caps 64
8.9 Selecting maths fonts 65
6 Font-dependent features 14
8.10 Finishing up 68
6.1 Different font technologies:
AAT and ICU 15
6.2 Optical font sizes 15 II fontspec.cfg 69
6.3 Ligatures 16
6.4 Letters 17
6.5 Numbers 18 III fontspec-example.ltx 69
1
1 Introduction
With the introduction of Jonathan Kew’s XƎTEX,1 users can now easily access
system-wide fonts directly in a TEX variant, providing a best of both worlds en-
vironment. XƎTEX eliminates the need for all those files required for installing
fonts (.tfm, .vf, .map, …) and provides an easy way to select fonts in Plain TEX:
\font\tenrm="Times New Roman" at 10pt.
Before fontspec, 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 \emph or \bfseries.
This package provides a completely automatic way to select font families in
LATEX for arbitrary fonts. Furthermore, it allows very flexible control over the se-
lection of advanced font features such as number case and fancy ligatures (and
many more!) present in most modern fonts.
1.1 Usage
For basic use, no package options are required:
2
1. Unicode fonts are loaded by default; it didn’t make sense to have the legacy
Computer Modern fonts in the Unicode-enabled XƎTEX.
2. If you don’t have the Latin Modern OpenType fonts installed, you might
want to consider doing so.
1.1.3 Configuration
If you wish to customise any part of the fontspec interface (see later in this
manual, Section 7 on page 27 and Section 7.1), this should be done by creating
your own fontspec.cfg file,3 which will be automatically loaded if it is found
by XƎTEX. Either place it in the same folder as the main document for isolated
cases, or in a location that XƎTEX searches by default, e.g., ~/Library/texmf/
xelatex/. The package option [no-config] will suppress this behaviour under
all circumstances.
? v1.14: Used to be [noconfig],
which still works.
1.1.4 Warnings
This package can give many warnings that can be harmless if you know what
you’re doing. Use the [quiet] package option to write these warnings to the tran-
script (.log) file instead.
3
are noted in the margin of this document as shown here, with a red star if the
change is relevant to the current release of the package. (New features are de-
noted similarly in blue.)
This document has been typeset with XƎTEX 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, many of which are distributed
with Mac OS X or are otherwise commercial.
Many examples are shown in this manual. These are typeset side-by-side with
their verbatim source code, although various size-altering commands (\large,
\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.
2 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 fontspec-example.tex for a more detailed example.
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont[Mapping=tex-text]{Baskerville}
\setsansfont[Mapping=tex-text]{Skia}
\setmonofont{Courier}
3 Font selection
\fontspec \fontspec[hfont featuresi]{hfont namei} is the base command of the package, used
for selecting the specified hfont namei in a LATEX family. The font features argu-
ment accepts comma separated hfont featurei=hoptioni lists; these will not be fully
described until Section 6 on page 14.
As our first example, look how easy it is to select the Hoefler Text typeface
with the fontspec package:
\def\pangram{The five boxing
The five boxing wizards jump quickly. wizards jump quickly.\\}
The five boxing wizards jump quickly. \fontspec{Hoefler Text} \pangram
TH# FIV# BOXING WIZARDS JuMP QuICKLY. {\itshape \pangram}
THE FIVE BOXING WIZARDS JUMP QUICKLY. {\scshape \pangram}
The five boxing wizards jump quickly. {\scshape\itshape \pangram}
The five boxing wizards jump quickly. \bfseries \pangram
THE FIVE BOXING WIZARDS JUMP QUICKLY. {\itshape \pangram}
THE FIVE BOXING WIZARDS JUMP QUICKLY. {\scshape \pangram}
{\itshape\scshape \pangram}
4
The fontspec package takes care of the necessary font definitions for those shapes
as shown above automatically. Furthermore, it is not necessary to install the font for
XƎTEX in any way whatsoever: every font that is installed in the operating system
may be accessed.
5
3.3 Arbitrary bold/italic/small caps fonts
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
? v1.6: These features used to be bold and italic fonts to chose between. The BoldFont and ItalicFont featuresare
called Bold and Italic, and these provided for these situations. If only one of these is used, the bold italic font is
shorter names may still be used if requested as the default from the new font.
you desire.
\fontspec[BoldFont={Helvetica Neue}]
Helvetica Neue UltraLight {Helvetica Neue UltraLight}
Helvetica Neue UltraLight Italic Helvetica Neue UltraLight \\
Helvetica Neue {\itshape Helvetica Neue UltraLight Italic} \\
Helvetica Neue Italic {\bfseries Helvetica Neue } \\
{\bfseries\itshape Helvetica Neue Italic} \\
If a bold italic shape is not defined, or you want to specify both custom bold and
? v1.6: BoldItalic also works italic shapes, the BoldItalicFont feature is provided.
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 ‘Baskerville SemiBold’:
\fontspec[BoldFont={* SemiBold}]{Baskerville}
Baskerville Italic SemiBold Italic Baskerville \textit{Italic}
\bfseries SemiBold \textit{Italic}
Old-fashioned font families used to distribute their small caps glyphs in sepa-
rate 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 SmallCapsFont of the fam-
ily you are specifying:
\fontspec[
Roman 123 SmallCapsFont={Minion MM Small Caps & Oldstyle Figures},
Small caps 456 ]{Minion MM Roman}
Roman 123 \\ \textsc{Small caps 456}
6
you have troubles, but I can’t guarantee to be able to fix any incompatibilities. The
Lucida and Euler maths fonts (the latter loaded with euler rather than eulervm)
should be fine; for all others keep an eye out for problems.
\setmathrm However, the default text fonts may not necessarily be the ones you wish to
\setboldmathrm use when typesetting maths (especially with the use of fancy ligatures and so
\setmathsf on). For this reason, you may optionally use those commands listed in the margin
\setmathtt (in the same way as our other \fontspec-like commands) to explicitly state which
fonts to use inside such commands as \mathrm. Additionally, the \setboldmathrm
command allows you define the font used for \mathrm when in bold maths mode
(which is activated with, among others, \boldmath).
For example, if you were using Optima with the Euler maths font, you might
have this in your preamble:
\usepackage[mathcal]{euler}
\usepackage{fontspec,xunicode}
\setmainfont{Optima Regular}
\setmathrm{Optima}
\setboldmathrm[BoldFont=Optima ExtraBlack]{Optima Bold}
and this would allow you to typeset something like this:
$ X \rightarrow \mathrm{X} \rightarrow \mathbf{X} $
X→X→X
\\\boldmath
X→X→X $ X \rightarrow \mathrm{X} \rightarrow \mathbf{X} $
If no path is given, then the font will be found in a location normally searched
by XƎTEX, including the current directory. For example, the following declaration
could load either the Latin Modern roman font in the current directory or, say, in
$TEXMF/fonts/opentype/public/lm/:
\fontspec[ExternalLocation]{lmroman10-regular}
Bold and italic fonts cannot be automatically selected when external fonts are
being used; they must be explicitly declared using the methods described in Sec-
tion 3.3 on the preceding page.
7
3.6 Miscellaneous font selecting details
By the way, from v1.9, \fontspec and \addfontfeatures will now ignore follow-
ing spaces as if it were a ‘naked’ control sequence; e.g., ‘M. \fontspec{...} N’
and ‘M. \fontspec{...}N’ are the same.
Note that this package redefines the \itshape and \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.)
8
\fontspec[Numbers=OldStyle]{Skia}
`In 1842, 999 people sailed 97 miles in
‘In 1842, 999 people sailed 97 miles in 13 13 boats. In 1923, 111 people sailed 54
boats. In 1923, 111 people sailed 54 miles in 56 boats.' \bigskip
miles in 56 boats.’
{\addfontfeatures{Numbers={Monospaced,Lining}}
Year People Miles Boats \begin{tabular}{@{} cccc @{}}
\toprule Year & People & Miles & Boats \\
1842 999 75 13 \midrule 1842 & 999 & 75 & 13 \\
1923 111 54 56 1923 & 111 & 54 & 56 \\
\bottomrule
\end{tabular}}
\addfontfeature This command may also be executed under the alias \addfontfeature.
\fontspec[BoldFont={Skia},
Skia
BoldFeatures={Weight=2}]{Skia}
Skia ‘Bold’ Skia \\ \bfseries Skia `Bold'
Note that because most fonts include their small caps glyphs within the main
font, these features are applied in addition to any other shape-specific features as
9
defined above, and hence SmallCapsFeatures can be nested within ItalicFea-
tures and friends. Every combination of upright, italic, bold and small caps can
thus be assigned individual features, as shown in the following ludicrous exam-
ple.
\fontspec[
UprightFeatures={Colour = 220022,
SmallCapsFeatures = {Colour=115511}},
ItalicFeatures={Colour = 2244FF,
SmallCapsFeatures = {Colour=112299}},
Upright SMALL CAPS
BoldFeatures={Colour = FF4422,
Italic ITALIC SMALL CAPS
SmallCapsFeatures = {Colour=992211}},
Bold BOLD SMALL CAPS BoldItalicFeatures={Colour = 888844,
Bold Italic BOLD ITALIC SMALL SmallCapsFeatures = {Colour=444422}},
CAPS ]{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}
\fontspec[ SizeFeatures={
Small
{Size={-8}, Font=Apple Chancery, Colour=AA0000},
Normal size {Size={8-14}, Colour=00AA00},
Large {Size={14-}, Colour=0000AA}} ]{Skia}
{\scriptsize Small\par} Normal size\par {\Large Large\par}
A less trivial example is shown in the context of optical font sizes in Section 6.2
on page 15.
To be precise, the Size sub-feature accepts arguments in the form shown in Ta-
ble 1 on the next page. Braces around the size range are optional. For an exact font
size (Size=X) font sizes chosen near that size will ‘snap’. For example, for size def-
initions at exactly 11pt and 14pt, if a 12pt font is requested actually the 11pt font
will be selected. This is a remnant of the past when fonts were designed in metal
(at obviously rigid sizes) and later when bitmap fonts were similarly designed for
fixed sizes.
10
Input Font size, s
Size = X- s≥X
Size = -Y s<Y
Size = X-Y X≤s<Y
Size = X s=X
Table 1: Syntax for specifying the size to apply custom font features.
If additional features are only required for a single size, the other sizes must
still be specified. As in:
SizeFeatures={
{Size=-10,Numbers=Uppercase},
{Size=10-}}
5.1 Scale
In its explicit form, Scale takes a single numeric argument for linearly scaling
the font, as demonstrated in Section 3.1 on page 5. Since version 0.99 of XƎTEX,
however, it is now possible to measure the correct dimensions of the fonts loaded,
and hence calculate values to scale them automatically.
? v1.9: As of Dec. 2005 The Scale feature nowalso takes the options MatchLowercase and MatchUp-
percase, which will scale the font being selected to match the current default ro-
man font to either the height of the lowercase or uppercase letters, respectively.
\setmainfont{Georgia}
\newfontfamily\lc[Scale=MatchLowercase]{Verdana}
The perfect match is hard to find.
The perfect match {\lc is hard to find.}\\
LOGOFONT \newfontfamily\uc[Scale=MatchUppercase]{Arial}
L O G O \uc F O N T
The amount of scaling used in each instance is reported in the .log file. Since
there is some subjectivity about the exact scaling to be used, these values should
be used to fine-tune the results.
5.2 Mapping
Mapping enables a XƎTEX text-mapping scheme.
11
\fontspec[Mapping=tex-text]{Cochin}
“¡A small amount of—text!”
``!`A small amount of---text!''
5.3 Colour
Colour (or Color), also shown in Section 4.1 on page 8 and Section 6 on page 14,
uses XƎTEX 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.)
\fontsize{48}{48}
\fontspec{Hoefler Text Black}
WSPR {\addfontfeature{Color=FF000099}W}\kern-1ex
{\addfontfeature{Color=0000FF99}S}\kern-0.8ex
{\addfontfeature{Color=DDBB2299}P}\kern-0.8ex
{\addfontfeature{Color=00BB3399}R}
Be careful with the unpredictable things that the AAT font renderer can do with
the text! Unlike TEX, Mac OS X 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.
12
5.5 Post-punctuation space
If \frenchspacing is not in effect, TEX will allow extra space after some punctu-
ation 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 PunctuationSpace feature takes a scaling factor by which to adjust the
nominal value chosen for the font. Note that PunctuationSpace=0 is not equiv-
alent to \frenchspacing, although the difference will only be apparent when a
line of text is under-full.
\nonfrenchspacing
\fontspec{Baskerville}
Letters, Words. Sentences. Letters, Words. Sentences. \par
Letters, Words. Sentences. \fontspec[PunctuationSpace=0.5]{Baskerville}
Letters, Words. Sentences. Letters, Words. Sentences. \par
\fontspec[PunctuationSpace=0]{Baskerville}
Letters, Words. Sentences.
Also be aware that the above caveat for interword space also applies here, so
after the last line in the above example, the PunctuationSpace for all Baskerville
instances will be 0.
\fontspec{Didot}
\addfontfeature{LetterSpace=0.0}
USE TRACKING FOR DISPLAY CAPS TEXT
USE TRACKING FOR DISPLAY CAPS TEXT \\
USE TRACKING FOR DISPLAY CAPS TEXT \addfontfeature{LetterSpace=2.0}
USE TRACKING FOR DISPLAY CAPS TEXT
This functionality 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 Uppercase option of the Letters feature
(Section 6.4 on page 17).
13
the input is the string 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 character5 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 char-
acter.
A MULTITUDE OF
OBSTREPEROUSLY \def\text
HYPHENATED ENTITIES {A MULTITUDE OF OBSTREPEROUSLY HYPHENATED ENTITIES
\par\vspace{1ex}}
A MULTITUDE OF OBSTREPER-
\fontspec[HyphenChar=None]{Adobe Garamond Pro} \text
OUSLY HYPHENATED ENTITIES
\fontspec[HyphenChar={-}]{Adobe Garamond Pro} \text
A MULTITUDE OF OBSTREPER \fontspec[HyphenChar="F6BA]{Adobe Garamond Pro} \text
OUSLY HYPHENATED ENTITIES
Note that in an actual situation, the Uppercase option of the Letters feature
would probably supply this for you (see Section 6.4 on page 17).
The xltxtra package redefines LATEX’s \- macro such that it adjusts along with
the above changes.
6 Font-dependent 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:
\fontspec[
Colour=CC00CC,
My 1st example of Numbers=OldStyle,
Apple Chancery VerticalPosition=Ordinal,
Variant=2]{Apple Chancery}
My 1st example of\\ Apple Chancery
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; Numbers={OldStyle,Lining} doesn’t make much sense
because the two options are mutually exclusive, and XƎTEX will simply use the
last option that is specified (in this case using Lining over 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 1.1.4 on page 3 these warnings can
be suppressed by selecting the [quiet] package option.
5I found the character, and its number, in Mac OS X’s Character Palette.
14
6.1 Different font technologies: AAT and ICU
XƎTEX supports two rendering technologies for typesetting, selected with the Ren-
derer font feature. The first, AAT, is that provided (only) by Mac OS X itself. The
second, ICU, is an open source OpenType interpreter. It provides much greater
support for OpenType features, notably contextual arrangement, over AAT.
In general, this feature will not need to be explicitly called: for OpenType fonts,
the ICU renderer is used automatically, and for AAT fonts, AAT is chosen by default.
Some fonts, however, will contain font tables for both rendering technologies, such
as the Hiragino Japanese fonts distributed with Mac OS X, and in these cases the
choice may be required.
Among some other font features only available through a specific renderer,
ICU provides for the Script and Language features, which allow different font
behaviour for different alphabets and languages; see Section 6.19 on page 25 for
the description of these features. Because these font features can change which features
are able to be selected for the font instance, they are selected by fontspec before all others
and will automatically and without warning select the ICU renderer.
15
\fontspec{Warnock Pro}
Automatic optical size Automatic optical size \\
Automatic optical size \scalebox{0.4}{\Huge
Automatic optical size}
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 Section 6.18 on page 25 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.
\fontspec[OpticalSize=11]{Minion MM Roman}
MM optical size test \\
MM optical size test
\fontspec[OpticalSize=47]{Minion MM Roman}
MM optical size test
MM optical size test \\
MM optical size test \fontspec[OpticalSize=71]{Minion MM Roman}
MM optical size test \\
The SizeFeatures feature ( Section 4.5 on page 10) can be used to specify ex-
actly which optical sizes will be used for ranges of font size. For example, some-
thing like
\fontspec[
SizeFeatures={
{Size=-10, OpticalSize=8 },
{Size= 10-14, OpticalSize=10},
{Size= 14-18, OpticalSize=14},
{Size= 18-, OpticalSize=18}}
]{Warnock Pro}
6.3 Ligatures
Ligatures refer to the replacement of two separate characters with a specially
drawn glyph for functional or æsthetic reasons. For AAT fonts, you may choose
from any combination of Required, Common, Rare (or Discretionary), Logos, Re-
bus, Diphthong, Squared, AbbrevSquared, and Icelandic.
The first three are also supported in OpenType fonts, which may also use His-
torical and Contextual. To turn a ligature option off, prefix its name with No: e.g.,
NoDiphthong.
\fontspec[Ligatures=Rare]{Hoefler Text}
stri< firefly strict firefly \\
\fontspec[Ligatures=NoCommon]{Hoefler Text}
strict firefly strict firefly
16
\fontspec
Rare: Ð Þ ð þ [Ligatures={Rare,Logos,Rebus,Diphthong}]
{Palatino}
Logos:
Rare: Dh Th dh th \\
Rebus: ‰ Logos: apple \\
Diphthong: Æ Œ æ œ Rebus: \%0 \\
Dipht\null hong: AE OE ae oe
Some other Apple AAT fonts have those ‘Rare’ ligatures contained in the Ice-
landic feature. Notice also that the old TEX trick of splitting up a ligature with an
empty brace pair does not work in XƎTEX; you must use a 0 pt kern or \hbox (e.g.,
\null) to split the characters up.
6.4 Letters
? v1.6: This feature has changed The Letters featurespecifies how the letters in the current font will look. For AAT
names along with its options, fonts, you may choose from Normal, Uppercase, Lowercase, SmallCaps, and Ini-
breaking backwards compatibility! tialCaps.
\fontspec[Letters=Uppercase]{Palatino}
THIS Sentence no verb \\
THIS SENTENCE NO VERB
\fontspec[Letters=Lowercase]{Palatino}
this sentence no verb
THIS Sentence no verb \\
This Sentence No Verb \fontspec[Letters=InitialCaps]{Palatino}
THIS Sentence no verb
OpenType fonts have some different options: Uppercase, SmallCaps, PetiteCaps,
? v1.9: The Uppercase... UppercaseSmallCaps, UppercasePetiteCaps, and Unicase.Petite caps are smaller
variants have changed (e.g., from than small caps. Mixed case commands turn lowercase letters into the smaller
SMALLCAPS) to allow for more caps letters, whereas uppercase options turn the capital letters to the smaller caps
flexible option handling in the (good, e.g., for applying to already uppercase acronyms like ‘NASA’). ‘Unicase’ is
future. The old forms still work, for
a weird hybrid of upper and lower case letters.
now…
\fontspec[Letters=SmallCaps]{Warnock Pro}
THIS SENTENCE ɴ ʀʙ THIS SENTENCE no verb \\
ʜɪ ɴɴ no verb \fontspec[Letters=UppercaseSmallCaps]{Warnock Pro}
THIS SENTENCE no verb
The Uppercase option is also provided but it will (probably) not actually map
letters to uppercase.6 It will, however, select various uppercase forms for glyphs
such as accents and dashes.
\fontspec{Warnock Pro}
UPPER-CASE EXAMPLE UPPER-CASE EXAMPLE \\
UPPERCASE EXAMPLE \addfontfeature{Letters=Uppercase}
UPPER-CASE EXAMPLE
6 If you want automatic uppercase letters, look to LATEX’s \MakeUppercase command.
17
The Kerning feature also contains an Uppercase option, which adds a small
amount of spacing in between letters (see Section 6.13 on page 22). This feature
was originally planned to be included with the one above (so Letters=Uppercase
would do both punctuation and tracking), but I decided that it would be a bad
idea to break the one-to-one correspondence with fontspec and OpenType fea-
tures. (Sorry TUGboat readers!)
6.5 Numbers
The Numbers feature defines how numbers will look in the selected font. For both
AAT and OpenType fonts, they may be a combination of Lining or OldStyle and
Proportional or Monospaced (the latter is good for tabular material). The syn-
onyms Uppercase and Lowercase are equivalent to Lining and OldStyle, respec-
tively. The differences have been shown previously in Section 4.2 on page 8.
For OpenType fonts, there is also the SlashedZero option which replaces the
default zero with a slashed version to prevent confusion with an uppercase ‘O’.
\fontspec[Numbers=Lining]{Warnock Pro}
0123456789
0123456789 123456789
\fontspec[Numbers=SlashedZero]{Warnock Pro}
0123456789
6.6 Contextuals
This feature refers to glyph substitution that vary by their position; things like
? v1.9: This feature used to be contextual swashes are implemented here. The options for AAT fonts are Wor-
called Swashes. This name still dInitial, WordFinal, LineInitial, LineFinal, and Inner (also called ‘non-final’
works, for now. sometimes). As non-exclusive selectors, like the ligatures, you can turn them off
by prefixing their name with No.
\newfontface\fancy
[Contextuals={WordInitial,WordFinal}]
where is all the vegemite
{Hoefler Text Italic}
\fancy where is all the vegemite
\fontspec[Contextuals=Inner]{Hoefler Text}
‘Inner’ @waAes can Bometimes
`Inner' swashes can \emph{sometimes} \\
contain the archaic long s.
contain the archaic long~s.
For OpenType fonts, all features as above but the LineInitial feature are sup-
? v1.9: Used to be Contextual; ported, and Swash turns on contextual swashes.
still works.
\fontspec{Warnock Pro} \itshape
Without Contextual Swashes Without Contextual Swashes \\
With Contextual Swashes; cf. W C S \fontspec[Contextuals=Swash]{Warnock Pro}
With Contextual Swashes; cf. W C S
18
Historic forms (e.g., long s as shown above) are accessed in OpenType fonts via
the feature Style=Historic; this is generally not contextual in OpenType, which
is why it is not included here.
\fontspec{Skia}
Normal
\fontspec[VerticalPosition=Superior]{Skia}
Normal !"#$%&'% ()*+,(-, Superior
1!. 2ⁿ0 3%0 4.1 0.1 82340$ \fontspec[VerticalPosition=Inferior]{Skia}
Inferior \\
\fontspec[VerticalPosition=Ordinal]{Skia}
1st 2nd 3rd 4th 0th 8abcde
OpenType fonts also have the option ScientificInferior which extends further
below the baseline than Inferiors, as well as Numerator and Denominator for
creating arbitrary fractions (see next section). Beware, the Ordinal feature will
not work correctly for all OpenType fonts!
\fontspec[VerticalPosition=Superior]{Warnock Pro}
Sup: abdehilmnorst (-\$12,345.67) \\
\fontspec[VerticalPosition=Numerator]{Warnock Pro}
Sup: ˡⁿʳˢ ⁽⁻¹²³⁴⁵⁶⁷⁾
Numerator: 12345 \\
Numerator:
\fontspec[VerticalPosition=Denominator]{Warnock Pro}
Denominator: Denominator: 12345 \\
Scientific Inferior: ₁₂₃₄₅ \fontspec[VerticalPosition=ScientificInferior]{Warnock Pro}
‘Ordinals’: 1ˢt 2ⁿd 3ʳd 4h 0h Scientific Inferior: 12345 \\
\fontspec[VerticalPosition=Ordinal]{Warnock Pro}
`Ordinals': 1st 2nd 3rd 4th 0th
The xltxtra package redefines the \textsubscript and \textsuperscript
commands to use the above font features.
6.8 Fractions
Many fonts come with the capability to typeset various forms of fractional mate-
rial. This is accessed in fontspec with the Fractions feature, which may be turned
? v1.7: This feature has changed: On or Off in both AAT and OpenType fonts.
no backwards compatibility! In AAT fonts, the ‘fraction slash’ or solidus character, which may be obtained
by typing ‘⌥⇧ 1’, is (supposed) to be used to create fractions. When Fractions
are turned On, then (supposedly) only pre-drawn fractions will be used.
19
\fontspec[Fractions=On]{Palatino}
½ 5⁄6
1⁄2 \quad 5⁄6 \\ % fraction slash
1/2 5/6 1/2 \quad 5/6 % regular slash
Using the 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.
\fontspec{Hoefler Text}
13579⁄24680
13579 24680 \\ % fraction slash
13579/24680
\quad 13579/24680 % regular slash
Some (Asian fonts predominantly) also provide for the Alternate feature:
\fontspec{Hiragino Maru Gothic Pro W4}
1/2 1/4 5/6 13579/24680 1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
13579/24680 \addfontfeature{Fractions=Alternate}
1/2 \quad 1/4 \quad 5/6 \quad 13579/24680 \\
The xltxtra package provides a \vfrac command for creating arbitrary so-called
‘vulgar’ fractions:
\fontspec{Warnock Pro}
⁄
\vfrac{13579}{24680}
6.9 Variants
The Variant feature takes a single numerical input for choosing different al-
phabetic shapes. Don’t mind my fancy example :) I’m just looping through the
nine ( ! ) variants of Zapfino.
\newcounter{var}\newcounter{trans}
\whiledo{\value{var}<9}{%
\stepcounter{trans}%
ddddddddd
\fontspec[Variant=\thevar,
Colour=005599\thetrans\thetrans]{Zapfino}%
\makebox[0.75\width]{d}%
\stepcounter{var}}
For OpenType fonts, Variant selects a ‘Stylistic Set’, again specified numerically. I
don’t have a font to demonstrate this feature with, unfortunately. See Section 7 on
page 27 for a way to assign names to variants, which should be done on a per-font
basis.
20
6.10 AAT Alternates
Selection of Alternates in AAT fonts again must be done numerically.
\fontspec[Alternate=0]{Hoefler Text Italic}
Sphinx Of Black Quartz, JUDGE MY VOW
Sphinx Of Black Quartz, {\scshape Judge My Vow} \\
Sphinx Of Black Quartz, JUDGE MY \fontspec[Alternate=1]{Hoefler Text Italic}
VOW Sphinx Of Black Quartz, {\scshape Judge My Vow}
See Section 7 on page 27 for a way to assign names to alternates, which should be
done on a per-font basis.
6.11 Style
? v1.7: The old name, The options of the Style featureare defined in AAT as one of the following: Dis-
StyleOptions, still works. play, Engraved, IlluminatedCaps, Italic, Ruby,7 TallCaps, or TitlingCaps.
\newfontface\officedoor[Style=Engraved]{Hoefler Text}
[ABCD…WXYZ]\officedoor [ABCD\dots WXYZ]
ICU supported options are Alternate, Italic, Historic, Ruby,7 Swash, Titling-
Caps, HorizontalKana, and VerticalKana.
\fontspec{Warnock Pro}
KQRkvwy K Q R k v w y \\
\addfontfeature{Style=Alternate}
KQRkvwy K Q R k v w y
Note the occasional inconsistency with which font features are labelled; a long-
tailed ‘Q’ could turn up anywhere!
\fontspec{Adobe Jenson Pro}
MQZ M Q Z \\
MQZ \addfontfeature{Style=Historic}
M Q Z
Note the difference here between the default and the horizontal style kana:
7 ‘Ruby’ refers to a small optical size, used in Japanese typography for annotations.
21
\fontspec{Hiragino Mincho Pro}
ようこそ ワカヨタレソ ようこそ ワカヨタレソ \\
{\addfontfeature{Style=HorizontalKana}
ようこそ ワカヨタレソ} \\
{\addfontfeature{Style=VerticalKana}
ようこそ ワカヨタレソ}
6.12 Diacritics
Diacritics refer to characters that include extra marks that usually indicate pro-
nunciation; e.g., accented letters. You may either choose to Show, Hide or Decom-
pose them in AAT fonts.
Some fonts include O/ etc. as diacritics for writing Ø. You’ll want to turn this
feature off (imagine typing hello/goodbye and getting ‘hellø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.
\fontspec[Diacritics=Show]{Palatino}
Ó Ö Ø O´ \quad O¨ \quad O/ \par
O´ O¨ O/ \fontspec[Diacritics=Decompose]{Palatino}
Better: Ó Ö Ø O´ \quad O¨ \quad O/ \par
Better: \'O \"O \O % (requires xunicode)
The Hide option is for Arabic-like fonts which may be displayed either with or
without vowel markings.
No options for OpenType fonts.
6.13 Kerning
Well designed fonts contain kerning information that controls the spacing be-
tween letter pairs, on an individual basis. The Kerning feature provides options
to control this, for OpenType fonts only.
The options provided for now are On, Off (don’t know why you’d want to),
and Uppercase.
\fontspec{Warnock Pro}
Ta AV Ta AV \\
Ta AV \fontspec[Kerning=Off]{Warnock Pro}
Ta AV
As briefly mentioned previously at the end of Section 6.4 on page 17, the Up-
percase option will add a small amount of tracking between uppercase letters:
\fontspec{Warnock Pro}
UPPER-CASE EXAMPLE UPPER-CASE EXAMPLE \\
UPPER-CASE EXAMPLE \addfontfeature{Kerning=Uppercase}
UPPER-CASE EXAMPLE
22
6.14 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
? v1.9: Was CharacterShape, OpenType fonts support the following CJKShape options: Traditional, Simpli-
which wasn't very descriptive. No fied, JIS1978, JIS1983, JIS1990, and Expert. OpenType also supports the NLC
backwards compatibility. option.
\def\test{\makebox[2cm][l]{ようこそ}%
\makebox[2.5cm][l]{ワカヨタレソ}%
abcdef \makebox[2.5cm][l]{abcdef}}
ようこそ ワカヨタレソ abcde \fontspec{Hiragino
f Mincho Pro}
ワカヨタレソ abcdef {\addfontfeature{CharacterWidth=Proportional}\test}\\
{\addfontfeature{CharacterWidth=Full}\test}\\
{\addfontfeature{CharacterWidth=Half}\test}
8 Apple seems to be adapting its AAT features in this regard (at least in the fonts it distributes with
Mac OS X) 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.
23
The same situation occurs with numbers, which are provided in increasingly il-
legible compressed forms:
The option CharacterWidth=Full doesn’t work with the default OpenType font
renderer (ICU) due to a bug in the Hiragino fonts.
6.16 Annotation
Various Asian fonts are equipped with a more extensive range of numbers and
numerals in different forms. These are accessed through the Annotation feature
with the following options: Off, Box, RoundedBox, Circle, BlackCircle, Paren-
thesis, Period, RomanNumerals, Diamond, BlackSquare, BlackRoundSquare, and
DoubleCircle.
\fontspec{Hei Regular}
1 2 3 4 5 6 7 8 9 \\
123456789 \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
For OpenType fonts, the only option supported is On and Off:
24
共産主義者は
\fontspec{Hiragino Mincho Pro}
共 共産主義者は
産
主 \fontspec[Renderer=AAT,Vertical=RotatedGlyphs]{Hiragino Mincho Pro}
義 \rotatebox{-90}{共産主義者は}% requires the graphicx package
者
は
The AAT renderer is required above because XƎTEX 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 XƎTEX
documentation.
Variations along a multiple master font’s optical size axis has been shown previ-
ously in Section 6.2 on page 15.
25
6.19.1 Script examples
In the following examples, the same font is used to typeset the verbatim input and
the XƎTEX output. Because the 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 Jonathan Kew, Yves Codet and Gildas Hamel for their contributions
towards these examples.
\fontspec[Script=Arabic]{Code2000}
ﺍﻟﻌﺮﺑﻲ
العربي
\fontspec[Script=Devanagari]{Code2000}
िहदी हिन्दी
\fontspec[Script=Bengali]{Code2000}
েলখ
লেখ
\fontspec[Script=Gujarati]{Code2000}
મયાદા-સૂચક િનવેદન મર્યાદા-સૂચક નિવેદન
\fontspec[Script=Malayalam]{Code2000}
നമ്മുെട പാരബര നമ്മുടെ പാരബര്യ
\fontspec[Script=Gurmukhi]{Code2000}
ਆਿਦ ਸਚੁ ਜੁਗਾਿਦ ਸਚੁ
ਆਦਿ ਸਚੁ ਜੁਗਾਦਿ ਸਚੁ
\fontspec[Script=Tamil]{Code2000}
தழ் ேத தமிழ் தேடி
\fontspec[Script=Hebrew]{Code2000}
תּהּ
ָֽ ִר ְד
ּרִדְתָּֽה
ȘșȚț \addfontfeature{Language=Moldavian}
Ş ş Ţ ţ
26
6.19.3 Defining new scripts and languages
\newfontscript Further scripts and languages may be added with the \newfontscript and \new-
\newfontlanguage fontlanguage commands. For example,
\newfontscript{Arabic}{arab}
\newfontlanguage{Turkish}{TUR}
The first argument is the fontspec name, the second the OpenType definition. The
advantage to using these commands rather than \newfontfeature (see Section 7)
is the error-checking that is performed when the script or language is requested.
Table 2: Defined Scripts for OpenType fonts. Aliased names are shown in adja-
cent positions marked with red pilcrows (¶), defined in fontspec.cfg.
27
Abaza German Igbo Kuy Newari Albanian
Abkhazian Default Ijo Koryak Nagari Serbian
Adyghe Dogri Ilokano Ladin Norway House Cree Saraiki
Afrikaans Divehi Indonesian Lahuli Nisi Serer
Afar Djerma Ingush Lak Niuean South Slavey
Agaw Dangme Inuktitut Lambani Nkole Southern Sami
Altai Dinka Irish Lao N’ko Suri
Amharic Dungan Irish Traditional Latin Dutch Svan
Arabic Dzongkha Icelandic Laz Nogai Swedish
Aari Ebira Inari Sami L-Cree Norwegian Swadaya Aramaic
Arakanese Eastern Cree Italian Ladakhi Northern Sami Swahili
Assamese Edo Hebrew Lezgi Northern Tai Swazi
Athapaskan Efik Javanese Lingala Esperanto Sutu
Avar Greek Yiddish Low Mari Nynorsk Syriac
Awadhi English Japanese Limbu Oji-Cree Tabasaran
Aymara Erzya Judezmo Lomwe Ojibway Tajiki
Azeri Spanish Jula Lower Sorbian Oriya Tamil
Badaga Estonian Kabardian Lule Sami Oromo Tatar
Baghelkhandi Basque Kachchi Lithuanian Ossetian TH-Cree
Balkar Evenki Kalenjin Luba Palestinian Aramaic Telugu
Baule Even Kannada Luganda Pali Tongan
Berber Ewe Karachay Luhya Punjabi Tigre
Bench French Antillean Georgian Luo Palpa Tigrinya
Bible Cree Farsi Kazakh Latvian Pashto Thai
Belarussian Finnish Kebena Majang Polytonic Greek Tahitian
Bemba Fijian Khutsuri Georgian Makua Pilipino Tibetan
Bengali Flemish Khakass Malayalam Palaung Turkmen
Bulgarian Forest Nenets Khanty-Kazim Traditional Polish Temne
Bhili Fon Khmer Mansi Provencal Tswana
Bhojpuri Faroese Khanty-Shurishkar Marathi Portuguese Tundra Nenets
Bikol French Khanty-Vakhi Marwari Chin Tonga
Bilen Frisian Khowar Mbundu Rajasthani Todo
Blackfoot Friulian Kikuyu Manchu R-Cree Turkish
Balochi Futa Kirghiz Moose Cree Russian Buriat Tsonga
Balante Fulani Kisii Mende Riang Turoyo Aramaic
Balti Ga Kokni Me’en Rhaeto-Romanic Tulu
Bambara Gaelic Kalmyk Mizo Romanian Tuvin
Bamileke Gagauz Kamba Macedonian Romany Twi
Breton Galician Kumaoni Male Rusyn Udmurt
Brahui Garshuni Komo Malagasy Ruanda Ukrainian
Braj Bhasha Garhwali Komso Malinke Russian Urdu
Burmese Ge’ez Kanuri Malayalam Sadri Upper Sorbian
Bashkir Gilyak Kodagu Reformed Sanskrit Uyghur
Beti Gumuz Korean Old Hangul Malay Santali Uzbek
Catalan Gondi Konkani Mandinka Sayisi Venda
Cebuano Greenlandic Kikongo Mongolian Sekota Vietnamese
Chechen Garo Komi-Permyak Manipuri Selkup Wa
Chaha Gurage Guarani Korean Maninka Sango Wagdi
Chattisgarhi Gujarati Komi-Zyrian Manx Gaelic Shan West-Cree
Chichewa Haitian Kpelle Moksha Sibe Welsh
Chukchi Halam Krio Moldavian Sidamo Wolof
Chipewyan Harauti Karakalpak Mon Silte Gurage Tai Lue
Cherokee Hausa Karelian Moroccan Skolt Sami Xhosa
Chuvash Hawaiin Karaim Maori Slovak Yakut
Comorian Hammer-Banna Karen Maithili Slavey Yoruba
Coptic Hiligaynon Koorete Maltese Slovenian Y-Cree
Cree Hindi Kashmiri Mundari Somali Yi Classic
Carrier High Mari Khasi Naga-Assamese Samoan Yi Modern
Crimean Tatar Hindko Kildin Sami Nanai Sena Chinese Hong Kong
Church Slavonic Ho Kui Naskapi Sindhi Chinese Phonetic
Czech Harari Kulvi N-Cree Sinhalese Chinese Simplified
Danish Croatian Kumyk Ndebele Soninke Chinese Traditional
Dargwa Hungarian Kurdish Ndonga Sodo Gurage Zande
Woods Cree Armenian Kurukh Nepali Sotho Zulu
\newfontfeature In case the above commands do not accommodate the desired font feature
(perhaps a new XƎTEX feature that fontspec hasn’t been updated to support), a
command is provided to pass arbitrary input into the font selection string:
\newfontfeature{hnamei}{hinput stringi}
For example, Zapfino contains the feature ‘Avoid d-collisions’. To access it with
this package, you could do the following:
\newfontfeature{AvoidD}{Special=Avoid d-collisions}
sockdola6r rubdo: \newfontfeature{NoAvoidD}{Special=!Avoid d-collisions}
\fontspec[AvoidD,Variant=1]{Zapfino}
sockdola6r rubdo:
sockdolager rubdown \\
\fontspec[NoAvoidD,Variant=1]{Zapfino}
sockdolager rubdown
Spaces in feature (and option names, see below) are allowed. (You may have
noticed this already in the lists of OpenType scripts and languages).
\aliasfontfeatureoption If you wish to change the name of a font feature option, it can be aliased to
another with the command \aliasfontfeatureoption{hfont featurei}{hexisting
namei}{hnew namei}:
\aliasfontfeature{VerticalPosition}{Vert Pos}
Scientific \aliasfontfeatureoption{VerticalPosition}{ScientificInferior}{Sci Inf}
Inferior: ₁₂₃₄₅ \fontspec[Vert Pos=Sci Inf]{Warnock Pro}
Scientific Inferior: 12345
29
This example demonstrates an important point: when aliasing the feature options,
the 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, Proportional can be aliased to Prop in the Letters feature, but
550099BB cannot be substituted for Purple in a Colour specification. For this type
of thing, the \newfontfeature command should be used to declare a new, e.g.,
PurpleColour feature:
\newfontfeature{PurpleColour}{color=550099BB}
30
File I
fontspec.sty
8 Implementation
Herein lie 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 them together at the time. (Possibly inspired by Hermann
Zapf.)
Only proceed if it is XƎTEX that is doing the typesetting.
1 \RequirePackage{ifxetex}
2 \RequireXeTeX
Counters
18 \newcount\c@zf@newff
19 \newcount\c@zf@index
20 \newcount\c@zf@script
21 \newcount\c@zf@language
31
fontspec shorthands:
22 \newcommand\zf@PackageError[2]{\PackageError{fontspec}{#1}{#2}}
23 \newcommand\zf@PackageWarning[1]{\PackageWarning{fontspec}{#1}}
24 \newcommand\zf@PackageInfo[1]{\PackageInfo{fontspec}{#1}}
\def@cx LATEX3–like syntax for various low level commands. Makes life much easier; can’t
\gdef@cx wait for the official interface :)
\let@cc 25 \providecommand\def@cx[2]{\expandafter\edef\csname#1\endcsname{#2}}
26 \providecommand\gdef@cx[2]{\expandafter\xdef\csname#1\endcsname{#2}}
27 \providecommand\let@cc[2]{%
28 \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
8.3 Packages
We require the calc package for autoscaling and a recent version of the xkeyval
package for option processing.
41 \RequirePackage{calc}
42 \RequirePackage{xkeyval}[2005/05/07]
8.4 Encodings
Frank Mittelbach has recommended using the ‘EUx’ family of font encodings to
experiment with unicode. Now that XƎTEX can find fonts in the texmf tree, the
Latin Modern OpenType fonts can be used as the defaults. See the euenc collection
of files for how this is implemented.
43 \if@zf@euenc
44 \def\zf@enc{EU1}
45 \renewcommand{\rmdefault}{lmr}
46 \renewcommand{\sfdefault}{lmss}
47 \renewcommand{\ttdefault}{lmtt}
32
48 \RequirePackage[\zf@enc]{fontenc}
49 \else
50 \def\zf@enc{U}
51 \let\encodingdefault\zf@enc
52 \fi
53 \let\UTFencname\zf@enc
\setmainfont The following three macros perform equivalent operations setting the default font
\setsansfont (using \let rather than \renewcommand because \zf@family will change in the
\setmonofont 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.
63 \newcommand*\setmainfont[2][]{%
64 \zf@fontspec{#1}{#2}%
65 \let\rmdefault\zf@family
66 \normalfont}
33
67 \let\setromanfont\setmainfont
68 \newcommand*\setsansfont[2][]{%
69 \zf@fontspec{#1}{#2}%
70 \let\sfdefault\zf@family
71 \normalfont}
72 \newcommand*\setmonofont[2][]{%
73 \zf@fontspec{#1}{#2}%
74 \let\ttdefault\zf@family
75 \normalfont}
\setmathrm These commands are analogous to \setromanfont and others, but for selecting
\setmathsf the font used for \mathrm, etc. They can only be used in the preamble of the
\setboldmathrm document. \setboldmathrm is used for specifying which fonts should be used in
\setmathtt \boldmath.
76 \newcommand*\setmathrm[2][]{%
77 \zf@fontspec{#1}{#2}%
78 \let\zf@rmmaths\zf@family}
79 \newcommand*\setboldmathrm[2][]{%
80 \zf@fontspec{#1}{#2}%
81 \let\zf@rmboldmaths\zf@family}
82 \newcommand*\setmathsf[2][]{%
83 \zf@fontspec{#1}{#2}%
84 \let\zf@sfmaths\zf@family}
85 \newcommand*\setmathtt[2][]{%
86 \zf@fontspec{#1}{#2}%
87 \let\zf@ttmaths\zf@family}
88 \@onlypreamble\setmathrm
89 \@onlypreamble\setboldmathrm
90 \@onlypreamble\setmathsf
91 \@onlypreamble\setmathtt
If the commands above are not executed, then \rmdefault (etc.) will be used.
92 \def\zf@rmmaths{\rmdefault}
93 \def\zf@sfmaths{\sfdefault}
94 \def\zf@ttmaths{\ttdefault}
\newfontfamily This macro takes the arguments of \fontspec with a prepended hinstance cmdi
\newfontface (code for middle optional argument generated by Scott Pakin’s newcommand.py).
This command is used when a specific font instance needs to be referred to repet-
itively (e.g., in a section heading) since continuously calling \zf@fontspec is inef-
ficient because it must parse the option arguments every time.
\zf@fontspec defines a font family and saves its name in \zf@family. This
family is then used in a typical NFSS \fontfamily declaration, saved in the macro
name specified.
95 \newcommand*\newfontfamily[1]{%
96 \@ifnextchar[{\newfontfamily@i#1}{\newfontfamily@i#1[]}}
34
97 \def\newfontfamily@i#1[#2]#3{%
98 \zf@fontspec{#2}{#3}%
99 \edef\@tempa{%
100 \noexpand\DeclareRobustCommand\noexpand#1
101 {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
102 \@tempa}
\newfontface uses an undocumented feature of the BoldFont feature; if its argu-
ment is empty (i.e., BoldFont={}), then no bold font is searched for.
103 \newcommand*\newfontface[1]{%
104 \@ifnextchar[{\newfontface@i#1}{\newfontface@i#1[]}}
105 \def\newfontface@i#1[#2]#3{%
106 \zf@fontspec{BoldFont={},ItalicFont={},SmallCapsFont={},#2}{#3}%
107 \edef\@tempa{%
108 \noexpand\DeclareRobustCommand\noexpand#1
109 {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
110 \@tempa}
\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
\fontspec command.
The default options are not applied (which is why \zf@default@options is
emptied inside the group; this is allowed as \zf@family is globally defined in
\zf@fontspec), so this means that the only added features to the font are strictly
those specified by this command.
\addfontfeature is defined as an alias, as I found that I often typed this in-
stead when adding only a single font feature.
113 \newcommand*\addfontfeatures[1]{%
114 \begingroup
115 \let\zf@default@options\@empty
116 \edef\@tempa{%
117 \noexpand\zf@fontspec
35
118 {\csname zf@family@options\f@family\endcsname,#1}%
119 {\csname zf@family@fontname\f@family\endcsname}}%
120 \@tempa
121 \endgroup
122 \fontfamily\zf@family\selectfont
123 \ignorespaces}
124 \let\addfontfeature\addfontfeatures
\newAATfeature This command assigns a new AAT feature by its code (#2,#3) to a new name (#1).
Better than \newfontfeature because it checks if the feature exists in the font it’s
being used for.
131 \newcommand*\newAATfeature[4]{%
132 \unless\ifcsname zf@options@#1\endcsname
133 \zf@define@font@feature{#1}%
134 \fi
135 \key@ifundefined[zf]{#1}{#2}{}{%
136 \zf@PackageWarning{Option '#2' of font feature '#1' overwritten.}}%
137 \zf@define@feature@option{#1}{#2}{#3}{#4}{}}
\newICUfeature This command assigns a new OpenType feature by its abbreviation (#2) to a new
name (#1). Better than \newfontfeature because it checks if the feature exists in
the font it’s being used for.
138 \newcommand*\newICUfeature[3]{%
139 \unless\ifcsname zf@options@#1\endcsname
140 \zf@define@font@feature{#1}%
141 \fi
142 \key@ifundefined[zf]{#1}{#2}{}{%
143 \zf@PackageWarning{Option '#2' of font feature '#1' overwritten.}}%
144 \zf@define@feature@option{#1}{#2}{}{}{#3}}
36
\aliasfontfeature User commands for renaming font features and font feature options. Provided
\aliasfontfeatureoption I’ve been consistent, they should work for everything.
145 \newcommand*\aliasfontfeature[2]{\multi@alias@key{#1}{#2}}
146 \newcommand*\aliasfontfeatureoption[3]{\keyval@alias@key[zf@feat]{#1}{#2}{#3}}
\newfontscript Mostly used internally, but also possibly useful for users, to define new Open-
Type ‘scripts’, mapping logical names to OpenType script tags. Iterates though
the scripts in the selected font to check that it’s a valid feature choice, and then
prepends the (XƎTEX) \font feature string with the appropriate script selection
tag.
147 \newcommand*\newfontscript[2]{%
148 \define@key[zf@feat]{Script}{#1}[]{%
149 \zf@check@ot@script{#2}%
150 \if@tempswa
151 \global\c@zf@script\@tempcnta\relax
152 \xdef\zf@script@name{#1}%
153 \xdef\zf@family@long{\zf@family@long+script=#1}%
154 \xdef\zf@pre@ff{script=#2,\zf@pre@ff}%
155 \else
156 \zf@PackageWarning{Font \fontname\zf@basefont does not con-
tain script '#1'}%
157 \fi}}
\newfontlanguage Mostly used internally, but also possibly useful for users, to define new OpenType
‘languages’, mapping logical names to OpenType language tags. Iterates though
the languages in the selected font to check that it’s a valid feature choice, and then
prepends the (XƎTEX) \font feature string with the appropriate language selection
tag.
158 \newcommand*\newfontlanguage[2]{%
159 \define@key[zf@feat]{Lang}{#1}[]{%
160 \zf@check@ot@lang{#2}%
161 \if@tempswa
162 \global\c@zf@language\@tempcnta\relax
163 \xdef\zf@language@name{#1}%
164 \xdef\zf@family@long{\zf@family@long+lang=#1}%
165 \xdef\zf@pre@ff{\zf@pre@ff language=#2,}%
166 \else
167 \zf@PackageWarning{%
168 Font \fontname\zf@basefont does not contain
169 language '#1' for script '\zf@script@name'}%
170 \fi}}
37
font (#2, stored in \zf@fontname globally for the \zf@make@aat@feature@string
macro), it will define an NFSS family for that font and put the family name into
\zf@family.
This macro does its processing inside a group, but it’s a bit worthless coz
there’s all sorts of \global action going on. Pity. Anyway, 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 obfuscating. (E.g., \zf@init and
\zf@set@font@type.)
First off, initialise some bits and pieces and run the preparse feature process-
ing. This catches font features such as Renderer that can change the way subse-
quent features are processed. All font features that ‘slip through’ this stage are
saved in the \zf@font@feat macro for future processing.
171 \newcommand*\zf@fontspec[2]{%
172 \begingroup
173 \zf@init
174 \edef\zf@fontname{#2}%
175 \let\zf@family@long\zf@fontname
176 \setkeys*[zf]{prepreparse}{#1}%
177 \edef\@tempa{\noexpand\setkeys*[zf]{preparse}{\XKV@rm}}\@tempa
178 \let\zf@font@feat\XKV@rm
Now check if the font is to be rendered with ATSUI or ICU. This will either be
automatic (based on the font type), or specified by the user via a font feature. If
automatic, the \zf@suffix macro will still be empty (other suffices that could be
added will be later in the feature processing), and if it is indeed still empty, assign
it a value so that the other weights of the font are specifically loaded with the same
renderer. This fixes a bug in v1.10 for a mishmash of Lucida fonts.
179 \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
180 \unless\ifzf@icu
181 \zf@set@font@type
182 \fi
183 \ifx\zf@suffix\@empty
184 \ifzf@atsui
185 \def\zf@suffix{/AAT}%
186 \else
187 \ifzf@icu
188 \def\zf@suffix{/ICU}%
189 \fi
190 \fi
191 \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
192 \fi
Now convert the remaining requested features to font definition strings. This
is performed with \zf@get@feature@requests, in which \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
38
\setkeys is run more than once (since different font faces may have different fea-
ture names), we only want the complex family name to be built up once, hence
the \zf@firsttime conditionals.
In the future, this will be replaced by a dedicated makefamily xkeyval \setkeys
declaration. Probably.
193 \zf@firsttimetrue
194 \zf@get@feature@requests{\zf@font@feat}%
195 \zf@firsttimefalse
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 sim-
ple NFSS family name for the font we’re selecting.
196 \unless\ifcsname zf@UID@\zf@family@long\endcsname
197 \ifcsname c@zf@famc@#2\endcsname
198 \expandafter\stepcounter\else
199 \expandafter\newcounter\fi
200 {zf@famc@#2}%
201 \def@cx{zf@UID@\zf@family@long}{%
202 \zap@space#2 \@empty
203 (\expandafter\the\csname c@zf@famc@#2\endcsname)}%
204 \fi
205 \xdef\zf@family{\@nameuse{zf@UID@\zf@family@long}}%
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 \addfontfeatures.
206 \unless\ifcsname zf@family@fontname\zf@family\endcsname
207 \zf@PackageInfo{Defining font family for '#2'
208 with options [\zf@default@options #1]}%
209 \gdef@cx{zf@family@fontname\zf@family}{\zf@fontname}%
210 \gdef@cx{zf@family@options\zf@family}{\zf@default@options #1}%
211 \gdef@cx{zf@family@fontdef\zf@family}
212 {\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff}%
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 rede-
fined, the shapes will be selected to fit in with the current state. For example, if
\bfdefault is redefined to b, all bold shapes defined by this package will also be
assigned to b.
The macros \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: (any shape-
specific features are appended to the generic font features requested in the last
argument of \zf@make@font@shapes.)
213 \DeclareFontFamily{\zf@enc}{\zf@family}{}%
214 \zf@make@font@shapes{\zf@fontname}
39
215 {\mddefault}{\updefault}{\zf@font@feat\zf@up@feat}%
Secondly, bold. Again, the extra bold options defined with BoldFeatures are ap-
pended to the generic font features. Then, the bold font is defined either as the
ATS default (\zf@make@font@shapes’ optional argument is to check if there actu-
ally is one; if not, the bold NFSS series is left undefined) or with the font specified
with the BoldFont feature.
216 \unless\ifzf@nobf
217 \ifx\zf@bf\@empty
218 \zf@make@font@shapes[\zf@fontname]{/B}
219 {\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
220 \else
221 \zf@make@font@shapes{\zf@bf}
222 {\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
223 \fi
224 \fi
And italic in the same way:
225 \unless\ifzf@noit
226 \ifx\zf@it\@empty
227 \zf@make@font@shapes[\zf@fontname]{/I}
228 {\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
229 \else
230 \zf@make@font@shapes{\zf@it}
231 {\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
232 \fi
233 \fi
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.
234 \@tempswatrue
235 \ifzf@nobf\@tempswafalse\fi
236 \ifzf@noit\@tempswafalse\fi
237 \if@tempswa
238 \ifx\zf@bfit\@empty
239 \ifx\zf@bf\@empty
240 \ifx\zf@it\@empty
241 \zf@make@font@shapes[\zf@fontname]{/BI}
242 {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
243 \else
244 \zf@make@font@shapes[\zf@it]{/B}
245 {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
246 \fi
247 \else
248 \zf@make@font@shapes[\zf@bf]{/I}
249 {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
40
250 \fi
251 \else
252 \zf@make@font@shapes{\zf@bfit}
253 {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
254 \fi
255 \fi
256 \fi
257 \endgroup}
8.6.1 Fonts
\zf@set@font@type This macro sets \zf@atsui or \zf@icu or \zf@mm booleans accordingly depending
if the font in \zf@basefont is an AAT font or an OpenType font or a font with
feature axes (either AAT or Multiple Master), respectively.
258 \newcommand*\zf@set@font@type{%
259 \zf@tfmfalse \zf@atsuifalse \zf@icufalse \zf@mmfalse
260 \ifcase\XeTeXfonttype\zf@basefont
261 \zf@tfm
262 \or
263 \zf@atsuitrue
264 \ifnum\XeTeXcountvariations\zf@basefont > 0
265 \zf@mmtrue
266 \fi
267 \or
268 \zf@icutrue
269 \fi}
41
276 \fi
277 \font\@tempfontb="\zf@font@wrap{#1#2}\zf@suffix" at \f@size pt
278 \edef\@tempb{\fontname\@tempfontb}%
279 \ifx\@tempa\@tempb
280 \zf@PackageInfo{Could not resolve font #1#2 (it might not exist)}%
281 \else
282 \edef\zf@fontname{#1#2}%
283 \let\zf@basefont\@tempfontb
284 \zf@DeclareFontShape{#3}{#4}{#5}%
Next, the small caps are defined. \zf@make@smallcaps is used to define the appro-
priate 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 italic font, however, the shape parameter is overloaded and we must call italic
small caps by their own identifier. See Section 8.8 on page 64 for the code that
enables this usage.
285 \ifx\zf@sc\@empty
286 \unless\ifzf@nosc
287 \zf@make@smallcaps
288 \unless\ifx\zf@smallcaps\@empty
289 \zf@DeclareFontShape[\zf@smallcaps]{#3}
290 {\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
291 \fi
292 \fi
293 \else
294 \edef\zf@fontname{\zf@sc}%
295 \zf@DeclareFontShape{#3}
296 {\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
297 \fi
298 \fi
299 \endgroup}
Note that the test for italics to choose the \sidefault shape only works while
\zf@fontspec passes single tokens to this macro…
\zf@DeclareFontShape [#1]: Raw appended font feature
#2 : Font series
#3 : Font shape
#4 : Font features
Wrapper for \DeclareFontShape.
300 \newcommand\zf@DeclareFontShape[4][]{%
301 \ifx\zf@size@feat\@empty
302 \zf@get@feature@requests{#4}%
303 \edef\zf@font@str{<->\zf@scale"\zf@font@wrap\zf@fontname\zf@suffix:%
304 \zf@pre@ff\zf@ff#1"}%
305 \else
Default code, above, sets things up for no optical size fonts or features. On the
other hand, loop through SizeFeatures arguments, which are of the form
42
SizeFeatures={{<one>},{<two>},{<three>}}.
306 \@for\zf@this@size:=\zf@size@feat\do{%
307 \let\zf@size\@empty
308 \let\zf@size@fnt\zf@fontname
309 \edef\@tempa{\noexpand
310 \setkeys*[zf]{sizing}{\expandafter\@firstofone\zf@this@size}}%
311 \@tempa
312 \ifx\zf@size\@empty\zf@PackageError
313 {Size information must be supplied}
314 {For example, SizeFeatures={Size={8-12},...},...}%
315 \fi
316 \zf@get@feature@requests{#4,\XKV@rm}%
317 \edef\zf@font@str{\zf@font@str <\zf@size>%
318 \zf@scale"\zf@size@fnt\zf@suffix:\zf@pre@ff\zf@ff#1"}}%
319 \fi
And finally the actual font shape declaration using \zf@font@str defined above.
\zf@adjust is defined in various places to deal with things like the hyphenation
character and interword spacing.
320 \edef\@tempa{\noexpand
321 \DeclareFontShape{\zf@enc}{\zf@family}{#2}{#3}
322 {\zf@font@str}{\zf@adjust}}%
323 \@tempa
This 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. Alternatively, one day I might
just redefine \slshape. Why not, eh?
324 \edef\@tempa{#3}%
325 \edef\@tempb{\itdefault}%
326 \ifx\@tempa\@tempb
327 \edef\@tempa{\noexpand
328 \DeclareFontShape{\zf@enc}{\zf@family}{#1}{\sldefault}
329 {<->sub*\zf@family/#2/\itdefault}{\zf@adjust}}%
330 \@tempa
331 \fi}
\zf@update@family This macro is used to build up a complex family name based on its features.
\zf@firsttime is set true in \zf@fontspec only the first time \f@get@feature@requests
is called, so that the family name is only created once.
332 \newcommand*{\zf@update@family}[1]{%
333 \ifzf@firsttime
334 \xdef\zf@family@long{\zf@family@long#1}%
335 \fi}
43
8.6.2 Features
\zf@get@feature@requests This macro is a wrapper for \setkeys which expands and adds a default specifi-
cation to the original passed options. It begins by initialising the commands used
to hold font-feature specific strings.
336 \newcommand*\zf@get@feature@requests[1]{%
337 \let\zf@ff \@empty
338 \let\zf@scale \@empty
339 \let\zf@adjust \@empty
340 \edef\@tempa{\noexpand\setkeys[zf]{options}{\zf@default@options#1}}%
341 \@tempa}
\zf@make@smallcaps This macro checks if the font contains small caps, and if so creates the string for
accessing them in \zf@smallcaps.
366 \newcommand*\zf@make@smallcaps{%
367 \let\zf@smallcaps\@empty
368 \ifzf@atsui
369 \zf@make@aat@feature@string{3}{3}%
370 \unless\ifx\@tempa\@empty
371 \edef\zf@smallcaps{\@tempa;}%
44
372 \fi
373 \fi
374 \ifzf@icu
375 \zf@check@ot@feat{+smcp}%
376 \if@tempswa
377 \edef\zf@smallcaps{+smcp,}%
378 \fi
379 \fi}
\zf@update@ff \zf@ff is the string used to define the list of specific font features. Each time an-
other 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.
380 \newcommand*\zf@update@ff[1]{%
381 \unless\ifzf@firsttime
382 \xdef\zf@ff{\zf@ff #1\ifzf@icu,\else;\fi}%
383 \fi}
\zf@make@feature This macro is called by each feature key selected, and runs according to which
type of font is selected.
384 \newcommand*\zf@make@feature[3]{%
45
408 for ICU font '\fontname\zf@basefont'}%
409 \else
410 \expandafter\zf@check@ot@feat\expandafter{\@tempa}%
411 \if@tempswa
412 \zf@update@family{#3}%
413 \zf@update@ff{#3}%
414 \else
415 \zf@PackageWarning{%
416 OpenType feature '\XKV@tfam=\XKV@tkey' (#3)
417 not available in font \fontname\zf@basefont, script
418 '\zf@script@name', language '\zf@language@name'}%
419 \fi
420 \fi
421 \fi}
\zf@define@font@feature These macros are used in order to simplify font feature definition later on.
\zf@define@feature@option 422 \newcommand*\zf@define@font@feature[1]{%
423 \define@key[zf]{options}{#1}{{\setkeys[zf@feat]{#1}{##1}}}}
424 \newcommand*\zf@define@feature@option[5]{%
425 \define@key[zf@feat]{#1}{#2}[]{\zf@make@feature{#3}{#4}{#5}}}
\multi@alias@key This macro iterates through families to map one key to another, regardless of
which family it’s contained within.
429 \newcommand*\multi@alias@key[2]{%
430 \key@ifundefined[zf]{preparse}{#1}
431 {\key@ifundefined[zf]{options}{#1}
432 {\zf@PackageError{The feature #1 doesn't appear to be defined}
433 {It looks like you're trying to rename a feature that doesn't exist.}}
434 {\keyval@alias@key[zf]{options}{#1}{#2}}}
435 {\keyval@alias@key[zf]{preparse}{#1}{#2}}}
\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 (see page 44).
436 \newcommand*\zf@make@aat@feature@string[2]{%
437 \edef\@tempa{\XeTeXfeaturename\zf@basefont #1}%
438 \unless\ifx\@tempa\@empty
For exclusive selectors, it’s easy; just grab the string:
439 \ifnum\XeTeXisexclusivefeature\zf@basefont #1>0
440 \edef\@tempb{\XeTeXselectorname\zf@basefont #1 #2}%
46
For non-exclusive selectors, it’s a little more complex. If the selector is even, it
corresponds to switching the feature on:
441 \else
442 \unless\ifodd #2
443 \edef\@tempb{\XeTeXselectorname\zf@basefont #1 #2}%
If the selector is odd, it corresponds to switching the feature off. But XƎTEX doesn’t
return a selector string for this number, since the feature is defined for the ‘switch-
ing on’ value. So we need to check the selector of the previous number, and then
prefix the feature string with ! to denote the switch.
444 \else
445 \edef\@tempb{\XeTeXselectorname\zf@basefont #1 \numexpr#2-1\relax}%
446 \unless\ifx\@tempb\@empty
447 \edef\@tempb{!\@tempb}%
448 \fi
449 \fi
450 \fi
Finally, save out the complete feature string in \@tempa. If the selector doesn’t
exist, re-initialise the feature string to empty.
451 \unless\ifx\@tempb\@empty
452 \edef\@tempa{\@tempa=\@tempb}%
453 \else
454 \let\@tempa\@empty
455 \fi
456 \fi}
\zf@iv@strnum This macro takes a four character string and converts it to the numerical repre-
\zf@v@strnum sentation required for XƎTEX OpenType script/language/feature purposes. The
output is stored in \@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 always
not spaces.) So this macro reads in the string, delimited by a space; this input is
padded with \@emptys and anything beyond four chars is snipped. The \@emptys
then are used to reconstruct the spaces in the string to number calculation.
The variant \zf@v@strnum is used when looking at features, which are passed
around with prepended plus and minus signs (e.g., +liga, -dlig); it simply strips
off the first char of the input before calling the normal \zf@iv@strnum.
It’s probable that all OpenType features 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.
457 \newcommand\zf@iv@strnum[1]{%
458 \zf@iv@strnum@i#1 \@nil}
459 \def\zf@iv@strnum@i#1 \@nil{%
460 \zf@iv@strnum@ii#1\@empty\@empty\@nil}
461 \def\zf@iv@strnum@ii#1#2#3#4#5\@nil{%
47
462 \@tempcnta\z@
463 \@tempcntb`#1\relax
464 \multiply\@tempcntb"1000000\advance\@tempcnta\@tempcntb
465 \@tempcntb`#2
466 \multiply\@tempcntb"10000\advance\@tempcnta\@tempcntb
467 \expandafter\@tempcntb\ifx\@empty#332\else`#3\fi
468 \multiply\@tempcntb"100\advance\@tempcnta\@tempcntb
469 \expandafter\@tempcntb\ifx\@empty#432\else`#4\fi
470 \advance\@tempcnta\@tempcntb}
471 \newcommand\zf@v@strnum[1]{%
472 \expandafter\zf@iv@strnum@i\@gobble#1 \@nil}
TODO: convert to \numexpr
\zf@check@ot@script This macro takes an OpenType script tag and checks if it exists in the current font.
The output boolean is \@tempswatrue. \@tempcnta is used to store the number
corresponding to the script tag string.
473 \newcommand\zf@check@ot@script[1]{%
474 \zf@iv@strnum{#1}%
475 \@tempcntb\XeTeXOTcountscripts\zf@basefont
476 \c@zf@index\z@ \@tempswafalse
477 \loop\ifnum\c@zf@index<\@tempcntb
478 \ifnum\XeTeXOTscripttag\zf@basefont\c@zf@index=\@tempcnta
479 \@tempswatrue
480 \c@zf@index\@tempcntb
481 \else
482 \advance\c@zf@index\@ne
483 \fi
484 \repeat}
\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 \@tempswatrue. \@tempcnta is used to store the
number corresponding to the language tag string. The script used is whatever’s
held in \c@zf@script. By default, that’s the number corresponding to ‘latn’.
485 \newcommand\zf@check@ot@lang[1]{%
486 \zf@iv@strnum{#1}%
487 \@tempcntb\XeTeXOTcountlanguages\zf@basefont\c@zf@script
488 \c@zf@index\z@ \@tempswafalse
489 \loop\ifnum\c@zf@index<\@tempcntb
490 \ifnum\XeTeXOTlanguagetag\zf@basefont\c@zf@script\c@zf@index=\@tempcnta
491 \@tempswatrue
492 \c@zf@index\@tempcntb
493 \else
494 \advance\c@zf@index\@ne
495 \fi
496 \repeat}
48
\zf@check@ot@feat This macro takes an OpenType feature tag and checks if it exists in the cur-
rent font/script/language. The output boolean is \@tempswa. \@tempcnta is used
to store the number corresponding to the feature tag string. The script used is
whatever’s held in \c@zf@script. By default, that’s the number corresponding to
‘latn’. The language used is \c@zf@language, by default 0, the ‘default language’.
497 \newcommand*\zf@check@ot@feat[1]{%
498 \@tempcntb\XeTeXOTcountfeatures\zf@basefont\c@zf@script\c@zf@language
499 \zf@v@strnum{#1}%
500 \c@zf@index\z@ \@tempswafalse
501 \loop\ifnum\c@zf@index<\@tempcntb
502 \ifnum\XeTeXOTfeaturetag\zf@basefont\c@zf@script\c@zf@language\c@zf@index=\@tempcnta
503 \@tempswatrue
504 \c@zf@index\@tempcntb
505 \else
506 \advance\c@zf@index\@ne
507 \fi
508 \repeat}
Renderer 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 avail-
able.
513 \define@choicekey[zf]{preparse}{Renderer}{AAT,ICU}{%
514 \edef\zf@suffix{\zf@suffix/#1}%
515 \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
516 \edef\zf@family@long{\zf@family@long +rend:#1}}
49
OpenType script/language See later for the resolutions from fontspec features
to OpenType definitions.
517 \define@key[zf]{preparse}{Script}{%
518 \zf@icutrue
519 \edef\zf@suffix{\zf@suffix/ICU}%
520 \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
521 \edef\zf@family@long{\zf@family@long +script:#1}%
522 {\setkeys[zf@feat]{Script}{#1}}}
Exactly the same:
523 \define@key[zf]{preparse}{Language}{%
524 \zf@icutrue
525 \edef\zf@suffix{\zf@suffix/ICU}%
526 \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
527 \edef\zf@family@long{\zf@family@long +language:#1}%
528 {\setkeys[zf@feat]{Lang}{#1}}}
Fonts Bold:
529 \define@key[zf]{preparse}{BoldFont}{%
530 \edef\@tempa{#1}%
531 \ifx\@tempa\@empty
532 \zf@nobftrue
533 \edef\zf@family@long{\zf@family@long nobf}%
534 \else
535 \zf@nobffalse
536 \zf@partial@fontname#1\@nil=\zf@bf
537 \edef\zf@family@long{\zf@family@long bf:#1}%
538 \fi}
Same for italic:
539 \define@key[zf]{preparse}{ItalicFont}{%
540 \edef\@tempa{#1}%
541 \ifx\@tempa\@empty
542 \zf@noittrue
543 \edef\zf@family@long{\zf@family@long noit}%
544 \else
545 \zf@noitfalse
546 \zf@partial@fontname#1\@nil=\zf@it
547 \edef\zf@family@long{\zf@family@long it:#1}%
548 \fi}
50
Simpler for bold+italic:
549 \define@key[zf]{preparse}{BoldItalicFont}{%
550 \zf@partial@fontname#1\@nil=\zf@bfit
551 \edef\zf@family@long{\zf@family@long bfit:#1}}
Small caps isn’t pre-parsed because it can vary with others above:
552 \define@key[zf]{options}{SmallCapsFont}{%
553 \edef\@tempa{#1}%
554 \ifx\@tempa\@empty
555 \zf@nosctrue
556 \edef\zf@family@long{\zf@family@long nosc}%
557 \else
558 \zf@noscfalse
559 \zf@partial@fontname#1\@nil=\zf@sc
560 \zf@update@family{sc:\zap@space #1 \@empty}%
561 \fi}
\zf@partial@fontname This macro takes the first token of its input and ends up defining #3 to the name
of the font depending if it’s been specified in full (“Baskerville Semibold”) or
in abbreviation (“* Semibold”).
This could be done more flexibly by making * active; I’ll change it later if I
need to.
562 \def\zf@partial@fontname#1#2\@nil=#3{%
563 \if#1*\relax
564 \edef#3{\zf@fontname#2}%
565 \else
566 \edef#3{#1#2}%
567 \fi}
Features
568 \define@key[zf]{preparse}{UprightFeatures}{%
569 \def\zf@up@feat{,#1}%
570 \edef\zf@family@long{\zf@family@long rmfeat:#1}}
571 \define@key[zf]{preparse}{BoldFeatures}{%
572 \def\zf@bf@feat{,#1}%
573 \edef\zf@family@long{\zf@family@long bffeat:#1}}
574 \define@key[zf]{preparse}{ItalicFeatures}{%
575 \def\zf@it@feat{,#1}%
576 \edef\zf@family@long{\zf@family@long itfeat:#1}}
577 \define@key[zf]{preparse}{BoldItalicFeatures}{%
578 \def\zf@bfit@feat{,#1}%
579 \edef\zf@family@long{\zf@family@long bfitfeat:#1}}
Note that small caps features can vary by shape, so these in fact aren’t pre-parsed.
580 \define@key[zf]{options}{SmallCapsFeatures}{%
581 \unless\ifzf@firsttime\def\zf@sc@feat{,#1}\fi
582 \zf@update@family{scfeat:\zap@space #1 \@empty}}
51
paragraphFeatures varying by size
583 \define@key[zf]{preparse}{SizeFeatures}{%
584 \unless\ifzf@firsttime\def\zf@size@feat{#1}\fi
585 \zf@update@family{sizefeat:\zap@space #1 \@empty}}
586 \define@key[zf]{sizing}{Size}{\def\zf@size{#1}}
587 \define@key[zf]{sizing}{Font}{\def\zf@size@fnt{#1}}
Scale If the input isn’t one of the pre-defined string options, then it’s gotta be
numerical. \zf@calc@scale does all the work in the auto-scaling cases.
588 \define@key[zf]{options}{Scale}{%
589 \edef\@tempa{#1}%
590 \edef\@tempb{MatchLowercase}%
591 \ifx\@tempa\@tempb
592 \zf@calc@scale{5}%
593 \else
594 \edef\@tempb{MatchUppercase}%
595 \ifx\@tempa\@tempb
596 \zf@calc@scale{8}%
597 \else
598 \edef\zf@scale{#1}%
599 \fi
600 \fi
601 \zf@update@family{+scale:\zf@scale}%
602 \edef\zf@scale{s*[\zf@scale]}}
\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 XƎTEX).
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.
603 \newcommand\zf@calc@scale[1]{%
604 \begingroup
605 \rmfamily
606 \setlength\@tempdima{\fontdimen#1\font}%
607 \setlength\@tempdimb{\fontdimen#1\zf@basefont}%
608 \setlength\@tempdimc{1pt*\ratio{\@tempdima}{\@tempdimb}}%
609 \xdef\zf@scale{\strip@pt\@tempdimc}%
610 \zf@PackageInfo{\zf@fontname\space scale = \zf@scale}%
611 \endgroup}
52
Inter-word space These options set the relevant \fontdimens for the font being
loaded.
612 \define@key[zf]{options}{WordSpace}{%
613 \zf@update@family{+wordspace:#1}%
614 \unless\ifzf@firsttime
615 \zf@wordspace@parse#1,\zf@@ii,\zf@@iii,\zf@@
616 \fi}
\zf@wordspace@parse This macro determines if the input to WordSpace is of the form {X} or {X,Y,Z} and
executes the font scaling. If the former input, it executes {X,X,X}.
617 \def\zf@wordspace@parse#1,#2,#3,#4\zf@@{%
618 \def\@tempa{#4}%
619 \ifx\@tempa\@empty
620 \setlength\@tempdima{#1\fontdimen2\zf@basefont}%
621 \@tempdimb\@tempdima
622 \@tempdimc\@tempdima
623 \else
624 \setlength\@tempdima{#1\fontdimen2\zf@basefont}%
625 \setlength\@tempdimb{#2\fontdimen3\zf@basefont}%
626 \setlength\@tempdimc{#3\fontdimen4\zf@basefont}%
627 \fi
628 \edef\zf@adjust{\zf@adjust
629 \fontdimen2\font\the\@tempdima
630 \fontdimen3\font\the\@tempdimb
631 \fontdimen4\font\the\@tempdimc}}
Letterspacing
636 \define@key[zf]{options}{LetterSpace}{%
637 \zf@update@family{+tracking:#1}%
638 \zf@update@ff{letterspace=#1}}
Hyphenation character This feature takes one of three arguments: ‘None’, hglyphi,
or hsloti. If the input isn’t the first, and it’s one character, then it’s the second; oth-
erwise, it’s the third.
639 \define@key[zf]{options}{HyphenChar}{%
640 \zf@update@family{+hyphenchar:#1}%
641 \edef\@tempa{#1}%
642 \edef\@tempb{None}%
53
643 \ifx\@tempa\@tempb
644 \g@addto@macro\zf@adjust{\hyphenchar\font-1\relax}%
645 \else
646 \zf@check@one@char#1\zf@@
647 \ifx\@tempb\@empty
648 {\zf@basefont\expandafter\ifnum\expandafter\XeTeXcharglyph\expandafter`#1 > 0
649 \g@addto@macro\zf@adjust{%
650 {\expandafter\hyphenchar\expandafter
651 \font\expandafter`#1}}%
652 \else
653 \zf@PackageError
654 {\fontname\zf@basefont\space doesn't appear to have the glyph cor-
responding to #1.}
655 {You can't hyphenate with a character that's not available!}
656 \fi}%
657 \else
658 {\zf@basefont\ifnum\XeTeXcharglyph#1 > 0
659 \g@addto@macro\zf@adjust{\hyphenchar\font#1\relax}%
660 \else
661 \zf@PackageError
662 {\fontname\zf@basefont\space doesn't appear to have the glyph cor-
responding to #1.}
663 {You can't hyphenate with a character that's not available!}%
664 \fi}%
665 \fi
666 \fi}
667 \def\zf@check@one@char#1#2\zf@@{\def\@tempb{#2}}
Colour
668 \define@key[zf]{options}{Colour}{%
669 \zf@update@family{+col:#1}%
670 \zf@update@ff{color=#1}}
671 \keyval@alias@key[zf]{options}{Colour}{Color}
Mapping
672 \define@key[zf]{options}{Mapping}{%
673 \zf@update@family{+map:#1}%
674 \zf@update@ff{mapping=#1}}
54
680 \zf@update@ff{width=#1}}
681 \define@key[zf]{options}{OpticalSize}{%
682 \ifzf@icu
683 \edef\zf@suffix{\zf@suffix/S=#1}%
684 \zf@update@family{+size:#1}%
685 \fi
686 \ifzf@mm
687 \zf@update@family{+size:#1}%
688 \zf@update@ff{optical size=#1}%
689 \fi
690 \ifzf@icu\else
691 \ifzf@mm\else
692 \ifzf@firsttime
693 \zf@PackageWarning
694 {\fontname\zf@basefont\space doesn't appear to have an Opti-
cal Size axis}%
695 \fi
696 \fi
697 \fi}
8.7.5 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 liga-
tures.
698 \zf@define@font@feature{Ligatures}
699 \zf@define@feature@option{Ligatures}{Required} {1}{0}{+rlig}
700 \zf@define@feature@option{Ligatures}{NoRequired} {1}{1}{-rlig}
701 \zf@define@feature@option{Ligatures}{Common} {1}{2}{+liga}
702 \zf@define@feature@option{Ligatures}{NoCommon} {1}{3}{-liga}
703 \zf@define@feature@option{Ligatures}{Rare} {1}{4}{+dlig}
704 \zf@define@feature@option{Ligatures}{NoRare} {1}{5}{-dlig}
705 \zf@define@feature@option{Ligatures}{Discretionary} {1}{4}{+dlig}
706 \zf@define@feature@option{Ligatures}{NoDiscretionary}{1}{5}{-dlig}
707 \zf@define@feature@option{Ligatures}{Contextual} {}{} {+clig}
708 \zf@define@feature@option{Ligatures}{NoContextual} {}{} {-clig}
709 \zf@define@feature@option{Ligatures}{Historical} {}{} {+hlig}
710 \zf@define@feature@option{Ligatures}{NoHistorical} {}{} {-hlig}
711 \zf@define@feature@option{Ligatures}{Logos} {1}{6} {}
712 \zf@define@feature@option{Ligatures}{NoLogos} {1}{7} {}
713 \zf@define@feature@option{Ligatures}{Rebus} {1}{8} {}
714 \zf@define@feature@option{Ligatures}{NoRebus} {1}{9} {}
715 \zf@define@feature@option{Ligatures}{Diphthong} {1}{10}{}
716 \zf@define@feature@option{Ligatures}{NoDiphthong} {1}{11}{}
717 \zf@define@feature@option{Ligatures}{Squared} {1}{12}{}
718 \zf@define@feature@option{Ligatures}{NoSquared} {1}{13}{}
719 \zf@define@feature@option{Ligatures}{AbbrevSquared} {1}{14}{}
55
720 \zf@define@feature@option{Ligatures}{NoAbbrevSquared}{1}{15}{}
721 \zf@define@feature@option{Ligatures}{Icelandic} {1}{32}{}
722 \zf@define@feature@option{Ligatures}{NoIcelandic} {1}{33}{}
8.7.6 Letters
723 \zf@define@font@feature{Letters}
724 \zf@define@feature@option{Letters}{Normal} {3}{0}{}
725 \zf@define@feature@option{Letters}{Uppercase} {3}{1}{+case}
726 \zf@define@feature@option{Letters}{Lowercase} {3}{2}{}
727 \zf@define@feature@option{Letters}{SmallCaps} {3}{3}{+smcp}
728 \zf@define@feature@option{Letters}{PetiteCaps} {} {} {+pcap}
729 \zf@define@feature@option{Letters}{UppercaseSmallCaps} {} {} {+c2sc}
730 \zf@define@feature@option{Letters}{UppercasePetiteCaps}{} {} {+c2pc}
731 \zf@define@feature@option{Letters}{InitialCaps} {3}{4}{}
732 \zf@define@feature@option{Letters}{Unicase} {} {} {+unic}
8.7.7 Numbers
These were originally separated into NumberCase and NumberSpacing following
AAT, but it makes more sense to combine them.
Both naming conventions are offered to select the number case.
733 \zf@define@font@feature{Numbers}
734 \zf@define@feature@option{Numbers}{Monospaced} {6} {0}{+tnum}
735 \zf@define@feature@option{Numbers}{Proportional} {6} {1}{+pnum}
736 \zf@define@feature@option{Numbers}{Lowercase} {21}{0}{+onum}
737 \zf@define@feature@option{Numbers}{OldStyle} {21}{0}{+onum}
738 \zf@define@feature@option{Numbers}{Uppercase} {21}{1}{+lnum}
739 \zf@define@feature@option{Numbers}{Lining} {21}{1}{+lnum}
740 \zf@define@feature@option{Numbers}{SlashedZero} {14}{5}{+zero}
741 \zf@define@feature@option{Numbers}{NoSlashedZero}{14}{4}{-zero}
8.7.8 Contextuals
742 \zf@define@font@feature {Contextuals}
743 \zf@define@feature@option{Contextuals}{Swash} {} {} {+cswh}
744 \zf@define@feature@option{Contextuals}{NoSwash} {} {} {-cswh}
745 \zf@define@feature@option{Contextuals}{WordInitial} {8}{0}{+init}
746 \zf@define@feature@option{Contextuals}{NoWordInitial}{8}{1}{-init}
747 \zf@define@feature@option{Contextuals}{WordFinal} {8}{2}{+fina}
748 \zf@define@feature@option{Contextuals}{NoWordFinal} {8}{3}{-fina}
749 \zf@define@feature@option{Contextuals}{LineInitial} {8}{4}{}
750 \zf@define@feature@option{Contextuals}{NoLineInitial}{8}{5}{}
751 \zf@define@feature@option{Contextuals}{LineFinal} {8}{6}{+falt}
752 \zf@define@feature@option{Contextuals}{NoLineFinal} {8}{7}{-falt}
753 \zf@define@feature@option{Contextuals}{Inner} {8}{8}{+medi}
754 \zf@define@feature@option{Contextuals}{NoInner} {8}{9}{-medi}
56
8.7.9 Diacritics
755 \zf@define@font@feature{Diacritics}
756 \zf@define@feature@option{Diacritics}{Show} {9}{0}{}
757 \zf@define@feature@option{Diacritics}{Hide} {9}{1}{}
758 \zf@define@feature@option{Diacritics}{Decompose}{9}{2}{}
8.7.10 Kerning
759 \zf@define@font@feature{Kerning}
760 \zf@define@feature@option{Kerning}{Uppercase}{}{}{+cpsp}
761 \zf@define@feature@option{Kerning}{On} {}{}{+kern}
762 \zf@define@feature@option{Kerning}{Off} {}{}{-kern}
763 %\zf@define@feature@option{Kerning}{Vertical}{}{}{+vkrn}
764 %\zf@define@feature@option{Kerning}{VerticalAlternateProportional}{}{}{+vpal}
765 %\zf@define@feature@option{Kerning}{VerticalAlternateHalfWidth} {}{}{+vhal}
8.7.12 Fractions
774 \zf@define@font@feature{Fractions}
775 \zf@define@feature@option{Fractions}{On} {11}{1}{+frac}
776 \zf@define@feature@option{Fractions}{Off} {11}{0}{-frac}
777 \zf@define@feature@option{Fractions}{Diagonal} {11}{2}{}
778 \zf@define@feature@option{Fractions}{Alternate}{} {} {+afrc}
57
789 \zf@make@feature{18}{#1}{+ss\two@digits{#1}}%
790 \fi}
8.7.14 Style
791 \zf@define@font@feature{Style}
792 \zf@define@feature@option{Style}{Alternate} {} {} {+salt}
793 \zf@define@feature@option{Style}{Italic} {32}{2}{+ital}
794 \zf@define@feature@option{Style}{Ruby} {28}{2}{+ruby}
795 \zf@define@feature@option{Style}{Swash} {} {} {+swsh}
796 \zf@define@feature@option{Style}{Historic} {} {} {+hist}
797 \zf@define@feature@option{Style}{Display} {19}{1}{}
798 \zf@define@feature@option{Style}{Engraved} {19}{2}{}
799 \zf@define@feature@option{Style}{TitlingCaps} {19}{4}{+titl}
800 \zf@define@feature@option{Style}{TallCaps} {19}{5}{}
801 \zf@define@feature@option{Style}{HorizontalKana}{} {} {+hkna}
802 \zf@define@feature@option{Style}{VerticalKana} {} {} {+vkna}
8.7.17 Annotation
820 \zf@define@font@feature{Annotation}
821 \zf@define@feature@option{Annotation}{Off}{24}{0}{-nalt}
822 \zf@define@feature@option{Annotation}{On}{}{}{+nalt}
823 \zf@define@feature@option{Annotation}{Box}{24}{1}{}
824 \zf@define@feature@option{Annotation}{RoundedBox}{24}{2}{}
825 \zf@define@feature@option{Annotation}{Circle}{24}{3}{}
826 \zf@define@feature@option{Annotation}{BlackCircle}{24}{4}{}
58
827 \zf@define@feature@option{Annotation}{Parenthesis}{24}{5}{}
828 \zf@define@feature@option{Annotation}{Period}{24}{6}{}
829 \zf@define@feature@option{Annotation}{RomanNumerals}{24}{7}{}
830 \zf@define@feature@option{Annotation}{Diamond}{24}{8}{}
831 \zf@define@feature@option{Annotation}{BlackSquare}{24}{9}{}
832 \zf@define@feature@option{Annotation}{BlackRoundSquare}{24}{10}{}
833 \zf@define@feature@option{Annotation}{DoubleCircle}{24}{11}{}
8.7.18 Vertical
834 \zf@define@font@feature{Vertical}
835 \define@key[zf@feat]{Vertical}{RotatedGlyphs}[]{%
836 \ifzf@icu
837 \zf@make@feature{}{}{+vrt2}%
838 \else
839 \zf@update@family{+vert}%
840 \zf@update@ff{vertical}%
841 \fi}
8.7.19 Script
842 \newfontscript{Arabic}{arab} \newfontscript{Armenian}{armn}
843 \newfontscript{Balinese}{bali} \newfontscript{Bengali}{beng}
844 \newfontscript{Bopomofo}{bopo} \newfontscript{Braille}{brai}
845 \newfontscript{Buginese}{bugi} \newfontscript{Buhid}{buhd}
846 \newfontscript{Byzantine Music}{byzm} \newfontscript{Canadian Syllab-
ics}{cans}
847 \newfontscript{Cherokee}{cher}
848 \newfontscript{CJK Ideographic}{hani} \newfontscript{Coptic}{copt}
849 \newfontscript{Cypriot Syllabary}{cprt} \newfontscript{Cyrillic}{cyrl}
850 \newfontscript{Default}{DFLT} \newfontscript{Deseret}{dsrt}
851 \newfontscript{Devanagari}{deva} \newfontscript{Ethiopic}{ethi}
852 \newfontscript{Georgian}{geor} \newfontscript{Glagolitic}{glag}
853 \newfontscript{Gothic}{goth} \newfontscript{Greek}{grek}
854 \newfontscript{Gujarati}{gujr} \newfontscript{Gurmukhi}{guru}
855 \newfontscript{Hangul Jamo}{jamo} \newfontscript{Hangul}{hang}
856 \newfontscript{Hanunoo}{hano} \newfontscript{Hebrew}{hebr}
857 \newfontscript{Hiragana and Katakana}{kana}
858 \newfontscript{Javanese}{java} \newfontscript{Kannada}{knda}
859 \newfontscript{Kharosthi}{khar} \newfontscript{Khmer}{khmr}
860 \newfontscript{Lao}{lao } \newfontscript{Latin}{latn}
861 \newfontscript{Limbu}{limb} \newfontscript{Linear B}{linb}
862 \newfontscript{Malayalam}{mlym} \newfontscript{Math}{math}
863 \newfontscript{Mongolian}{mong}
864 \newfontscript{Musical Symbols}{musc} \newfontscript{Myanmar}{mymr}
865 \newfontscript{N'ko}{nko } \newfontscript{Ogham}{ogam}
866 \newfontscript{Old Italic}{ital} \newfontscript{Old Persian Cuneiform}{xpeo}
867 \newfontscript{Oriya}{orya} \newfontscript{Osmanya}{osma}
868 \newfontscript{Phags-pa}{phag} \newfontscript{Phoenician}{phnx}
59
869 \newfontscript{Runic}{runr} \newfontscript{Shavian}{shaw}
870 \newfontscript{Sinhala}{sinh} \newfontscript{Sumero-Akkadian Cuneiform}{xsux}
871 \newfontscript{Syloti Nagri}{sylo} \newfontscript{Syriac}{syrc}
872 \newfontscript{Tagalog}{tglg} \newfontscript{Tagbanwa}{tagb}
873 \newfontscript{Tai Le}{tale} \newfontscript{Tai Lu}{talu}
874 \newfontscript{Tamil}{taml} \newfontscript{Telugu}{telu}
875 \newfontscript{Thaana}{thaa} \newfontscript{Thai}{thai}
876 \newfontscript{Tibetan}{tibt} \newfontscript{Tifinagh}{tfng}
877 \newfontscript{Ugaritic Cuneiform}{ugar}\newfontscript{Yi}{yi }
8.7.20 Language
878 \newfontlanguage{Abaza}{ABA}\newfontlanguage{Abkhazian}{ABK}\newfontlanguage{Adyghe}{ADY}
879 \newfontlanguage{Afrikaans}{AFK}\newfontlanguage{Afar}{AFR}\newfontlanguage{Agaw}{AGW}
880 \newfontlanguage{Altai}{ALT}\newfontlanguage{Amharic}{AMH}\newfontlanguage{Arabic}{ARA}
881 \newfontlanguage{Aari}{ARI}\newfontlanguage{Arakanese}{ARK}\newfontlanguage{Assamese}{ASM}
882 \newfontlanguage{Athapaskan}{ATH}\newfontlanguage{Avar}{AVR}\newfontlanguage{Awadhi}{AWA}
883 \newfontlanguage{Aymara}{AYM}\newfontlanguage{Azeri}{AZE}\newfontlanguage{Badaga}{BAD}
884 \newfontlanguage{Baghelkhandi}{BAG}\newfontlanguage{Balkar}{BAL}\newfontlanguage{Baule}{BAU}
885 \newfontlanguage{Berber}{BBR}\newfontlanguage{Bench}{BCH}\newfontlanguage{Bible Cree}{BCR}
886 \newfontlanguage{Belarussian}{BEL}\newfontlanguage{Bemba}{BEM}\newfontlanguage{Bengali}{BEN}
887 \newfontlanguage{Bulgarian}{BGR}\newfontlanguage{Bhili}{BHI}\newfontlanguage{Bhojpuri}{BHO}
888 \newfontlanguage{Bikol}{BIK}\newfontlanguage{Bilen}{BIL}\newfontlanguage{Blackfoot}{BKF}
889 \newfontlanguage{Balochi}{BLI}\newfontlanguage{Balante}{BLN}\newfontlanguage{Balti}{BLT}
890 \newfontlanguage{Bambara}{BMB}\newfontlanguage{Bamileke}{BML}\newfontlanguage{Breton}{BRE}
891 \newfontlanguage{Brahui}{BRH}\newfontlanguage{Braj Bhasha}{BRI}\newfontlanguage{Burmese}{BRM}
892 \newfontlanguage{Bashkir}{BSH}\newfontlanguage{Beti}{BTI}\newfontlanguage{Catalan}{CAT}
893 \newfontlanguage{Cebuano}{CEB}\newfontlanguage{Chechen}{CHE}\newfontlanguage{Chaha Gurage}{CHG
894 \newfontlanguage{Chattisgarhi}{CHH}\newfontlanguage{Chichewa}{CHI}\newfontlanguage{Chukchi}{C
895 \newfontlanguage{Chipewyan}{CHP}\newfontlanguage{Cherokee}{CHR}\newfontlanguage{Chuvash}{CHU}
896 \newfontlanguage{Comorian}{CMR}\newfontlanguage{Coptic}{COP}\newfontlanguage{Cree}{CRE}
897 \newfontlanguage{Carrier}{CRR}\newfontlanguage{Crimean Tatar}{CRT}\newfontlanguage{Church Slav
898 \newfontlanguage{Czech}{CSY}\newfontlanguage{Danish}{DAN}\newfontlanguage{Dargwa}{DAR}
899 \newfontlanguage{Woods Cree}{DCR}\newfontlanguage{German}{DEU}\newfontlanguage{Default}{DFLT}
900 \newfontlanguage{Dogri}{DGR}\newfontlanguage{Divehi}{DIV}\newfontlanguage{Djerma}{DJR}
901 \newfontlanguage{Dangme}{DNG}\newfontlanguage{Dinka}{DNK}\newfontlanguage{Dungan}{DUN}
902 \newfontlanguage{Dzongkha}{DZN}\newfontlanguage{Ebira}{EBI}\newfontlanguage{Eastern Cree}{ECR}
903 \newfontlanguage{Edo}{EDO}\newfontlanguage{Efik}{EFI}\newfontlanguage{Greek}{ELL}
904 \newfontlanguage{English}{ENG}\newfontlanguage{Erzya}{ERZ}\newfontlanguage{Spanish}{ESP}
905 \newfontlanguage{Estonian}{ETI}\newfontlanguage{Basque}{EUQ}\newfontlanguage{Evenki}{EVK}
906 \newfontlanguage{Even}{EVN}\newfontlanguage{Ewe}{EWE}\newfontlanguage{French An-
tillean}{FAN}
907 \newfontlanguage{Farsi}{FAR}\newfontlanguage{Finnish}{FIN}\newfontlanguage{Fijian}{FJI}
908 \newfontlanguage{Flemish}{FLE}\newfontlanguage{Forest Nenets}{FNE}\newfontlanguage{Fon}{FON}
909 \newfontlanguage{Faroese}{FOS}\newfontlanguage{French}{FRA}\newfontlanguage{Frisian}{FRI}
910 \newfontlanguage{Friulian}{FRL}\newfontlanguage{Futa}{FTA}\newfontlanguage{Fulani}{FUL}
911 \newfontlanguage{Ga}{GAD}\newfontlanguage{Gaelic}{GAE}\newfontlanguage{Gagauz}{GAG}
912 \newfontlanguage{Galician}{GAL}\newfontlanguage{Garshuni}{GAR}\newfontlanguage{Garhwali}{GAW}
60
913 \newfontlanguage{Ge'ez}{GEZ}\newfontlanguage{Gilyak}{GIL}\newfontlanguage{Gumuz}{GMZ}
914 \newfontlanguage{Gondi}{GON}\newfontlanguage{Greenlandic}{GRN}\newfontlanguage{Garo}{GRO}
915 \newfontlanguage{Guarani}{GUA}\newfontlanguage{Gujarati}{GUJ}\newfontlanguage{Haitian}{HAI}
916 \newfontlanguage{Halam}{HAL}\newfontlanguage{Harauti}{HAR}\newfontlanguage{Hausa}{HAU}
917 \newfontlanguage{Hawaiin}{HAW}\newfontlanguage{Hammer-Banna}{HBN}\newfontlanguage{Hiligaynon}
918 \newfontlanguage{Hindi}{HIN}\newfontlanguage{High Mari}{HMA}\newfontlanguage{Hindko}{HND}
919 \newfontlanguage{Ho}{HO}\newfontlanguage{Harari}{HRI}\newfontlanguage{Croatian}{HRV}
920 \newfontlanguage{Hungarian}{HUN}\newfontlanguage{Armenian}{HYE}\newfontlanguage{Igbo}{IBO}
921 \newfontlanguage{Ijo}{IJO}\newfontlanguage{Ilokano}{ILO}\newfontlanguage{Indonesian}{IND}
922 \newfontlanguage{Ingush}{ING}\newfontlanguage{Inuktitut}{INU}\newfontlanguage{Irish}{IRI}
923 \newfontlanguage{Irish Traditional}{IRT}\newfontlanguage{Icelandic}{ISL}\newfontlanguage{Inari
924 \newfontlanguage{Italian}{ITA}\newfontlanguage{Hebrew}{IWR}\newfontlanguage{Javanese}{JAV}
925 \newfontlanguage{Yiddish}{JII}\newfontlanguage{Japanese}{JAN}\newfontlanguage{Judezmo}{JUD}
926 \newfontlanguage{Jula}{JUL}\newfontlanguage{Kabardian}{KAB}\newfontlanguage{Kachchi}{KAC}
927 \newfontlanguage{Kalenjin}{KAL}\newfontlanguage{Kannada}{KAN}\newfontlanguage{Karachay}{KAR}
928 \newfontlanguage{Georgian}{KAT}\newfontlanguage{Kazakh}{KAZ}\newfontlanguage{Kebena}{KEB}
929 \newfontlanguage{Khutsuri Georgian}{KGE}\newfontlanguage{Khakass}{KHA}\newfontlanguage{Khanty-
Kazim}{KHK}
930 \newfontlanguage{Khmer}{KHM}\newfontlanguage{Khanty-Shurishkar}{KHS}\newfontlanguage{Khanty-
Vakhi}{KHV}
931 \newfontlanguage{Khowar}{KHW}\newfontlanguage{Kikuyu}{KIK}\newfontlanguage{Kirghiz}{KIR}
932 \newfontlanguage{Kisii}{KIS}\newfontlanguage{Kokni}{KKN}\newfontlanguage{Kalmyk}{KLM}
933 \newfontlanguage{Kamba}{KMB}\newfontlanguage{Kumaoni}{KMN}\newfontlanguage{Komo}{KMO}
934 \newfontlanguage{Komso}{KMS}\newfontlanguage{Kanuri}{KNR}\newfontlanguage{Kodagu}{KOD}
935 \newfontlanguage{Korean Old Hangul}{KOH}\newfontlanguage{Konkani}{KOK}\newfontlanguage{Kikongo
936 \newfontlanguage{Komi-Permyak}{KOP}\newfontlanguage{Korean}{KOR}\newfontlanguage{Komi-
Zyrian}{KOZ}
937 \newfontlanguage{Kpelle}{KPL}\newfontlanguage{Krio}{KRI}\newfontlanguage{Karakalpak}{KRK}
938 \newfontlanguage{Karelian}{KRL}\newfontlanguage{Karaim}{KRM}\newfontlanguage{Karen}{KRN}
939 \newfontlanguage{Koorete}{KRT}\newfontlanguage{Kashmiri}{KSH}\newfontlanguage{Khasi}{KSI}
940 \newfontlanguage{Kildin Sami}{KSM}\newfontlanguage{Kui}{KUI}\newfontlanguage{Kulvi}{KUL}
941 \newfontlanguage{Kumyk}{KUM}\newfontlanguage{Kurdish}{KUR}\newfontlanguage{Kurukh}{KUU}
942 \newfontlanguage{Kuy}{KUY}\newfontlanguage{Koryak}{KYK}\newfontlanguage{Ladin}{LAD}
943 \newfontlanguage{Lahuli}{LAH}\newfontlanguage{Lak}{LAK}\newfontlanguage{Lambani}{LAM}
944 \newfontlanguage{Lao}{LAO}\newfontlanguage{Latin}{LAT}\newfontlanguage{Laz}{LAZ}
945 \newfontlanguage{L-Cree}{LCR}\newfontlanguage{Ladakhi}{LDK}\newfontlanguage{Lezgi}{LEZ}
946 \newfontlanguage{Lingala}{LIN}\newfontlanguage{Low Mari}{LMA}\newfontlanguage{Limbu}{LMB}
947 \newfontlanguage{Lomwe}{LMW}\newfontlanguage{Lower Sorbian}{LSB}\newfontlanguage{Lule Sami}{LS
948 \newfontlanguage{Lithuanian}{LTH}\newfontlanguage{Luba}{LUB}\newfontlanguage{Luganda}{LUG}
949 \newfontlanguage{Luhya}{LUH}\newfontlanguage{Luo}{LUO}\newfontlanguage{Latvian}{LVI}
950 \newfontlanguage{Majang}{MAJ}\newfontlanguage{Makua}{MAK}\newfontlanguage{Malayalam Tra-
ditional}{MAL}
951 \newfontlanguage{Mansi}{MAN}\newfontlanguage{Marathi}{MAR}\newfontlanguage{Marwari}{MAW}
952 \newfontlanguage{Mbundu}{MBN}\newfontlanguage{Manchu}{MCH}\newfontlanguage{Moose Cree}{MCR}
953 \newfontlanguage{Mende}{MDE}\newfontlanguage{Me'en}{MEN}\newfontlanguage{Mizo}{MIZ}
954 \newfontlanguage{Macedonian}{MKD}\newfontlanguage{Male}{MLE}\newfontlanguage{Malagasy}{MLG}
955 \newfontlanguage{Malinke}{MLN}\newfontlanguage{Malayalam Reformed}{MLR}\newfontlanguage{Malay}
61
956 \newfontlanguage{Mandinka}{MND}\newfontlanguage{Mongolian}{MNG}\newfontlanguage{Manipuri}{MNI
957 \newfontlanguage{Maninka}{MNK}\newfontlanguage{Manx Gaelic}{MNX}\newfontlanguage{Moksha}{MOK}
958 \newfontlanguage{Moldavian}{MOL}\newfontlanguage{Mon}{MON}\newfontlanguage{Moroccan}{MOR}
959 \newfontlanguage{Maori}{MRI} \newfontlanguage{Maithili}{MTH} \newfontlanguage{Maltese}{MTS}
960 \newfontlanguage{Mundari}{MUN} \newfontlanguage{Naga-Assamese}{NAG} \new-
fontlanguage{Nanai}{NAN}
961 \newfontlanguage{Naskapi}{NAS} \newfontlanguage{N-Cree}{NCR} \newfontlanguage{Ndebele}{NDB}
962 \newfontlanguage{Ndonga}{NDG} \newfontlanguage{Nepali}{NEP} \newfontlanguage{Newari}{NEW}
963 \newfontlanguage{Nagari}{NGR} \newfontlanguage{Norway House Cree}{NHC} \new-
fontlanguage{Nisi}{NIS}
964 \newfontlanguage{Niuean}{NIU} \newfontlanguage{Nkole}{NKL} \newfontlanguage{N'ko}{NKO}
965 \newfontlanguage{Dutch}{NLD} \newfontlanguage{Nogai}{NOG} \newfontlanguage{Norwegian}{NOR}
966 \newfontlanguage{Northern Sami}{NSM} \newfontlanguage{Northern Tai}{NTA} \new-
fontlanguage{Esperanto}{NTO}
967 \newfontlanguage{Nynorsk}{NYN} \newfontlanguage{Oji-Cree}{OCR} \newfont-
language{Ojibway}{OJB}
968 \newfontlanguage{Oriya}{ORI} \newfontlanguage{Oromo}{ORO} \newfontlanguage{Ossetian}{OSS}
969 \newfontlanguage{Palestinian Aramaic}{PAA} \newfontlanguage{Pali}{PAL} \new-
fontlanguage{Punjabi}{PAN}
970 \newfontlanguage{Palpa}{PAP} \newfontlanguage{Pashto}{PAS} \newfontlanguage{Polytonic Greek}{P
971 \newfontlanguage{Pilipino}{PIL} \newfontlanguage{Palaung}{PLG} \newfont-
language{Polish}{PLK}
972 \newfontlanguage{Provencal}{PRO} \newfontlanguage{Portuguese}{PTG} \new-
fontlanguage{Chin}{QIN}
973 \newfontlanguage{Rajasthani}{RAJ} \newfontlanguage{R-Cree}{RCR} \newfont-
language{Russian Buriat}{RBU}
974 \newfontlanguage{Riang}{RIA} \newfontlanguage{Rhaeto-Romanic}{RMS} \new-
fontlanguage{Romanian}{ROM}
975 \newfontlanguage{Romany}{ROY} \newfontlanguage{Rusyn}{RSY} \newfontlanguage{Ruanda}{RUA}
976 \newfontlanguage{Russian}{RUS} \newfontlanguage{Sadri}{SAD} \newfontlanguage{Sanskrit}{SAN}
977 \newfontlanguage{Santali}{SAT} \newfontlanguage{Sayisi}{SAY} \newfontlanguage{Sekota}{SEK}
978 \newfontlanguage{Selkup}{SEL} \newfontlanguage{Sango}{SGO} \newfontlanguage{Shan}{SHN}
979 \newfontlanguage{Sibe}{SIB} \newfontlanguage{Sidamo}{SID} \newfontlanguage{Silte Gurage}{SIG}
980 \newfontlanguage{Skolt Sami}{SKS} \newfontlanguage{Slovak}{SKY} \newfont-
language{Slavey}{SLA}
981 \newfontlanguage{Slovenian}{SLV} \newfontlanguage{Somali}{SML} \newfont-
language{Samoan}{SMO}
982 \newfontlanguage{Sena}{SNA} \newfontlanguage{Sindhi}{SND} \newfontlanguage{Sinhalese}{SNH}
983 \newfontlanguage{Soninke}{SNK} \newfontlanguage{Sodo Gurage}{SOG} \new-
fontlanguage{Sotho}{SOT}
984 \newfontlanguage{Albanian}{SQI} \newfontlanguage{Serbian}{SRB} \newfont-
language{Saraiki}{SRK}
985 \newfontlanguage{Serer}{SRR} \newfontlanguage{South Slavey}{SSL} \newfont-
language{Southern Sami}{SSM}
986 \newfontlanguage{Suri}{SUR} \newfontlanguage{Svan}{SVA} \newfontlanguage{Swedish}{SVE}
987 \newfontlanguage{Swadaya Aramaic}{SWA} \newfontlanguage{Swahili}{SWK} \new-
fontlanguage{Swazi}{SWZ}
62
988 \newfontlanguage{Sutu}{SXT} \newfontlanguage{Syriac}{SYR} \newfontlanguage{Tabasaran}{TAB}
989 \newfontlanguage{Tajiki}{TAJ} \newfontlanguage{Tamil}{TAM} \newfontlanguage{Tatar}{TAT}
990 \newfontlanguage{TH-Cree}{TCR} \newfontlanguage{Telugu}{TEL} \newfontlanguage{Tongan}{TGN}
991 \newfontlanguage{Tigre}{TGR} \newfontlanguage{Tigrinya}{TGY} \newfontlanguage{Thai}{THA}
992 \newfontlanguage{Tahitian}{THT} \newfontlanguage{Tibetan}{TIB} \newfont-
language{Turkmen}{TKM}
993 \newfontlanguage{Temne}{TMN} \newfontlanguage{Tswana}{TNA} \newfontlanguage{Tundra Nenets}{TNE
994 \newfontlanguage{Tonga}{TNG} \newfontlanguage{Todo}{TOD}
995 \newfontlanguage{Tsonga}{TSG} \newfontlanguage{Turoyo Aramaic}{TUA} \new-
fontlanguage{Tulu}{TUL}
996 \newfontlanguage{Tuvin}{TUV} \newfontlanguage{Twi}{TWI} \newfontlanguage{Udmurt}{UDM}
997 \newfontlanguage{Ukrainian}{UKR} \newfontlanguage{Urdu}{URD} \newfontlanguage{Upper Sor-
bian}{USB}
998 \newfontlanguage{Uyghur}{UYG} \newfontlanguage{Uzbek}{UZB} \newfontlanguage{Venda}{VEN}
999 \newfontlanguage{Vietnamese}{VIT} \newfontlanguage{Wa}{WA} \newfontlanguage{Wagdi}{WAG}
1000 \newfontlanguage{West-Cree}{WCR} \newfontlanguage{Welsh}{WEL} \newfontlanguage{Wolof}{WLF}
1001 \newfontlanguage{Tai Lue}{XBD} \newfontlanguage{Xhosa}{XHS} \newfontlanguage{Yakut}{YAK}
1002 \newfontlanguage{Yoruba}{YBA} \newfontlanguage{Y-Cree}{YCR} \newfontlanguage{Yi Clas-
sic}{YIC}
1003 \newfontlanguage{Yi Modern}{YIM} \newfontlanguage{Chinese Hong Kong}{ZHH}
1004 \newfontlanguage{Chinese Phonetic}{ZHP} \newfontlanguage{Chinese Simpli-
fied}{ZHS}
1005 \newfontlanguage{Chinese Traditional}{ZHT} \newfontlanguage{Zande}{ZND} \new-
fontlanguage{Zulu}{ZUL}
Turkish Turns out that many fonts use ‘TUR’ as their Turkish language tag
rather than the specified ‘TRK’. So we check for both:
1006 \define@key[zf@feat]{Lang}{Turkish}[]{%
1007 \zf@check@ot@lang{TRK}%
1008 \if@tempswa
1009 \c@zf@language\@tempcnta\relax
1010 \xdef\zf@language@name{Turkish}%
1011 \xdef\zf@family@long{\zf@family@long+lang=Turkish}%
1012 \xdef\zf@pre@ff{\zf@pre@ff language=TRK,}%
1013 \else
1014 \zf@check@ot@lang{TUR}%
1015 \if@tempswa
1016 \c@zf@language\@tempcnta\relax
1017 \xdef\zf@language@name{Turkish}%
1018 \xdef\zf@family@long{\zf@family@long+lang=Turkish}%
1019 \xdef\zf@pre@ff{\zf@pre@ff language=TUR,}%
1020 \else
1021 \zf@PackageWarning{Font \fontname\zf@basefont does not contain
1022 language '#1' for script '\zf@script@name'}%
1023 \fi
1024 \fi}
63
8.7.21 Raw feature string
This allows savvy XƎTEX-ers to input font features manually if they have already
memorised the OpenType abbreviations and don’t mind not having error check-
ing.
1025 \define@key[zf]{options}{RawFeature}{%
1026 \zf@update@family{+Raw:#1}%
1027 \zf@update@ff{#1}}
\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.
1033 \newcommand*{\zf@merge@shape}[3]{%
1034 \edef\@tempa{#1}%
1035 \edef\@tempb{#2}%
1036 \ifx\f@shape\@tempb
1037 \ifcsname\f@encoding/\f@family/\f@series/#3\endcsname
1038 \edef\@tempa{#3}%
1039 \fi
1040 \fi
1041 \fontshape{\@tempa}\selectfont}
\itshape Here the original \..shape commands are redefined to use the merge shape
\scshape macro.
\upshape 1042 \DeclareRobustCommand{\itshape}{%
1043 \not@math@alphabet\itshape\mathit
1044 \zf@merge@shape\itdefault\scdefault\sidefault}
1045 \DeclareRobustCommand{\slshape}{%
1046 \not@math@alphabet\slshape\relax
1047 \zf@merge@shape\sldefault\scdefault\sidefault}
64
1048 \DeclareRobustCommand{\scshape}{%
1049 \not@math@alphabet\scshape\relax
1050 \zf@merge@shape\scdefault\itdefault\sidefault}
1051 \DeclareRobustCommand{\upshape}{%
1052 \not@math@alphabet\upshape\relax
1053 \zf@merge@shape\updefault\sidefault\scdefault}
65
legacy 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 operators font,
which is generally the main text font. (Actually, there is a \hat accent in Euler-
Fractur, but it’s ugly. So I ignore it. Sorry if this causes inconvenience.)
1072 \DeclareSymbolFont{legacymaths}{OT1}{cmr}{m}{n}
1073 \SetSymbolFont{legacymaths}{bold}{OT1}{cmr}{bx}{n}
1074 \DeclareMathAccent{\acute} {\mathalpha}{legacymaths}{19}
1075 \DeclareMathAccent{\grave} {\mathalpha}{legacymaths}{18}
1076 \DeclareMathAccent{\ddot} {\mathalpha}{legacymaths}{127}
1077 \DeclareMathAccent{\tilde} {\mathalpha}{legacymaths}{126}
1078 \DeclareMathAccent{\bar} {\mathalpha}{legacymaths}{22}
1079 \DeclareMathAccent{\breve} {\mathalpha}{legacymaths}{21}
1080 \DeclareMathAccent{\check} {\mathalpha}{legacymaths}{20}
1081 \DeclareMathAccent{\hat} {\mathalpha}{legacymaths}{94} % too bad, euler
1082 \DeclareMathAccent{\dot} {\mathalpha}{legacymaths}{95}
1083 \DeclareMathAccent{\mathring}{\mathalpha}{legacymaths}{23}
\colon: what’s going on? Okay, so : and \colon in maths mode are defined in
a few places, so I need to work out what does what. Respectively, we have:
% 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}
(3A16 = 5810 ) So I think, based on this summary, that it is fair to tell fontspec to
‘replace’ the operators font with legacymaths for this symbol, except when ams-
math is loaded since we want to keep its definition.
1084 \begingroup
1085 \mathchardef\@tempa="603A %
1086 \let\next\egroup
66
1087 \ifx\colon\@tempa
1088 \DeclareMathSymbol{\colon}{\mathpunct}{legacymaths}{58}
1089 \fi
1090 \endgroup
The following symbols are only defined specifically in euler, so skip them if that
package is loaded.
1091 \ifzf@math@euler\else
1092 \DeclareMathSymbol{!}{\mathclose}{legacymaths}{33}
1093 \DeclareMathSymbol{:}{\mathrel} {legacymaths}{58}
1094 \DeclareMathSymbol{;}{\mathpunct}{legacymaths}{59}
1095 \DeclareMathSymbol{?}{\mathclose}{legacymaths}{63}
And these ones are defined both in euler and lucbmath, so we only need to run
this code if no extra maths package has been loaded.
1096 \ifzf@math@lucida\else
1097 \DeclareMathSymbol{0}{\mathalpha}{legacymaths}{`0}
1098 \DeclareMathSymbol{1}{\mathalpha}{legacymaths}{`1}
1099 \DeclareMathSymbol{2}{\mathalpha}{legacymaths}{`2}
1100 \DeclareMathSymbol{3}{\mathalpha}{legacymaths}{`3}
1101 \DeclareMathSymbol{4}{\mathalpha}{legacymaths}{`4}
1102 \DeclareMathSymbol{5}{\mathalpha}{legacymaths}{`5}
1103 \DeclareMathSymbol{6}{\mathalpha}{legacymaths}{`6}
1104 \DeclareMathSymbol{7}{\mathalpha}{legacymaths}{`7}
1105 \DeclareMathSymbol{8}{\mathalpha}{legacymaths}{`8}
1106 \DeclareMathSymbol{9}{\mathalpha}{legacymaths}{`9}
1107 \DeclareMathSymbol{\Gamma}{\mathalpha}{legacymaths}{0}
1108 \DeclareMathSymbol{\Delta}{\mathalpha}{legacymaths}{1}
1109 \DeclareMathSymbol{\Theta}{\mathalpha}{legacymaths}{2}
1110 \DeclareMathSymbol{\Lambda}{\mathalpha}{legacymaths}{3}
1111 \DeclareMathSymbol{\Xi}{\mathalpha}{legacymaths}{4}
1112 \DeclareMathSymbol{\Pi}{\mathalpha}{legacymaths}{5}
1113 \DeclareMathSymbol{\Sigma}{\mathalpha}{legacymaths}{6}
1114 \DeclareMathSymbol{\Upsilon}{\mathalpha}{legacymaths}{7}
1115 \DeclareMathSymbol{\Phi}{\mathalpha}{legacymaths}{8}
1116 \DeclareMathSymbol{\Psi}{\mathalpha}{legacymaths}{9}
1117 \DeclareMathSymbol{\Omega}{\mathalpha}{legacymaths}{10}
1118 \DeclareMathSymbol{+}{\mathbin}{legacymaths}{43}
1119 \DeclareMathSymbol{=}{\mathrel}{legacymaths}{61}
1120 \DeclareMathDelimiter{(}{\mathopen} {legacymaths}{40}{largesymbols}{0}
1121 \DeclareMathDelimiter{)}{\mathclose}{legacymaths}{41}{largesymbols}{1}
1122 \DeclareMathDelimiter{[}{\mathopen} {legacymaths}{91}{largesymbols}{2}
1123 \DeclareMathDelimiter{]}{\mathclose}{legacymaths}{93}{largesymbols}{3}
1124 \DeclareMathDelimiter{/}{\mathord}{legacymaths}{47}{largesymbols}{14}
1125 \DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{36}
1126 \fi
1127 \fi
67
Finally, we change the font definitions for \mathrm and so on. These are defined
using the \zf@rmmaths (…) macros, which default to \rmdefault but may be spec-
ified with the \setmathrm (…) commands in the preamble.
Since LATEX only generally defines one level of boldness, we omit \mathbf in
the bold maths series. It can be specified as per usual with \setboldmathrm, which
stores the appropriate family name in \zf@rmboldmaths.
1128 \DeclareSymbolFont{operators}\zf@enc\zf@rmmaths\mddefault\updefault
1129 \SetSymbolFont{operators}{normal}\zf@enc\zf@rmmaths\mddefault\updefault
1130 \SetMathAlphabet\mathrm{normal}\zf@enc\zf@rmmaths\mddefault\updefault
1131 \SetMathAlphabet\mathit{normal}\zf@enc\zf@rmmaths\mddefault\itdefault
1132 \SetMathAlphabet\mathbf{normal}\zf@enc\zf@rmmaths\bfdefault\updefault
1133 \SetMathAlphabet\mathsf{normal}\zf@enc\zf@sfmaths\mddefault\updefault
1134 \SetMathAlphabet\mathtt{normal}\zf@enc\zf@ttmaths\mddefault\updefault
1135 \SetSymbolFont{operators}{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
1136 \ifdefined\zf@rmboldmaths
1137 \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmboldmaths\mddefault\updefault
1138 \SetMathAlphabet\mathbf{bold}\zf@enc\zf@rmboldmaths\bfdefault\updefault
1139 \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmboldmaths\mddefault\itdefault
1140 \else
1141 \SetMathAlphabet\mathrm{bold}\zf@enc\zf@rmmaths\bfdefault\updefault
1142 \SetMathAlphabet\mathit{bold}\zf@enc\zf@rmmaths\bfdefault\itdefault
1143 \fi
1144 \SetMathAlphabet\mathsf{bold}\zf@enc\zf@sfmaths\bfdefault\updefault
1145 \SetMathAlphabet\mathtt{bold}\zf@enc\zf@ttmaths\bfdefault\updefault
1146 \let\font@warning\zf@font@warning}
\zf@math@maybe We’re a little less sophisticated about not executing the \zf@maths macro if var-
ious other maths font packages are loaded. This list is based on the wonder-
ful ‘LATEXFont Catalogue’: http://www.tug.dk/FontCatalogue/mathfonts.html.
I’m sure there are more I’ve missed. Do the TEX Gyre fonts have maths support
yet?
Untested: would \unless\ifnum\Gamma=28672\relax\@zf@mathfalse\fi be
a better test? This needs more cooperation with euler and lucida, I think.
1147 \def\zf@math@maybe{%
1148 \@ifpackageloaded{anttor}{\ifx\define@antt@mathversions a\@zf@mathfalse\fi}{}
1149 \@ifpackageloaded{arev}{\@zf@mathfalse}{}
1150 \@ifpackageloaded{eulervm}{\@zf@mathfalse}{}
1151 \@ifpackageloaded{mathdesign}{\@zf@mathfalse}{}
1152 \@ifpackageloaded{concmath}{\@zf@mathfalse}{}
1153 \@ifpackageloaded{cmbright}{\@zf@mathfalse}{}
1154 \@ifpackageloaded{mathesf}{\@zf@mathfalse}{}
1155 \@ifpackageloaded{gfsartemisia}{\@zf@mathfalse}{}
1156 \@ifpackageloaded{gfsneohellenic}{\@zf@mathfalse}{}
1157 \@ifpackageloaded{iwona}{\ifx\define@iwona@mathversions a\@zf@mathfalse\fi}{}
1158 \@ifpackageloaded{kpfonts}{\@zf@mathfalse}{}
1159 \@ifpackageloaded{kmath}{\@zf@mathfalse}{}
68
1160 \@ifpackageloaded{kurier}{\ifx\define@kurier@mathversions a\@zf@mathfalse\fi}{}
1161 \@ifpackageloaded{fouriernc}{\@zf@mathfalse}{}
1162 \@ifpackageloaded{fourier}{\@zf@mathfalse}{}
1163 \@ifpackageloaded{mathpazo}{\@zf@mathfalse}{}
1164 \@ifpackageloaded{mathptmx}{\@zf@mathfalse}{}
1165 \@ifpackageloaded{unicode-math}{\@zf@mathfalse}{}
1166 \if@zf@math
1167 \zf@PackageWarning{Adjusting the maths setup^^J (use [no-
math] to avoid this)}
1168 \zf@math
1169 \fi}
1170 \AtBeginDocument{\zf@math@maybe}
8.10 Finishing up
Now we just want to set up loading the .cfg file, if it exists.
1171 \if@zf@configfile
1172 \InputIfFileExists{fontspec.cfg}
1173 {\typeout{fontspec.cfg loaded.}}
1174 {\typeout{No fontspec.cfg file found; no configuration loaded.}}
1175 \fi
69
File II
fontspec.cfg
As an example, and to avoid upsetting people as much as possible, I’m populating
the default fontspec.cfg file with backwards compatibility feature aliases.
1
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %%% FOR BACKWARDS COMPATIBILITY WITH PREVIOUS VERSIONS %%%
4
5 \let\newfontinstance\newfontfamily
6
7 \newcommand\newfeaturecode[3]{%
8 \define@key{zf}{#1}[]{\zf@make@feature{#2}{#3}{}}}
9
10 \aliasfontfeature{BoldFont}{Bold}
11 \aliasfontfeature{ItalicFont}{Italic}
12 \aliasfontfeature{BoldItalicFont}{BoldItalic}
13 \aliasfontfeature{SmallCapsFont}{SmallCaps}
14 \aliasfontfeature{Style}{StyleOptions}
15 \aliasfontfeature{Contextuals}{Swashes}
16 \aliasfontfeatureoption{Contextuals}{Swash}{Contextual}
17 \aliasfontfeatureoption{Letters}{UppercaseSmallCaps}{SMALLCAPS}
18 \aliasfontfeatureoption{Letters}{UppercasePetiteCaps}{PETITECAPS}
19
20 %%%%%%%%%%%%%%%%%%%%%%%
21 %%% FOR CONVENIENCE %%%
22
23 \newfontscript{Kana}{kana}
24 \newfontscript{Maths}{math}
25 \newfontscript{CJK}{hani}
26
File III
fontspec-example.ltx
1 \documentclass{article}
2
3 \usepackage{euler}
4 \usepackage[cm-default]{fontspec}
5 \usepackage{xltxtra}
6
7 \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
8 \setmainfont[Numbers=Lowercase]{FPL Neu}
70
9 \setsansfont{Lucida Sans}
10 \setmonofont{Lucida Sans Typewriter}
11
12 \frenchspacing % TeX's default is a little old-fashioned...
13
14 \begin{document}
15 \pagestyle{empty}
16
17 \section*{The basics of the \textsf{fontspec} package}
18
19 The \textsf{fontspec} package enables automatic font selection for \La-
TeX{} documents typeset with \XeTeX{}. The basic command is\\
20 \indent \verb|\fontspec[font features]{font display name}|.\\
21 As an example:
22
23 \begin{center}
24 \Large
25 \fontspec[
26 Colour = 0000CC,
27 Numbers = OldStyle,
28 VerticalPosition = Ordinal,
29 Variant = 2
30 ]{Apple Chancery}
31 My 1st example of Apple Chancery
32 \end{center}
33
34 The default, sans serif, and typewriter fonts may be set with the \verb|\setmainfont|, \verb|\sets
mands, respectively, as shown in the preamble. They take the same syn-
tax as the \verb|\fontspec| package. All expected font shapes are available:
35
36 \begin{center}
37 {\itshape Italics and \scshape small caps\dots}\\
38 {\sffamily\bfseries Bold sans serif and \itshape bold italic sans serif\dots}
39 \end{center}
40
41 With the roman and sans serif fonts set in the preamble, text fonts in math mode are also changed: $
face `Euler' has been used in this document (with the \textsf{euler} pack-
age---or the \textsf{eulervm} package if the |xpdfdvimx| driver is be-
ing used), since the default Computer Modern maths font is rather light.
42 \[
43 \mathcal F(s) = \int^\infty_0 f(t) \exp(-st)\,\mathrm{d}t
44 \]
45
46 You'll also notice the \verb|\defaultfontfeatures| command in the pream-
ble. This command takes a single argument of font features that are then ap-
plied to every subsequent instance of font selection. The first argu-
ment in this case, \verb|Mapping=tex-text|, enables regular \TeX{} liga-
71
tures like \verb|``---''| for ``---''. The second automatically scales the fonts to the same x-
height.
47
48 Please see the documentation for font feature explanation and further pack-
age niceties.
49
50 \end{document}
72
Change History
v1.0
General: Initial version. 31
v1.1
General: Name change to fontspec. 31
\setmainfont: Implemented (with friends). 34
v1.10
General: Color brought back into the .sty 54
New feature LetterSpace. 53
Some babel encoding problems resolved. 33
\addfontfeatures: Saved family information macro changes. 36
\AtBeginDocument: Added lucimatx checking. (Not really tested, though.) 65
Fixed Lucida bug (missing \else) 65
\zf@fontspec: Saved family info split into two (now three) macros. 41
Space zapped from LATEX family name due to various problems. 41
\zf@make@feature: Removed embarrassing space after warnings. 46
v1.11
General: HyphenChar checks its input now. 53
Added better support for Turkish language selection. 64
Ensure bold/italic fonts are loaded with the same renderer as the regular
font even if unspecified. 41
OpenType Variant fixed. 57
\emph: Redefinitions moved to xltxtra. 65
\newfontface: Name change from \newfontfamily. 35
\newfontlanguage: Fixed \c@zf@language setting not being global. 37
\newfontscript: Fixed \c@zf@script setting not being global. 37
\zf@wordspace@parse: Improved saving \fontdimen stuff to \zd@adjust(also
see PunctuationSpace). 53
v1.12
General: BoldFont, etc., flags \zf@nobf conditional false rather than assum-
ing it implicitly. This allows, e.g., empty BoldFont to be overloaded. 50
Finally, use the EU1 font encoding. 33
New feature ExternalLocation for loading external fonts. 49
Package option for disabling the EU1 encoding. 32
\addfontfeatures: Now use grouping to restore \zf@default@option change.36
\zf@make@aat@feature@string: Fixed result of \XeTeXfeaturename output
change (empty string if odd non-exclusive selector). 47
Removed \@thisfontfeature macro; replaced with \@tempa. 47
v1.13
General: RawFeature added 64
SizeFeatures: Beginnings of support for different font features for differ-
ent font sizes, required by unimath. 52
\zf@DeclareFontShape: New feature SizeFeatures implemented. 43
\zf@make@feature: Warns (and fixes bug) when an AAT feature is requested
for an ICU font and vice versa. 46
73
\zf@partial@fontname: Folded in the \@tempa \let command, changing the
syntax. 51
v1.2
General: Initial OpenType support. 31
Support for Scale. 52
v1.3
General: More OpenType support. 31
Support for Mapping and Colour. 54
\defaultfontfeatures: Implemented. 35
\newAATfeature: Implemented. 36
\newfontfeature: Implemented. 36
v1.3a
General: Bug fix for OpenType small caps. 56
v1.4
General: Support for Weight and Width AAT features. 54
\AtBeginDocument: Selects the default \mathXX fonts. 65
\defaultfontfeatures: Name changed from \setdefaultoptions. 35
v1.5
General: New options for arbitrary bold/italic shapes. 50
\addfontfeatures: Implemented. 36
\zf@fontspec: Added code for choosing arbitrary bold/italic fonts. 41
Checks if the font family has already been defined. 41
NFSS specifiers now take the default values. 41
\zf@make@font@shapes: Absorbed font-checking from \zf@fontspec. 42
v1.5a
\AtBeginDocument: Added fix for Computer Modern maths. 65
v1.6
General: Bold option aliased to BoldFont. 50
LetterCase is now Letters and options changed appropriately. 56
Scale feature now updates family name. 52
All AAT Fractions features offered. 57
New OpenType feature: Language 60
New OpenType feature: Script 59
OpenType letters features: PetiteCaps and PETITECAPS. 56
OpenType ligature features: Contextual and Historical. 55
OpenType stylistic sets supports under the Variant option. 57
\addfontfeatures: Removed \relaxing of temporary macros. 36
\AtBeginDocument: Removed mathtime support since XeTeX doesn’t handle
virtual fonts. Why did I put it in in the first place? 65
\fontspec: Removed \zf@currfont (unnecessary) 33
\newfontface: Implemented. 35
\newfontfeature: newff counter now uses LaTeX methods rather than prim-
itive TeX. I don’t know if there is any advantage to this. 36
\setmainfont: Changed \rmdefault, etc., assigning to use \let directly. 34
\zf@fontspec: Added code for choosing arbitrary bold/italic font features. 41
Writes some info to the .log file 41
74
\zf@get@feature@requests: Removed the space between the comma and
\zf@options when it’s concatenated with the defaults. 44
v1.7
General: Style feature renamed from StyleOptions. 58
AAT Numbers:SlashedZero. 56
New feature: Annotation 58
New feature: CharacterShape 58
New feature: CharacterWidth 58
New feature: OpticalSize; works with both OpenType and MM fonts. 54
OpenType Alternate Fractions feature. 57
OpenType Alternate now only AAT. 57
Removed AAT check for weight/width axes (could also be Multiple Master)54
\zf@define@feature@option: Implemented for the bulk of the feature pro-
cessing code. 46
\zf@fontspec: Optional argument now mandatory. 41
\zf@make@aat@feature@string: Changed some \edefs to \let 47
Removed third argument; always saves the feature string in \zf@thisfontfeature47
\zf@make@feature: Accommodation of the \zf@thisfontfeature change. 46
\zf@make@font@shapes: Changed some \edefs to \let. 42
Support for the OpticalSize feature. 42
\zf@make@smallcaps: Accommodation of the \zf@thisfontfeature change. 45
\zf@set@font@type: Added ‘MM’ font type; tests true, e.g., with Skia & Min-
ion MM. Used with the OpticalSize feature. 41
Removed exclusivity from font type (AAT, OpenType) check, since fonts
can be both. 41
Removed various \count255s. 41
\zf@update@ff: Fix for featureless fonts (e.g., the MS fonts) being ignored. 45
v1.8
\AtBeginDocument: Added support for user-specified \mathrm and others. 65
Finally fixed legacy maths font issues. Also checks that euler.sty is loaded
in the right order. 65
\setmathrm: Implemented (with friends). 34
v1.8a
\AtBeginDocument: Added conditional to \colon math symbol (incompati-
bility with lucida and amsmath) 65
v1.9
General: CharacterShape now CJKShape 58
SMALLCAPS option changed to UppercaseSmallCaps to facilitate option
normalisation (to come). Similarly for PETITECAPS. 56
Swashes feature changed to Contextuals. Option of this feature Contex-
tual changed to Swash, for obvious reasons. 56
TextSpacing now CharacterWidth, with associated option names’ change.58
Alternate/Variant options can be assigned names. 57
New Scale options: MatchLowercase and MatchUppercase. 52
New feature HyphenChar. 53
New feature Kerning. 57
New feature PunctuationSpace. 53
75
New feature UprightFeatures. 50
New feature Vertical. 59
New feature WordSpace. 53
New features SmallCapsFont and SmallCapsFeatures. 50
Package options (no)config, quiet implemented. 68
\addfontfeatures: Added \ignorespaces to make it invisible. 36
Changed \fontspec call to \@fontspec so that \ignorespaces isn’t called
unnecessarily. 36
\aliasfontfeature: Implemented. 37
\aliasfontfeatureoption: Implemented. 37
\AtBeginDocument: Maths hex numbers converted to decimal. 65
Suppresses harmless maths font encoding warnings. 68
\emph: Redefined \em in order for nested emphases to work. 65
\fontspec: Added \ignorespaces to make it invisible. 33
\keyval@alias@key: Implemented. 46
\multi@alias@key: Implemented for \aliasfontfeature. 46
\newAATfeature: Replacement for \newfeaturecode. 36
\newfontlanguage: Implemented. 37
\newfontscript: Implemented. 37
\newICUfeature: Implemented. 36
\zf@calc@scale: Implemented for auto-scaling options. 53
\zf@check@ot@feat: Implemented. 49
\zf@check@ot@lang: Implemented. 48
\zf@check@ot@script: Implemented. 48
\zf@DeclareFontShape: Implemented as wrapper for \DeclareFontShape. 43
Slanted/italic shape substitution implemented. 43
\zf@fontspec: Absorbed the comma into \zf@..@options as to be more ef-
ficient when they are not defined. 41
Abstracted the long family name so the NFSS family is simple. 41
Incorporated \zf@get@feature@requests argument change. 41
Incorporated \zf@make@font@shapes change; removed \zf@options stor-
age macro. 41
\zf@get@feature@requests: Absorbed comma into \zf@default@options,
making \zf@current@options redundant. 44
Added an argument to eliminate the \zf@options macro. 44
Removed init stuff. 44
\zf@init: Taken from \zf@get@feature@requests. 44
\zf@make@feature: Now checks for OpenType feature. 46
\zf@make@font@shapes: \zf@scale@str eliminated. 42
Absorbed \IfEqFonts. 42
Added argument for \zf@get@feature@requests change. 42
Added code for SmallCaps... features. 42
Added logging of /B, /I, /BI failure. 42
Changed input syntax. 42
Incorporated \sidefault test into the \DeclareFontShape argument di-
rectly now that it’s fully expanded. 42
Made local to hide \zf@fontname changes. 42
76
Removed \zf@scshape macro. 42
Removed \nfss@catcodes wrapper. 42
\zf@make@smallcaps: Now uses \zf@check@ot@feat. 45
\zf@partial@fontname: Implemented. 51
\zf@update@family: Now fully expands arguments. 43
\zf@update@ff: Removed ridiculous \zf@feature@separator code. 45
\zf@v@strnum: Implemented. 48
\zf@wordspace@parse: Implemented. 53
77
Index
Numbers written in italic refer to the page where the corresponding entry is de-
scribed; numbers underlined refer to the code line of the definition; numbers in
roman refer to the code lines where the entry is used.
78
D 439, 448, 462, 464, 476, 488, 500,
\ddot . . . . . . . . . . . . . . . . . . . . . . . 1073 529, 539, 552, 560, 590, 594, 620,
\DeclareFontFamily . . . . . . . . . . . . . 208 642, 649, 654, 657, 687, 688, 835,
\DeclareFontShape . . . . . . . . . 316, 323 1010, 1017, 1059, 1088, 1093, 1137
\DeclareMathAccent . . . . . . . . 1071–1080 \em . . . . . . . . . . . . . . . . . . . . . . . . 1051
\DeclareMathDelimiter . . . . . 1117–1121 \emph . . . . . . . . . . . . . . . . . . . . . . . 1051
\DeclareMathSymbol . . . . . . . . . . . . . \encodingdefault . . . . . . . . . . . . . . 47
. 1085, 1089–1092, 1094–1116, 1122 \end . . . . . . . . . . . . . . . . . . . . 32, 39, 50
\DeclareOption . . . . . . . . . . . . . . 30–34 \endcsname . . . . 26, 27, 29, 114, 115,
\DeclareRobustCommand . . . . . . . . . . 125, 128, 135, 191, 192, 198, 201, 1034
96, 104, 1026, 1039, 1042, 1045, 1048 \endgroup . . . . . 117, 252, 294, 608, 1087
\DeclareSymbolFont . . . . . . . . 1069, 1125 \ExecuteOptions . . . . . . . . . . . . . . . 35
\DeclareTextFontCommand . . . . . . . 1029 \exp . . . . . . . . . . . . . . . . . . . . . . . . . 43
\def . . . . . . . . . 42, 46, 88–90, 93, 101, \expandafter 26, 27, 29, 193, 194, 198,
107, 180, 183, 357, 359, 381, 454, 305, 405, 462, 464, 467, 645, 647, 648
456, 557, 564, 567, 570, 573, 576,
F
580, 583, 584, 614, 615, 664, 779, 785
\f@encoding . . . . . . . . . . . . . . . . . . 1034
\def@cx . . . . . . . . . . . . . . . . 26, 123, 196
\f@family . . . . . . . . . . . . 114, 115, 1034
\defaultfontfeatures . . . . . 7, 8, 46, 107
\f@series . . . . . . . . . . . . . . . . . . . 1034
\define@choicekey . . . . . . . . . . . . . 508
\f@shape . . . . . . . . . . . . . . . . . . . . 1033
\define@key . . . . . . . . . . . . . . . . . . . \f@size . . 174, 186, 269, 272, 510, 515, 521
. 8, 124, 144, 155, 418, 420, 504, \fi . . 48, 130, 137, 153, 165, 177, 184,
512, 518, 524, 534, 544, 547, 563, 185, 187, 194, 199, 218, 219, 227,
566, 569, 572, 575, 578, 583–585, 228, 230, 231, 241, 245, 249–251,
609, 629, 633, 636, 665, 669, 672, 261, 264, 271, 285–287, 291–293,
675, 678, 776, 782, 832, 1003, 1022 310, 314, 326, 330, 367, 368, 373,
\Delta . . . . . . . . . . . . . . . . . . . . . . 1105 374, 377, 378, 395–397, 414–416,
\do . . . . . . . . . . . . . . . . . . . . . . . . . 301 443–445, 450, 451, 462, 464, 478,
\document . . . . . . . . . . . . . . . . . . . . 52 490, 502, 533, 543, 556, 562,
\documentclass . . . . . . . . . . . . . . . . . 1 576, 581, 596, 597, 613, 624, 653,
\dot . . . . . . . . . . . . . . . . . . . . . . . . 1079 661–663, 682, 686, 692–694, 781,
\dots . . . . . . . . . . . . . . . . . . . . . . 37, 38 787, 838, 1020, 1021, 1036, 1037,
1065, 1086, 1123, 1124, 1140, 1148
E \font . . . . 174, 186, 269, 272, 510, 515,
\edef . . . . . 26, 95, 103, 112, 169, 172, 521, 603, 626–628, 632, 641, 648, 656
267, 270, 273, 277, 289, 298, 304, \font@warning . . . . . . . . . . . . . . . . 1143
312, 315, 319, 320, 322, 335, 366, \fontdimen . . . . . . . . . . . . . . . 603,
372, 399, 432, 435, 438, 440, 442, 604, 617, 621–623, 626–628, 631, 632
447, 509, 511, 514, 516, 520, 522, \fontfamily . . . . . . . . . . 57, 97, 105, 118
525, 528, 532, 535, 538, 542, 546, \fontname . . . . . . 152, 163, 270, 273,
548, 551, 559, 561, 565, 568, 571, 385, 391, 403, 412, 651, 659, 691, 1018
574, 586, 587, 591, 595, 599, 625, \fontshape . . . . . . . . . . . . . . 1028, 1038
632, 638, 639, 680, 1031, 1032, 1035 \fontspec . . . . . . . . . . . 4, 20, 25, 34, 55
\egroup . . . . . . . . . . . . . . . . . . . . . 1083 \frenchspacing . . . . . . . . . . . . . . . . 12
\else . 45, 151, 162, 181, 193, 215, 224,
238, 242, 246, 276, 285, 288, 291, G
300, 377, 386, 392, 404, 409, 436, \g@addto@macro . . . . . . 52, 641, 646, 656
79
\Gamma . . . . . . . . . . . . . . . . . . . . . . 1104 \itdefault . . . . . . . . . . . . . . . 223,
\gdef . . . . . . . . . . . . . . . . . . . . . . . . 507 226, 237, 240, 244, 248, 285, 291,
\gdef@cx . . . . . . . . . . . . . . . 26, 204–206 320, 324, 1041, 1047, 1128, 1136, 1139
\global . . . . . . . . . . . . . . . . . . 147, 158 \itshape . . . . . . . . . . . . . . . 37, 38, 1039
\grave . . . . . . . . . . . . . . . . . . . . . . 1072
K
H \key@ifundefined . . . . 131, 138, 425, 426
\hat . . . . . . . . . . . . . . . . . . . . . . . . 1078 \keyval@alias@key 142, 421, 429, 430, 668
\hyphenchar . . . . . . . . . . . . 641, 647, 656
L
I \Lambda . . . . . . . . . . . . . . . . . . . . . 1107
\if . . . . . . . . . . . . . . . . . . . . . . . . . 558 \Large . . . . . . . . . . . . . . . . . . . . . . . 24
\if@tempswa . . . . . . . . . . . . . . . . . . . \LaTeX . . . . . . . . . . . . . . . . . . . . . . . 19
. 146, 157, 232, 371, 406, 1005, 1012 \latinencoding . . . . . . . . . . . . . . 51, 54
\if@zf@configfile . . . . . . . 15, 17, 1144 \let . . . . . . . . . . . . . . . . . . 5, 29, 34,
47, 49–51, 53, 54, 61, 63, 66, 70, 74,
\if@zf@euenc . . . . . . . . . . . . . 16, 18, 41
77, 80, 83, 108, 111, 120, 170, 173,
\ifcase . . . . . . . . . . . . . . . . . . . . . . 255
278, 302, 303, 332–334, 339–355,
\ifcsname . . 128, 135, 191, 192, 201, 1034
362, 449, 1054, 1055, 1083, 1143
\ifdefined . . . . . . . . . . . . . . . . . . 1133
\let@cc . . . . . . . . . . . . . . . . 26, 422, 423
\ifnum . . . . . . . . . . . . . . . . 259, 434,
\loop . . . . . . . . . . . . . . . . . 472, 484, 496
472, 473, 484, 485, 496, 497, 645, 655
\ifodd . . . . . . . . . . . . . . . . . . . . . . . 437 M
\ifx . 178, 212, 221, 233–235, 268, 274, \mathalpha . . . . . 1071–1080, 1094–1114
280, 283, 285, 291, 296, 307, 321, \mathbf . . . . . . . . . . . . 1064, 1129, 1135
365, 382, 388, 400, 433, 441, 446, \mathbin . . . . . . . . . . . . . . . . . . . . 1115
462, 464, 526, 536, 549, 588, 592,
\mathcal . . . . . . . . . . . . . . . . . . . . . 43
616, 640, 644, 778, 784, 1033, 1084
\mathchardef . . . . . . . . . . . . . . . . . 1082
\ifzf@atsui . . . . . . . . . . 8, 179, 363, 380
\mathclose . . . . . 1089, 1092, 1118, 1120
\ifzf@firsttime . . . . . . . . . . . . . . .
\mathdollar . . . . . . . . . . . . . . . . . . 1122
. . . . . 3, 328, 376, 576, 579, 611, 689
\mathit . . . . 1040, 1064, 1128, 1136, 1139
\ifzf@icu . . . . . . . . . . . . . . . . . . 9,
\mathopen . . . . . . . . . . . . . . . 1117, 1119
175, 182, 369, 377, 398, 679, 687, 833
\mathord . . . . . . . . . . . . . . . . 1121, 1122
\ifzf@math@euler . . . . . . . . . . 11, 1088
\mathpunct . . . . . . . . . . . . . . 1085, 1091
\ifzf@math@lucida . . . . . . . . . 12, 1093 \mathrel . . . . . . . . . . . . . . . . 1090, 1116
\ifzf@mm . . . . . . . . . . . . . . . 10, 683, 688 \mathring . . . . . . . . . . . . . . . . . . . 1080
\ifzf@nobf . . . . . . . . . . . . . . 4, 211, 230 \mathrm . . . . . . . . . . 43, 1127, 1134, 1138
\ifzf@noit . . . . . . . . . . . . . . 5, 220, 231 \mathsf . . . . . . . . . . . . . . . . . 1130, 1141
\ifzf@nosc . . . . . . . . . . . . . . . . . 6, 281 \mathtt . . . . . . . . . . . . . . . . . 1131, 1142
\ifzf@package@babel@loaded . . . . . . 14 \mddefault . . . . . . . . . 210, 223, 226,
\ifzf@package@euler@loaded . . 13, 1057 1125–1128, 1130, 1131, 1134, 1136
\ifzf@tfm . . . . . . . . . . . . . . . . . . . . . 7 \MessageBreak . . . . . . . . . . . . 1061–1063
\ignorespaces . . . . . . . . . . . . . . 58, 119 \multi@alias@key . . . . . . . . . . 141, 424
\indent . . . . . . . . . . . . . . . . . . . . . . 20 \multiply . . . . . . . . . . . . . 459, 461, 463
\infty . . . . . . . . . . . . . . . . . . . . . . . 43
\InputIfFileExists . . . . . . . . . . . . 1145 N
\int . . . . . . . . . . . . . . . . . . . . . . . . . 43 \newAATfeature . . . . . . . . . . . . . 27, 127
80
\newcommand . . . . . . . 7, 23–25, 55, 59, \relax . . . . . . . . . . . . . . . . 147, 158,
64, 68, 72, 75, 78, 81, 91, 99, 107, 356, 358, 440, 458, 558, 641, 656,
109, 121, 127, 134, 141–143, 154, 1006, 1013, 1027, 1043, 1046, 1049
166, 253, 265, 295, 327, 331, 337, \repeat . . . . . . . . . . . . . . . 479, 491, 503
361, 375, 379, 417, 419, 421, 424, \RequirePackage . . . . 1, 37, 39, 40, 43, 44
431, 452, 466, 468, 480, 492, 600, 1030 \RequireXeTeX . . . . . . . . . . . . . . . . 2, 38
\newcount . . . . . . . . . . . . . . . . . . 19–22 \rmdefault . . . . . . . . . . . . . . . . . 61, 88
\newcounter . . . . . . . . . . . . . . . . . . . 194 \rmfamily . . . . . . . . . . . . . . . . . . . . 602
\newfeaturecode . . . . . . . . . . . . . . . . 7
\newfontface . . . . . . . . . . . . . . . . . 5, 91 S
\newfontface@i . . . . . . . . . . . . 100, 101 \scdefault 285, 291, 1041, 1044, 1047, 1050
\newfontfamily . . . . . . . . . . . . . 5, 5, 91 \scshape . . . . . . . . . . . . . . . . . 37, 1039
\newfontfamily@i . . . . . . . . . . . . 92, 93 \section . . . . . . . . . . . . . . . . . . . . . 17
\newfontfeature . . . . . . . . . . . . 29, 121 \selectfont . . 57, 97, 105, 118, 1028, 1038
\newfontinstance . . . . . . . . . . . . . . . 5 \setboldmathrm . . . . . . . . . . . . . . . 6, 72
\setkeys . . . . . . . . . . . . . . . . . 171,
\newfontlanguage . . . . 27, 154, 875–1002
172, 305, 335, 418, 517, 523, 777, 783
\newfontscript . 23–25, 27, 143, 839–874
\setlength . . 603–605, 617, 621–623, 631
\newICUfeature . . . . . . . . . . . . . 29, 134
\setmainfont . . . . . . . . . . . . . . . . . 5, 59
\newif . . . . . . . . . . . . . . . . . . . . . . 3–18
\SetMathAlphabet . . . . . 1127–1131,
\next . . . . . . . . . . . . . . . . . . . . . . . 1083
1134–1136, 1138, 1139, 1141, 1142
\noexpand . . . . . . . . . . . . . . . 96, 97,
\setmathrm . . . . . . . . . . . . . . . . . . 6, 72
104, 105, 113, 172, 304, 315, 322, 335
\setmathsf . . . . . . . . . . . . . . . . . . 6, 72
\normalfont . . . . . . . . . . . . . . 62, 67, 71
\setmathtt . . . . . . . . . . . . . . . . . . 6, 72
\not@math@alphabet . . . . . . . . . . . . .
\setmonofont . . . . . . . . . . . . 5, 10, 34, 59
. . . . . 1027, 1040, 1043, 1046, 1049
\setromanfont . . . . . . . . . . . . . 8, 34, 63
\numexpr . . . . . . . . . . . . . . . . . . . . . 440 \setsansfont . . . . . . . . . . . . . 5, 9, 34, 59
\SetSymbolFont . . . . . . 1070, 1126, 1132
O
\sfdefault . . . . . . . . . . . . . . . . . 66, 89
\Omega . . . . . . . . . . . . . . . . . . . . . . 1114
\sffamily . . . . . . . . . . . . . . . . . . . . 38
\or . . . . . . . . . . . . . . . . . . . . . 257, 262 \sidefault . . . . . . . . . . . . 285, 291,
1025, 1028, 1041, 1044, 1047, 1050
P
\Sigma . . . . . . . . . . . . . . . . . . . . . . 1110
\PackageError . . . .. . . . . . . . . . . . . 23
\sishape . . . . . . . . . . . . . . . . . . . . 1025
\PackageInfo . . . . .. . . . . . . . . . . . . 25 \sldefault . . . . . . . . . . . . . . 323, 1044
\PackageWarning . .. . . . . . . . . . . . . 24 \slshape . . . . . . . . . . . . . . . . 1042, 1043
\pagestyle . . . . . .. . . . . . . . . . . . . 15 \space . . . . . . . . . . . . . 607, 651, 659, 691
\Phi . . . . . . . . . . . .. . . . . . . . . . . . 1112 \stepcounter . . . . . . . . . . . . . . 122, 193
\Pi . . . . . . . . . . . .. . . . . . . . . . . . 1109 \strip@pt . . . . . . . . . . . . . . . . . . . . 606
\pi . . . . . . . . . . . .. . . . . . . . . . . . . 41
\pm . . . . . . . . . . . .. . . . . . . . . . . . . 41 T
\ProcessOptions . .. . . . . . . . . . . . . 36 \TeX . . . . . . . . . . . . . . . . . . . . . . . . . 46
\protect . . . . . . . .. . . . . . . . . . . . 1064 \textsf . . . . . . . . . . . . . . . . . 17, 19, 41
\providecommand . .. . . . . . . 26–28, 1025 \textsi . . . . . . . . . . . . . . . . . . . . . 1025
\Psi . . . . . . . . . . . .. . . . . . . . . . . . 1113 \the . . . . . . . . . . . 123, 198, 626–628, 632
\Theta . . . . . . . . . . . . . . . . . . . . . . 1106
R \tilde . . . . . . . . . . . . . . . . . . . . . . 1074
\ratio . . . . . . . . . . . . . . . . . . . . . . . 605 \ttdefault . . . . . . . . . . . . . . . . . 70, 90
81
\two@digits . . . . . . . . . . . . . . . . . . . 786 \zf@atsuitrue . . . . . . . . . . . . . . . . . 258
\typeout . . . . . . . . . . . . . . . . 1146, 1147 \zf@basefont . . . . . . . . . . . . . . 152,
163, 174, 186, 255, 259, 278, 385,
U 391, 403, 412, 432, 434, 435, 438,
\unless . . 128, 135, 175, 191, 201, 211, 440, 470, 473, 482, 485, 493, 497,
220, 268, 281, 283, 365, 376, 433, 510, 515, 521, 604, 617, 621–623,
437, 441, 446, 576, 579, 611, 778, 784 631, 645, 651, 655, 659, 691, 1018
\updefault . . . . . . . . . . . . 210, 214, \zf@bf . . . . . . 212, 216, 234, 243, 344, 531
217, 1050, 1125–1127, 1129–1132, \zf@bf@feat . . . . . . . . . 214, 217, 349, 567
1134, 1135, 1138, 1141, 1142 \zf@bfit . . . . . . . . . . . 233, 247, 346, 545
\upshape . . . . . . . . . . . . . . . . . . . . 1039
\zf@bfit@feat 237, 240, 244, 248, 351, 573
\Upsilon . . . . . . . . . . . . . . . . . . . . 1111
\zf@calc@scale . . . . . . . . . 589, 593, 600
\usepackage . . . . . . . . . . . . . . . . . . . 3–5
\zf@check@one@char . . . . . . . . . 643, 664
\UTFencname . . . . . . . . . . . . . . . . . . . 49
\zf@check@ot@feat . . . . . . 370, 405, 492
V \zf@check@ot@lang . 156, 480, 1004, 1011
\verb . . . . . . . . . . . . . . . . . . . 20, 34, 46 \zf@check@ot@script . . . . . . . . 145, 468
\zf@DeclareFontShape . 279, 284, 290, 295
X \zf@default@options . . . . . . . . . . . .
\xdef . . . . 27, 148–150, 159–161, 200, . . . . . . 107, 108, 111, 203, 205, 335
329, 377, 606, 1007–1009, 1014–1016 \zf@define@feature@option . . . . . . .
\XeTeX . . . . . . . . . . . . . . . . . . . . . . . 19 133, 140, 417, 696–719, 721–729,
\XeTeXcharglyph . . . . . . . . . . . 645, 655 731–738, 740–751, 753–755,
\XeTeXcountvariations . . . . . . . . . . 259 757–762, 764–770, 772–775,
\XeTeXfeaturename . . . . . . . . . . . . . 432 789–799, 801–807, 809–816, 818–830
\XeTeXfonttype . . . . . . . . . . . . . . . . 255 \zf@define@font@feature . . . . 129,
\XeTeXisexclusivefeature . . . . . . . 434 136, 417, 695, 720, 730, 739, 752,
\XeTeXOTcountfeatures . . . . . . . . . . 493 756, 763, 771, 788, 800, 808, 817, 831
\XeTeXOTcountlanguages . . . . . . . . . 482 \zf@enc . . . . . . . 42, 44, 46, 47, 49–51,
\XeTeXOTcountscripts . . . . . . . . . . . 470 53, 54, 208, 316, 323, 1125–1132,
\XeTeXOTfeaturetag . . . . . . . . . . . . . 497 1134–1136, 1138, 1139, 1141, 1142
\XeTeXOTlanguagetag . . . . . . . . . . . . 485 \zf@family . . . . . . . . . . . . . . 57, 61,
\XeTeXOTscripttag . . . . . . . . . . . . . 473 66, 70, 74, 77, 80, 83, 97, 105, 118,
\XeTeXselectorname . . . . . . 435, 438, 440 200, 201, 204–206, 208, 316, 323, 324
\Xi . . . . . . . . . . . . . . . . . . . . . . . . 1108
\zf@family@long . . . . . . . . . . . 149,
\XKV@rm . . . . . . . . 172, 173, 311, 778, 784
160, 170, 191, 196, 200, 329, 511,
\XKV@tfam . . . 384, 390, 402, 411, 779, 785
516, 522, 528, 532, 538, 542, 546,
\XKV@tkey . . . . . . . . . . 384, 390, 402, 411
551, 565, 568, 571, 574, 1008, 1015
Z
\zf@ff . . . . . . . . . 207, 299, 313, 332, 377
\z@ . . . . . . . . . . . . . . . 457, 471, 483, 495 \zf@firsttimefalse . . . . . . . . . . . . . 190
\zap@space . . . . . . . . . 197, 555, 577, 582 \zf@firsttimetrue . . . . . . . . . . . . . 188
\zf@@ . . . . . . . . . . . . . . 612, 614, 643, 664 \zf@font@feat . . . 173, 189, 210, 214,
\zf@@ii . . . . . . . . . . . . . . . . . . . . . . 612 217, 223, 226, 237, 240, 244, 248, 340
\zf@@iii . . . . . . . . . . . . . . . . . . . . . 612 \zf@font@str . . . . . . . . 298, 312, 317, 341
\zf@adjust . . . . . . . . . . . . . . . . . . . \zf@font@warning . . . . . . . . . 1054, 1143
317, 324, 334, 625, 632, 641, 646, 656 \zf@font@wrap . . . . . . . . . . 174, 186,
\zf@atsuifalse . . . . . . . . . . . . . . . . 254 269, 272, 298, 342, 507, 510, 515, 521
82
\zf@fontname . . . . 169, 170, 174, 186, \zf@PackageInfo . . . 25, 34, 202, 275, 607
204, 207, 209, 213, 222, 236, 277, \zf@PackageWarning . 24, 34, 132, 139,
289, 298, 303, 510, 515, 521, 559, 607 152, 163, 383, 389, 401, 410, 690, 1018
\zf@fontspec . . . . . . . . . . . . . 56, 60, \zf@partial@fontname . . . . . . . . . . .
65, 69, 73, 76, 79, 82, 94, 102, 113, 166 . . . . . . . . . . 531, 541, 545, 554, 557
\zf@get@feature@requests . . . . . . . \zf@pre@ff . . . . . . . . . . . . . . . 150,
. . . . . . . . . . . . . 189, 297, 311, 331 161, 207, 299, 313, 339, 1009, 1016
\zf@icufalse . . . . . . . . . . . . . . 254, 338 \zf@rmboldmaths . . . . . . . 77, 1133–1136
\zf@icutrue . . . . . . . . . 263, 505, 513, 519 \zf@rmmaths . . . . . . . . . . . . . . . . . . .
\zf@init . . . . . . . . . . . . . . . . . 168, 337 74, 88, 1125–1129, 1132, 1138, 1139
\zf@it . . . . . . 221, 225, 235, 239, 345, 541
\zf@sc . . . . . . . . . . . . . 280, 289, 347, 554
\zf@it@feat . . . . . . . . . 223, 226, 350, 570
\zf@sc@feat . . . . . . . . . 285, 291, 352, 576
\zf@iv@strnum . . . . . . . . . . 452, 469, 481
\zf@iv@strnum@i . . . . . . . . 453, 454, 467 \zf@scale . . . . . . . . . . . . . . . . . . . .
\zf@iv@strnum@ii . . . . . . . . . . 455, 456 298, 313, 333, 595, 598, 599, 606, 607
\zf@language@name . . . . . . . . . . . . . \zf@script@name 148, 164, 357, 413, 1019
. . . . . . . . 159, 359, 413, 1007, 1014 \zf@set@font@type . . . . . . . . . 176, 253
\zf@make@aat@feature@string . . . . . \zf@sfmaths . . . . . . . . . 80, 89, 1130, 1141
. . . . . . . . . . . . . . . . 364, 387, 431 \zf@size . . . . . . . 302, 307, 312, 353, 583
\zf@make@feature 8, 379, 420, 780, 786, 834 \zf@size@feat . . . . . . . 296, 301, 354, 580
\zf@make@font@shapes . . . . 209, 213, \zf@size@fnt . . . . . . . . 303, 313, 355, 584
216, 222, 225, 236, 239, 243, 247, 265 \zf@smallcaps . . . 283, 284, 362, 366, 372
\zf@make@smallcaps . . . . . . . . . 282, 361 \zf@suffix . . . . . . . . . 174, 178, 180,
\zf@math@eulertrue . . . . . . . . . . . . 1058 183, 186, 207, 269, 272, 298, 313,
\zf@math@lucidatrue . . . . . . . 1066–1068 343, 509, 510, 514, 515, 520, 521, 680
\zf@merge@shape . . . . . . . . . . . . . . . \zf@tfm . . . . . . . . . . . . . . . . . . . . . . 256
. . . . . 1030, 1041, 1044, 1047, 1050
\zf@tfmfalse . . . . . . . . . . . . . . . . . . 254
\zf@mmfalse . . . . . . . . . . . . . . . . . . . 254
\zf@this@size . . . . . . . . . . . . . 301, 305
\zf@mmtrue . . . . . . . . . . . . . . . . . . . 260
\zf@nobffalse . . . . . . . . . . . . . . . . . 530 \zf@ttmaths . . . . . . . . . 83, 90, 1131, 1142
\zf@nobftrue . . . . . . . . . . . . . . 506, 527 \zf@up@feat . . . . . . . . . . . . 210, 348, 564
\zf@noitfalse . . . . . . . . . . . . . . . . . 540 \zf@update@family . . . . . . . . . . . . .
\zf@noittrue . . . . . . . . . . . . . . 506, 537 . . . . . . 125, 327, 393, 407, 555,
\zf@noscfalse . . . . . . . . . . . . . . . . . 553 577, 582, 598, 610, 630, 634, 637,
\zf@nosctrue . . . . . . . . . . . . . . . . . . 550 666, 670, 673, 676, 681, 684, 836, 1023
\zf@package@euler@loadedfalse . . 1052 \zf@update@ff . . . 126, 375, 394, 408,
\zf@package@euler@loadedtrue . . . 1051 635, 667, 671, 674, 677, 685, 837, 1024
\zf@PackageError . . . . . . . . . . . . . . \zf@v@strnum . . . . . . . . . . . . . . 452, 494
. . . . . . 23, 307, 427, 650, 658, 1060 \zf@wordspace@parse . . . . . . . . 612, 614
83