Skip to content

Add decorationSkipInk support in TextStyle (skip ink for underlines) #174968

@otabekoff

Description

@otabekoff

Use case

When applying TextDecoration.underline in Flutter, the underline always passes through descenders of glyphs (like g, j, p, q, y). This makes text harder to read compared to modern text rendering engines that support underline skipping.

On the web and in CSS, this feature is controlled via text-decoration-skip-ink. Many design systems expect consistent typography between Flutter and the web, but Flutter currently lacks this capability.

Proposal

Introduce a property on TextStyle, for example:

TextStyle(
  decoration: TextDecoration.underline,
  decorationSkipInk: true, // new property
);

When decorationSkipInk: true, Flutter’s text rendering engine should avoid drawing underlines through glyph descenders, making underlined text more visually pleasing.

Why this needs to considered?

  • Using just only decorationStyle: TextDecorationStyle.solid (still doesn’t skip ink).
  • Writing a CustomPainter to manually draw underlines that skip glyph bounds. This works, but it is inefficient, complex, and inconsistent compared to having native engine support.
  • No package on pub.dev currently provides a clean drop-in replacement.

Why Flutter should provide this

This feature aligns Flutter with web typography standards (text-decoration-skip-ink) and improves text readability. It should be available out-of-the-box in TextStyle rather than requiring custom painters for every use case. And this contibutes to make Flutter apps way more beautiful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: typographyText rendering, possibly libtxtc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions