making a font bold

gjoisa

Active Member
Licensed User
Longtime User
I am using a custom font in my app . i used the code as :
Dim mf As TypeFace
.......
mf=Typeface.LoadFromAssets("sgj.ttf")
Now how to make this font as bold font ?
 

bsnqt

Active Member
Licensed User
Longtime User
Dear Erel,

I use Roboto Thin font (.ttf). I can upload it here upon your request.
My code:
B4X:
Dim myfont As TypeFace
myfont = Typeface.LoadFromAssets("RobotoThin.ttf")
myfont = Typeface.CreateNew(myfont , Typeface.STYLE_BOLD)
Label1.Typeface = myfont
I need to mention that my Label1 is used for adding to a CustomListView.
I don't get any error. It just displays the same thin font without changing it to BOLD as expected :(
 
Last edited:
Upvote 0
Top