GNOME Bugzilla – Bug 100625
Solitary tone mark shapes to no glyphs
Last modified: 2004-12-22 21:47:04 UTC
If you have a string with U+302E and nothing else, the result of shaping it with hangul-xft is no glyphs, which is not allowed. The rules are basically that every character in the input must be part of some cluster in the output. If characters are not part of any printing cluster, they can shape to the glyph 0 which is guaranteed to be non-printing. Quite possibly related to bug 96299
Created attachment 12830 [details] Program showing assertion failure
Yes, the patch checked in for 96299 is the cause of this problem. My original patch (http://bugzilla.gnome.org/showattachment.cgi?attach_id=11853) didn't skip the solitary tone mark, but the patch actually checked in does. I thought there was a guard against it in the patch checked in, but apparently I was mistaken. Anyway,I made a patch (this is different from attachment 11853 [details] [review] although I like it better).
Created attachment 12946 [details] [review] a patch
Created attachment 13048 [details] [review] Fancier patch
This patch prevents the crash, but doesn't really show the user what's going on, since the tone mark just disappears. The patch I've attached and checked in does something fancier - it displays the mark attached to a base glyph - preferably a circle, but a space if the font doesn't have a circle. I also found that the tone mark handling wasn't working at all in fonts that didn't have the tone mark characters, since the Korean font wasn't being selected for the tone mark characters, so they ended up shaped separately. (When the Hangul font isn't the default font) To fix this, I put an awful hack in the coverage-computation code. See bug 101406.