[iOS] Fix minimumFontScale
in New Architecture
#54072
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR is meant to replace #43543 and attempts to address the issue of
minimumFontScale
not being respected on iOS when used withadjustsFontSizeToFit
.When using
adjustsFontSizeToFit
on Fabric, the behavior differs from the old renderer, asminimumFontScale
is not respected. The code currently usesminimumFontSize
andmaximumFontSize
, but those props do not actually exist. This brings the behavior closer to the old renderer by removing the unused props and implementingminimumFontScale
instead.From #43543:
Changelog:
[IOS] [FIXED] - Fix
minimumFontScale
on iOS FabricTest Plan:
This adds one example of the new iOS behavior in RNTester. You can see that, on iOS, the line "Can limit how small the text becomes with minimumFontScale" does not respect the
minimumFontScale
prop in the before screenshot, but does in the after screenshot: