Skip to content

Conversation

conner1reimers
Copy link

Summary:

This PR is meant to replace #43543 and attempts to address the issue of minimumFontScale not being respected on iOS when used with adjustsFontSizeToFit.

When using adjustsFontSizeToFit on Fabric, the behavior differs from the old renderer, as minimumFontScale is not respected. The code currently uses minimumFontSize and maximumFontSize, but those props do not actually exist. This brings the behavior closer to the old renderer by removing the unused props and implementing minimumFontScale instead.

From #43543:

From what I understand, in the old renderer, it would use the font size of the outermost text, but since we don't easily have access to that in Fabric, I use the maximum font size of the attributed string.

Changelog:

[IOS] [FIXED] - Fix minimumFontScale on iOS Fabric

Test 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:

Before After
image image

@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 6, 2025
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 6, 2025
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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants