Glyphs in vertical text are drawn on top of each other



Hi,

[ this list was described as 'help using pango' despite its name]

I'm trying to display text using Pango and Cairo. It all works fine using
horizontal text (r2l and l2r). When I try vertical text, however, Katakana
glyphs become superimposed with each other. A run of Latin characters
in the same string are properly spaced.

What I do to use vertical text rather than horizontal text is:

+ Set base gravity on the Pango context to auto.
+ cairo_rotate the cairo_t to M_PI/2

I've tried various other combinations, calling various update routines
from pangocairo, etc, and I can get vertical text with Katakana not
rotated, in which case they are properly spaced (eg, they're 'horizontal'
but rotated by the Cairo CTM).

I've tried both showing the layout directly, or line by line. Both cases
exhibit the same behavior. I've also tried using the Pango matrix rather
than the Cairo matrix (but it's not very nice as I use Cairo to offset/scale
text, so that becomes lost in the process).

Is this a known problem with a known solution ? Is there a known gotcha,
maybe some setup call people often forget ?

Thank you.


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