[csswg-drafts] [css-text-decor-4] Definition of `from-font` value for `text-decoration-thickness` (#13216)

jfkthame has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text-decor-4] Definition of `from-font` value for `text-decoration-thickness` ==
https://drafts.csswg.org/css-text-decor-4/#valdef-text-decoration-thickness-from-font says that the `from-font` value means:

> If the [first available font](https://drafts.csswg.org/css-fonts-4/#first-available-font) has metrics indicating a preferred underline width, use that width, otherwise behaves as [auto](https://drafts.csswg.org/css-text-decor-4/#valdef-text-decoration-thickness-auto).

However, this seems wrong for `line-through` decorations, as OpenType fonts provide a separate [`yStrikeoutSize`](https://learn.microsoft.com/en-gb/typography/opentype/spec/os2#ystrikeoutsize) value in the `OS/2` table which specifies the font's desired thickness for the strikeout stroke.

This may often match the font's [`underlineThickness`](https://learn.microsoft.com/en-gb/typography/opentype/spec/post) (found in the `post` table), but there are some common fonts where the two metrics are different, including for example the Arial and Times fonts on macOS.

To more properly respect the metrics provided by the font designer, I suggest `from-font` should be defined to use the font's preferred underline width for underline and overline decorations (OpenType does not provide a separate overline-thickness metric), but to use the strikeout size for line-through decorations.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13216 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 13 December 2025 17:16:19 UTC