[texhax] XeLaTeX, fontspec, fontsize, etc.

Peter Davis pfd at pfdstudio.com
Tue Dec 7 12:22:19 CET 2010


On Tue, Dec 7, 2010 at 3:55 AM, Ulrike Fischer <news3 at nililand.de> wrote:

> Am Mon, 6 Dec 2010 22:19:55 -0500 schrieb Peter Davis:
>
> > I'm debugging a C++ program that reads an XML file and outputs a LaTeX
> file,
> > ready for typesetting.  Due to the nature of the XML, there are some
> > redundant commands in the .tex file, but I don't think they should cause
> the
> > weird behavior I'm seeing.  Basically, I use \fontspec{Minion Pro} and
> > \fontsize{14.000000}{14.000000}. (The \fontsize gets used some extra
> times,
> > but always at 14 pts.  However, in the resulting PDF from XeLaTeX (XeTeX,
> > Version 3.1415926-2.2-0.9997.4 (MiKTeX 2.9)), I get plain text in a small
> > font, and bold or italic text in what appears to be the correct size.
>  Can
> > anyone explain this?
>
> \fontsize takes effect only after a \selectfont commmand. \itshape
> and \bfseries internally issues such a \selectfont.
>

Excellent!  Just adding \selectfont after each \fontsize command seems to
have fixed the problem.

Thank you!

-pd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20101207/0876210e/attachment.html>


More information about the texhax mailing list