1

Google- Inter(font family) not supported when used as external styles

my code

assets/fonts file :

InterBold:{ fontFamily:'Inter-Bold'},
InterSemiBold:{ fontFamily:'Inter-SemiBold'},
InterRegular:{ fontFamily:'Inter-Regular'},
InterMedium:{ fontFamily:'Inter-Medium'},
InterBlack:{ fontFamily:'Inter-Black'},
InterExtraBold:{ fontFamily:'Inter-ExtraBold'},
InterExtraLight:{ fontFamily:'Inter-ExtraLight'},
InterLight:{ fontFamily:'Inter-Light'},
InterThin:{ fontFamily:'Inter-Thin'}

Source File :

import Fonts from 'assets/fonts';
...
return(
...
<Text
style={[
CommonStyles.TextColor1,
Device.isTablet ? FontSize.size16RFValue : FontSize.size14RFValue,
Fonts.InterRegular,    //fontfamily not supported   
]}>
{name}
 </Text>
 ...
) 

But when used as inline (i.e)

<Text
  style={[
{
color: '#1C1C1C',
fontSize: 14,
fontFamily: 'Inter-Regular', //its working 
  },
]}>
 {name}
</Text>    
Niraimathi
  • 11
  • 2

0 Answers0