[XeTeX] Bug in fontspec's \newfontfamily?
David Perry
hospes.primus at verizon.net
Sat May 23 17:07:38 CEST 2009
Is there any reason why the following code works as it does? The
fontspec docs do not say that a shorthand name is required with the
\newfontfamily and \newfontface commands (and I would not expect such a
requirement), but without the shortcut I get all sorts of nasty error
messages and the requested font changes do not appear in the document.
I tried this using a few other fonts, with the same result. I'm using
MiKTeX under Vista.
David
______________________
% !TEX TS-program = xelatex
% !TEX encoding = UTF-8
\documentclass[11pt]{article}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont{Linux Libertine}
%\setsansfont{Deja Vu Sans}
%\setmonofont{Deja Vu Mono}
\begin{document}
Here's some text in the default font, Linux Libertine!
\bigskip
%\newfontface{Arial Black}
%Now we'll try Arial Black to see what happens!
%two lines above do not work!!
\newfontface\NF{Arial Black}
\NF Now we'll try Arial Black to see what happens using the shorthand NF!
%\bigskip
%\newfontfamily{Palatino Linotype}
%Some roman and
%\it{now some italic}
%\bf{and now some bold} \rm{in Palatino!}
% four lines above do not work!!
\bigskip
\newfontfamily\PL{Palatino Linotype}
\PL Some roman and
\it{now some italic}
\bf{and now some bold} \rm{in Palatino, using shorthand PL!}
\end{document}
More information about the XeTeX
mailing list