[XeTeX] pre-loading fonts in the format?
Jonathan Kew
jonathan at jfkew.plus.com
Sun Oct 26 16:47:03 CET 2008
On 26 Oct 2008, at 1:04 PM, Manuel Pégourié-Gonnard wrote:
> Jonathan Kew a écrit :
>> Right; this would present various technical challenges, and could be
>> quite confusing for the user if the .fmt file contained references to
>> fonts that meanwhile have been removed or modified in the host
>> system.
>>
> Ok. OTOH, I don't understand exactly how font preloading works for
> "classical" TeX, but the same could happen if the fonts were removed
> from the texmf tree (or even form the map files)? Or maybe TeX needs
> only the tfms while XeTeX is using "more" of the font?
Yes, that's basically the situation. With "classical" TeX, the .fmt
file contains the entire tfm data for the preloaded fonts, so TeX can
then do its work without reference to the tfms or any other files. (If
you remove the tfms, it won't even notice as it already has that data.
If you remove the pfbs or map file entries, TeX won't care, it can
still typeset. Your output driver may have problems, though!)
But for the equivalent to work with xetex, we'd have to "embed" a
large portion of the entire OpenType font into the .fmt file. This
doesn't seem like a good idea.
>
>>> 7 seconds to load on my computer.
>>
>> That seems very slow. What system are you running, and how are you
>> specifying the font name?
>
> I'm running a PC with a pentium dual core 1.86Ghz and enough ram under
> Linux, 64bit system and tex binaries. I'm specifiying the font name
> using fontspec under XeLaTeX as
>
> \setdefaultfont[Mapping=tex-text,Numbers=OldStyle]{Minion Pro}
Which looks fine to me.
>
>> or if you use a form of the font
>> name that is not found directly via fontconfig, in which case xetex
>> will fall back to a slower and more exhaustive search.
>>
> Hum, maybe. Other font loads fast indeed, only Minion is so slow.
> (Maybe
> it's because the family is quite big, with opticals etc. But myriad,
> another quite big family, loads pretty fast.) Is there a way to guess
> the correct name? Below is the relevant part of the output of fc-list.
You're using what seems to be the "primary" family name, which is what
I normally expect to work well. I wonder what it's spending the time
on. It would be instructive to run a test under a profiling tool, but
I'm not in a position to do that on an equivalent system right now
(don't have a Linux machine with Minion Pro available at the moment).
JK
More information about the XeTeX
mailing list