GNOME Bugzilla – Bug 101406
Shape marks with base characters
Last modified: 2018-05-22 12:02:16 UTC
The Hangul shaper uses fallback glyphs for the two tone-mark glyphs if the font doesn't have the tone mark. But if the font doesn't have the tone marks, it would normally get put into a different run (different font) from the base glyphs unless the Hangul font is the default font. I put a hack into pangofc-fontmap.cI to deal with this, but we really need some general mechanism, which might involve new API of some sort. (The get_coverage() method of PangoEngine was supposed to handle this, but it is no longer used with current font backends) === /* Awful hack so Hangul Tone marks get rendered with the same * font and in the same run as other Hangul characters. If a font * covers the first composed Hangul glyph, then it is declared to cover * the Hangul tone marks. This hack probably needs to be formalized * by choosing fonts for scripts rather than individual code points. */ if (pango_coverage_get (coverage, 0xac00) == PANGO_COVERAGE_EXACT) { pango_coverage_set (coverage, 0x302e, PANGO_COVERAGE_EXACT); pango_coverage_set (coverage, 0x302f, PANGO_COVERAGE_EXACT); }
The new itemization algorithm helps to some extent ... now the Hangul shaper can implement a covers() method that claims to cover thos characters, in which case they will shape with the base characters. However this problem is really pretty general and nasty; given input inputs of: LATIN SMALL LETTER A COMBINING ACUTE ACCENT LATIN SMALL LETTER A WITH ACUTE A font could cover LATIN SMALL LETTER A WITH ACUTE but not COMBINING ACUTE ACCENT, or it could cover COMBINING ACUTE ACCENT and not LATIN SMALL LETTER A, but we want really want Pango to give identical results for all canonically identically sequences. I'm thinking that we may need to switch the covers() virtual function to take not a single character but an entire sequence of base character plus combining marks. Doing that without adverse effect on performance is going to be challenging. Cover a and
Not going to solve this mess for Pango-1.4, which means we'll need to rev the backend interface again for Pango-1.6.
*** Bug 490414 has been marked as a duplicate of this bug. ***
This should be properly fixed now by using the harfbuzz normalizer during itemization...
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/7.