I see, I didnt realize that.
I'm probably confused but I believe NJDude is talking about creating a library from B4A class, compile to jar, then adding the ttf file to it.
Then you need to take the input stream from LoadFileFileFromJar(in the class mentioned by NJDude) and copy it.
Then you further need to use JO or Reflection to load it.
Also, Typeface.createFromFile should definitely be added to the B4A Typeface class as well.
You can use this sub to load a typeface from a file:
B4X:
Sub LoadTypefaceFromFile(Dir As String, FileName As String) As Typeface
Dim jo As JavaObject
jo.InitializeStatic("android.graphics.Typeface")
Return jo.RunMethod("createFromFile", Array(File.Combine(Dir, FileName)))
End Sub
'usage example
Dim tf As Typeface = LoadTypefaceFromFile(File.DirRootExternal, "papercuts-2.ttf")
Label1.Typeface = tf
If i understand correctly, the only diference between create type face from file and typeface.load from assets is the ability to access outside folders, right?