From 446616af78c68a47b3851065c2121bab5a96ad53 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Jun 2006 22:49:18 +0000 Subject: fontspec update, and put under xetex git-svn-id: svn://tug.org/texlive/trunk@1706 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/xetex/fontspec/README | 48 ++++++++++++++++++ .../doc/xetex/fontspec/fontspec-example.tex | 55 +++++++++++++++++++++ Master/texmf-dist/doc/xetex/fontspec/fontspec.pdf | Bin 0 -> 1971940 bytes 3 files changed, 103 insertions(+) create mode 100644 Master/texmf-dist/doc/xetex/fontspec/README create mode 100644 Master/texmf-dist/doc/xetex/fontspec/fontspec-example.tex create mode 100644 Master/texmf-dist/doc/xetex/fontspec/fontspec.pdf (limited to 'Master/texmf-dist/doc/xetex') diff --git a/Master/texmf-dist/doc/xetex/fontspec/README b/Master/texmf-dist/doc/xetex/fontspec/README new file mode 100644 index 00000000000..b9f6e1b014b --- /dev/null +++ b/Master/texmf-dist/doc/xetex/fontspec/README @@ -0,0 +1,48 @@ +-------------------------- +THE FONTSPEC PACKAGE v1.10 + +The fontspec package only works with XeTeX, a unicode capable TeX-variant. It provides an automatic and unified interface for loading fonts in LaTeX. XeTeX allows a direct interface to system-installed fonts, so no manual font installation is required. + +This package also provides access to the large number of font features available with AAT and OpenType fonts, including upper and lower case numbers, proportional and monospaced numbers, swash letters, vulgar fractions, ligature control, and many others. + +It also provides an interface to set the XeTeX font mappings, font colour, relative font scaling, inter-word space scaling, and more. + +------------------------ +SUMMARY OF USER COMMANDS + +Font families may be selected individually with the command + \fontspec[]{} + +Commands for selecting fonts efficiently can be created with + \newfontinstance\myfont[]{} + +Default document fonts are selected with + \setromanfont[]{} + \setsansfont[]{} + \setmonofont[]{} + +Fonts to be used in maths are defined with + \setmathrm[]{} + \setmathsf[]{} + \setmathtt[]{} + \setboldmathrm[]{} + +Features to be used for every subsequently defined font are specified with + \defaultfontfeatures{} + +Features may be added to the font currently in use with + \addfontfeatures{} + \addfontfeature{<...>} does the same thing + +Features not provided for out of the box may be defined with + \newAATfeature{}{}{} + \newICUfeature{}{[+|-]<4 letter feature string>} + \newfontfeature{}{} + +Features can be renamed and feature options can be renamed with + \aliasfontfeature{}{} + \aliasfontfeatureoption{}{}{} + +-------------- +Will Robertson +2006 \ No newline at end of file diff --git a/Master/texmf-dist/doc/xetex/fontspec/fontspec-example.tex b/Master/texmf-dist/doc/xetex/fontspec/fontspec-example.tex new file mode 100644 index 00000000000..2aed92a6fc3 --- /dev/null +++ b/Master/texmf-dist/doc/xetex/fontspec/fontspec-example.tex @@ -0,0 +1,55 @@ + +\documentclass[12pt]{article} + +\usepackage{euler,fontspec,graphicx} + +\defaultfontfeatures{Scale=MatchLowercase ,Mapping=tex-text} +\setromanfont{Hoefler Text} +\setsansfont{Gill Sans} +\setmonofont{Lucida Sans Typewriter} + +%% Define the \XeTeX logo: +\DeclareRobustCommand\XeTeX{% + \mbox{\smash{% + X\lower.5ex\hbox{\kern-.12em\reflectbox{E}}\kern-.1667em + T\kern -.1667em\lower .5ex\hbox {E}\kern -.12em X}}\@} +%% The logo should be defined on a per-document basis +%% so that its parameters may be fine tuned for the fonts used. + +\begin{document} +\pagestyle{empty} + +\section{The basics of the \textsf{fontspec} package} + +The \textsf{fontspec} package enables automatic font selection for \LaTeX{} documents typeset with \XeTeX{}. The basic command is\\ +\indent \verb|\fontspec[font features]{Mac OS X font display name}|.\\ +As an example: + +\begin{center} + \Large + \fontspec[ + Colour = 0000CC, + Numbers = OldStyle, + VerticalPosition = Ordinal, + Variant = 2 + ]{Apple Chancery} + My 1st example of Apple Chancery +\end{center} + +The default roman, sans serif, and typewriter fonts may be set with the \verb|\setromanfont|, \verb|\setsansfont| and \verb|\setmonofont| commands, respectively, as shown in the preamble. They take the same syntax as the \verb|\fontspec| package. All expected font shapes are available: + +\begin{center} + {\scshape Small caps and \itshape small caps italic\dots}\\ + {\sffamily\bfseries Bold sans serif and \itshape bold italic sans serif\dots} +\end{center} + +With the roman and sans serif fonts set in the preamble, text fonts in math mode are also changed: $\cos(n\pi)=\pm 1$. The maths typeface `Euler' has been used in this document (with the \textsf{euler} package---note that the \textsf{eulervm} package will not work in \XeTeX{} because it uses virtual fonts), since the default Computer Modern maths font is rather light. +\[ + \mathcal F(s) = \int^\infty_0\! f(t) e^{-st}\,\mathrm{d}t +\] + +You'll also notice the \verb|\defaultfontfeatures| command in the preamble. This command takes a single argument of font features that are then applied to every subsequent instance of font selection. The first argument in this case, \verb|Mapping=tex-text|, enables regular \TeX{} ligatures like \verb|``---''| for ``---''. The second automatically scales the fonts to the same x-height. + +Please see the documentation for font feature explanation and further package niceties. + +\end{document} diff --git a/Master/texmf-dist/doc/xetex/fontspec/fontspec.pdf b/Master/texmf-dist/doc/xetex/fontspec/fontspec.pdf new file mode 100644 index 00000000000..b9a50832149 Binary files /dev/null and b/Master/texmf-dist/doc/xetex/fontspec/fontspec.pdf differ -- cgit v1.2.3