Skip to content

[css-text-decor] Please implement text-strikethrough-position key #9027

Open
@ryanbugden

Description

@ryanbugden

In submitting bug reports to various browsers, and how they are inaccurately rendering from-font values for text decoration (with this test page by @nicksherman), it started to become clear, that within the dichotomy of underline and strikethroughs (the two linear decorations that font files contain metadata for), there seems to be no way to invoke the font metadata which covers the strikethrough’s y-position.

On the CSS level, how we invoke the values from the font:

Underline thickness: Taken care of by text-decoration-thickness: from-font;
Strikethrough thickness: Also taken care of by text-decoration-thickness: from-font;
Underline position: Taken care of by text-underline-position: from-font;
Strikethrough position

On the font level, these are the values in the font:

Underline: post table

  • underlineThickness
  • underlinePosition

Strikethrough: OS2 table

  • yStrikeoutSize
  • yStrikeoutPosition

Suggestion:

  • Implement a text-strikethrough-position key, for which there is a possible (and hopefully default) from-font value.
  • For this position, look at OS2 > yStrikeoutPosition, and interpret it as the y-position of the top of the stroke.

The position of the top of the strikeout stroke relative to the baseline in font design units.

Thanks for your consideration!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions