Uh oh!
There was an error while loading. Please reload this page.
Support font-variant-ligatures values - #36740
Conversation
facebook-github-bot
commented
Mar 31, 2023
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 cla@meta.com. Thanks! |
finnp
commented
Mar 31, 2023
This change is related to increasing compability with web, linking #34425 |
facebook-github-bot
commented
Mar 31, 2023
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
finnp
commented
Mar 31, 2023
Here's a table of all the values:
|
1282a5b to
9a121c0Compare9a121c0 to
d8a7dbbCompareTest 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 ✅ |
finnp
commented
Apr 3, 2023
@cortinico@necolas Is anything else needed here to get this merged? |
cortinico
commented
Apr 3, 2023
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
554e14bCompareThe 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
d9fa362Comparefacebook-github-bot
commented
Apr 5, 2023
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
facebook-github-bot
commented
Apr 5, 2023
@cortinico merged this pull request in f0893cf. |
professorkolik
commented
Jun 7, 2023
When this can be released? |
cortinico
commented
Jun 8, 2023
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