Skip to content

Avoid redundant font variation resets (#59531) - #59531

Open
javache wants to merge 1 commit into
react:mainfrom
javache:export-D127793810
Open

javache wants to merge 1 commit into
react:mainfrom
javache:export-D127793810

Conversation

@javache

@javache javache commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Only clear matching fontVariationSettings before reapplying them when the effective typeface has changed. Changed settings already bypass the platform equality shortcut, and an unchanged typeface does not need to be replaced on Paint.

Preserve TextView typeface bookkeeping and compare its effective typeface after the setter. If the platform rejects unsupported axes, explicitly clear previous settings rather than retaining stale axes.

Changelog:
[Android][Fixed] - Avoid unnecessary font variation resets while preserving correct text measurement.

Differential Revision: D127793810

@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 27, 2026
@meta-codesync

meta-codesync Bot commented Oct 27, 2026

Copy link
Copy Markdown

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

javache added a commit to javache/react-native that referenced this pull request Oct 27, 2026
Summary:
Pull Request resolved: react#59531

Only clear matching `fontVariationSettings` before reapplying them when the effective typeface has changed. Changed settings already bypass the platform equality shortcut, and an unchanged typeface does not need to be replaced on `Paint`.

Preserve `TextView` typeface bookkeeping and compare its effective typeface after the setter. If the platform rejects unsupported axes, explicitly clear previous settings rather than retaining stale axes.

Changelog:
[Android][Fixed] - Avoid unnecessary font variation resets while preserving correct text measurement.

Differential Revision: D127793810
@meta-codesync meta-codesync Bot changed the title Avoid redundant font variation resets Avoid redundant font variation resets (#59531) Oct 27, 2026
@github-actions

Copy link
Copy Markdown

Visual regression

No visual differences at 24b09f023f2f.

ios: no capture

Summary:

Only clear matching `fontVariationSettings` before reapplying them when the effective typeface has changed. Changed settings already bypass the platform equality shortcut, and an unchanged typeface does not need to be replaced on `Paint`.

Preserve `TextView` typeface bookkeeping and compare its effective typeface after the setter. If the platform rejects unsupported axes, explicitly clear previous settings rather than retaining stale axes.

Changelog:
[Android][Fixed] - Avoid unnecessary font variation resets while preserving correct text measurement.

Differential Revision: D127793810

This branch has not been deployed

No deployments
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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant