[iOS] Fabric: Add font variant support#44112
Closed
zhongwuzw wants to merge 1 commit into
Closed
Conversation
Base commit: a52bd7d |
cipolleschi
approved these changes
Apr 16, 2024
Contributor
cipolleschi
left a comment
There was a problem hiding this comment.
Thanks a lot for the contribution! :D
Contributor
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
@cipolleschi merged this pull request in 89eb794. |
|
This pull request was successfully merged by @zhongwuzw in 89eb794. When will my fix make it into a release? | How to file a pick request? |
Contributor
|
Awesome! Thank you |
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 15, 2025
Summary: In the old arch, stylistic sets were supported however in the new arch support was not added. It seems that fontVariant support was actually initially missed on iOS fabric however a limited version was added in #44112 . I referenced that PR and also old arch implementation for these changes. <img width="480" alt="Screenshot 2025-01-14 at 11 15 18 AM" src="https://github.com/user-attachments/assets/ec32a356-fadd-4281-83b9-15871bbcd18f" /> ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [GENERAL] [ADDED] - Support stylistic sets for fontVariant Pull Request resolved: #48674 Test Plan: - Verified that the "Unsupported FontVariant" native log no longer displays on both platforms - On iOS was easy to test in the tester app as SF supports stylistic sets by default: ``` <Text> Stylistic{'\n'} <Text>Normal: ${'\n'}</Text> <Text style={{fontVariant: ['stylistic-four']}}> Stylistic Four: $ </Text> </Text> ``` <img width="391" alt="Screenshot 2025-01-14 at 11 59 29 AM" src="https://github.com/user-attachments/assets/1ede258e-783f-448f-8300-4c8c710796ef" /> - On Android I could not find any system fonts that support stylistic sets by default so I added Raleway and confirmed with a W character  I did not add font variant example to the tester apps as I felt it could be confusing for people at a glance to understand why there is only a system font example on iOS and why I chose the specific stylistic set. Reviewed By: cipolleschi Differential Revision: D68205738 Pulled By: javache fbshipit-source-id: 03ce572d3c8ecafca71fe00fc0e88eeafc2558bb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Fixes #44064
Changelog:
[IOS] [FIXED] - [iOS] Fabric: Add font variant support
Test Plan:
Demo in #44064 .