GtkSourceView (gedit - Text Editor and others) wrongly has monospaced font in dropdown (context) menu

Bug #1823550 reported by Norbert
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GtkSourceView
Fix Released
Unknown
gtk+3.0 (Ubuntu)
Invalid
Undecided
Unassigned
gtksourceview3 (Ubuntu)
Invalid
Undecided
Unassigned
mate-themes (Ubuntu)
Invalid
Undecided
Unassigned
pluma (Ubuntu)
Invalid
Undecided
Unassigned
ubuntu-mate-artwork (Ubuntu)
Fix Released
Undecided
Martin Wimpress 
ubuntu-themes (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. Have Ubuntu 17.04 or later installed
2. Open any application with GtkSourceView component - such as Pluma, Gedit, Giggle, Gitg, gnome-builder and maybe others (see complete list with `apt-cache rdepends libgtksourceview-3.0-1`)
3. Click right mouse button on text zone

Expected result:
* dropdown menu has normal font as all other interface elements

Actual result:
* dropdwon menu wrongly has monospaced font

Notes:
* first seen in 17.04, but persists in 17.10, 18.04 LTS, 18.10, 19.04 releases.
* seems to be caused by GTK3 library

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: pluma 1.18.1-0ubuntu1
ProcVersionSignature: Ubuntu 4.10.0-42.46-generic 4.10.17
Uname: Linux 4.10.0-42-generic x86_64
ApportVersion: 2.20.4-0ubuntu4.10
Architecture: amd64
CurrentDesktop: MATE
Date: Sun Apr 7 20:13:24 2019
InstallationDate: Installed on 2018-08-07 (243 days ago)
InstallationMedia: Ubuntu-MATE 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
SourcePackage: pluma
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Norbert (nrbrtx) wrote :
Revision history for this message
Norbert (nrbrtx) wrote :

The correct (expected) font is presented on the screenshot from Ubuntu MATE 16.04 LTS.

summary: - Context menu in Pluma wrongly has monospaced font in dropdown menu
+ Pluma wrongly has monospaced font in dropdown menu
summary: - Pluma wrongly has monospaced font in dropdown menu
+ Pluma wrongly has monospaced font in dropdown (context) menu
Norbert (nrbrtx)
summary: - Pluma wrongly has monospaced font in dropdown (context) menu
+ GtkSourceView wrongly has monospaced font in dropdown (context) menu
Changed in pluma (Ubuntu):
status: New → Invalid
Norbert (nrbrtx)
description: updated
Norbert (nrbrtx)
affects: mate-desktop → gnome-desktop
affects: gnome-desktop → gtksourceview
Changed in gtksourceview:
status: Unknown → Fix Released
Revision history for this message
Norbert (nrbrtx) wrote : Re: GtkSourceView wrongly has monospaced font in dropdown (context) menu

The issue:
* exists with the following themes - Ambiant-MATE, Ambiant-MATE-Dark, BlackMATE, GreenLaguna, Radiant-MATE, TraditionalGreen, TraditionalOk;
* does not exist with BlueMenta, Blue-Submarine, Green-Submarine, High Contrast, High Contrast Inverse, Menta.

So all default `mate-themes` themes should be changed to have normal font in aforementioned dropdown menus. See BlueMenta as good example in attachment.

Changed in gtk+3.0 (Ubuntu):
status: New → Invalid
Changed in gtksourceview3 (Ubuntu):
status: New → Invalid
Revision history for this message
Norbert (nrbrtx) wrote :

The problem is also exists in Gedit, which is by default themed with Ambiance theme from `light-themes` package.
Problem confirmed on Ubuntu session (means GNOME) of Ubuntu 18.04.2 LTS and in upcoming 19.04 while running Unity desktop. Here only Adwaita theme looks correct.

So all modern GTK themes should be fixed to correctly show drop-down menu in GtkSourceView.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Did you try changing font by de-selecting "use system fixed width font" ?

Revision history for this message
Norbert (nrbrtx) wrote :

I'm using default clean installation of Ubuntu with default settings of GNOME desktop (say 18.04 LTS).

> Did you try changing font by de-selecting "use system fixed width font" ?

Going to Preferences → Font & Colors → Font, and deselecting "use system fixed width font" substitutes font with other monospaced font - see image.

So this is not a solution.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mate-themes (Ubuntu):
status: New → Confirmed
Changed in ubuntu-themes (Ubuntu):
status: New → Confirmed
tags: removed: artful zesty
Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

@Norbert

No, I actually wanted you to change the font from gedit preference. For example select purisha oblique.

Reset geit pref. Install tweak-tool. Try changing monospace font. It will change both context menu and soureview font.

But I think you are right by default it is set to monospace font. But you can force it to use other fonts.

And yes this can be set in the theme too.

Revision history for this message
Sebastien Bacher (seb128) wrote :

It doesn't seem an issue on a default disco install with the new yaru theme?

Revision history for this message
Norbert (nrbrtx) wrote :

@seb128

Yaru theme on regular Ubuntu desktop (GNOME Shell) is not affected.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

In lp: #1242984 light theme is already using (see https://code.launchpad.net/~larsu/ubuntu-themes/gedit-fixes/+merge/201212)

.context-menu { font: regular medium;}

not sure why it is not working. May be it needs to use font-family. So changing it in ~/.config/gtk-3.0/gtk.css works for me.

.context-menu {
    font-weight: medium;
    font-family: regular;
}

Revision history for this message
Norbert (nrbrtx) wrote :

Thanks, Khurshid!

I automated your method by

```
mkdir -p ~/.config/gtk-3.0

cat > ~/.config/gtk-3.0/gtk.css << EOF
.context-menu {
    font-weight: medium;
    font-family: regular;
}
EOF
```

and got almost normal context menu in Pluma.

summary: - GtkSourceView wrongly has monospaced font in dropdown (context) menu
+ GtkSourceView (gedit - Text Editor and others) wrongly has monospaced
+ font in dropdown (context) menu
Norbert (nrbrtx)
tags: added: eoan
removed: amd64
Changed in mate-themes (Ubuntu):
status: Confirmed → Invalid
Changed in ubuntu-mate-artwork (Ubuntu):
status: New → Triaged
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

For reference this is the commit for ubuntu-mate-artwork that resolves this issue in our themes:

  * https://github.com/ubuntu-mate/ubuntu-mate-artwork/commit/da425237ea3eba1e95d95154af25150dc94d7f50

Changed in ubuntu-mate-artwork (Ubuntu):
status: Triaged → Fix Committed
assignee: nobody → Martin Wimpress (flexiondotorg)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-mate-artwork - 19.10.2

---------------
ubuntu-mate-artwork (19.10.2) eoan; urgency=medium

  * Add suggested-action button style.
  * Add -secure icons required for correct VPN icon display in
    AppIndicator mode. (LP: #1681654)
  * Add Apport icons.
  * Optimise all .png and .jpg image assets.
  * De-duplicate icon themes.
  * Fix low contrast text selection in dialog windows. (LP: #1763942)
  * Fix inconsistent OK buttons.
  * Fix model buttons popovers.
  * Fix styling of paned headerbars.
  * Increase treeview expander size.
  * Increase minimum size of checkbox/radio buttons.
  * Improve font and font-size for context-menu. (LP: #1823550)
  * Improve spacing and padding for tabs, toolbars, menu items and column
    headers.

 -- Martin Wimpress <email address hidden> Mon, 20 May 2019 08:12:40 +0100

Changed in ubuntu-mate-artwork (Ubuntu):
status: Fix Committed → Fix Released
Norbert (nrbrtx)
tags: removed: cosmic eoan
Norbert (nrbrtx)
tags: removed: disco
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.