-
Notifications
You must be signed in to change notification settings - Fork 25k
Support font-variant-ligatures values #36740
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
Conversation
|
Hi @finnp! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
This change is related to increasing compability with web, linking #34425 |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Here's a table of all the values:
|
1282a5b to
9a121c0
Compare
9a121c0 to
d8a7dbb
Compare
necolas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stamping
Test PlanI started testing iOS with a test project with the following code: https://github.com/finnp/react-native-font-test/blob/main/A The results looks like this: The same test on Android looks like this Both screenshot look as expected ✅ |
|
@cortinico @necolas Is anything else needed here to get this merged? |
Yes we need CircleCI tests to be green before we can import this. Can I ask you to logoff/login to your CircleCI as your token got revoked. You can do so from this UI: https://app.circleci.com/pipelines/github/facebook/react-native/21404 |
Base commit: 58ee6b2 |
bfe9f9f to
554e14b
Compare
The text style prop `fontVariant` in React Native is supposed to map to the CSS `font-variant` property. The CSS property is a short-hand for the following CSS properties: - `[font-variant-alternates](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-alternates)` - `[font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps)` - `[font-variant-east-asian](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-east-asian)` - `[font-variant-emoji](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-emoji)` - `[font-variant-ligatures](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures)` - `[font-variant-numeric](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric)` - `[font-variant-position](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-position)` Currently React Native only supports a subset of the values from `font-variant-numeric` and `font-variant-caps`. This change increase the `font-variant` support by adding all values from `font-variant-ligatures`. - [Apple True Type Reference](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html) - [Webkit Source Code](https://opensource.apple.com/source/WebCore/WebCore-7602.1.50.1.1/platform/graphics/cocoa/FontCacheCoreText.cpp) - [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures) - [Android TextView Documentation](https://developer.android.com/reference/android/widget/TextView#setFontFeatureSettings(java.lang.String))
554e14b to
d9fa362
Compare
|
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@cortinico merged this pull request in f0893cf. |
Summary: The text style prop `fontVariant` in React Native is supposed to map to the CSS `font-variant` property. The CSS property is a short-hand for the following CSS properties: - [font-variant-alternates](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-alternates) - [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) - [font-variant-east-asian](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-east-asian) - [font-variant-emoji](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-emoji) - [font-variant-ligatures](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures) 👈 - [font-variant-numeric](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric) - [font-variant-position](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-position) Currently React Native only supports a subset of the values from `font-variant-numeric` and `font-variant-caps`. This change increases the `font-variant` support by adding all values from `font-variant-ligatures`. ## Changelog: [iOS] [Added] - Add all fontVariant values for font-variant-ligatures [Android] [Added] - Add all fontVariant values for font-variant-ligatures Pull Request resolved: facebook#36740 Test Plan: See facebook#36740 (comment) ## Resources - [Apple True Type Reference](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html) - [Webkit Source Code](https://opensource.apple.com/source/WebCore/WebCore-7602.1.50.1.1/platform/graphics/cocoa/FontCacheCoreText.cpp) - [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures) - [Android TextView Documentation](https://developer.android.com/reference/android/widget/TextView#setFontFeatureSettings(java.lang.String)) Reviewed By: cipolleschi Differential Revision: D44705513 Pulled By: cortinico fbshipit-source-id: 1cde5fcc23ba99fd2f98fa73d934c8e51b0d292e
Summary: The text style prop `fontVariant` in React Native is supposed to map to the CSS `font-variant` property. The CSS property is a short-hand for the following CSS properties: - [font-variant-alternates](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-alternates) - [font-variant-caps](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps) - [font-variant-east-asian](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-east-asian) - [font-variant-emoji](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-emoji) - [font-variant-ligatures](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures) 👈 - [font-variant-numeric](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric) - [font-variant-position](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-position) Currently React Native only supports a subset of the values from `font-variant-numeric` and `font-variant-caps`. This change increases the `font-variant` support by adding all values from `font-variant-ligatures`. ## Changelog: [iOS] [Added] - Add all fontVariant values for font-variant-ligatures [Android] [Added] - Add all fontVariant values for font-variant-ligatures Pull Request resolved: facebook#36740 Test Plan: See facebook#36740 (comment) ## Resources - [Apple True Type Reference](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html) - [Webkit Source Code](https://opensource.apple.com/source/WebCore/WebCore-7602.1.50.1.1/platform/graphics/cocoa/FontCacheCoreText.cpp) - [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures) - [Android TextView Documentation](https://developer.android.com/reference/android/widget/TextView#setFontFeatureSettings(java.lang.String)) Reviewed By: cipolleschi Differential Revision: D44705513 Pulled By: cortinico fbshipit-source-id: 1cde5fcc23ba99fd2f98fa73d934c8e51b0d292e
|
When this can be released? |
This will land in 0.73 |


Summary
The text style prop
fontVariantin React Native is supposed to map to the CSSfont-variantproperty. The CSS property is a short-hand for the following CSS properties:Currently React Native only supports a subset of the values from
font-variant-numericandfont-variant-caps.This change increases the
font-variantsupport by adding all values fromfont-variant-ligatures.Changelog:
[iOS] [Added] - Add all fontVariant values for font-variant-ligatures
[Android] [Added] - Add all fontVariant values for font-variant-ligatures
Test Plan:
See #36740 (comment)
Resources