Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass font size to text wireframe builder #581

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

louiszawadzki
Copy link
Contributor

What does this PR do?

When removing the font argument to createTextWireframe we lost the information of the font size (link to PR).
We can now pass directly a fontSize argument to this method since this PR.

Additional Notes

We used to call shadowNode.textAttributes.effectiveFont() which sets the font size to a default value of 14 when it is NaN. I replicated the same logic here (passing NaN would not render the text element).

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@louiszawadzki louiszawadzki requested a review from a team as a code owner January 5, 2024 12:14
@louiszawadzki louiszawadzki force-pushed the louiszawadzki/fix-font-size-for-ios-SR branch from 6bf40c6 to 07739e9 Compare January 5, 2024 12:16
@louiszawadzki louiszawadzki merged commit 614d61e into develop Jan 9, 2024
4 checks passed
@louiszawadzki louiszawadzki deleted the louiszawadzki/fix-font-size-for-ios-SR branch January 9, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants