iOS Question Do we have TypeFace object

Mashiane

Expert
Licensed User
Longtime User
You are looking for the Font object.
B4X:
lbl.Font = Font.DEFAULT_BOLD
I wanted to use FontAwesome like this..

B4X:
'Initialize the Typeface.
Dim myFont AsTypeface
myFont = Typeface.LoadFromAssets("fontawesome.otf")
'Add the FontAwesome typeface to your view.
Label1.Typeface = myFont
'Select the icon you want to display
Label1.Text = Chr(61481)

Is this possible with B4i to do something like that?
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
I wanted to use FontAwesome like this..

B4X:
'Initialize the Typeface.
Dim myFont AsTypeface
myFont = Typeface.LoadFromAssets("fontawesome.otf")
'Add the FontAwesome typeface to your view.
Label1.Typeface = myFont
'Select the icon you want to display
Label1.Text = Chr(61481)

Is this possible with B4i to do something like that?
I couldnt exactly understand what you are asking after Erel's response but first you have to put
B4X:
#AppFont: ethnocentricrg.ttf
under project attributes. later you can use

B4X:
lblilkekran.Font = Font.CreateNew2("EthnocentricRg-Regular", 20)

The name of the font must be exactly same with the one when you double click on the font .
 
Upvote 0
Top