After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 59071 - Ellipsization support for PangoLayout
Ellipsization support for PangoLayout
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.6 API freeze
Assigned To: pango-maint
pango-maint
Depends on:
Blocks: 84390 125250 144835
 
 
Reported: 2001-08-15 19:29 UTC by Havoc Pennington
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Havoc Pennington 2001-08-15 19:29:27 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.
Comment 1 Havoc Pennington 2002-03-22 19:24:10 UTC
Did you mean 2.2.0, not 1.2.0?

I think this is several days of work...
Comment 2 Owen Taylor 2002-03-22 19:47:11 UTC
Eh? This is pango. 1.2.0 is the next API-addition milestone.
There is no 2.2.0 milestone.
Comment 3 Havoc Pennington 2002-03-22 23:08:49 UTC
Oh, right.

Anyhow, I'm skeptical about making GTK 2.2 timeframe with this, though 
I would like to do so. ;-)
Comment 4 Owen Taylor 2002-03-22 23:16:48 UTC
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.)
Comment 5 Owen Taylor 2003-03-29 14:06:27 UTC
[ 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.
Comment 6 Owen Taylor 2004-07-14 22:17:48 UTC
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