lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pango + Cairo, text clusters & invisible glyphs


From: Han-Wen Nienhuys
Subject: Pango + Cairo, text clusters & invisible glyphs
Date: Sun, 6 Feb 2022 00:33:06 +0100

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 - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]