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 755968 - GtkCellRendererText does not apply <b> markup at line start if font-desc property has been set
GtkCellRendererText does not apply <b> markup at line start if font-desc prop...
Status: RESOLVED DUPLICATE of bug 699060
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-10-02 07:17 UTC by Christian Hergert
Modified: 2016-03-06 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case for conflicting font-desc/bold markup (679 bytes, text/x-python)
2015-10-02 07:17 UTC, Christian Hergert
Details

Description Christian Hergert 2015-10-02 07:17:26 UTC
Created attachment 312543 [details]
test case for conflicting  font-desc/bold markup

This is a weird one.

In Builder, we highlight the autocompletion result using a sort of "fuzzy match". This means we could have markup like:

 <b>gtk</b>_widget_<b>show</b>

The autocompletion window has it's GtkCellRendererText:font-desc property set so that the font matches, and lines up with, the textview insert mark.

When the cell renderer markup begins with <b>, the first bold chunk does not get applied. It does work if we change it from bold to <u>, or <span color="orange">, etc. It does not work if we set it to <span weight="bold">!

I have a test case for this, which is attached. If you comment the font_desc lines, it will show up fine.
Comment 1 Christian Hergert 2015-10-02 07:53:45 UTC
If I add the following to the test case, it works as expected. The issue is that the FontDescription we get back from a simple parse has the weight set (to normal), and it's attribute is taking precedent over the PangoAttrWeight from the markup.

font.unset_fields(Pango.FontMask.WEIGHT)
Comment 2 Sébastien Wilmet 2015-10-02 10:20:28 UTC
It's probably a duplicate of bug #699060.
Comment 3 Matthias Clasen 2016-03-06 17:07:12 UTC

*** This bug has been marked as a duplicate of bug 699060 ***