Pango + Cairo, text clusters & invisible glyphs
Han-Wen Nienhuys <[email protected]> Sun, 6 Feb 2022 00:33:06 +0100
| Newsgroups | gmane.comp.gnu.lilypond.devel,gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAOw_e7Z4o9brwLSUHJyjpzji0T2d9TQLYuQXdmRDxjQgpKecTQ@mail.gmail.com> |
Hi there, I'm trying to fix some corner cases in LilyPond's Cairo support. For proper copy&paste support in our PDF output (https://gitlab.com/lilypond/lilypond/-/issues/6172), I'm trying to use cairo_show_text_glyphs(). This seems to mostly work in normal cases. However, when rendering bidi text in Pango, the direction changing codes (U+202A, U+202B, U+202C) generate a cluster entry in Pango, but the glyph is invisible. Currently, LilyPond simply filters out the invisible glyph, but with cairo_show_text_glyphs that causes the UTF-8 text, glyph list and cluster mapping to go out of sync, leading to 'input clusters do not represent the accompanying text and glyph arrays' Is there a standard way to specify an invisible glyph to cairo_show_text_glyphs? I'd rather not have to edit the UTF-8 string to filter out the invisible chars. -- Han-Wen Nienhuys - [email protected] - http://www.xs4all.nl/~hanwen