[Webkit-unassigned] [Bug 152393] REGRESSION (r172008): Icon fonts using hinting blurred at odd window widths

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 18 15:22:02 PST 2015


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

Myles C. Maxfield <mmaxfield at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #11 from Myles C. Maxfield <mmaxfield at apple.com> ---
The cause of this bug is pretty straightforward - the font is trying to draw something exactly n pixels wide, but it starts halfway through the first pixel. Therefore, your edges which you thought appeared at discrete pixel boundaries all actually happen halfway through the pixel, leading to 50% coverage and grey pixels.

In one respect, this is working as intended. Sub-pixel placement of layout objects is a progression. Fonts, in general, benefit greatly from sub-pixel positioning, and it greatly improves readability of text.

All the major browsers which run on OS X all have the same behavior here.

For your use case of showing icons in web content, I would suggest using SVG. Fonts were never designed for this purpose.

A "solution" is simply to make sure your markup always results in these icons being drawn at integer pixel locations.

Another idea for a solution is to allow something like a "round()" function which can be used inside the "calc()" CSS function. Presumably something like this would suit your needs?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151218/34a0a6a9/attachment.html>


More information about the webkit-unassigned mailing list