Text variants not working correctly on Android #89
Labels
brightlayer-ui
Used to identify Brightlayer UI platform issues for easy filtering
bug
Something isn't working
high-priority
Issues that should be fixed sooner than later
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:
The text was updated successfully, but these errors were encountered: