[XeTeX] unicode-math testing

Khaled Hosny khaledhosny at eglug.org
Mon May 31 08:08:07 CEST 2010


On Fri, May 28, 2010 at 10:13:09AM +0300, Khaled Hosny wrote:
> On Fri, May 28, 2010 at 04:54:56AM +0800, Diederick C. Niehorster wrote:
> > On Fri, May 28, 2010 at 12:20 AM, Khaled Hosny <khaledhosny at eglug.org> wrote:
> > > Looks like xetex is getting glyph indexes from one font file but loading
> > > the actual glyph from another font. Checking the output of 'fc-list :
> > > file' my reveal that you, or whoever is experiencing this, have several
> > > version of the font accessible to xetex, if so, then removing all but
> > > one can solve the issue.
> > 
> > I have had problems like this as well, a while ago, but simply with
> > fontspec. I had one of Adobe's fonts in both my windows fonts
> > directory and in the TeX tree (same version btw) and my documents came
> > out all garbled. Removing the one in windows\fonts fixed it.
> > 
> > Should XeTeX just stick with whichever of the fonts it finds first?
> 
> I'm not sure, but it may be that the font file used by xetex is not the
> one xdvipdfmx is graping glyphs from, I don't know how xetex passes the
> font to the xdv file, but may there are two separate font lookup
> routines and each one is returning a different font file? Checking the
> source code might help, but I don't feel like doing it.

Looking further, it seems that when a system font is used, xetex embeds
the font name not the resolved path in the xdv file, so xdvipdfmx has to
lookup the font again and it seems to find a different font sometimes. I
don't know why xetex don't just embed the resolved full path of the
font, as it does already with with "external fonts", this makes sure
xdvipdfmx is getting the same font file as xetex and alleviate the need
of font lookup logic in xdvipdfmx itself. May be there is some
(historical?) reason, but judging by how popular this issue, I think it
might be reasonable to consider this.

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the XeTeX mailing list