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 163016 - Wrong ellipsis in bookmarks bar buttons with no freetype hinting
Wrong ellipsis in bookmarks bar buttons with no freetype hinting
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.6.x
Other Linux
: Normal normal
: Small fix
Assigned To: gtk-bugs
Marco Pesenti Gritti
Depends on:
Blocks:
 
 
Reported: 2005-01-05 14:39 UTC by Vincent Noel
Modified: 2005-03-03 15:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot showing the bookmarks bar (13.63 KB, image/png)
2005-01-05 14:41 UTC, Vincent Noel
Details
better test program (2.47 KB, text/plain)
2005-01-05 19:18 UTC, Christian Persch
Details
minimal testcase (658 bytes, text/plain)
2005-01-05 19:56 UTC, Christian Persch
Details

Description Vincent Noel 2005-01-05 14:39:54 UTC
I'm not sure if this is an epiphany or a gtk bug, but I can only see it in epiphany.

Using the font capplet/advanced, set "hinting" to "none". All buttons on the
bookmarks bar (except ones with very short names) will get ellipsized. When the
hinting is not set to "none", the buttons are not ellipsized.
Comment 1 Vincent Noel 2005-01-05 14:41:20 UTC
Created attachment 35480 [details]
screenshot showing the bookmarks bar

This shot shows the bookmarks bar - the names of the bookmarks are "flickr",
"journaux" and "Gnome bz". These are short and should not be ellipsized.
Comment 2 Vincent Noel 2005-01-05 14:44:18 UTC
Also : this is with a recent freetype (2.1.9 or something like that). pkg-config
shows version 9.8.3.
Comment 3 Christian Persch 2005-01-05 18:18:05 UTC
There's a testellipsise program in gtk+/tests/, can you try to reproduce with it ?
Comment 4 Vincent Noel 2005-01-05 18:58:58 UTC
Nope, the testellipsise program works fine (either with or without hinting). But
epiphany definitely does not. My google smart bookmark shows ellipsized as
"Goog...". Maybe a weird interaction between the toolbar and the ellipsis ?

I don't see this bug anywhere else but in epiphany.
Comment 5 Christian Persch 2005-01-05 19:18:52 UTC
Created attachment 35497 [details]
better test program

This program tests the ellipsise mode which epiphany uses
(gtk_label_set_max_width_chars); I didn't realise gtk+' testellipsise didn't
exercise that mode.

Can you try with this, please?
Comment 6 Christian Persch 2005-01-05 19:35:06 UTC
Btw, I cannot reproduce this, either in ephy or my testcase. I'm using freetype
2.1.9-1 from FC3, gtk+ HEAD from 2005-01-03 and pango from 2004-12-16.

After upgrading to latest pango HEAD, I can reproduce this.
Comment 7 Christian Persch 2005-01-05 19:56:53 UTC
Created attachment 35499 [details]
minimal testcase

Here's a minimal testcase with which I can reproduce. 
It seems this happens only to short string; when I make the string long, it
doesn't get ellipsised until the prescribed width is reached.
Comment 8 Christian Persch 2005-01-05 19:59:41 UTC
Moving to gtk+ for evaluation.

Steps to reproduce:
0) Compile & run the attached testcase
1) Open GNOME Control Centre Fonts capplet
2) Choose "Details"
3) Set hinting to "None"

Actual results:
In 0), test program shows "Signets". After step 3), shows "Sign..." even though
the string's shorter than the max width.
Comment 9 Matthias Clasen 2005-01-05 20:24:55 UTC
I don't think there is much that can be done here. The widget was sized to make
"Signets" fit exactly with hinting. Turning hinting off apparently makes the
text come out a bit wider, so it doesn't fit anymore, so it gets ellipsized.
Comment 10 Vincent Noel 2005-01-05 20:37:16 UTC
Matthias : that's what I was thinking too, so I exited epiphany and restarted.
The behavior is still there.

I would expect gtk+ to size the widget according to the active hinting status at
the time of widget creation.
Comment 11 Vincent Noel 2005-01-07 14:33:42 UTC
Ok, I upgraded to pango and gtk+ CVS and the problem disappeared. I cannot
reproduce either with the testcase.
I'm going to close it, please feel free to re-open it if you are still able to
reproduce.
Comment 12 Vincent Noel 2005-01-07 17:41:08 UTC
Sorry, the problem is still there. I had just switched fonts - I selected
Verdana instead of bitstream vera sans for testing purposes. Now that I've
reverted to Vera, the problem is back...

This might hopefully shed some light on the subject...
Comment 13 Vincent Noel 2005-01-12 17:08:05 UTC
I can reproduce the same bug in evince, in the history dropdown.
If I browse a PDF a little, and click on the history dropdown, I can see "Pag..."
instead of "Page 1", "Page 2" etc. If I turn the hinting on, the bug disappears.
Comment 14 Vincent Noel 2005-01-12 23:47:54 UTC
Things are getting more interesting.
I can reproduce this bug with any ellipsized gtklabel, the only requirement is
that the label should be small, as explained in comment #7.

For example, I have two opened epiphany windows : 
* One titled "Blank page". The window selector applet shows "Blank pa...".
* One titled "Bug 156917: Use window-menu from libwnck". The window selector
applet shows the title in full.

Comment 15 Vincent Noel 2005-01-12 23:49:15 UTC
Actually, to reproduce it the way I explained you have to open the two windows
one after the other (if the two windows are opened simultaneously, the largest
title is displayed so the first title is not ellipsized).
Comment 16 Vincent Noel 2005-01-12 23:50:39 UTC
Same thing if I have only google in my epiphany history : the history drop-down
shows "Goo...".
Comment 17 Vincent Noel 2005-03-03 15:00:22 UTC
This has been fixed in pango :

2005-03-02  Owen Taylor  <otaylor@redhat.com>

        * pango/pangoxft-font.c (pango_xft_font_get_glyph_extents):
        Go back to using Xft-reported metrics for all non-transformed
        fonts. Reporting non-integer glyph metrics for fonts
        where people have disabled hinting in their config causes
        various problems. (reported variously, including #167801,
        Adam Sampson)