Bug 1192098 - Fonts are badly displayed in GNOME Web
Summary: Fonts are badly displayed in GNOME Web
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: webkitgtk4
Version: 21
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tomas Popela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-12 15:51 UTC by Adriano Petrosillo
Modified: 2015-08-01 17:53 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-01 17:53:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adriano Petrosillo 2015-02-12 15:51:23 UTC
Description of problem: Fonts in GNOME Web (Epiphany) are displayed badly (with no apparent antialiasing). It is especially visible if compared to Mozilla Firefox. Trying to enforce a larger font size doesn't appear to work. freetype-freeworld has been installed from the RPM Fusion repository, and RGBA subpixel antialiasing with slight hinting has been activated. On Firefox, minimum font size has been set to 12.

http://s30.postimg.org/60agx2wzl/Screenshot_from_2015_02_12_16_08_09.png
http://s18.postimg.org/lm1j36jbd/Screenshot_from_2015_02_12_16_08_17.png
http://s21.postimg.org/q42b4o72f/Screenshot_from_2015_02_12_16_34_39.png
http://s1.postimg.org/wg9wch6pb/Screenshot_from_2015_02_12_16_34_48.png
http://s15.postimg.org/wi5i3jf6j/Screenshot_from_2015_02_12_16_36_22.png


Version-Release number of selected component (if applicable): 1:3.14.2-3.fc21


How reproducible: Always reproducible. Behaviour consistent across all tested websites (reddit.com, repubblica.it, fedoraforum.org, guardian.co.uk).

Comment 1 Adriano Petrosillo 2015-02-12 16:14:52 UTC
Posted screenshots have been reduced in quality. Here are some good-quality screenshots:

http://i5.minus.com/ik4WeK0bFEMaM.png
http://i4.minus.com/ifmhriayFbE0U.png
http://i4.minus.com/iHmf25vdpcU4U.png
http://i1.minus.com/ibaTeqmInxf5sB.png
http://i1.minus.com/ibaX1L9GJzCopB.png

Comment 2 Michael Catanzaro 2015-02-23 21:09:58 UTC
I think they're being antialiased. They would look REALLY bad if they weren't.

Anyway it's really hard to deal with font bugs unless you're an expert, and we don't have any. Both Firefox and WebKitGTK+ use fontconfig, but Firefox use skia to create the fonts whereas we use cairo. The difference could be in those libraries, or in how we use fontconfig. E.g. we "seed" fontconfig with the GTK+ font settings you can set in Tweak Tool; maybe Firefox doesn't.

I've spent a good amount of time looking through our font configuration code (if you care, it is under WebKit/Source/WebCore/platform/graphics/freetype) and I don't see any issue with system fonts. We're letting GTK+ dictate font settings for web fonts without checking fontconfig at all, which is a problem, but those are system fonts in your screenshots. The code is not straightforward, so it's possible we're doing something wrong and I just haven't noticed.

Note: font display is really subjective. The fonts you have in Firefox, you might call "smooth," but I call "blurry." :) My concern is if we're somehow not handling fontconfig properly, rather than that you don't like Fedora's defaults.

Comment 3 Michael Catanzaro 2015-08-01 17:53:21 UTC
Thanks again for reporting this bug.

(In reply to Adriano Petrosillo from comment #1)
> Posted screenshots have been reduced in quality. Here are some good-quality
> screenshots:
> 
> http://i5.minus.com/ik4WeK0bFEMaM.png
> http://i4.minus.com/ifmhriayFbE0U.png

Turns out these are simply not the same font. Firefox is using Liberation Sans and WebKit is using DejaVu Sans, at least with our default configuration. (See [1] or [2] for background on why; WebKit trunk now uses Liberation Sans as well.)

> http://i4.minus.com/iHmf25vdpcU4U.png
> http://i1.minus.com/ibaTeqmInxf5sB.png
> http://i1.minus.com/ibaX1L9GJzCopB.png

Ditto (Firefox again picked Liberation Sans, WebKit again picked DejaVu Sans).

Now, it's possible there are additional behavior differences asides from the selection of different fonts. If so, [3] applies.

[1] https://bugs.webkit.org/show_bug.cgi?id=147057
[2] https://bugzilla.gnome.org/show_bug.cgi?id=752533
[3] https://bugzilla.gnome.org/show_bug.cgi?id=752533#c5


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