Files
react-native/packages
Finn PaulsandFacebook GitHub Bot f0893cf72f Support font-variant-ligatures values (#36740)
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: https://github.com/facebook/react-native/pull/36740

Test Plan:
See https://github.com/facebook/react-native/pull/36740#issuecomment-1492546631
## 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
2023-04-05 06:16:15 -07:00
..
2023-03-30 15:55:58 -07:00
2023-03-30 15:55:58 -07:00