[Webkit-unassigned] [Bug 174403] [GTK][FreeType] Enable BCI on webfonts

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 12 02:07:43 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=174403

Adrian Perez <aperez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aperez at igalia.com

--- Comment #9 from Adrian Perez <aperez at igalia.com> ---
As discussed by chat, I also agree we should be enabling the BCI nowadays.
Just a comment below, for the sake of completeness...

(In reply to Michael Catanzaro from comment #3)

> We've discussed this fairly extensively internally, and consensus seems to
> be that we should try this again now. The problems from bug #140994 seem to
> have disappeared, probably due to changes in FreeType.

In particular, FreeType 2.7 introduced a new subpixel hinting mode, which
is similar to “emulating a modern version of ClearType”. This is one of the
changes (probably the main one) to font rendering that makes us now obtain
better results with the BCI enabled. Full 2.7 release notes, for reference:

  https://sourceforge.net/projects/freetype/files/freetype2/2.7/

The following document is also very interesting to better understand the
whole story of BCI-hinting vs. autohinting in FreeType:

  https://www.freetype.org/freetype2/docs/text-rendering-general.html

The TL;DR is:

  - Use always “slight” hinting. It uses the BCI when a font contains
    hints natively, and falls back to the autohinter if not. And always
    uses subpixel hinting from FreeType 2.7 onwards. BTW, “slight” is
    already the default setting when using GNOME.

  - The new default LCD filter causes less color fringes. As long as we
    use FreeType 2.6.2 or newer with the default filter settings, nothing
    else needs to be done.

  - The output from FreeType rendering is a coverage map (linear: 50% gray
    means a glyph covers it 50%), and not the final value of pixels. It has
    to be blended and gamma-corrected when painting (screens are non-linear:
    a 50% gray has to be painted darker than 50% gray!). Toolkits and graphics
    libraries rarely support this out of the box, so there's nothing we can
    do about this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170712/07bcaf7c/attachment.html>


More information about the webkit-unassigned mailing list