Comment 23 for bug 1425387

Revision history for this message
David Mathog (mathog) wrote :

See the first paragraph of note 5 above. All of these little patches, yours and mine, are never going to settle into a system which works for all languages. Fix one thing, it will break another. Inkscape is only partly "pangofied" and while that could be beaten into submission for relatively simple European languages it keeps tripping up on languages which combine glyphs in inscrutable ways. As I've said before, fixing this looks like a lot of work. Minimally Inkscape would have to start "thinking" in logical clusters, the way Pango breaks unicode down into a glyph representation. That Inkscape works as well as it does for the European languages is because those logical clusters usually resolve to a single character, or at worst a single character with an accent or other mark above or below it. That allows for a simple "advance" view on a glyph by glyph basis with some exceptions thrown in for the accents, which don't advance. It seems to work out OK for Japanese and Chinese too, where again, I think the unicode maps a logical clusters to one glyph. However, it falls apart badly for Indic languages, and apparently Thai, which really need to operate on those logical clusters.

Basically every place you find a reference to a glyph's width needs some sort of change, so that it works instead on logical clusters and their widths.

This may also be relevant to some of your questions above:

https://developer.gnome.org/pango/stable/pango-Glyph-Storage.html#pango-glyph-string-x-to-index