summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@googlemail.com>2006-12-24 15:43:15 +0000
committerJonathan Kew <jfkthame@googlemail.com>2006-12-24 15:43:15 +0000
commitd65f9c0842d5d5c1720ed3165e98450c70554530 (patch)
tree26b0e93bfff2d479192b38c4b13029984bc81bf0 /Master
parentdc3ab019d70c18b051f989b82e5c085dabd084a6 (diff)
update Will's xetex-based macro packages
git-svn-id: svn://tug.org/texlive/trunk@2881 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/xelatex/fontspec/README5
-rw-r--r--Master/texmf-dist/doc/xelatex/fontspec/fontspec-example.ltx (renamed from Master/texmf-dist/doc/xelatex/fontspec/fontspec-example.tex)31
-rw-r--r--Master/texmf-dist/doc/xelatex/fontspec/fontspec.pdfbin1971940 -> 1640565 bytes
l---------Master/texmf-dist/doc/xelatex/xltxtra/README1
-rw-r--r--Master/texmf-dist/doc/xelatex/xltxtra/README.txt18
-rw-r--r--Master/texmf-dist/doc/xelatex/xltxtra/xltxtra.pdfbin221150 -> 284898 bytes
-rw-r--r--Master/texmf-dist/tex/xelatex/fontspec/fontspec.cfg3
-rw-r--r--Master/texmf-dist/tex/xelatex/fontspec/fontspec.sty627
-rw-r--r--Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty146
9 files changed, 508 insertions, 323 deletions
diff --git a/Master/texmf-dist/doc/xelatex/fontspec/README b/Master/texmf-dist/doc/xelatex/fontspec/README
index b9f6e1b014b..067d00b45ed 100644
--- a/Master/texmf-dist/doc/xelatex/fontspec/README
+++ b/Master/texmf-dist/doc/xelatex/fontspec/README
@@ -1,5 +1,5 @@
--------------------------
-THE FONTSPEC PACKAGE v1.10
+THE FONTSPEC PACKAGE v1.12
The fontspec package only works with XeTeX, a unicode capable TeX-variant. It provides an automatic and unified interface for loading fonts in LaTeX. XeTeX allows a direct interface to system-installed fonts, so no manual font installation is required.
@@ -14,7 +14,8 @@ Font families may be selected individually with the command
\fontspec[<font options>]{<font name>}
Commands for selecting fonts efficiently can be created with
- \newfontinstance\myfont[<font options>]{<font name>}
+ \newfontfamily\myfamily[<font options>]{<font name>}
+ \newfontface\myfont[<font options>]{<font name>}
Default document fonts are selected with
\setromanfont[<font options>]{<font name>}
diff --git a/Master/texmf-dist/doc/xelatex/fontspec/fontspec-example.tex b/Master/texmf-dist/doc/xelatex/fontspec/fontspec-example.ltx
index 2aed92a6fc3..9a7d94d0922 100644
--- a/Master/texmf-dist/doc/xelatex/fontspec/fontspec-example.tex
+++ b/Master/texmf-dist/doc/xelatex/fontspec/fontspec-example.ltx
@@ -1,28 +1,23 @@
+\documentclass{article}
-\documentclass[12pt]{article}
+\usepackage{euler}
+\usepackage[cm-default]{fontspec}
+\usepackage{xltxtra}
-\usepackage{euler,fontspec,graphicx}
-
-\defaultfontfeatures{Scale=MatchLowercase ,Mapping=tex-text}
-\setromanfont{Hoefler Text}
-\setsansfont{Gill Sans}
+\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
+\setromanfont[Numbers=Lowercase]{FPL Neu}
+\setsansfont{Lucida Sans}
\setmonofont{Lucida Sans Typewriter}
-%% Define the \XeTeX logo:
-\DeclareRobustCommand\XeTeX{%
- \mbox{\smash{%
- X\lower.5ex\hbox{\kern-.12em\reflectbox{E}}\kern-.1667em
- T\kern -.1667em\lower .5ex\hbox {E}\kern -.12em X}}\@}
-%% The logo should be defined on a per-document basis
-%% so that its parameters may be fine tuned for the fonts used.
+\frenchspacing % TeX's default is a little old-fashioned...
\begin{document}
\pagestyle{empty}
-\section{The basics of the \textsf{fontspec} package}
+\section*{The basics of the \textsf{fontspec} package}
The \textsf{fontspec} package enables automatic font selection for \LaTeX{} documents typeset with \XeTeX{}. The basic command is\\
-\indent \verb|\fontspec[font features]{Mac OS X font display name}|.\\
+\indent \verb|\fontspec[font features]{font display name}|.\\
As an example:
\begin{center}
@@ -39,13 +34,13 @@ As an example:
The default roman, sans serif, and typewriter fonts may be set with the \verb|\setromanfont|, \verb|\setsansfont| and \verb|\setmonofont| commands, respectively, as shown in the preamble. They take the same syntax as the \verb|\fontspec| package. All expected font shapes are available:
\begin{center}
- {\scshape Small caps and \itshape small caps italic\dots}\\
+ {\itshape Italics and \scshape small caps\dots}\\
{\sffamily\bfseries Bold sans serif and \itshape bold italic sans serif\dots}
\end{center}
-With the roman and sans serif fonts set in the preamble, text fonts in math mode are also changed: $\cos(n\pi)=\pm 1$. The maths typeface `Euler' has been used in this document (with the \textsf{euler} package---note that the \textsf{eulervm} package will not work in \XeTeX{} because it uses virtual fonts), since the default Computer Modern maths font is rather light.
+With the roman and sans serif fonts set in the preamble, text fonts in math mode are also changed: $\cos(n\pi)=\pm 1$. The maths typeface `Euler' has been used in this document (with the \textsf{euler} package---or the \textsf{eulervm} package if the |xpdfdvimx| driver is being used), since the default Computer Modern maths font is rather light.
\[
- \mathcal F(s) = \int^\infty_0\! f(t) e^{-st}\,\mathrm{d}t
+ \mathcal F(s) = \int^\infty_0 f(t) \exp(-st)\,\mathrm{d}t
\]
You'll also notice the \verb|\defaultfontfeatures| command in the preamble. This command takes a single argument of font features that are then applied to every subsequent instance of font selection. The first argument in this case, \verb|Mapping=tex-text|, enables regular \TeX{} ligatures like \verb|``---''| for ``---''. The second automatically scales the fonts to the same x-height.
diff --git a/Master/texmf-dist/doc/xelatex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/xelatex/fontspec/fontspec.pdf
index b9a50832149..cdf9407b4b8 100644
--- a/Master/texmf-dist/doc/xelatex/fontspec/fontspec.pdf
+++ b/Master/texmf-dist/doc/xelatex/fontspec/fontspec.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xltxtra/README b/Master/texmf-dist/doc/xelatex/xltxtra/README
deleted file mode 120000
index c3ca07460ab..00000000000
--- a/Master/texmf-dist/doc/xelatex/xltxtra/README
+++ /dev/null
@@ -1 +0,0 @@
-README.txt \ No newline at end of file
diff --git a/Master/texmf-dist/doc/xelatex/xltxtra/README.txt b/Master/texmf-dist/doc/xelatex/xltxtra/README.txt
deleted file mode 100644
index 335110d32d8..00000000000
--- a/Master/texmf-dist/doc/xelatex/xltxtra/README.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-------------------------
-THE XLTXTRA PACKAGE v0.1
-
-This package provides a few small features that
-are useful for XeLaTeX.
-
-It loads the fixltx2e and etex packages, and
-patches a couple of other LaTeX commands: \-
-for discretionary hyphenation with variable
-hyphenation characters, and \textsuperscript/
-\textsubscript that use the fontspec to access
-real superior/inferior characters. It also
-provides a parameterised logos for \TeX,
-\LaTeX and \XeTeX.
-
---------------
-Will Robertson
-2006
diff --git a/Master/texmf-dist/doc/xelatex/xltxtra/xltxtra.pdf b/Master/texmf-dist/doc/xelatex/xltxtra/xltxtra.pdf
index c266ce8aaff..c3e63582ea5 100644
--- a/Master/texmf-dist/doc/xelatex/xltxtra/xltxtra.pdf
+++ b/Master/texmf-dist/doc/xelatex/xltxtra/xltxtra.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/xelatex/fontspec/fontspec.cfg b/Master/texmf-dist/tex/xelatex/fontspec/fontspec.cfg
index 1741bba6d7d..8feabdd81e9 100644
--- a/Master/texmf-dist/tex/xelatex/fontspec/fontspec.cfg
+++ b/Master/texmf-dist/tex/xelatex/fontspec/fontspec.cfg
@@ -1,8 +1,9 @@
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% FOR BACKWARDS COMPATIBILITY WITH PREVIOUS VERSIONS %%%
+\let\newfontinstance\newfontfamily
+
\newcommand\newfeaturecode[3]{%
\define@key{zf}{#1}[]{\zf@make@feature{#2}{#3}{}}}
diff --git a/Master/texmf-dist/tex/xelatex/fontspec/fontspec.sty b/Master/texmf-dist/tex/xelatex/fontspec/fontspec.sty
index 86e8e054a71..c539a8b67aa 100644
--- a/Master/texmf-dist/tex/xelatex/fontspec/fontspec.sty
+++ b/Master/texmf-dist/tex/xelatex/fontspec/fontspec.sty
@@ -14,24 +14,23 @@
%%
%%
\ProvidesPackage{fontspec}
- [2006/06/07 v1.10 Advanced font selection for XeLaTeX]
-
-\unless\ifdefined\XeTeXversion
- \@latex@error{^^J
- *************************************************^^J
- *** Sorry! ^^J
- *** The fontspec package only works with XeTeX. ^^J
- *************************************************}
-\fi
+ [2006/12/21 v1.13 Advanced font selection for XeLaTeX]
+\RequirePackage{ifxetex}
+\RequireXeTeX
\newif\ifzf@firsttime
+\newif\ifzf@nobf
+\newif\ifzf@noit
+\newif\ifzf@nosc
\newif\ifzf@tfm
\newif\ifzf@atsui
\newif\ifzf@icu
\newif\ifzf@mm
\newif\ifzf@math@euler
\newif\ifzf@math@lucida
-\newif\ifzf@euler@package@loaded
+\newif\ifzf@package@euler@loaded
\newif\ifzf@package@babel@loaded
+\newif\if@zf@configfile
+\newif\if@zf@euenc
\newcount\c@zf@newff
\newcount\c@zf@index
\newcount\c@zf@script
@@ -39,23 +38,44 @@
\newcommand\zf@PackageError[2]{\PackageError{fontspec}{#1}{#2}}
\newcommand\zf@PackageWarning[1]{\PackageWarning{fontspec}{#1}}
\newcommand\zf@PackageInfo[1]{\PackageInfo{fontspec}{#1}}
+\providecommand\def@cx[2]{\expandafter\edef\csname#1\endcsname{#2}}
+\providecommand\gdef@cx[2]{\expandafter\xdef\csname#1\endcsname{#2}}
+\providecommand\let@cc[2]{%
+ \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
+\DeclareOption{cm-default}{\@zf@euencfalse}
+\DeclareOption{lm-default}{\@zf@euenctrue}
+\DeclareOption{config}{\@zf@configfiletrue}
+\DeclareOption{noconfig}{\@zf@configfilefalse}
+\DeclareOption{quiet}{\let\zf@PackageWarning\zf@PackageInfo}
+\ExecuteOptions{config,lm-default}
+\ProcessOptions*
+\RequirePackage{ifxetex}
+\RequireXeTeX
\RequirePackage{calc}
\RequirePackage{xkeyval}[2005/05/07]
-\def\zf@enc{U}
-\renewcommand\encodingdefault{\zf@enc}
-\def\cyrillicencoding{U}%
-\def\latinencoding{U}%
+\if@zf@euenc
+ \def\zf@enc{EU1}
+ \RequirePackage{lmodern}
+ \RequirePackage[\zf@enc]{fontenc}
+\else
+ \def\zf@enc{U}
+ \let\encodingdefault\zf@enc
+\fi
+\let\UTFencname\zf@enc
+\let\cyrillicencoding\zf@enc
+\let\latinencoding\zf@enc
\g@addto@macro\document{%
- \def\cyrillicencoding{U}%
- \def\latinencoding{U}}
+ \let\cyrillicencoding\zf@enc
+ \let\latinencoding\zf@enc}
\newcommand*\fontspec[2][]{%
\zf@fontspec{#1}{#2}%
\fontfamily\zf@family\selectfont
\ignorespaces}
-\newcommand*\setromanfont[2][]{%
+\newcommand*\setmainfont[2][]{%
\zf@fontspec{#1}{#2}%
\let\rmdefault\zf@family
\normalfont}
+\let\setromanfont\setmainfont
\newcommand*\setsansfont[2][]{%
\zf@fontspec{#1}{#2}%
\let\sfdefault\zf@family
@@ -83,24 +103,34 @@
\def\zf@rmmaths{\rmdefault}
\def\zf@sfmaths{\sfdefault}
\def\zf@ttmaths{\ttdefault}
-\newcommand*\newfontinstance[1]{%
- \@ifnextchar[{\newfontinstance@i#1}{\newfontinstance@i#1[]}}
-\def\newfontinstance@i#1[#2]#3{%
+\newcommand*\newfontfamily[1]{%
+ \@ifnextchar[{\newfontfamily@i#1}{\newfontfamily@i#1[]}}
+\def\newfontfamily@i#1[#2]#3{%
\zf@fontspec{#2}{#3}%
- \edef#1{\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}
+ \edef\@tempa{%
+ \noexpand\DeclareRobustCommand\noexpand#1
+ {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
+ \@tempa}
+\newcommand*\newfontface[1]{%
+ \@ifnextchar[{\newfontface@i#1}{\newfontface@i#1[]}}
+\def\newfontface@i#1[#2]#3{%
+ \zf@fontspec{BoldFont={},ItalicFont={},SmallCapsFont={},#2}{#3}%
+ \edef\@tempa{%
+ \noexpand\DeclareRobustCommand\noexpand#1
+ {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}}%
+ \@tempa}
\newcommand*\defaultfontfeatures[1]{\def\zf@default@options{#1,}}
\let\zf@default@options\@empty
\newcommand*\addfontfeatures[1]{%
- \let\zf@default@options@old\zf@default@options
- \let\zf@default@options\@empty
- \edef\zf@thisinfo{}%
- \edef\@tempa{%
- \noexpand\zf@fontspec
- {\csname zf@family@options\f@family\endcsname,#1}%
- {\csname zf@family@fontname\f@family\endcsname}}%
- \@tempa
+ \begingroup
+ \let\zf@default@options\@empty
+ \edef\@tempa{%
+ \noexpand\zf@fontspec
+ {\csname zf@family@options\f@family\endcsname,#1}%
+ {\csname zf@family@fontname\f@family\endcsname}}%
+ \@tempa
+ \endgroup
\fontfamily\zf@family\selectfont
- \let\zf@default@options\zf@default@options@old
\ignorespaces}
\let\addfontfeature\addfontfeatures
\newcommand*\newfontfeature[2]{%
@@ -129,7 +159,7 @@
\define@key[zf@feat]{Script}{#1}[]{%
\zf@check@ot@script{#2}%
\if@tempswa
- \c@zf@script\@tempcnta\relax
+ \global\c@zf@script\@tempcnta\relax
\xdef\zf@script@name{#1}%
\xdef\zf@family@long{\zf@family@long+script=#1}%
\xdef\zf@pre@ff{script=#2,\zf@pre@ff}%
@@ -140,7 +170,7 @@
\define@key[zf@feat]{Lang}{#1}[]{%
\zf@check@ot@lang{#2}%
\if@tempswa
- \c@zf@language\@tempcnta\relax
+ \global\c@zf@language\@tempcnta\relax
\xdef\zf@language@name{#1}%
\xdef\zf@family@long{\zf@family@long+lang=#1}%
\xdef\zf@pre@ff{\zf@pre@ff language=#2,}%
@@ -148,20 +178,28 @@
\zf@PackageWarning{Font \fontname\zf@basefont does not contain
language '#1' for script '\zf@script@name'}%
\fi}}
-\providecommand\def@cx[2]{\expandafter\edef\csname#1\endcsname{#2}}
-\providecommand\gdef@cx[2]{\expandafter\xdef\csname#1\endcsname{#2}}
-\providecommand\let@cc[2]{\expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
\newcommand*\zf@fontspec[2]{%
\begingroup
\zf@init
\edef\zf@fontname{#2}%
\let\zf@family@long\zf@fontname
- \setkeys*[zf]{preparse}{#1}%
- \edef\zf@font@feat{\zf@font@feat\XKV@rm}%
- \unless\ifdefined\zf@basefont
- \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
+ \setkeys*[zf]{prepreparse}{#1}%
+ \edef\@tempa{\noexpand\setkeys*[zf]{preparse}{\XKV@rm}}\@tempa
+ \let\zf@font@feat\XKV@rm
+ \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
+ \unless\ifzf@icu
+ \zf@set@font@type
+ \fi
+ \ifx\zf@suffix\@empty
+ \ifzf@atsui
+ \def\zf@suffix{/AAT}%
+ \else
+ \ifzf@icu
+ \def\zf@suffix{/ICU}%
+ \fi
+ \fi
+ \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
\fi
- \zf@set@font@type
\zf@firsttimetrue
\zf@get@feature@requests{\zf@font@feat}%
\zf@firsttimefalse
@@ -180,35 +218,53 @@
with options [\zf@default@options #1]}%
\gdef@cx{zf@family@fontname\zf@family}{\zf@fontname}%
\gdef@cx{zf@family@options\zf@family}{\zf@default@options #1}%
- \gdef@cx{zf@family@fontdef\zf@family}{\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff}%
+ \gdef@cx{zf@family@fontdef\zf@family}
+ {\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff}%
\DeclareFontFamily{\zf@enc}{\zf@family}{}%
- \zf@make@font@shapes{\zf@fontname}{\mddefault}{\updefault}{\zf@font@feat\zf@up@feat}%
- \ifx\zf@bf\@empty
- \zf@make@font@shapes[\zf@fontname]{/B}{\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
- \else
- \zf@make@font@shapes{\zf@bf}{\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
+ \zf@make@font@shapes{\zf@fontname}
+ {\mddefault}{\updefault}{\zf@font@feat\zf@up@feat}%
+ \unless\ifzf@nobf
+ \ifx\zf@bf\@empty
+ \zf@make@font@shapes[\zf@fontname]{/B}
+ {\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
+ \else
+ \zf@make@font@shapes{\zf@bf}
+ {\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}%
+ \fi
\fi
- \ifx\zf@it\@empty
- \zf@make@font@shapes[\zf@fontname]{/I}{\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
- \else
- \zf@make@font@shapes{\zf@it}{\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
+ \unless\ifzf@noit
+ \ifx\zf@it\@empty
+ \zf@make@font@shapes[\zf@fontname]{/I}
+ {\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
+ \else
+ \zf@make@font@shapes{\zf@it}
+ {\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}%
+ \fi
\fi
- \ifx\zf@bfit\@empty
- \ifx\zf@bf\@empty
- \ifx\zf@it\@empty
- \zf@make@font@shapes[\zf@fontname]{/BI}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \@tempswatrue
+ \ifzf@nobf\@tempswafalse\fi
+ \ifzf@noit\@tempswafalse\fi
+ \if@tempswa
+ \ifx\zf@bfit\@empty
+ \ifx\zf@bf\@empty
+ \ifx\zf@it\@empty
+ \zf@make@font@shapes[\zf@fontname]{/BI}
+ {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \else
+ \zf@make@font@shapes[\zf@it]{/B}
+ {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \fi
\else
- \zf@make@font@shapes[\zf@it]{/B}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \zf@make@font@shapes[\zf@bf]{/I}
+ {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
\fi
\else
- \zf@make@font@shapes[\zf@bf]{/I}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
+ \zf@make@font@shapes{\zf@bfit}
+ {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
\fi
- \else
- \zf@make@font@shapes{\zf@bfit}{\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}%
\fi
\fi
- \endgroup
- }
+ \endgroup}
\newcommand*\zf@set@font@type{%
\zf@tfmfalse \zf@atsuifalse \zf@icufalse \zf@mmfalse
\ifcase\XeTeXfonttype\zf@basefont
@@ -222,13 +278,13 @@
\zf@icutrue
\fi}
\newcommand*\zf@make@font@shapes[5][]{%
- \bgroup
+ \begingroup
\edef\@tempa{#1}%
- \ifx\@tempa\@empty\else
- \font\@tempfonta="#1\zf@suffix" at \f@size pt
+ \unless\ifx\@tempa\@empty
+ \font\@tempfonta="\zf@font@wrap{#1}\zf@suffix" at \f@size pt
\edef\@tempa{\fontname\@tempfonta}%
\fi
- \font\@tempfontb="#1#2\zf@suffix" at \f@size pt
+ \font\@tempfontb="\zf@font@wrap{#1#2}\zf@suffix" at \f@size pt
\edef\@tempb{\fontname\@tempfontb}%
\ifx\@tempa\@tempb
\zf@PackageInfo{Could not resolve font #1#2 (it might not exist)}%
@@ -237,10 +293,12 @@
\let\zf@basefont\@tempfontb
\zf@DeclareFontShape{#3}{#4}{#5}%
\ifx\zf@sc\@empty
- \zf@make@smallcaps
- \ifx\zf@smallcaps\@empty\else
- \zf@DeclareFontShape[\zf@smallcaps]{#3}
- {\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
+ \unless\ifzf@nosc
+ \zf@make@smallcaps
+ \unless\ifx\zf@smallcaps\@empty
+ \zf@DeclareFontShape[\zf@smallcaps]{#3}
+ {\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
+ \fi
\fi
\else
\edef\zf@fontname{\zf@sc}%
@@ -248,19 +306,36 @@
{\ifx#4\itdefault\sidefault\else\scdefault\fi}{#5\zf@sc@feat}%
\fi
\fi
- \egroup}
+ \endgroup}
\newcommand\zf@DeclareFontShape[4][]{%
- \zf@get@feature@requests{#4}%
- \def\@tempb{"\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff#1"}%
- \zf@PackageInfo{\string\font\space is \@tempb}%
+ \ifx\zf@size@feat\@empty
+ \zf@get@feature@requests{#4}%
+ \edef\zf@font@str{<->\zf@scale"\zf@font@wrap\zf@fontname\zf@suffix:%
+ \zf@pre@ff\zf@ff#1"}%
+ \else
+ \@for\zf@this@size:=\zf@size@feat\do{%
+ \let\zf@size\@empty
+ \let\zf@size@fnt\zf@fontname
+ \edef\@tempa{\noexpand
+ \setkeys*[zf]{sizing}{\expandafter\@firstofone\zf@this@size}}%
+ \@tempa
+ \ifx\zf@size\@empty\zf@PackageError
+ {Size information must be supplied}
+ {For example, SizeFeatures={Size={8-12},...},...}%
+ \fi
+ \zf@get@feature@requests{#4,\XKV@rm}%
+ \edef\zf@font@str{\zf@font@str <\zf@size>%
+ \zf@scale"\zf@size@fnt\zf@suffix:\zf@pre@ff\zf@ff#1"}}%
+ \fi
\edef\@tempa{\noexpand
- \DeclareFontShape{\zf@enc}{\zf@family}{#2}{#3}
- {<->\zf@scale\@tempb}{\zf@adjust}}%
+ \DeclareFontShape{\zf@enc}{\zf@family}{#2}{#3}%
+ {\zf@font@str}{\zf@adjust}}%
\@tempa
- \edef\@tempa{#3}\edef\@tempb{\itdefault}%
+ \edef\@tempa{#3}%
+ \edef\@tempb{\itdefault}%
\ifx\@tempa\@tempb
\edef\@tempa{\noexpand
- \DeclareFontShape{\zf@enc}{\zf@family}{#2}{\sldefault}
+ \DeclareFontShape{\zf@enc}{\zf@family}{#1}{\sldefault}
{<->sub*\zf@family/#2/\itdefault}{\zf@adjust}}%
\@tempa
\fi}
@@ -275,8 +350,11 @@
\edef\@tempa{\noexpand\setkeys[zf]{options}{\zf@default@options#1}}%
\@tempa}
\newcommand*\zf@init{%
+ \zf@icufalse
\let\zf@pre@ff \@empty
\let\zf@font@feat \@empty
+ \let\zf@font@str \@empty
+ \let\zf@font@wrap \@firstofone
\let\zf@suffix \@empty
\let\zf@bf \@empty
\let\zf@it \@empty
@@ -287,6 +365,9 @@
\let\zf@it@feat \@empty
\let\zf@bfit@feat \@empty
\let\zf@sc@feat \@empty
+ \let\zf@size\@empty
+ \let\zf@size@feat\@empty
+ \let\zf@size@fnt\@empty
\c@zf@script 1818326126\relax
\def\zf@script@name{Latin}%
\c@zf@language 0\relax
@@ -296,8 +377,8 @@
\let\zf@smallcaps\@empty
\ifzf@atsui
\zf@make@aat@feature@string{3}{3}%
- \unless\ifx\zf@thisfontfeature\@empty
- \edef\zf@smallcaps{\zf@thisfontfeature;}%
+ \unless\ifx\@tempa\@empty
+ \edef\zf@smallcaps{\@tempa;}%
\fi
\fi
\ifzf@icu
@@ -312,26 +393,40 @@
\fi}
\newcommand*\zf@make@feature[3]{%
\ifzf@atsui
- \zf@make@aat@feature@string{#1}{#2}%
- \ifx\zf@thisfontfeature\@empty
+ \def\@tempa{#1}%
+ \ifx\@tempa\@empty
\zf@PackageWarning{%
- AAT feature '\XKV@tfam=\XKV@tkey'
- (#1,#2) not available in font \fontname\zf@basefont}%
+ ‘\XKV@tfam=\XKV@tkey’ feature not supported
+ for AAT font ‘\fontname\zf@basefont’}%
\else
- \zf@update@family{+#1,#2}%
- \zf@update@ff\zf@thisfontfeature
+ \zf@make@aat@feature@string{#1}{#2}%
+ \ifx\@tempa\@empty
+ \zf@PackageWarning{%
+ AAT feature '\XKV@tfam=\XKV@tkey'
+ (#1,#2) not available in font \fontname\zf@basefont}%
+ \else
+ \zf@update@family{+#1,#2}%
+ \zf@update@ff\@tempa
+ \fi
\fi
\fi
\ifzf@icu
- \zf@check@ot@feat{#3}%
- \if@tempswa
- \zf@update@family{#3}%
- \zf@update@ff{#3}%
- \else
+ \edef\@tempa{#3}%
+ \ifx\@tempa\@empty
\zf@PackageWarning{%
- OpenType feature '\XKV@tfam=\XKV@tkey' (#3)
- not available in font \fontname\zf@basefont, script
- '\zf@script@name', language '\zf@language@name'}%
+ ‘\XKV@tfam=\XKV@tkey’ feature not supported
+ for ICU font ‘ \fontname\zf@basefont’}%
+ \else
+ \expandafter\zf@check@ot@feat\expandafter{\@tempa}%
+ \if@tempswa
+ \zf@update@family{#3}%
+ \zf@update@ff{#3}%
+ \else
+ \zf@PackageWarning{%
+ OpenType feature '\XKV@tfam=\XKV@tkey' (#3)
+ not available in font \fontname\zf@basefont, script
+ '\zf@script@name', language '\zf@language@name'}%
+ \fi
\fi
\fi}
\newcommand*\zf@define@font@feature[1]{%
@@ -349,24 +444,24 @@
{\keyval@alias@key[zf]{options}{#1}{#2}}}
{\keyval@alias@key[zf]{preparse}{#1}{#2}}}
\newcommand*\zf@make@aat@feature@string[2]{%
- \edef\zf@this@featurename{\XeTeXfeaturename\zf@basefont #1}%
- \ifx\zf@this@featurename\@empty
- \let\zf@thisfontfeature\@empty
- \else
- \edef\zf@this@selectionname{\XeTeXselectorname\zf@basefont #1 #2}%
- \ifx\zf@this@selectionname\@empty
- \let\zf@thisfontfeature\@empty
+ \edef\@tempa{\XeTeXfeaturename\zf@basefont #1}%
+ \unless\ifx\@tempa\@empty
+ \ifnum\XeTeXisexclusivefeature\zf@basefont #1 > 0
+ \edef\@tempb{\XeTeXselectorname\zf@basefont #1 #2}%
\else
- \edef\zf@thisfontfeature{%
- \ifnum\XeTeXisexclusivefeature\zf@basefont #1 > 0
- \zf@this@featurename=\zf@this@selectionname
- \else
- \ifodd #2
- \zf@this@featurename=!\zf@this@selectionname
- \else
- \zf@this@featurename=\zf@this@selectionname
- \fi
- \fi}%
+ \unless\ifodd #2
+ \edef\@tempb{\XeTeXselectorname\zf@basefont #1 #2}%
+ \else
+ \edef\@tempb{\XeTeXselectorname\zf@basefont #1 \numexpr#2-1\relax}%
+ \unless\ifx\@tempb\@empty
+ \edef\@tempb{!\@tempb}%
+ \fi
+ \fi
+ \fi
+ \unless\ifx\@tempb\@empty
+ \edef\@tempa{\@tempa=\@tempb}%
+ \else
+ \let\@tempa\@empty
\fi
\fi}
\newcommand\zf@iv@strnum[1]{%
@@ -421,27 +516,64 @@
\advance\c@zf@index\@ne
\fi
\repeat}
+\define@key[zf]{prepreparse}{ExternalLocation}[]{%
+ \zf@icutrue
+ \zf@nobftrue\zf@noittrue
+ \gdef\zf@font@wrap##1{[#1##1]}}
+\define@choicekey[zf]{preparse}{Renderer}{AAT,ICU}{%
+ \edef\zf@suffix{\zf@suffix/#1}%
+ \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +rend:#1}}
+\define@key[zf]{preparse}{Script}{%
+ \zf@icutrue
+ \edef\zf@suffix{\zf@suffix/ICU}%
+ \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +script:#1}%
+ {\setkeys[zf@feat]{Script}{#1}}}
+\define@key[zf]{preparse}{Language}{%
+ \zf@icutrue
+ \edef\zf@suffix{\zf@suffix/ICU}%
+ \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt
+ \edef\zf@family@long{\zf@family@long +language:#1}%
+ {\setkeys[zf@feat]{Lang}{#1}}}
\define@key[zf]{preparse}{BoldFont}{%
- \zf@partial@fontname#1\@nil
- \let\zf@bf\@tempa
- \edef\zf@family@long{\zf@family@long bf:#1}}
+ \edef\@tempa{#1}%
+ \ifx\@tempa\@empty
+ \zf@nobftrue
+ \edef\zf@family@long{\zf@family@long nobf}%
+ \else
+ \zf@nobffalse
+ \zf@partial@fontname#1\@nil=\zf@bf
+ \edef\zf@family@long{\zf@family@long bf:#1}%
+ \fi}
\define@key[zf]{preparse}{ItalicFont}{%
- \zf@partial@fontname#1\@nil
- \let\zf@it\@tempa
- \edef\zf@family@long{\zf@family@long it:#1}}
+ \edef\@tempa{#1}%
+ \ifx\@tempa\@empty
+ \zf@noittrue
+ \edef\zf@family@long{\zf@family@long noit}%
+ \else
+ \zf@noitfalse
+ \zf@partial@fontname#1\@nil=\zf@it
+ \edef\zf@family@long{\zf@family@long it:#1}%
+ \fi}
\define@key[zf]{preparse}{BoldItalicFont}{%
- \zf@partial@fontname#1\@nil
- \let\zf@bfit\@tempa
+ \zf@partial@fontname#1\@nil=\zf@bfit
\edef\zf@family@long{\zf@family@long bfit:#1}}
\define@key[zf]{options}{SmallCapsFont}{%
- \zf@partial@fontname#1\@nil
- \let\zf@sc\@tempa
- \zf@update@family{sc:\zap@space #1 \@empty}}
-\def\zf@partial@fontname#1#2\@nil{%
+ \edef\@tempa{#1}%
+ \ifx\@tempa\@empty
+ \zf@nosctrue
+ \edef\zf@family@long{\zf@family@long nosc}%
+ \else
+ \zf@noscfalse
+ \zf@partial@fontname#1\@nil=\zf@sc
+ \zf@update@family{sc:\zap@space #1 \@empty}%
+ \fi}
+\def\zf@partial@fontname#1#2\@nil=#3{%
\if#1*\relax
- \edef\@tempa{\zf@fontname#2}%
+ \edef#3{\zf@fontname#2}%
\else
- \edef\@tempa{#1#2}%
+ \edef#3{#1#2}%
\fi}
\define@key[zf]{preparse}{UprightFeatures}{%
\def\zf@up@feat{,#1}%
@@ -458,20 +590,13 @@
\define@key[zf]{options}{SmallCapsFeatures}{%
\unless\ifzf@firsttime\def\zf@sc@feat{,#1}\fi
\zf@update@family{scfeat:\zap@space #1 \@empty}}
-\define@choicekey[zf]{preparse}{Renderer}{AAT,ICU}{%
- \edef\zf@suffix{\zf@suffix/#1}%
- \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
- \edef\zf@family@long{\zf@family@long +rend:#1}}
-\define@key[zf]{preparse}{Script}{%
- \edef\zf@suffix{\zf@suffix/ICU}%
- \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
- \edef\zf@family@long{\zf@family@long +script:#1}
- {\setkeys[zf@feat]{Script}{#1}}}
-\define@key[zf]{preparse}{Language}{%
- \edef\zf@suffix{\zf@suffix/ICU}%
- \font\zf@basefont="\zf@fontname\zf@suffix" at \f@size pt
- \edef\zf@family@long{\zf@family@long +language:#1}
- {\setkeys[zf@feat]{Lang}{#1}}}
+\define@key[zf]{preparse}{SizeFeatures}{%
+ \unless\ifzf@firsttime
+ \def\zf@size@feat{#1}%
+ \fi
+ \zf@update@family{sizefeat:\zap@space #1 \@empty}}
+\define@key[zf]{sizing}{Size}{\def\zf@size{#1}}
+\define@key[zf]{sizing}{Font}{\def\zf@size@fnt{#1}}
\define@key[zf]{options}{Scale}{%
\edef\@tempa{#1}%
\edef\@tempb{MatchLowercase}%
@@ -493,7 +618,7 @@
\setlength\@tempdima{\fontdimen#1\font}%
\setlength\@tempdimb{\fontdimen#1\zf@basefont}%
\setlength\@tempdimc{1pt*\ratio{\@tempdima}{\@tempdimb}}%
- \xdef\zf@scale{\strip@pt\@tempdimc}
+ \xdef\zf@scale{\strip@pt\@tempdimc}%
\zf@PackageInfo{\zf@fontname\space scale = \zf@scale}%
\endgroup}
\define@key[zf]{options}{WordSpace}{%
@@ -504,20 +629,22 @@
\def\zf@wordspace@parse#1,#2,#3,#4\zf@@{%
\def\@tempa{#4}%
\ifx\@tempa\@empty
- \g@addto@macro\zf@adjust{%
- \fontdimen2\font#1\fontdimen2\font
- \fontdimen3\font#1\fontdimen3\font
- \fontdimen4\font#1\fontdimen4\font}%
+ \setlength\@tempdima{#1\fontdimen2\zf@basefont}%
+ \@tempdimb\@tempdima
+ \@tempdimc\@tempdima
\else
- \g@addto@macro\zf@adjust{%
- \fontdimen2\font#1\fontdimen2\font
- \fontdimen3\font#2\fontdimen3\font
- \fontdimen4\font#3\fontdimen4\font}%
- \fi}
+ \setlength\@tempdima{#1\fontdimen2\zf@basefont}%
+ \setlength\@tempdimb{#2\fontdimen3\zf@basefont}%
+ \setlength\@tempdimc{#3\fontdimen4\zf@basefont}%
+ \fi
+ \edef\zf@adjust{\zf@adjust
+ \fontdimen2\font\the\@tempdima
+ \fontdimen3\font\the\@tempdimb
+ \fontdimen4\font\the\@tempdimc}}
\define@key[zf]{options}{PunctuationSpace}{%
\zf@update@family{+punctspace:#1}%
- \g@addto@macro\zf@adjust{%
- \fontdimen7\font#1\fontdimen7\font}}
+ \setlength\@tempdima{#1\fontdimen7\zf@basefont}%
+ \edef\zf@adjust{\zf@adjust\fontdimen7\font\the\@tempdima}}
\define@key[zf]{options}{LetterSpace}{%
\zf@update@family{+tracking:#1}%
\zf@update@ff{letterspace=#1}}
@@ -530,11 +657,23 @@
\else
\zf@check@one@char#1\zf@@
\ifx\@tempb\@empty
- \g@addto@macro\zf@adjust{%
- {\expandafter\hyphenchar\expandafter
- \font\expandafter`#1}}%
+ {\zf@basefont\expandafter\ifnum\expandafter\XeTeXcharglyph\expandafter`#1 > 0
+ \g@addto@macro\zf@adjust{%
+ {\expandafter\hyphenchar\expandafter
+ \font\expandafter`#1}}%
+ \else
+ \zf@PackageError
+ {\fontname\zf@basefont\space doesn't appear to have the glyph corresponding to #1.}
+ {You can't hyphenate with a character that's not available!}
+ \fi}
\else
- \g@addto@macro\zf@adjust{\hyphenchar\font#1\relax}
+ {\zf@basefont\ifnum\XeTeXcharglyph#1 > 0
+ \g@addto@macro\zf@adjust{\hyphenchar\font#1\relax}%
+ \else
+ \zf@PackageError
+ {\fontname\zf@basefont\space doesn't appear to have the glyph corresponding to #1.}
+ {You can't hyphenate with a character that's not available!}
+ \fi}
\fi
\fi}
\def\zf@check@one@char#1#2\zf@@{\def\@tempb{#2}}
@@ -554,17 +693,17 @@
\define@key[zf]{options}{OpticalSize}{%
\ifzf@icu
\edef\zf@suffix{\zf@suffix/S=#1}%
- \zf@update@family{+size:#1}
+ \zf@update@family{+size:#1}%
\fi
\ifzf@mm
\zf@update@family{+size:#1}%
- \zf@update@ff{optical size=#1}
+ \zf@update@ff{optical size=#1}%
\fi
\ifzf@icu\else
\ifzf@mm\else
\ifzf@firsttime
\zf@PackageWarning
- {\fontname\zf@basefont\space doesn't appear to have an Optical Size axis}
+ {\fontname\zf@basefont\space doesn't appear to have an Optical Size axis}%
\fi
\fi
\fi}
@@ -594,88 +733,90 @@
\zf@define@feature@option{Ligatures}{Icelandic} {1}{32}{}
\zf@define@feature@option{Ligatures}{NoIcelandic} {1}{33}{}
\zf@define@font@feature{Letters}
-\zf@define@feature@option{Letters}{Normal}{3}{0}{}
-\zf@define@feature@option{Letters}{Uppercase}{3}{1}{+case}
-\zf@define@feature@option{Letters}{Lowercase}{3}{2}{}
-\zf@define@feature@option{Letters}{SmallCaps}{3}{3}{+smcp}
-\zf@define@feature@option{Letters}{PetiteCaps}{}{}{+pcap}
-\zf@define@feature@option{Letters}{UppercaseSmallCaps}{}{}{+c2sc}
-\zf@define@feature@option{Letters}{UppercasePetiteCaps}{}{}{+c2pc}
-\zf@define@feature@option{Letters}{InitialCaps}{3}{4}{}
-\zf@define@feature@option{Letters}{Unicase}{}{}{+unic}
+\zf@define@feature@option{Letters}{Normal} {3}{0}{}
+\zf@define@feature@option{Letters}{Uppercase} {3}{1}{+case}
+\zf@define@feature@option{Letters}{Lowercase} {3}{2}{}
+\zf@define@feature@option{Letters}{SmallCaps} {3}{3}{+smcp}
+\zf@define@feature@option{Letters}{PetiteCaps} {} {} {+pcap}
+\zf@define@feature@option{Letters}{UppercaseSmallCaps} {} {} {+c2sc}
+\zf@define@feature@option{Letters}{UppercasePetiteCaps}{} {} {+c2pc}
+\zf@define@feature@option{Letters}{InitialCaps} {3}{4}{}
+\zf@define@feature@option{Letters}{Unicase} {} {} {+unic}
\zf@define@font@feature{Numbers}
-\zf@define@feature@option{Numbers}{Monospaced}{6}{0}{+tnum}
-\zf@define@feature@option{Numbers}{Proportional}{6}{1}{+pnum}
-\zf@define@feature@option{Numbers}{Lowercase}{21}{0}{+onum}
-\zf@define@feature@option{Numbers}{OldStyle}{21}{0}{+onum}
-\zf@define@feature@option{Numbers}{Uppercase}{21}{1}{+lnum}
-\zf@define@feature@option{Numbers}{Lining}{21}{1}{+lnum}
-\zf@define@feature@option{Numbers}{SlashedZero}{14}{5}{+zero}
+\zf@define@feature@option{Numbers}{Monospaced} {6} {0}{+tnum}
+\zf@define@feature@option{Numbers}{Proportional} {6} {1}{+pnum}
+\zf@define@feature@option{Numbers}{Lowercase} {21}{0}{+onum}
+\zf@define@feature@option{Numbers}{OldStyle} {21}{0}{+onum}
+\zf@define@feature@option{Numbers}{Uppercase} {21}{1}{+lnum}
+\zf@define@feature@option{Numbers}{Lining} {21}{1}{+lnum}
+\zf@define@feature@option{Numbers}{SlashedZero} {14}{5}{+zero}
\zf@define@feature@option{Numbers}{NoSlashedZero}{14}{4}{-zero}
-\zf@define@font@feature{Contextuals}
-\zf@define@feature@option{Contextuals}{Swash}{}{}{+cswh}
-\zf@define@feature@option{Contextuals}{NoSwash}{}{}{-cswh}
-\zf@define@feature@option{Contextuals}{WordInitial}{8}{0}{+init}
+\zf@define@font@feature {Contextuals}
+\zf@define@feature@option{Contextuals}{Swash} {} {} {+cswh}
+\zf@define@feature@option{Contextuals}{NoSwash} {} {} {-cswh}
+\zf@define@feature@option{Contextuals}{WordInitial} {8}{0}{+init}
\zf@define@feature@option{Contextuals}{NoWordInitial}{8}{1}{-init}
-\zf@define@feature@option{Contextuals}{WordFinal}{8}{2}{+fina}
-\zf@define@feature@option{Contextuals}{NoWordFinal}{8}{3}{-fina}
-\zf@define@feature@option{Contextuals}{LineInitial}{8}{4}{}
+\zf@define@feature@option{Contextuals}{WordFinal} {8}{2}{+fina}
+\zf@define@feature@option{Contextuals}{NoWordFinal} {8}{3}{-fina}
+\zf@define@feature@option{Contextuals}{LineInitial} {8}{4}{}
\zf@define@feature@option{Contextuals}{NoLineInitial}{8}{5}{}
-\zf@define@feature@option{Contextuals}{LineFinal}{8}{6}{+falt}
-\zf@define@feature@option{Contextuals}{NoLineFinal}{8}{7}{-falt}
-\zf@define@feature@option{Contextuals}{Inner}{8}{8}{+medi}
-\zf@define@feature@option{Contextuals}{NoInner}{8}{9}{-medi}
+\zf@define@feature@option{Contextuals}{LineFinal} {8}{6}{+falt}
+\zf@define@feature@option{Contextuals}{NoLineFinal} {8}{7}{-falt}
+\zf@define@feature@option{Contextuals}{Inner} {8}{8}{+medi}
+\zf@define@feature@option{Contextuals}{NoInner} {8}{9}{-medi}
\zf@define@font@feature{Diacritics}
-\zf@define@feature@option{Diacritics}{Show}{9}{0}{}
-\zf@define@feature@option{Diacritics}{Hide}{9}{1}{}
+\zf@define@feature@option{Diacritics}{Show} {9}{0}{}
+\zf@define@feature@option{Diacritics}{Hide} {9}{1}{}
\zf@define@feature@option{Diacritics}{Decompose}{9}{2}{}
\zf@define@font@feature{Kerning}
\zf@define@feature@option{Kerning}{Uppercase}{}{}{+cpsp}
-\zf@define@feature@option{Kerning}{On}{}{}{+kern}
-\zf@define@feature@option{Kerning}{Off}{}{}{-kern}
+\zf@define@feature@option{Kerning}{On} {}{}{+kern}
+\zf@define@feature@option{Kerning}{Off} {}{}{-kern}
\zf@define@font@feature{VerticalPosition}
-\zf@define@feature@option{VerticalPosition}{Normal}{10}{0}{}
-\zf@define@feature@option{VerticalPosition}{Superior}{10}{1}{+sups}
-\zf@define@feature@option{VerticalPosition}{Inferior}{10}{2}{+subs}
+\zf@define@feature@option{VerticalPosition}{Normal} {10}{0}{}
+\zf@define@feature@option{VerticalPosition}{Superior} {10}{1}{+sups}
+\zf@define@feature@option{VerticalPosition}{Inferior} {10}{2}{+subs}
+\zf@define@feature@option{VerticalPosition}{Ordinal} {10}{3}{+ordn}
+\zf@define@feature@option{VerticalPosition}{Numerator} {} {} {+numr}
+\zf@define@feature@option{VerticalPosition}{Denominator}{} {} {+dnom}
\zf@define@feature@option{VerticalPosition}{ScientificInferior}{}{}{+sinf}
-\zf@define@feature@option{VerticalPosition}{Ordinal}{10}{3}{+ordn}
-\zf@define@feature@option{VerticalPosition}{Numerator}{}{}{+numr}
-\zf@define@feature@option{VerticalPosition}{Denominator}{}{}{+dnom}
\zf@define@font@feature{Fractions}
-\zf@define@feature@option{Fractions}{On}{11}{1}{+frac}
-\zf@define@feature@option{Fractions}{Off}{11}{0}{-frac}
-\zf@define@feature@option{Fractions}{Diagonal}{11}{2}{}
-\zf@define@feature@option{Fractions}{Alternate}{}{}{+afrc}
+\zf@define@feature@option{Fractions}{On} {11}{1}{+frac}
+\zf@define@feature@option{Fractions}{Off} {11}{0}{-frac}
+\zf@define@feature@option{Fractions}{Diagonal} {11}{2}{}
+\zf@define@feature@option{Fractions}{Alternate}{} {} {+afrc}
\define@key[zf]{options}{Alternate}{%
\setkeys*[zf@feat]{Alternate}{#1}%
\unless\ifx\XKV@rm\@empty
+ \def\XKV@tfam{Alternate}%
\zf@make@feature{17}{#1}{}%
\fi}
\define@key[zf]{options}{Variant}{%
\setkeys*[zf@feat]{Variant}{#1}%
\unless\ifx\XKV@rm\@empty
+ \def\XKV@tfam{Variant}%
\zf@make@feature{18}{#1}{+ss\two@digits{#1}}%
\fi}
\zf@define@font@feature{Style}
-\zf@define@feature@option{Style}{Alternate}{}{}{+salt}
-\zf@define@feature@option{Style}{Italic}{32}{2}{+ital}
-\zf@define@feature@option{Style}{Ruby}{28}{2}{+ruby}
-\zf@define@feature@option{Style}{Swash}{}{}{+swsh}
-\zf@define@feature@option{Style}{Historic}{}{}{+hist}
-\zf@define@feature@option{Style}{Display}{19}{1}{}
-\zf@define@feature@option{Style}{Engraved}{19}{2}{}
-\zf@define@feature@option{Style}{TitlingCaps}{19}{4}{+titl}
-\zf@define@feature@option{Style}{TallCaps}{19}{5}{}
-\zf@define@feature@option{Style}{HorizontalKana}{}{}{+hkna}
-\zf@define@feature@option{Style}{VerticalKana}{}{}{+vkna}
+\zf@define@feature@option{Style}{Alternate} {} {} {+salt}
+\zf@define@feature@option{Style}{Italic} {32}{2}{+ital}
+\zf@define@feature@option{Style}{Ruby} {28}{2}{+ruby}
+\zf@define@feature@option{Style}{Swash} {} {} {+swsh}
+\zf@define@feature@option{Style}{Historic} {} {} {+hist}
+\zf@define@feature@option{Style}{Display} {19}{1}{}
+\zf@define@feature@option{Style}{Engraved} {19}{2}{}
+\zf@define@feature@option{Style}{TitlingCaps} {19}{4}{+titl}
+\zf@define@feature@option{Style}{TallCaps} {19}{5}{}
+\zf@define@feature@option{Style}{HorizontalKana}{} {} {+hkna}
+\zf@define@feature@option{Style}{VerticalKana} {} {} {+vkna}
\zf@define@font@feature{CJKShape}
-\zf@define@feature@option{CJKShape}{Traditional}{20}{0}{+trad}
-\zf@define@feature@option{CJKShape}{Simplified}{20}{1}{+smpl}
-\zf@define@feature@option{CJKShape}{JIS1978}{20}{2}{+jp78}
-\zf@define@feature@option{CJKShape}{JIS1983}{20}{3}{+jp83}
-\zf@define@feature@option{CJKShape}{JIS1990}{20}{4}{+jp90}
-\zf@define@feature@option{CJKShape}{Expert}{20}{10}{+expt}
-\zf@define@feature@option{CJKShape}{NLC}{20}{13}{+nlck}
+\zf@define@feature@option{CJKShape}{Traditional}{20}{0} {+trad}
+\zf@define@feature@option{CJKShape}{Simplified} {20}{1} {+smpl}
+\zf@define@feature@option{CJKShape}{JIS1978} {20}{2} {+jp78}
+\zf@define@feature@option{CJKShape}{JIS1983} {20}{3} {+jp83}
+\zf@define@feature@option{CJKShape}{JIS1990} {20}{4} {+jp90}
+\zf@define@feature@option{CJKShape}{Expert} {20}{10}{+expt}
+\zf@define@feature@option{CJKShape}{NLC} {20}{13}{+nlck}
\zf@define@font@feature{CharacterWidth}
\zf@define@feature@option{CharacterWidth}{Proportional}{22}{0}{+pwid}
\zf@define@feature@option{CharacterWidth}{Full}{22}{1}{+fwid}
@@ -859,7 +1000,7 @@
\newfontlanguage{Tigre}{TGR} \newfontlanguage{Tigrinya}{TGY} \newfontlanguage{Thai}{THA}
\newfontlanguage{Tahitian}{THT} \newfontlanguage{Tibetan}{TIB} \newfontlanguage{Turkmen}{TKM}
\newfontlanguage{Temne}{TMN} \newfontlanguage{Tswana}{TNA} \newfontlanguage{Tundra Nenets}{TNE}
-\newfontlanguage{Tonga}{TNG} \newfontlanguage{Todo}{TOD} \newfontlanguage{Turkish}{TUR}
+\newfontlanguage{Tonga}{TNG} \newfontlanguage{Todo}{TOD}
\newfontlanguage{Tsonga}{TSG} \newfontlanguage{Turoyo Aramaic}{TUA} \newfontlanguage{Tulu}{TUL}
\newfontlanguage{Tuvin}{TUV} \newfontlanguage{Twi}{TWI} \newfontlanguage{Udmurt}{UDM}
\newfontlanguage{Ukrainian}{UKR} \newfontlanguage{Urdu}{URD} \newfontlanguage{Upper Sorbian}{USB}
@@ -871,6 +1012,28 @@
\newfontlanguage{Yi Modern}{YIM} \newfontlanguage{Chinese Hong Kong}{ZHH}
\newfontlanguage{Chinese Phonetic}{ZHP} \newfontlanguage{Chinese Simplified}{ZHS}
\newfontlanguage{Chinese Traditional}{ZHT} \newfontlanguage{Zande}{ZND} \newfontlanguage{Zulu}{ZUL}
+\define@key[zf@feat]{Lang}{Turkish}[]{%
+ \zf@check@ot@lang{TRK}%
+ \if@tempswa
+ \c@zf@language\@tempcnta\relax
+ \xdef\zf@language@name{Turkish}%
+ \xdef\zf@family@long{\zf@family@long+lang=Turkish}%
+ \xdef\zf@pre@ff{\zf@pre@ff language=TRK,}%
+ \else
+ \zf@check@ot@lang{TUR}%
+ \if@tempswa
+ \c@zf@language\@tempcnta\relax
+ \xdef\zf@language@name{Turkish}%
+ \xdef\zf@family@long{\zf@family@long+lang=Turkish}%
+ \xdef\zf@pre@ff{\zf@pre@ff language=TUR,}%
+ \else
+ \zf@PackageWarning{Font \fontname\zf@basefont does not contain
+ language '#1' for script '\zf@script@name'}%
+ \fi
+ \fi}
+\define@key[zf]{options}{RawFeature}{%
+ \zf@update@family{+Raw:#1}%
+ \zf@update@ff{#1}}
\providecommand*{\sidefault}{si}
\DeclareRobustCommand{\sishape}{%
\not@math@alphabet\sishape\relax
@@ -897,26 +1060,13 @@
\DeclareRobustCommand{\upshape}{%
\not@math@alphabet\upshape\relax
\zf@merge@shape\updefault\sidefault\scdefault}
-\AtBeginDocument{%
- \DeclareRobustCommand\em
- {\@nomath\em
- \edef\@tempa{\f@shape}%
- \edef\@tempb{\itdefault}%
- \ifx\@tempa\@tempb
- \eminnershape
- \else
- \emshape
- \fi}}
-\DeclareTextFontCommand{\emph}{\em}
-\let\emshape\itshape
-\let\eminnershape\upshape
-\@ifpackageloaded{euler}{\zf@euler@package@loadedtrue}
- {\zf@euler@package@loadedfalse}
+\@ifpackageloaded{euler}{\zf@package@euler@loadedtrue}
+ {\zf@package@euler@loadedfalse}
\AtBeginDocument{%
\let\zf@font@warning\@font@warning
\let\@font@warning\@font@info
\@ifpackageloaded{euler}{%
- \ifzf@euler@package@loaded
+ \ifzf@package@euler@loaded
\zf@math@eulertrue
\else
\zf@PackageError{The euler package must be loaded BEFORE fontspec}
@@ -1003,19 +1153,16 @@
\SetMathAlphabet\mathsf{bold}\zf@enc\zf@sfmaths\bfdefault\updefault
\SetMathAlphabet\mathtt{bold}\zf@enc\zf@ttmaths\bfdefault\updefault
\let\font@warning\zf@font@warning}
-\DeclareOption{config}{%
+\if@zf@configfile
\InputIfFileExists{fontspec.cfg}
{\typeout{fontspec.cfg loaded.}}
- {\typeout{fontspec.cfg would be loaded now if it existed.}}}
-\DeclareOption{noconfig}{}
-\DeclareOption{quiet}{\let\zf@PackageWarning\zf@PackageInfo}
-\ExecuteOptions{config}
-\ProcessOptions
+ {\typeout{No fontspec.cfg file found; no configuration loaded.}}
+\fi
%%
-%% Copyright 2005 by Will Robertson <will@guerilla.net.au>
+%% Copyright 2005-2006 by Will Robertson <wspr81@gmail.com>
%%
%% Distributable under the LaTeX Project Public License,
-%% version 1.3b or higher (your choice). The latest version of
+%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
%% This work is "maintained" (as per LPPL maintenance status)
diff --git a/Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty b/Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
index c8527e2fd5c..d5641f00dba 100644
--- a/Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
+++ b/Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
@@ -12,52 +12,104 @@
%% License information appended
%%
%%
-\unless\ifdefined\XeTeXversion
- \@latex@error{^^J
- *************************************************^^J
- *** The xltxtra package only works with XeTeX ***^^J
- *************************************************}
-\fi
\ProvidesPackage{xltxtra}
- [2006/06/08 v0.1 Improvements for the XeTeX/LaTeX format]
-\newcommand*\TeXlogospacing[5]{%
- \DeclareRobustCommand\TeX{%
- \leavevmode
- \smash{%
- T\kern#1
- \lower#3\hbox{E}\kern#2 X}%
- \spacefactor1000\relax}
- \DeclareRobustCommand{\LaTeX}{%
- \leavevmode
- \smash{
- L\kern#4%
- {\sbox\z@ T%
- \vbox to\ht\z@{\hbox{\check@mathfonts
- \fontsize\sf@size\z@
- \math@fontsfalse\selectfont
- A}%
- \vss}%
- }%
- \kern#5%
- \TeX}}
- \DeclareRobustCommand\XeTeX{%
- \leavevmode
- \smash{%
- X\lower #3
- \hbox{\kern #2
- \ifnum\XeTeXcharglyph"018E > 0
+ [2006/06/13 v0.2 Improvements for the XeTeX/LaTeX format]
+\RequirePackage{ifxetex}
+\RequireXeTeX
+\RequirePackage{graphicx}
+\RequirePackage{fontspec}
+\RequirePackage{xunicode}
+\newlength\xxt@kern@Te
+\newlength\xxt@kern@eX
+\newlength\xxt@lower@e
+\newlength\xxt@kern@La
+\newlength\xxt@kern@aT
+\newlength\xxt@kern@eL
+\newcommand*\TeX@logo@spacing[6]{%
+ \setlength\xxt@kern@Te{#1}%
+ \setlength\xxt@kern@eX{#2}%
+ \setlength\xxt@lower@e{#3}%
+ \setlength\xxt@kern@La{#4}%
+ \setlength\xxt@kern@aT{#5}%
+ \setlength\xxt@kern@eL{#6}%
+}
+\DeclareRobustCommand\TeX{%
+ \leavevmode
+ \smash{%
+ T\kern\xxt@kern@Te
+ \lower\xxt@lower@e\hbox{E}\kern\xxt@kern@eX X}%
+ \spacefactor1000\relax}
+\DeclareRobustCommand{\LaTeX}{%
+ \leavevmode
+ \smash{%
+ L\kern\xxt@kern@La
+ {\sbox\z@ T%
+ \vbox to\ht\z@{\hbox{\check@mathfonts
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern\xxt@kern@aT
+ \TeX}}
+\DeclareRobustCommand\XeTeX{%
+ \leavevmode
+ \smash{%
+ X\lower\xxt@lower@e
+ \hbox{\kern\xxt@kern@eX
+ \ifnum\XeTeXfonttype\font>0
+ \ifnum\XeTeXcharglyph"018E>0
\char"018E\relax
- \else\ifdim\fontdimen1\font=0pt
- \reflectbox{E}%
- \else % rotation is about the origin, so we need to adjust positioning
- \XeTeXuseglyphmetrics=1%
- \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0%
- \raise\dimen0\hbox{\rotatebox{180}{\box0}}%
- \fi\fi
- }\kern#1\TeX}}}
-\TeXlogospacing{-0.15em}{-0.15em}{0.5ex}{-0.36em}{-0.15em}
+ \else
+ \ifdim\fontdimen1\font=0pt
+ \reflectbox{E}%
+ \else
+ \XeTeXuseglyphmetrics=1%
+ \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0%
+ \raise\dimen0\hbox{\rotatebox{180}{\box0}}%
+ \fi
+ \fi
+ \else
+ \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0%
+ \raise\dimen0\hbox{\rotatebox{180}{\box0}}%
+ \fi
+ }\kern\xxt@kern@Te\TeX}}%
+\DeclareRobustCommand\XeLaTeX{%
+ \leavevmode
+ \smash{%
+ X\lower\xxt@lower@e
+ \hbox{\kern\xxt@kern@eX
+ \ifnum\XeTeXfonttype\font>0\relax
+ \ifnum\XeTeXcharglyph"018E>0\relax
+ \char"018E\relax
+ \else
+ \ifdim\fontdimen1\font=0pt\relax
+ \reflectbox{E}%
+ \else
+ \XeTeXuseglyphmetrics=1\relax
+ \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0\relax
+ \raise\dimen0\hbox{\rotatebox{180}{\box0}}%
+ \fi
+ \fi
+ \else
+ \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0\relax
+ \raise\dimen0\hbox{\rotatebox{180}{\box0}}%
+ \fi}\kern\xxt@kern@eL\LaTeX}}
+\TeX@logo@spacing{-0.15em}{-0.15em}{0.5ex}{-0.36em}{-0.15em}{-0.1em}
\RequirePackage{etex}
\RequirePackage{fixltx2e}[2006/03/24]
+\DeclareRobustCommand\em
+ {\@nomath\em
+ \edef\@tempa{\f@shape}%
+ \edef\@tempb{\itdefault}%
+ \ifx\@tempa\@tempb
+ \eminnershape
+ \else
+ \emshape
+ \fi}
+\DeclareTextFontCommand{\emph}{\em}
+\let\emshape\itshape
+\let\eminnershape\upshape
\newcommand*\robust@let@nc[2]{%
\expandafter\let\expandafter#1\csname #2 \endcsname}
\DeclareRobustCommand{\-}{%
@@ -139,11 +191,19 @@
{\addfontfeature{VerticalPosition=Denominator}#2}%
\fi
\endgroup}
+\newcommand\namedglyph[1]{%
+ \@tempcnta=\XeTeXglyphindex "#1"\relax
+ \ifnum\@tempcnta>0
+ \XeTeXglyph\@tempcnta
+ \else
+ \xxt@namedglyph@fallback{#1}%
+ \fi}
+\newcommand\xxt@namedglyph@fallback[1]{[#1]}
%%
%% Copyright (C) 2006 by Will Robertson <wspr81@gmail.com>
%%
%% Distributable under the LaTeX Project Public License,
-%% version 1.3b or higher (your choice). The latest version of
+%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
%% This work is "maintained" (as per LPPL maintenance status)