Skip to content

Add space tracking metrics to LibTxt to properly include end-of-line spaces in bounding rects. #26658

@GaryQian

Description

@GaryQian

Currently, we truncate white space at the end of lines when the text is centered.

Correct behavior should be that the white space still adds metrics but does not contribute to the centering or width of the text. This way, when spaces are typed, they still appear and the centering is not skewed.

This is extracted from #25312

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsa: typographyText rendering, possibly libtxtengineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions