[XeTeX] 0.997 font oddity

Stephen Moye stephenmoye at mac.com
Fri Jul 27 11:55:15 CEST 2007


I updated XeTeX this morning from the svn source. At random, I picked a file to TeX -- (fontspec-example.tex see below).

There is this message in the log file:

      ** NOTICE: This document contains a `Preview & Print only' licensed font **

I tried commenting out all of the fonts (and deleting euler from the \usepackage command), but the message was still there. Where is it coming
from? Presumably this is spurious, as all of the fonts requested seem to be embedded and subsetted in the resulting PDF, whether using the original fonts or commenting them out. Just curious...

There is an amusing irony here: I checked the XeTeX mail archives, and found that my advice (!) when this question came up before was to upgrade the to latest and greatest XeTeX. I thought the problem seemed familiar...

Thanks...


Stephen Moye


%%=====8><----------%%

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt]{article}

\usepackage{euler,fontspec,graphicx}

\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}
\setromanfont{Hoefler Text}
\setsansfont{Gill Sans}
\setmonofont{Courier New}

%% 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}


More information about the XeTeX mailing list