How to use Google variable fonts in React-Native

Viewed 167

i'm trying to use google custom fonts in react-native but i'm getting issues, i downloaded OpenSans font from google and configured it with react-native correctly.

font file OpenSans-VariableFont_wdth,wght.ttf

i'm trying to use it like

{
fontSize: 18,
fontFamily:"OpenSans-Bold"
},

but i'm getting issue like Unrecognized font family 'OpenSans-Bold'. But it is working if i give like OpenSans-Regular.

How can i use this file OpenSans-VariableFont_wdth,wght.ttf

0 Answers
Related