[XeTeX] Embarrassing fontspec

Jonathan Kew jonathan_kew at sil.org
Wed Jan 4 15:24:34 CET 2006


On 4 Jan 2006, at 5:57 am, Will Robertson wrote:

> Hello,
>
> In trying to complete fontspec 1.9 before the new year properly  
> begins, I've come across a very strange problem that has me totally  
> stumped.

OK, I can now confirm that it is NOT fontspec that is at fault; this  
is a XeTeX bug. It will typically show up at some point when the  
total number of fonts you've loaded during the job (whether or not  
you actually used them all to print) gets significantly past 1000 or  
so. Because fontspec does so much "speculative" loading of fonts, to  
examine styles and features, you reach this figure in your job,  
though you don't come anywhere near it if you just use \font to load  
the styles you're actually going to print.

I will release an update shortly with this bug fixed (along with a  
couple of others). In the meantime, you should be able to work around  
it by generating your figures in smaller groups, so that you don't  
access quite as many fonts during a single run (and thus run out of  
mojo). I realize that's inconvenient in a case like yours, Will; sorry!

Incidentally, I noticed while trying to track this down that fontspec  
often seems to use \font with the exact same font specification two  
or three times in succession. Is there scope for some optimization of  
the behavior here? I didn't dig any deeper to try and figure out what  
it's really doing, but from inside XeTeX, it looked like repeated  
identical calls.

JK



More information about the XeTeX mailing list