Public xFontBase As B4XFont 'Font per le B4xView
Public xFontLight As B4XFont
.....
xFontBase = CreateB4XFont("AppleGaramond.ttf", 14, 14) 'per b4xview
xFontLight = CreateB4XFont("AppleGaramond-Light.ttf", 14, 14)
....
'NativeFontSize is needed only for B4J or B4I.
Public Sub CreateB4XFont(FontFileName As String, FontSize As Float, NativeFontSize As Float) As B4XFont
#If B4A
Return xui.CreateFont(Typeface.LoadFromAssets(FontFileName), FontSize)
#Else If B4i
Return xui.CreateFont(Font.CreateNew2(FontFileName, NativeFontSize), FontSize)
#Else
'B4J - unused
Return xui.CreateFont(fx.LoadFont(File.DirAssets, FontFileName, NativeFontSize), FontSize)
#End If
End Sub