[XeTeX] A regression of ICU library in recent XeTeX

Dohyun Kim nomosnomos at gmail.com
Mon May 3 13:19:55 CEST 2010


Hi,

The ICU library included in texlive 2010 is of version 4.4,
which seems to have a bug compared to that of texlive 2009.

For instance,

\font\juni="[Junicode-Regular]:+calt" at 24pt \juni
fīð    % f, imacron, eth
\bye

with this tex file, I get different result from between tl2009 and tl2010.
Though this sample is not of practical use, it is enough to show a bug
introduced to recent ICU layout engine.

The reason of this bug is a wrong interpretation of GSUB table by ICU LE.
Let me show you the relevant part of the fea file extracted by the fontforge
from Junicode font.

lookup caltContextualAlternatesinLatin {
  lookupflag 0;
    @cc37_match_1 = [\f ];
    @cc37_match_2 = [\agrave \acircumflex \atilde \adieresis \aring
\egrave \ecircumflex \edieresis
        \igrave \iacute \icircumflex \idieresis \ograve \ocircumflex \otilde
        \odieresis \ugrave \ucircumflex \udieresis \ydieresis \amacron \abreve
        \emacron \ebreve \imacron \ibreve \omacron \obreve \umacron \ubreve
        \aemacron ];
    sub @cc37_match_1'lookup SingleSubstitutionlookup33  @cc37_match_2' ;
  subtable;
    @cc38_match_1 = [\imacron ];
    @cc38_match_2 = [\eth ];
    sub @cc38_match_1' @cc38_match_2'lookup SingleSubstitutionlookup33  ;
} caltContextualAlternatesinLatin;

Under tl2009, after "f" "imacron" sequence matches the first
substitution sentence,
"imacron" "eth" sequence match does not occur. This is correct behaviour.

Under tl2010 (and recent xetex binary of microtype branch as well), however,
the second match occurs even after the first match. This is wrong.

I came across this sort of bug while testing a Korean font which supports
old Hangul (used until 1933 in Korea) rendering. As this Korean font
is too large in size
to provide as a testing purpose, I have tried to find a font with
similar lookup table
and finally found this Junicode font.

Should this bug reported to ICU developers?
Or can it be tackled by some patches from XeTeX or TeX Live team?
I have no idea about what to do, so I am reporting this bug
to xetex mailinglist before anything. Anyway, I hope that TeX Live 2010
will be released without this issue.

Sincerely,
-- 
Dohyun Kim



More information about the XeTeX mailing list