On Android, all of the text are rendered using the Regular font. Android does not support setting fontWeight as a number (they only support 'bold') for custom fonts.
What are the steps to reproduce?
Render a text variant which is supposed to have a bold/semibold weight (e.g., headlineLarge)
Observe that the font is not bold
Screenshots / Screen recording
Here is how the Text variants look:
iOS (correct)
Android (incorrect)
Code snippet / Link to minimum reproduction example
Instead of setting fontWeight in our theme, we must switch the fontFamily to the correct file (e.g., if we need a bold font , we must set the fontFamily to OpenSans-Bold instead of OpenSans-Regular with fontWeight: '700').
Anything else to add?
We need to add information into our Readme that explains that if you need to change the fontWeight of a Text element, it must be done through the fontFamily property and not the fontWeight property.
Strangely, if you try to manually add a bold style to the font, it stops using Open Sans entirely (notice the 'g') — even worse:
Describe the bug / expected behavior
On Android, all of the text are rendered using the Regular font. Android does not support setting fontWeight as a number (they only support 'bold') for custom fonts.
What are the steps to reproduce?
Screenshots / Screen recording
Here is how the Text variants look:
Code snippet / Link to minimum reproduction example
Your environment information
This only affects Android.
Suggested fix
Instead of setting fontWeight in our theme, we must switch the fontFamily to the correct file (e.g., if we need a bold font , we must set the fontFamily to OpenSans-Bold instead of OpenSans-Regular with fontWeight: '700').
Anything else to add?
We need to add information into our Readme that explains that if you need to change the fontWeight of a Text element, it must be done through the fontFamily property and not the fontWeight property.
Strangely, if you try to manually add a bold style to the font, it stops using Open Sans entirely (notice the 'g') — even worse: