Re: pangocairo show_glyph_string vs. glyph_string_path



On Fri, 2007-11-09 at 23:14 +0100, Leon Woestenberg wrote:
> Hello all,
> 
> in one application I try to use pango_cairo_glyph_string_path() so
> that I can specify subsequent fill and stroke.
> 
> However, I do not understand how to deal with line leading properly
> when I iterate over the 'runs'.
> 
> I would expect cases #1 and #2 in my attached source code, to give
> identical visual layout (except for fill/stroke)
> as case #0.
> 
> However, case #1 does not seem to apply line leading. Case #2 somehow
> resets position.
> 
> What did I miss?

You don't seem to be positioning the runs at all.

Guessing at what you want to do, you have two options:

  - Use pango_cairo_layout_path().

  - If you really want to handle each run separately, subclass
PangoRenderer and let pango deal with positioning runs and call back
your method to render each run.

> Thanks,

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





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