iOS Code Snippet Get MaterialIcons and FontAwesome Fonts

Discussion in 'iOS Code Snippets' started by AndOrNot, Mar 30, 2017.

  1. AndOrNot

    AndOrNot Well-Known Member Licensed User

    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.

    Code:
    '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
     

    Attached Files:

Loading...