[tex-live] Fontconfig for XeTeX versus regular fontconfig

Zdenek Wagner zdenek.wagner at gmail.com
Thu Nov 3 00:40:01 CET 2011

2011/10/30 Khaled Hosny <khaledhosny at eglug.org>:
> On Sat, Oct 29, 2011 at 08:40:35AM +0100, Jonathan Kew wrote:
>> On 28 Oct 2011, at 22:44, Khaled Hosny wrote:
>> > On Thu, Oct 27, 2011 at 10:39:13PM +0100, Jonathan Kew wrote:
>> >> I believe the worst of the problems with xetex/xdvipdfmx font
>> >> mismatches due to multiple versions of the same-named font could
>> >> actually be fixed fairly easily, by modifying xetex so that (when
>> >> using fontconfig to find fonts) it always writes the absolute path to
>> >> the font file into the xdv output (as if the font had been specified
>> >> by absolute pathname in the source document).
>> >
>> > It turned out not that hard, the attached (very minimal patch) will
>> > cause xetex to always write the full path to the XDV file (or so shows
>> > the dviasm I patched, which makes me feel very confident :p) No idea
>> > how this would affect xdv2pdf, though.
>> It would break xetex on macosx (whether using xdvipdfmx or xdv2pdf),
>> where getFontFilename(engine) will often return NULL.
>> Yes, the change is not hard, as I said earlier, but it does need to be
>> done with care. Probably something like this (untested) would work:
> But this leaves the original issue partially unfixed, may be we would
> instead make sure getFontFilename(engine) returns a file name, if
> xdvipdfmx can resolve a file name the font name, then surely xetex can,
> or does sdvipdfmx use some system API that returns font data from
> memory? (off to check the code :) )
Apparently xdvipdfmx _does_ use a different API. If XeTeX were not
able to find a font, it would complain and use \nullfont. However, I
have an error message from xdvipdfmx, not from XeTeX. It seems to me
that XeTeX finds a font bud xdvipdfmx does not. I had problems of this
kind with the Nafees fonts, now (when testing someone else's file) the
same happens with Pothana2000 (Telugu font).

> [...]
>> (BTW, the xetex list would be a better forum to discuss xetex bugs and patches.)
> I'm not subscribed to xetex list, also I'm building xetex from texlive
> svn tree since xetex's svn does not build for me, so may be I'd need
> texlive help at some point.
> Regards,
>  Khaled

Zdeněk Wagner

More information about the tex-live mailing list