Closed jf-ouellette closed 4 years ago
Hi @jf-ouellette
The font size is indeed adjustable and the fontWeight
property is not this is because react native
only allows these values.
https://react-native.org/doc/text-style-props.html#fontweight
As specified in the docs there are only these options possible and that is why it is not adjustable
greetings Thomas
Hi @TVke
That makes sense.
I wanted to adjust the values because when I use semiBold, it works well with iOS, but not with Android. My font has 'normal' weight instead of 'bold' weight, so I end up needing to overwrite the value like so : semibold: Platform.OS === 'ios' ? '600' : 'bold'
.
I'll see if I can come up with another solution.
Thank you, Thomas! Jean-François
Hi @jf-ouellette
Maybe you can modify the font file itself? 🤔
Thank you for using react-native-tailwindcss
.
greetings Thomas
Hi!
I've been trying to overwrite the value for
fontSemibold
in mytailwind.config
, but I am not able to make it work. I ended up comparingfontSize.js
andfontWeight.js
in thenode_modules
and I noticed that the first one usestheme.fontSize
in thegenerator.generate
function while the other uses an (hardcoded?) array.Does that mean that we can't overwrite the values for
fontWeight
, or am I just missing something?I am using version 1.1.9 of the plugin.
Thank you so much!