[0.88] Fix Android text mis-measurement when re-applying fontVariationSettings #1446
Description
Target Branch
0.88
Link to commit or PR to be picked
Description
Picks #58320 (merged to main as 96518a8), which fixes a bug in the fontVariationSettings support that is new in 0.88 (#57804, #57805, #57929).
Problem: On Android, Paint.setFontVariationSettings returns early when the requested string equals the one the paint already holds, and Paint.setTypeface doesn't clear that stored string. React Native reuses paints and calls setTypeface before re-applying the settings, so the variation axes are silently dropped on one of the passes. With a variable font whose default instance is lighter than the requested wght, Yoga measures regular-weight glyphs while heavier glyphs are drawn.
Impact: Reproducible on 0.88.0-rc.4 with a variable font (e.g. Roboto Flex) and fontVariationSettings: { wght: 500 }. Text is measured narrower than it is drawn, so on Android a single-line label inside a fixed-height container wraps and its last word is clipped, and numberOfLines={1} text gets ellipsized unexpectedly. The same text renders correctly with the font's default weight and on iOS. Any app adopting fontVariationSettings in 0.88 with a weight above the font's default will hit this.
Risk: Low. It adds a few lines to ReactTypefaceUtils.applyFontVariationSettings and ReactEditText.maybeUpdateTypeface that clear existing settings before re-applying them, and only when both old and new settings are non-null. Paints without previous settings are unaffected. The diff applies cleanly to 0.88-stable, and the PR includes a unit test.
Since this ships alongside the feature it fixes, picking it avoids 0.88.0 releasing fontVariationSettings in a state that mis-measures text on Android.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsInbox
Activity
github-actions commentedon Oct 14, 2026
Thank you for opening a new React Native Pick Request.
These are the criteria we follow when accepting or rejecting a code change into a React Native release branch (source).
If your Pick Request does not satisfy the criteria below, please close it as it will not be considered.
✅ Which Pick Requests we accept
TurboModule.getEnforcingfunction is throwing an unexpected assertion error.react-native-macosis not behaving as expected or is regressingReactRootView.java) if it is causing a breaking change for the React Native ecosystem.❌ Which Pick Requests we don't accept
ℹ️ What makes for a good Pick Request
In order for your Pick Request to be considered, please do the following:
main, or one PR against the release branch.fabriziocucci commentedon Oct 14, 2026
Deferred to 0.88.1, not picked into 0.88.0-rc.6.
Assessed on its merits and this is a good pick: the fix is 8 production lines plus a unit test, it is not already on
0.88-stable, it is not breaking, and the bug is real on a feature that is new in 0.88.It is deferred purely on timing. rc.6 was cut as an exceptional RC for one specific pick that was already in flight when this was filed, and 0.88.0 ships today. Adding a second pick means another full CI cycle on the branch.
This is first in line for 0.88.1.