[XeTeX] Difference in typesetting persian in v0.9998 (or v0.9997.5) and v0.9999.2 of xetex

Khaled Hosny khaledhosny at eglug.org
Sat Apr 13 01:46:33 CEST 2013

I’m not sure what is the purpose of that code; it is typesetting the
first 128 Unicode characters each in a box, measuring its hight and
depth and adjusting \baselineskip based on that. For a Unicode-based
font this makes no sense:

* The first 32 characters are control code that almost no font have them
  and will result in the default glyph for missing characters.
* Why checking those 128 characters specifically? The paragraph in your
  file has only a few punctuation marks from them, so whatever the
  result is it has no relation to the text you are actually typesetting.

Now the cause of the difference here is that for \char9 and \char13 the
ICU layout engine used pre-0.9999 gives nothing, no glyphs at all which
causes XeTeX to set the hight and depth of the resulting box to font’t
ascender and descender (a là \XeTeXuseglyphmetrics=0), no idea why but
the code in XeTeX was checking for the case of empty glyph string
specifically. In 0.9999, however, the HarfBuzz engine we are now using
returns the glyph for missing character, .notdef, which has zero height
and depth in that font.

In short this code is bogus (for a Unicode-based world at least) and the
old behaviour was just a side effect of something completely unrelated,
so the difference in new version does not constitute a bug in my book.


On Fri, Apr 12, 2013 at 10:22:58PM +1000, Persian TeX Group wrote:
> Here is the minimal example showing different behaviours with the two
> versions of xetex.
> On Fri, Apr 12, 2013 at 9:59 PM, Persian TeX Group <persian-tex at tug.org>wrote:
> > Hi
> >
> > We get completely two different results with v0.9998 (or v0.9997.5) and
> > v0.9999.2 of xetex for the following documents. Why?
> >
> > If it helps, with v0.9998 (or v0.9997.5) of xetex, in the log, you see
> >
> > character with height greater baselineskip found in font
> > baselineskip changed to 1.5 of that height!
> >
> > but with v0.9999.2 of xetex, there is no such thing.
> >
> > (This is a test that picinpar package does). Perhaps we could make a more
> > minimal example.
> >
> > --
> > Sincerely yours,
> > Persian TeX Group
> >
> -- 
> Sincerely yours,
> Persian TeX Group

> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex

More information about the XeTeX mailing list