[XeTeX] misplaced combining diacritical marks
Jonathan Kew
jonathan_kew at sil.org
Wed Aug 25 17:55:27 CEST 2004
Hello Yves,
Thanks for the report. I understand what's happening here, and
unfortunately this isn't something I can "fix" in XeTeX; you're seeing
a difference between ATSUI text rendering (as used in XeTeX) and the
Cocoa text engine (used in TextEdit).
Here's the explanation: ATSUI handles "complex rendering" (ligatures,
contextual glyphs, positioning adjustments such as kerning, etc.)
strictly in accordance with the AAT tables in fonts. You'll see the
same behavior in applications that use ATSUI or the MLTE text engine;
for example, the WorldText program found in
/Developer/Applications/Utilities/Built Examples/ (if you have the
developer tools installed). The Lucida Grande font (along with most
other fonts you'll find) does *not* include AAT tables that support the
stacking of arbitrary diacritic combinations.
Cocoa Text is slightly different. It uses AAT tables, but also has some
other behaviors (largely inherited from the old NextStep system, I
suspect). One of these is that it has a default stacking behavior for
diacritics, in the absence of any specific control in the font; it will
attempt to center diacritics above (or below) the base character and
stack them outwards. The results may not be "perfect" from a font
designer's point of view (the marks are often spread out rather more
than designers tend to like), but it's a lot more useful than doing
nothing!
So in your example, it works better in TextEdit because of Cocoa's
default stacking algorithm. The best solution for XeTeX (and all other
ATSUI-based apps) would be for the font to be enhanced with the AAT
tables needed to support these diacritic combinations. Trying to make
XeTeX take advantage of the Cocoa text facilities is not feasible,
partly because of the performance impact and the difficulty of
integrating such very different models, and partly because it would
then be affected by Cocoa's bugs (yes, there are some significant ones
that XeTeX is currently immune from!).
To see properly-stacked diacritics working in XeTeX, you could try the
Doulos SIL font (available from http://scripts.sil.org/doulossilfont),
which includes OpenType tables that support arbitrary diacritic
stacking. (As yet, there are very few fonts that include such support.)
Jonathan
On 25 Aug 2004, at 11:40 am, Yves Codet wrote:
>
> Hello.
>
> I noticed a small problem which Jonathan might want to examine (hoping
> we don't all harass him too much).
>
> With "Lucida Grande" acute and circumflex are correctly placed over a
> macron in TextEdit (image 1, in the transcription of Greek for'a and
> for~as), but not in the pdf produced by XeLaTeX (image 2), where they
> are superimposed to the macron.
>
> Kind regards,
>
> Yves
>
> <images.sitx>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
More information about the XeTeX
mailing list