iOS Code Snippet Get MaterialIcons and FontAwesome Fonts

Hi don't know if is possible to get this fonts like b4a (typeface.Materialicons), but after different search i want to share the way that i use to get this.

B4X:
'Code module

Sub Process_Globals
    Private lblAwesome As Label
    Private lblMIcons As Label
End Sub

Sub GetFontMaterial(size As Int) As Font
    Dim p As Panel
    p.Initialize("")
    p.LoadLayout("fontsbil")
    Dim f As Font = lblMIcons.Font
    Return f.CreateNew2(f.Name,size)
End Sub

Sub GetFontAwesome(size As Int) As Font
    Dim p As Panel
    p.Initialize("")
    p.LoadLayout("fontsbil")
    Dim f As Font = lblAwesome.Font
    Return f.CreateNew2(f.Name,size)
End Sub

I attach the layout file
 

Attachments

  • fontsbil.zip
    1.1 KB · Views: 258
Top