mixed pango/foreign layout



Hi,

I'd like to interleave some text layed out by pango with foreign objects
which are layed out by a distinct rendering engine. Now, assuming I can
handle (or ignore) issues like text direction, what is the most
efficient and easy way of doing this?

Currently I split the text at word boundaries and use pango to layout
each single word, thus generating a large amount of PangoLayout objects.
But this turns out to be rather slow. I haven't found a way of inserting
foreign objects into a pango layout (which would be rather hard to
implement I guess), so I'm wondering if there's another way like, dunno,
having a way of splitting the text in the largest possible chunks so as
to minimize the number of layout objects to create (there would be
issues with indentation and line spacing which I'm not sure could be
solved with the current API).

I'm aware that what I'm trying to do somehow goes beyond what pango has
been designed for. (Un)fortunately there are contexts where plain text
is interleaved with other stuff (math formulae in my case), it would be
a pity if the valuable pango library turns out to be useless in such
cases.

--Luca





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