[XeTeX] Bug in fontspec's \newfontfamily?
David Perry
hospes.primus at verizon.net
Sat May 23 18:19:34 CEST 2009
Thank you Arthur. I'm embarrassed to say that I read section 3.2
multiple times before sending my email, but somehow the main point did
not really sink in. (The information is there, but I think it could be
a bit clearer for non-programmers; in any case, I get it now!)
David
Arthur Reutenauer wrote:
>> 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)
>
> Yes, it does, in section 3.2 of the manual (v1.18): \newfontfamily, as
> opposed to \fontspec, creates instances of a font that can be reused
> throughout the document. The first argument to \newfontfamily is the
> macro name, that can then be invoked to trigger the font change.
> Usually, you would define all these macros in a single place, and use
> them where appropriate in your document.
>
> What you seem to be wanting in your example file is the \fontspec
> command, which saves you the trouble of defining a macro if you only
> want to use some font once; but it's inefficient if you're going to use
> that font several times (XeTeX needs to query the system libraries to
> look it up, etc.), which is why \newfontfamily is recommended.
>
> Arthur
>
>
More information about the XeTeX
mailing list