Re: Help with use of PangoLayout



On Tue, 2007-10-30 at 22:32 +0100, Bogdan Butnaru wrote:
> On Oct 30, 2007 9:51 PM, Behdad Esfahbod <behdad behdad org> wrote:
[snip]
> > > (I could just make do with an ellipsizing function with both
> > > horizontal and vertical limits, but that's not available as far as I
> > > can tell.)
> >
> > Yes, that's exactly the API I want to add.
> 
> Is there any work ongoing on this, or should I think about preparing patches?

No, no work ongoing right now.

> By the way, I thought about something when reading the various bugs
> linked from the one you showed me. Someone proposed adding custom
> ellipsizing algorithms, to deal with specific situations (e.g.
> filenames). How about just allowing the user to give a string of
> numeric values, one per character, that indicates how "acceptable" is
> to remove that character (with some special value, like 0, to mean
> "never remove this"). This would be general enough to to cover all
> possible cases, I think, by just overloading the set_ellipsize method
> with a different parameter. It can even allow "ellipsize if you need
> to, but don't remove this part, even if it means the layout is bigger
> than asked" (which may be useful for file names).

I'm definitely not in love with your proposed API.  I like to work on
making PangoLayout more usefully subclassable to allow arbitrary
customizations like that instead of adding more and more functionality
in it.

> -- Bogdan Butnaru — bogdanb gmail com
-- 
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]