Label and buttone typeface

eilert

Member
Licensed User
Longtime User
Hi

Any chance to use other typeface/ font than SERIF and SANS_SERIF
on Label and buttons, its the only two I got in the designer ??

tore
 

eilert

Member
Licensed User
Longtime User
Hi.
Thanks for the answer, I read that posting, but i was wondering
if this i a thing that can be tested in the Designer ?

tore
 
Upvote 0

eilert

Member
Licensed User
Longtime User
Hi.
Still struggling, either it me, or its the documentation,
Im trying to change the typeface to something called segment.ttf
in the doc it says:

Loads a font file, that was added with the file manager.
Example:
Dim MyFont As Typeface
MyFont = Typeface.LoadFromAssets("MyFont.ttf")
EditText1.Typeface = MyFont

seems simple enough, but how this is done it don't' say,
Does it mean the file tab in the right corner, or another file manager??
Have tried that, but not able to load any ttf file...

tore
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
As your font file is : segment.ttf

You must use this code:
B4X:
Dim MyFont As Typeface
MyFont = Typeface.LoadFromAssets("[COLOR=red]segment.ttf[/COLOR]")
EditText1.Typeface = MyFont
Attached the small test program I used with the times.ttf font file.

Best regards.
 
Upvote 0

eilert

Member
Licensed User
Longtime User
Hi.
Thanks for your time and answer,
I also found out that the TTF's must be located in
the files folder of the app..



Thanks


tore
 
Upvote 0
Top