Open shakeri-mreza opened 7 years ago
You have to set a bold font to your textview :
<TextView fontPath="fonts/MyFont-bold.ttf"/>
When we switch between bold and regular in code, then this is not working.
@benju69 , I agree that your code works:
You have to set a bold font to your textview :
But hardcoding every TextView in the app would be a problem if you have too many layouts. However, Is there any way to programmatically do it?
There is no way to do it programmatically apparently, read the readme, you can also make a Style or a TextAppearance
It is possible to set it programmatically, as described in https://github.com/chrisjenx/Calligraphy/issues/87
textView.setTypeface(TypefaceUtils.load(getResources, "fonts/MyFont-Bold.ttf"));
Thanks @i-schuetz ... It works well for me. I can programmatically set both Regular and Bold fonts. Issue should be closed
how can I set two typefaces (a normal and a bold one) ?