-
I can see that i can control fontSize, fontWeight etc. for instance "text90", "text70" is for different sizes. also i can make it bold and large like this "text100BL". but where is the font family defined?. i assume this is the system default font. I would like to change it to a font family of my choice where i can control the weight, size like this using these presets. Is it possible? if so how?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can set your own typography presets or override the existing ones and pass whatever font prop you want: You can use It's important to notice that Android and iOS works a little different when it comes to font. You can see for example how we set our internal typographies here |
Beta Was this translation helpful? Give feedback.
You can set your own typography presets or override the existing ones and pass whatever font prop you want:
fontSize
,fontFamily
,fontWeight
,lineHeight
,letterSpacing
, etc..You can use
Typography.loadTypographies({myFont: {...}, text70: {...}});
It's important to notice that Android and iOS works a little different when it comes to font.
Sometimes the weight of a font is determined by the
fontFamily
and sometimes you need to pass thefontWeight
You can see for example how we set our internal typographies here
react-native-ui-lib/src/style/typographyPresets.ts
Line 19 in cf29b80