Skip to content

Set display density on prepared text layout paint (#59213) - #59213

Closed
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D126198343
Closed

Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D126198343

Conversation

@Abbondanzo

@Abbondanzo Abbondanzo commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

When prepared text layout is enabled, PreparedLayoutTextView draws the cached Layout directly. That Layout is built with a fresh TextPaint that never received the display density, so custom decoration drawing that scales with paint.density rendered wrong: the DOUBLE underline/linethrough gap (thickness + 2dp) collapsed to zero and the two strokes merged into one solid band.

Changelog: [Android][Fixed] - Fix double text decorations rendering as a solid band when prepared text layout is enabled

Differential Revision: D126198343

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 20, 2026
@meta-codesync

meta-codesync Bot commented Oct 20, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126198343.

@meta-codesync meta-codesync Bot changed the title Set display density on prepared text layout paint Set display density on prepared text layout paint (#59213) Oct 20, 2026
Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Oct 20, 2026
Summary:

When prepared text layout is enabled, PreparedLayoutTextView draws the cached Layout directly. That Layout is built with a fresh TextPaint that never received the display density, so custom decoration drawing that scales with paint.density rendered wrong: the DOUBLE underline/linethrough gap (thickness + 2dp) collapsed to zero and the two strokes merged into one solid band.

Changelog: [Android][Fixed] - Fix double text decorations rendering as a solid band when prepared text layout is enabled

Differential Revision: D126198343
@Abbondanzo
Abbondanzo force-pushed the export-D126198343 branch 2 times, most recently from e82eb48 to 494a2a7 Compare October 20, 2026 18:00
Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Oct 20, 2026
Summary:

When prepared text layout is enabled, PreparedLayoutTextView draws the cached Layout directly. That Layout is built with a fresh TextPaint that never received the display density, so custom decoration drawing that scales with paint.density rendered wrong: the DOUBLE underline/linethrough gap (thickness + 2dp) collapsed to zero and the two strokes merged into one solid band.

Changelog: [Android][Fixed] - Fix double text decorations rendering as a solid band when prepared text layout is enabled

Differential Revision: D126198343
Summary:
Pull Request resolved: react#59213

When prepared text layout is enabled, PreparedLayoutTextView draws the cached Layout directly. That Layout is built with a fresh TextPaint that never received the display density, so custom decoration drawing that scales with paint.density rendered wrong: the DOUBLE underline/linethrough gap (thickness + 2dp) collapsed to zero and the two strokes merged into one solid band.

Changelog: [Android][Fixed] - Fix double text decorations rendering as a solid band when prepared text layout is enabled

Differential Revision: D126198343
@meta-codesync meta-codesync Bot closed this in 6f6fa0a Oct 20, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Oct 20, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @Abbondanzo in 6f6fa0a

When will my fix make it into a release? | How to file a pick request?

@meta-codesync

meta-codesync Bot commented Oct 20, 2026

Copy link
Copy Markdown

This pull request has been merged in 6f6fa0a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants