GNOME Bugzilla – Bug 59071
Ellipsization support for PangoLayout
Last modified: 2004-12-22 21:47:04 UTC
Should have some way to "ellipsize" a layout to fit in a certain space, allowing the ellipses to be placed before, after, or in the middle.
Did you mean 2.2.0, not 1.2.0? I think this is several days of work...
Eh? This is pango. 1.2.0 is the next API-addition milestone. There is no 2.2.0 milestone.
Oh, right. Anyhow, I'm skeptical about making GTK 2.2 timeframe with this, though I would like to do so. ;-)
I doubt it's even one day of work... I'd guess a few hours; it's a lot simpler to do inside PangoLayout. And considering how gross the stuff people have done to work around it is, it's pretty high priority for me to do. (If you want to handle things like ellipsing wrapped paragraphs then it could get a little tricky to figure out how things _should_ work, but that's really not necessary for what you typically need.)
[ On later investigation, my "few hours" estimate turned into "a week or so" ] Another thing to think about here is the interaction of ellipsation with selection or cursor position for a selectable label - it may be that some portion of the label is "more important" to show than another portion. See bug 109473.
Wed Jul 14 17:47:38 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.[ch] pango/ellipsize.c pango/Makefile.am: Add PangoEllipsizeMode, pango_layout_set_ellipsize(), implement. (#59071) * pango/pango-layout-private.h pango/pango-layout.c: Move PangoLayout structure into a separate header file. * pango/pango-glyph-item.[ch]: Add pango_glyph_item_free(). * pango/pango-glyph-item-private.h pango/pango-glyph-item.c: Internally export the PangoGlyphItemIter functionality. * examples/renderdemo.[ch]: Add --ellipsize option. In the end, took about a day of work. I just punted on the whole selection / cursor position issue. Filed a couple of followup issues: bug 147607: Cursive joining and ellipsization bug 147608: Customizing ellipsization behavior