[texhax] Throughput

Peter Davis pfd at pfdstudio.com
Fri Mar 4 19:20:30 CET 2011

On Fri, Mar 4, 2011 at 9:18 AM, William Adams <will.adams at frycomm.com>wrote:

> On Mar 3, 2011, at 4:07 PM, Peter Davis wrote:
> > Also, William Adams mentioned that calling \fontspec can be very
> expensive, and I'm definitely doing that over and over again.  I guess
> there's a way to cache the font settings to eliminate a lot of that overhead
> when using the same font repeatedly.  (Unfortunately, when processing the
> XML, I have no way of knowing which is the 'normal' font for the document.)
> All of this is documented in the Fontspec documentation --- you want to
> make one font instance for each font used (say in the pre-amble) then make
> use of said font instances in the body of the document. It would probably be
> okay in terms of processing time to have a single package file which
> instantiated instances for _all_ fonts you are planning on using, then load
> that package file.

I think you're talking about the \newfontfamily and \newfontface commands,
right?  Does these *have* to appear in the preamble, or can I define a font
family anywhere in the document?  I've just tried the code below, and I get

! Undefined control sequence.
l.40 \MyriadZPro

Sample tex:





\newfontfamily\MyriadZPro{Myriad Pro}\MyriadZPro






0.130000}{one at one.com}\null\par}



The Tech Curmudgeon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110304/ac6895d6/attachment.html>

More information about the texhax mailing list