Android Question Custom Fonts issues

MitchBu

Active Member
Licensed User
I am trying to apply what looks like rather straighforward instructions in Erel's tutorial at https://www.b4x.com/android/forum/threads/custom-fonts.46461/

- I copied the fonts into Files\Special

2. Add the #AppFont attribute for each font file (including the extension):
Where should I add this ?
B4X:
#AppFont: Calebasse.ttf
#AppFont: Zz.ttf
I tried in Project Attributes, but I get an error "Attribute not supported:appfont"

Then this

B4X:
Label1.Font = Font.CreateNew2("Calebasse", 30)
triggers : "Undeclared variable 'font' is used before it was assigned any value"

What am I doing wrong ?
 
Last edited:
Top