[XeTeX] font selection debugging
jonathan_kew at sil.org
Sun Jul 20 20:14:28 CEST 2008
On 20 Jul 2008, at 4:17 PM, Vladimir Volovich wrote:
> "VV" == Vladimir Volovich writes:
> VV> what is the reason for different font pickup? how can it be
> VV> debugged?
>> i tried setting FC_DEBUG=5 env.var. but got no useful debugging
>> info from
>> \font calls (i see debugging info on the first call to \font, showing
>> how fontconfig reads available fonts, but no debugging for font
>> at all, and subsequent \font calls show no debugging info
> also, if i run e.g. \font\xxa="ArTarumianGrqiNor_U BoldItalic/I/ICU"
> at 10pt
> is there an equivalent fc-match command i can run to get the same font
> as xetex would get?
I'm afraid not; the only way to trace/debug this would be at the gdb
XeTeX does not use direct fontconfig queries each time it handles a
\font\x=.... command; it caches font names and other attributes in its
own tables, and uses these. The first time you use \font it will try
to collect info for all the fonts of the appropriate family, which is
why you see FC debugging info at that point, but not later; then it
relies on its cached data and looks for the best match among the
members of that family.
(And if it can't find "the appropriate family", then it will simply
ask FC for all the fonts it knows, and work from that collection.)
In general, rather than \font\xxa="ArTarumianGrqiNor_U BoldItalic/I/
ICU", I would suggest "\font\xxa="ArTarumianGrqiNor_U/BI/ICU"; in
other words, use the family name and style modifiers in preference to
a full name. (But this may not always work as it should, especially if
the family doesn't have the usual collection of members.)
More information about the XeTeX