Bug 187688 - Bizarre font hinting related to subpixel rendering
Bizarre font hinting related to subpixel rendering
Status: CLOSED DUPLICATE of bug 186593
Product: Fedora
Classification: Fedora
Component: pango (Show other bugs)
5
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Carl Worth
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-02 13:30 EDT by Roberto Ragusa
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-13 13:04:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
How fonts are rendered in KDE/GNOME with subpixel on/off and hint level off/light/medium/full (71.52 KB, image/png)
2006-04-02 14:00 EDT, Roberto Ragusa
no flags Details
Firefox screenshot. (40.78 KB, image/png)
2006-04-06 17:39 EDT, Roberto Ragusa
no flags Details
Firefox screenshot with MOZ_DISABLE_PANGO=1. (42.67 KB, image/png)
2006-04-06 17:40 EDT, Roberto Ragusa
no flags Details

  None (edit)
Description Roberto Ragusa 2006-04-02 13:30:57 EDT
Description of problem:

Font hinting is apparently wrong in some hint level / sub pixel combinations.
I see ugly font rendering in Firefox and all GTK apps.
Things are better in KDE, but I'm not sure rendering quality is optimal.


Version-Release number of selected component (if applicable):

freetype-2.1.10-5.2.1
gtk2-2.8.15-1
qt-3.3.5-13


How reproducible:

100%


Steps to Reproduce:

With subpixel rendering enabled and hint=medium on KDE
desktop, launch Firefox. The rendering of fonts in Firefox
is much worse than all KDE apps.
Running GNOME doesn't appear to solve the problem; on the contrary,
the entire desktop has low quality font rendering.


Actual results:

Bad looking font rendering.


Expected results:

Good looking font rendering, as obtained in Fedora Core 4.


Additional info:

I will attach a composition of screenshots and explain
what I think is wrong.
Comment 1 Roberto Ragusa 2006-04-02 14:00:05 EDT
Created attachment 127209 [details]
How fonts are rendered in KDE/GNOME with subpixel on/off and hint level off/light/medium/full

I see some problems:

1) Subpixel off: hinting is too weak.

Look at the "nu" in "Menu" or the ":" or the "li" in Application. Even with
hinting=full, we never get alignment to a pixel border.

2) Subpixel on: hinting is too strong, expecially in GNOME.

Look at the "Document" string: even with hint=light, we get total alignment
to pixel border (not even subpixel border, but entire pixel). Light or
medium or full gives no difference, it looks like it is always "full".


I'd say that maybe the code is quantinzing to full pixel when subpixel
rendering is on and to subpixels when subpixel rendering is off (the
opposite of the correct behavior).

Add to this the apparent "always full" hinting in GTK apps.

I usually run KDE with LCD+hint=medium setting and rendering quality
is generally good, but in Firefox (gtk) the hinting is so strong
that the output is very similar to not-antialiased, not-subpixel
render. In fact, disabling subpixel rendering improves the quality
because the hinting becomes weaker.
Comment 2 Roberto Ragusa 2006-04-02 14:03:44 EDT
This bug could explain bug #186593.
Comment 3 Roberto Ragusa 2006-04-05 09:56:54 EDT
I got a small improvement by using the following patch, as advised on the
freetype mailing list.

http://lists.gnu.org/archive/html/freetype/2006-04/msg00012.html

But the problem is still present. "Serif" text in Firefox remains
almost unreadable.

---------------------------------------------------------------------------------------------
Index: src/autofit/aflatin.c
===================================================================
RCS file: /cvsroot/freetype/freetype2/src/autofit/aflatin.c,v
retrieving revision 1.34
diff -u -r1.34 aflatin.c
--- src/autofit/aflatin.c    21 Mar 2006 16:30:04 -0000    1.34
+++ src/autofit/aflatin.c    4 Apr 2006 13:11:06 -0000
@@ -1344,14 +1344,14 @@
     *  We snap the width of vertical stems for the monochrome and
     *  horizontal LCD rendering targets only.
     */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
+    if ( mode == FT_RENDER_MODE_MONO )
      other_flags |= AF_LATIN_HINTS_HORZ_SNAP;


    /*
     *  We snap the width of horizontal stems for the monochrome and
     *  vertical LCD rendering targets only.
     */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
+    if ( mode == FT_RENDER_MODE_MONO )
      other_flags |= AF_LATIN_HINTS_VERT_SNAP;


    /*
---------------------------------------------------------------------------------------------
Comment 4 Roberto Ragusa 2006-04-06 17:36:25 EDT
Just discovered that Firefox render is perfect when using MOZ_DISABLE_PANGO=1.
I attach two screenshots.
Comment 5 Roberto Ragusa 2006-04-06 17:39:07 EDT
Created attachment 127430 [details]
Firefox screenshot.

Font render quality is very low.
(this picture has to be observed on a RGB LCD)
Comment 6 Roberto Ragusa 2006-04-06 17:40:57 EDT
Created attachment 127431 [details]
Firefox screenshot with MOZ_DISABLE_PANGO=1.

Font render quality is very good.
(this picture has to be observed on a RGB LCD)
Firefox has been launched with "MOZ_DISABLE_PANGO=1 firefox".
Comment 7 Roberto Ragusa 2006-04-07 05:25:05 EDT
Changed component to pango, as it seems more appropriate.
Comment 8 Rex Dieter 2006-05-13 13:04:21 EDT

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

Note You need to log in before you can comment on or make changes to this bug.