Fuzzy fonts caused by Cairo antialiasing artifacts with Radiance theme.

Bug #723167 reported by Martin Pitt
328
This bug affects 88 people
Affects Status Importance Assigned to Milestone
Ayatana Design
Invalid
Undecided
Unassigned
Unity
Fix Released
Medium
Marco Trevisan (Treviño)
cairo
New
Undecided
Unassigned
cairo (Ubuntu)
Confirmed
Undecided
Unassigned
unity (Ubuntu)
Fix Released
Medium
Marco Trevisan (Treviño)

Bug Description

Since the switch to a theme-aware panel, the Unity panel uses very fuzzy fonts. The actual submenus in the global menu bar, as well as the indicators look fine, but the top-level menu entries, time, name in me-menu, and the window title look fuzzy. Presumably this is because it doesn't use the configured Pango font anti-aliasing as the rest of GTK, as these are rendered by nux?

This is Unity 3.4.4 on current Natty.

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :
Alex Launi (alexlauni)
Changed in unity:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
importance: Undecided → Medium
Changed in unity (Ubuntu):
importance: Undecided → Medium
Changed in unity:
assignee: nobody → Neil J. Patel (njpatel)
Neil J. Patel (njpatel)
Changed in unity:
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

This is still an issue in current unity 3.6.8 (which was released after the upstream task was set "fix released").

Revision history for this message
Javier García Díaz (jgd) wrote :

Hi, I wonder if someone is working on this bug. I can still experience this problem after the several updates to unity. Fonts are OK if I use Ambiance, but not with Radiance or any other theme. Thanks!

Revision history for this message
Mattia Guidi (matguidi) wrote :

Same for me. What is strange is that Ambiance's rendering is OK, but with Radiance everything is messed up.

Revision history for this message
Jason (jason-willson) wrote :

Neil,

When will this fix be released? I do realize that this was fixed in a prior bug, but could it be that this is a regression? I'm seeing bad rendering for the Unity panel in Unity 4.22.0-0ubuntu3.

Revision history for this message
Dan Lea (danlea) wrote :

Same problem here in current version of unity (4.22.0-0ubuntu3). I'm attaching a screenshot that I think shows this in a slightly more pronouned way, with really sloppy rgba antialiasing, as if it has been iteratively applied.

Revision history for this message
Mattia Guidi (matguidi) wrote :

Here (http://askubuntu.com/questions/68022/how-to-fix-font-rendering-no-anti-aliasing-in-unity-global-menu-and-search) some users suggest to remove the file ~/.config/dconf/user and reboot. Does this "solution" work for you? For me it doesn't.

Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

This is definitely not fixed in current Oneiric nor in Precise. Compare panel font rendering of Unity and Unity 2D, the latter is correct.

paranoid (paranoidalex)
Changed in unity:
assignee: Neil J. Patel (njpatel) → nobody
affects: unity → null
Changed in unity:
status: New → Confirmed
Revision history for this message
Omer Akram (om26er) wrote :

Thanks for the bug report. Is that still an issue in Ubuntu 12.04?

Changed in unity:
status: Confirmed → Incomplete
Changed in unity (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The font in the panel is still different. But that's because it's rendered as embossed in the panel, but not in menus (except for disabled items). I think this is what design intended...

affects: null → ayatana-design
affects: ayatana-design → compiz
Changed in compiz:
status: Fix Released → New
affects: compiz → ayatana-design
Revision history for this message
oriolpont (oriolpont) wrote :

Using Precise, Ubuntu session. I experience fuzzy fonts in the panel when using Radiance or any other theme that has font shadows. A similar issue seems to be present also in the unity-2d panel, #977080
The same workaround mentioned in that bug-report - namely disabling text-shadows in the panel - works for me for the 3D compiz-based panel. As suggested by jihedamine:

open /usr/share/themes/Radiance/gtk-3.0/apps/unity.css
and add "text-shadow: none;" inside
.unity-panel.menubar,
.unity-panel .menubar {
}

so you get :

.unity-panel.menubar,
.unity-panel .menubar {
    text-shadow: none;
}

Revision history for this message
Peter Mertz (frottier) wrote :

Testing the polished themes in Quantal's daily build. Unfortunately the panel font in Radiance still hurts to look at.

The screenshot shows a comparison between the rendering in the panel vs. rendering in the window title. While the latter looks really smooth, the one in the panel clearly sticks out.

It is also visible in global menus where all of the non-selected items look slightly wrong.

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

Peter: appears to be being rendered (in the panel) with BGR sub-pixel ordering (instead of RGB), and without the vertical autohinter in use.

For the sub-pixel ordering; there are some possibilities:

  1. the system rendering settings aren't being read/used
  2. the text is being rendered as white-on-black, and negated/inverted (in colour-space)
  3. the text is being rendered right->left, and then the texture being mirrored (in horizontal space)
  4. something else

For the latter:

  1. the system rendering settings aren't being read/used
  2. something else

Changed in unity:
status: Incomplete → Confirmed
Changed in unity (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Marcus Bointon (marcus-synchromedia) wrote :

I'm seeing this same thing in a VM, though significantly worse. This could be down to the VM not having real hardware access, but it's acting as others describe - all the text looks ok apart from the menu bar. In my case I'm getting rough green fringes where shadows would be. Screen shot shows it in action. This is in current 12.04 running in VMWare fusion 4.1.3.

John Lea (johnlea)
Changed in ayatana-design:
importance: Medium → Undecided
Changed in unity (Ubuntu):
importance: Medium → Undecided
status: Confirmed → New
Changed in unity:
status: Confirmed → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

Ugly as hell. This is a clear bug that does not need "ayatana design" advice. I think the desired fix for this is obvious.

Changed in unity (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

This can be workarounded in the theme, adding another bugtask.

tags: added: oneiric precise quantal raring
Changed in ayatana-design:
status: New → Invalid
Changed in ubuntu-themes (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Mattia Guidi (matguidi) wrote :

Adolfo, could you explain how this bug can be "workarounded"?

Revision history for this message
Adolfo Jayme Barrientos (fitojb) wrote :

See comment #11 in this bug report.

Revision history for this message
Mattia Guidi (matguidi) wrote :

For me, that workaround alleviates the problem, but doesn't solve it. Fonts in the top bar still look worse than in the rest of the screen (not as smooth as when using Ambiance).

Revision history for this message
Roman Yepishev (rye) wrote :

Based on my tests:
1. The settings from gtk_settings_get_default() are being read and used (set in FontSettings.cpp). Forcing RGB mode in the code does not change anything.

2. Removing text-shadow makes text look slightly better but still with visible colorization/blurriness.

3. Rebuilding unity with cairo_font_options_set_antialias(font_options, CAIRO_ANTIALIAS_GRAY) makes it a bit better.

4. Setting "gsettings set org.gnome.settings-daemon.plugins.xsettings rgba-order bgr" makes panel fonts look the right way but all other applications start rendering fonts in a blurred way. Rebuilding unity with forced BGR mode makes panel font look the right way but the menu entry selected will be reversed (see attached image).

So it looks like the text is rendered in a wrong way in the panel but it is actually using the proper settings.

Revision history for this message
Roman Yepishev (rye) wrote :

As with bug 945608, we appear to be drawing menu entries on something that pango/cairo don't want to draw antialiased fonts.
By adding gtk_render_background I am now able to get the proper font rendering in both Ambiance and Radiance, however it does not play well with the fading in/out of the title/menubar - some flickering occurs.

This patch is against unity 5.18 in Precise. My PPA ( https://launchpad.net/~rye/+archive/ppa ) will have this test build shortly for those who want to see how a panel should have looked with a Radiance theme.

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

The attachment "draw_background.patch" 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-reviewers team 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.]

Revision history for this message
Roman Yepishev (rye) wrote :

We are drawing text onto CAIRO_FORMAT_ARGB32 surface with fully transparent background. Therefore we have artifacts at the edges - http://lists.cairographics.org/archives/cairo/2010-November/021265.html

So we either need to fix cairo or draw background.

Roman Yepishev (rye)
summary: - Panel does not use standard GTK/Pango font rendering/antialiasing,
- causing fuzzy fonts
+ Fuzzy fonts caused by Cairo antialiasing artifacts with Radiance theme.
no longer affects: ubuntu-themes (Ubuntu)
Revision history for this message
Jason (jason-willson) wrote :

Hi Roman,

I installed the ppa, but was unable to "force version" of Unity to yours. The current version of Unity in 12.04 still shows the issue. Is there a manual way to apply the patch? Thanks for your help so far!

Regards,

Jason

Revision history for this message
Stephen M. Webb (bregma) wrote :

Not sure if this is still happening, looks like it to me.

Changed in unity:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
returningshadow (reidwicks) wrote :

Issue is still present in Ubuntu 14.04 LTS alpha as of posting this comment.

Revision history for this message
Lee (qq510371827) wrote :

The issue is still present in ubuntu 14.04 feb 28 daily build.

tags: added: new-decorations ubuntu-desktop-trusty
Revision history for this message
Iain Lane (laney) wrote :

Hey Stephen, can you see if somebody can look at the patch? Thanks!

Changed in unity (Ubuntu):
assignee: nobody → Stephen M. Webb (bregma)
Revision history for this message
Chris J Arges (arges) wrote :

The fonts look like they are being displayed by a badly behaving CRT monitor. : )

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Mh, I've tried to apply a similar workaround as the one proposed on the patch, but it's not something we can apply in the way it is since we can't just draw a full bg over all our text, for many reasons...
One is that the panel can also be semi-transparent, and this will break it.

So, the only acceptable thing is to draw the bg only under the text glyphs, so that this will affect only the semi-transparent parts of text. I got something working here, but still I've to clean up and figure out a weird behavior I've noticed when the text is cut with fade.

Changed in unity:
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
milestone: none → 7.2.0
status: Triaged → In Progress
Changed in unity (Ubuntu):
status: Triaged → In Progress
assignee: Stephen M. Webb (bregma) → Marco Trevisan (Treviño) (3v1n0)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.2.0+14.04.20140402-0ubuntu1

---------------
unity (7.2.0+14.04.20140402-0ubuntu1) trusty; urgency=medium

  [ Stephen M. Webb ]
  * Release 7.2.0.

  [ Marco Trevisan (Treviño) ]
  * CompizUtils: only shadow-decorate alpha windows that have full
    decorations as well Since alpha windows might have custom shapes,
    it's safer not to shadow-decorate them unless they don't provide,
    for sure, a full decoration. (LP: #1281825)
  * Panel, Decorations: draw the background under the text glyphs before
    the text itself (LP: #723167)
  * PanelMenuView: use panel style context for painting the panel title
    (LP: #1296866)
  * SpreadFilter: use launcher width, scale on HiDPI, match also
    application names Launcher Width is now considered in setting the
    offset of the scale filter (fixes padding when launcher is in
    autohide mode). The search bar is correctly scaled when in HiDPI
    mode. We use ApplicationManager and thus BAMF to match windows by
    their name or app name. (LP: #1281297)
 -- Ubuntu daily release <email address hidden> Wed, 02 Apr 2014 11:04:11 +0000

Changed in unity (Ubuntu):
status: In Progress → Fix Released
Changed in unity:
status: In Progress → Fix Released
Changed in cairo (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris J Arges (arges) wrote :

Hi I'm using 7.2.0+14.04.20140402-0ubuntu1 and the Focused ambiance-themed title bars look better, but the Non-Focused title bars still have that fuzzy/bad crt look. Can that also be fixed?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Arges,

This is somewhat wanted, we're using 1px blurring on text-shadow for these, you can actually change it yourself by editing the radiance's unity.ccs UnityDecoration.top:backdrop section.

Mathew Hodson (mhodson)
tags: added: trusty unity
removed: oneiric quantal raring ubuntu-desktop-trusty
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.