Android Question Get Font Properties from ttf/otf

Mashiane

Expert
Licensed User
Longtime User
Hi

How can I get the font name from a ttf/otf file stored in the assets folder?

I am able to set a font label with..

B4X:
Sub SetLabelFont(v As Label, fontFile As String)
    Dim ff As Typeface
    ff = Typeface.LoadFromAssets(fontFile)
    v.Typeface = ff
    ff = Null
End Sub

Assuming that I know the fontFile. I want to enable a user to select from a list of available fonts using exact font names, can someone please advise?

Thanks, :(
 
Top