Re: [csswg-drafts] [css-text-decor-4] Add use-font keyword for text-decoration-width & text-decoration-offset

>> Can you explain more what sort of fixup this is?
> 
> CoreText uses a heuristic to guess when a font has bad data, and if it detects bad data, it synthesizes new values and exposes those.
> 
> If WebKit wanted to use literally what the font file says, it would have to parse the font file tables itself. This would be unfortunate because the CoreText synthesized data will be of higher quality than the font file itself (that's the whole point of the synthesis).

I see there are cases when what's in the `post` table for `underlinePosition` and `underlineThickness` cannot be used to draw anything. I wouldn't totally object to stating that the browser can switch to `auto` / do _something_ suitable if the values are totally invalid, but I would slightly prefer if we can avoid undocumented magic. 

Can we perhaps dig in and describe the criteria for when `use-font` would ignore what's in the font? For example: fall back to `auto` when `underlinePosition` is `0x0000`, or say larger than the ascent? What would be reasonable criteria? If can't come to a conclusion about such cut-offs, I am okay with leaving this up to implementations.


-- 
GitHub Notification of comment by drott
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2376#issuecomment-373672599 using your GitHub account

Received on Friday, 16 March 2018 10:33:41 UTC