fonts are blurred with subpixel rendering

Bug #153521 reported by zdzichu
34
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fontconfig (Ubuntu)
Invalid
High
Unassigned
Hardy
Invalid
High
Unassigned

Bug Description

On Gutsy beta fonts are blurred when subpixel aliasing is enabled. They are sharp again when I check ,,best shapes'' rendering mode, thus disabling subpixel rendering.

In Feisty fonts were sharp with subpixel enabled. I'm attaching two screenshots for comparison. One is from Feisty with supixel and sharp font. Second is from Gutsy. ,,best shapes'' are sharp, subpixel are blurred -- there are color bands on the sides of vertical elements. There werent's such bands in Feisty.

I'm using 14.1 LCD with 1440x900, which gives 120 DPI.

Revision history for this message
zdzichu (zdzichu-gmail) wrote :
Revision history for this message
zdzichu (zdzichu-gmail) wrote :
Revision history for this message
Przemek K. (azrael) wrote :

Have you tried changing your subpixel rendering order from RGB to BGR?

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

Yes. Vertical color bands swapped it places, reddish appeared right of letter and blueish appeared at the left side of letter. Letters are still blurred.

Revision history for this message
Tobias Wolf (towolf) wrote :

It’s a feature, ot a bug.
See: http://ubuntuforums.org/showpost.php?p=3483916&postcount=63

Don't swap the pixel ordering. It needs to reflect your LCDs layout, which is very likely RGB.

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

This is a bug. Default configuration even turn off this atrocity for "small" fonts. The problem is "small" defined as 12 or less points. Which is insane, as small fonts are 7 or less. I have all fonts size 9 or 10, so this working ("legacy") filter should be uses for all of them.
Current Ubuntu configuration causes eyestrain and by extensions is dangerous for health.

Morover, proposed change didn't affect banding much. There are still color stripes at letter side. I can't get back to sharp Feisty rendering.

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

Another data point: after upgrading Dapper -> Gutsy, on 17"LCD with 86 DPI, fonts look much better than on my 120 DPI display. Color fringing is less visible and fonts do not appear fuzzy.
Is there some problem with fontconfig when going Feisty -> Gutsy?

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

Reducing fonts size to 7 (from 8) on Gutsy make letters little more bearable, but still not in Feisty quality.
See attached feisty-vs-gutsy.png. Upper menu is from Gutsy, font size 7pt. Lower is from Feisty 8pt. This is the same font (DejaVu Sans), but in Feisty it was ideally pixel-aligned and sharp. In Gutsy it's fuzzy.

Revision history for this message
Johan Kiviniemi (ion) wrote :

Since the deciding folks think this is not a bug, here’s how I fixed it:

http://johan.kiviniemi.name/blag/2008/01/12/ubuntu-hardy-fonts/

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

Thank you Johan. Changes from your blog made fonts sharp again. It should be default for displays thinner that 150 or more DPI.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hope this will be addressed soon, one way or the another.

Changed in fontconfig:
importance: Undecided → High
milestone: none → ubuntu-8.04-beta
status: New → Triaged
Revision history for this message
Steve Langasek (vorlon) wrote :

zdzichu,

You mention that fonts look better when you upgrade from dapper to gutsy than when you upgrade from feisty to gutsy. On each of these machines, is /etc/fonts/conf.d/53-monospace-lcd-filter.conf present? That is supposed to address these color-fringing issues for the standard monospace fonts, and I certainly don't see this problem on my hardy system (and didn't see it on gutsy, either, after the bugfix before release).

You mention DejaVu Sans in the bug report, which is not a monospace font. I don't understand why there should be consistent problems with color fringing with this font; since it's not fixed-width, subpixel antialiasing will result in *occasional* color fringing, but not consistently so. I have the subpixel rendering enabled on my 108x88 dpi LCD, and I don't notice at all this problem that you're describing.

Changed in fontconfig:
milestone: ubuntu-8.04-beta → ubuntu-8.04
Revision history for this message
zdzichu (zdzichu-gmail) wrote :

I have only one Ubuntu machine - my laptop. I've installed Ubuntu version 6.10 beta in autumn 2006 and upgraded since. I'm running now 8.04 beta.

*All* fonts are color fringed, monospace and not monospace. Earlier there was no fringing. See screenshots I've attached earlier, they show issue by placing fringed and non fringed (from earlier ubuntu version) fonts side by side.

Now I'm running 99-local-unblur-fonts.conf provided by Johan on hist blog and fonts look OK. Do you want screenshot?

Revision history for this message
Steve Langasek (vorlon) wrote :

Does /etc/fonts/conf.d/53-monospace-lcd.-filter.conf exist on your machine? This is the code that is supposed to enable the legacy LCD filter for small monospace fonts; for the standard Ubuntu monospace fonts, at sizes < 12 pixels, this problem is supposed to already be fixed.

The 99-local-unblur-fonts change disables the new filter for all fonts, but that should not be needed to get non-blurry fonts from what I see; larger fonts should not appear blurry with the new LCD filter. And your original screenshot showed a font that was < 12px, so should have been handled by the existing rules.

Revision history for this message
zdzichu (zdzichu-gmail) wrote :

53-monospace-lcd-filter.conf -> ../conf.avail/53-monospace-lcd-filter.conf
Yes, it exist. But it only fixes monospace fonts. *All* fonts are blurred. Screenshots I've attached shows DejaVu Sans (NOT monospace) with fringing.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Some recent change fixed the larger fonts for me, but shouldn't 53-monospace-lcd-filter.conf use "slight" hinting and not full? For instance size 6 looks a lot worse with full hinting, and tilde looks the same as dash.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 153521] Re: fonts are blurred with subpixel rendering

On Tue, Apr 01, 2008 at 05:56:07PM -0000, Timo Aaltonen wrote:
> Some recent change fixed the larger fonts for me, but shouldn't 53
> -monospace-lcd-filter.conf use "slight" hinting and not full?

I'm not qualified to have an opinion on this. :) I think the main concerns
on this bug are:

- why would the current settings be a source of eye strain?
- why would fonts of the same *point* size look worse on screens with a
  higher DPI than on those with lower DPI, when a higher-DPI screen should
  allow for crisper fonts at the same size regardless?

Revision history for this message
Tobias Wolf (towolf) wrote :

> - why would the current settings be a source of eye strain?

Viewing habits, not eye-strain. Ok, maybe some people are seated really closely or watch the screen without glasses while having myopia (telescope effect).

> - why would fonts of the same *point* size look worse on screens with a
> higher DPI than on those with lower DPI, when a higher-DPI screen should
> allow for crisper fonts at the same size regardless?

At such a /still/ low dpi for any screen, even >>140dpi, antialiasing is never continuous but a kind of discrete phenomenon. You get jumpy effects. Especially prominent with native hinting. What looks splendid at 12ppi might look kinda color-fringed at 13ppi. Most often there's a sweet spot. Full hinting is not the way to go anyway. That is also why you still get readability for low ppi monospace with slight and not with native/full. Pixel snapping at that low point sizes cannot lead to discernible letters. But with slight you kinda get fully-antialiased, but readable characters.

Does "lcdfilter legacy" work now, BTW? Then what's the big deal here?

Revision history for this message
Steve Langasek (vorlon) wrote :

My current understanding of this bug is that:

- the filtering is only an issue when "subpixel smoothing" is selected in the system font preferences, which is not the default for hardy
- it is not a commonly observed problem; it may only affect systems with a specific dpi(?)
- a workaround is available
- the behavior is consistent with what was shipped with Ubuntu 7.10
- no fix is in evidence that we can be assured won't be a regression elsewhere

based on the above I am dropping the 8.04 milestone from this bug and marking it as a "target of opportunity" instead.

Changed in fontconfig:
milestone: ubuntu-8.04 → none
Revision history for this message
Ivo Saina (isaina-deactivatedaccount) wrote :

My problem is with too blured only bold fonts :

Font: Tahoma
Size: 9
full hinting

Revision history for this message
Matt Behrens (zigg) wrote :

"- why would the current settings be a source of eye strain?"

On a new gutsy install (now hardy), they definitely made my eyes/head hurt before I tried 'best shapes'. Eventually I xmag'd and found the fringing was a problem.

I've had similar trouble with ClearType on Windows, which fringes characters in much the same way. You can tune it down but it never really fully goes away.

It seems pretty clear to me why it's painful: it's effectively blurring parts of characters that should be sharp.

I am currently using Johan's workaround with success.

Revision history for this message
Matt Behrens (zigg) wrote :

@Ivo: your problem seems unrelated here, I don't see any subpixel rendering going on in your shot. Rather, it seems like a hinting issue.

Revision history for this message
Gannin (spacesword) wrote :

I know this has been marked for fontconfig, but I think it may also have to do with libfreetype.

Revision history for this message
Victor Cache (victorcache) wrote :

8.04 Hardy official release plus updates through today still has this blurry font bug.
I use and LCD. Note on a minority of reboots (maybe 1 out of 5) the fonts would be clear but 4 out of 5 times the fonts are blurry.
Johan's workaround has fixed it (for at least 1 reboot).
System --> Preferences --> Appearance --> Fonts : neither Best Shapes nor Subpixel Smoothing settings fix it.
Ubuntu developers: please fix this.

Revision history for this message
Jhair (jhair-tocancipa) wrote :

Johan fix solves the problem on my laptop,

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04
Release: 8.04
Codename: hardy

With the fix the fonts look more readable (Monospace-7 and BitStreamVera Sans Mono-7).

http://johan.kiviniemi.name/blag/2008/01/12/ubuntu-hardy-fonts/

Revision history for this message
Christoph (toeffy) wrote :

Hello,

I'm having this problem as well, but I'm new to Linux and Ubuntu, so I wan't able to implement Johan's fix.

How exactly do I "install" these config files? Can someone provide an idiot-proof "step by step" on this?

I tried simply writing both files using "sudo gedit" and copy-pasting the content in the instructions, but even after rebooting this didn't seem to do anything.
Sorry for the beginner question, but I really need to solve this issue if I am going to stick with this long enough to learn more!

Revision history for this message
Alexander Sack (asac) wrote :

after all the fontconfig cleanup we did in jaunty now, i would think that this is fixed there. maybe check the beta that will come out soon.

Changed in fontconfig (Ubuntu):
status: Triaged → Invalid
Revision history for this message
zdzichu (zdzichu-gmail) wrote :

Just for kicks, I've downloaded Ubuntu 9.04 Alpha6, installed and dist-upgraded to latest development version. And this bug still isn't fixed... There are still color bands next to vertical elements of letters. See especially letter "M" on attached screenshot.
Letter rendering got broken in 2007 in Ubuntu and still isn't fixed. I suggest you look into Fedora package -- there is no problem in their package.
I'm attaching composite screenshot. Upper part os from Fedora 10, with fontconfig-2.6.0-3.fc10.x86_64. Letters are crisp. Below is the same fragment of screen from current development Ubuntu, with blurred letters.
Both system were configured identically in Appearance preferences -- LCD subhinting, 86 DPI, 10pt Sans font, medium hinting.

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

Thanks for the link to Johan's fix. The default font blur drives me crazy... makes me feel like my monitor is miscalibrated or I have dirt in my eyes.

Maybe the bug is considered a feature for black text on a white background, but it causes problems when other colors are used. For example, I've attached a picture of white text on a blue background. The top line is the default in ubuntu 8.10, and the bottom line is with Johan's fix applied. By default, the letters aren't even a consistent color.

Could the new behavior be disabled except for specific cases? It seems like it should work for black/white or white/black text with font sizes larger than 12pt, but it seems to make everything else harder to read.

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

To help explain how this actually looks (without xzoom), here is a close-up of the same image from a camera. The top line is the default ubuntu blurry font behavior, and the bottom line uses Johan's fix.

Note the shapes of letters "dy/+" near the right side. In the top image, the "d" and "+" actually have two vertical lines each and the diagonals in "y" and "/" look more like disconnected vertical columns than like diagonal lines.

Jackson Doak (noskcaj)
Changed in fontconfig (Ubuntu Hardy):
status: Triaged → Invalid
Revision history for this message
zdzichu (zdzichu-gmail) wrote :

”status: Triaged → Invalid”
Nice joke, after 5 (five!) years. Thank you and goodbye.

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.