Fonts in global menubar and elsewhere become jagged when antialiasing is set to "grayscale"

Bug #873765 reported by Jay S
56
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Low
Andrey Logvinov
unity (Ubuntu)
Fix Released
Low
Andrey Logvinov

Bug Description

When I upgraded to Oneiric, the fonts in Unity -- in the global menubar, the clock, my name in the user menu, and in the hover text for apps on the dock -- became very jagged and seemingly fully hinted. After some playing around I discovered that changing the antialiasing setting in gnome-tweak-tool from "Grayscale" to "Rgba" fixed this problem.

Tags: patch

Related branches

Revision history for this message
Paul Sladen (sladen) wrote :

Please can you post a screenshot of what you're seeing. There is a bug whereby unity-panel-service picks up the wrong font, but that doesn't quite fit with the textual description here.

A screenshot (or ideally one before, and after) would be very useful.

Changed in unity:
status: New → Incomplete
Revision history for this message
Jay S (topdownjimmy) wrote :

Here's the strange font-hinting in the clock and user menu, above a gedit instance with normal font rendering. This is what happens when antialiasing is set to Grayscale in gnome-tweak-tool ("Advanced Settings").

I guess there aren't many people who use grayscale antialiasing. ;)

Revision history for this message
Omer Akram (om26er) wrote :

I confirm, its been like that for quite a few months it seems.

Changed in unity (Ubuntu):
importance: Undecided → Low
Changed in unity:
importance: Undecided → Low
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
status: Incomplete → Confirmed
Revision history for this message
Павло Вахнівський (paulnivsci) wrote :

Same here. Fonts in menus an applications are smoothed, but not in Unity panel and launcher

Revision history for this message
Павло Вахнівський (paulnivsci) wrote :

You can see this bug only when 'Antialiasing' set to 'Grayscale' and 'Hinting' is 'Full' or 'Medium'. With no hinting or even when it is set to 'Slight' fonts are smoothed

Revision history for this message
Andrey Logvinov (andrey-logvinov-81) wrote :

I have hinting set to "None" and antialiasing to "Grayscale", the bug is present (fonts in unity panel and launcher are not antialiased). I use a 42'' LCD TV as display and I have to set display resolution to lower than native because otherwise text and other UI items will be too small. Rgba smoothig makes no sense in this configuration since logical display subpixels do not correspond to physical subpixels and color artifacts become visible.

Revision history for this message
Andrey Logvinov (andrey-logvinov-81) wrote :

Well it turns out I was wrong in my previous comment. I tried to set hinting to "full" and then back "none" again and text in unity panel and launcher is now properly antialiased.

Revision history for this message
Andrey Logvinov (andrey-logvinov-81) wrote :

But after reboot the font is agan not antialiased. It only becomes antialiased after setting hinting to some other value and back to "none" in gnome-tweak-tool.

Revision history for this message
Andrey Logvinov (andrey-logvinov-81) wrote :

Apparently this is a bug in unity-4.24.0/plugins/unityshell/src/FontSettings.cpp
It checks for gtk-xft-rgba value and if it's "none", sets antialiasing to CAIRO_ANTIALIAS_NONE.
I added gtk-xft-antialias value check and if it's nonzero, set antialiasing to CAIRO_ANTIALIAS_GRAY instead. This fixed the problem for me.
See attached diff for FontSettings.cpp.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "FontSettings.cpp.diff" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Omer Akram (om26er) wrote :

Andrey, thanks for the patch, could you please check if it applies to unity trunk and propose a bzr branch to lp:unity with your fix?

Revision history for this message
Andrey Logvinov (andrey-logvinov-81) wrote :
Omer Akram (om26er)
Changed in unity:
assignee: nobody → Andrey Logvinov (andrey-logvinov-81)
status: Confirmed → In Progress
status: In Progress → Incomplete
Changed in unity (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Andrey Logvinov (andrey-logvinov-81)
Changed in unity:
status: Incomplete → In Progress
Changed in unity:
status: In Progress → Fix Committed
Changed in unity:
status: Fix Committed → Fix Released
Changed in unity (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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