[Webkit-unassigned] [Bug 258857] Underline/strikethrough thickness/position (from-font) don't reflect font metadata

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 4 14:32:19 PDT 2023


--- Comment #1 from Myles C. Maxfield <mmaxfield at apple.com> ---
(In reply to Ryan Bugden from comment #0)
> With `from-font`:
> In using `text-decoration-thickness: from-font` and
> `text-underline-position: from-font`, the results do not accurately reflect
> the metadata in the font.
> - The position of the strikethrough is not correct (also, there is currently
> no CSS tag for this: https://github.com/w3c/csswg-drafts/issues/9027).

Right, there's nothing WebKit can really do about this until the CSSWG creates a mechanism for the author to indicate they want the strikethrough info to come from the font. I suggest filing an issue at https://github.com/w3c/csswg-drafts/issues/new for the CSS Working Group.

> - The thickness and position of the underline is slightly off, but
> acceptable.

WebKit intentionally rounds the position and size of underlines to device pixel boundaries. We do this because it makes underlines look crisp (which we think makes them look better, especially at small font sizes). I'm attaching a screenshot showing the content zoomed-in - you can see the difference is that we are rounding the underline but the black line isn't.

> Without `from-font`:
> The underline/strikethrough thickness/position seems arbitrary and won’t
> necessarily work for every font. 

I wrote a patch years ago to enable `font-font` by default for all text, but too many fonts have bogus values in them. Too much content broke. I had to revert the patch the next day.

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/20230704/2bb1e303/attachment-0001.htm>

More information about the webkit-unassigned mailing list