Using author supplied fonts

mjtaryan

Active Member
Licensed User
Longtime User
Is it possible to use special or author supplied fonts for Labels and EditText views. If so, how is this done? Thanks.
 
Never mind. I think I found what I needed to know. I am, however, assuming that external fonts can be used by either Labels or EditText.
 
Upvote 0
Here's the way I did it. First, click on your Files tab and add the font file. I've used TTF and OTF fonts so far with no problems.

Then add something like this:
Code: Copy
Sub Process_Globals
     Dim myFont As Typeface
End Sub

In my code I used:
Code: Copy
myFont = Typeface.LoadFromAssets("rawengulksans.otf")
lblTitle.Typeface = myFont

Just be sure to use a font to which you have the legal right to distribute, such as public domain fonts. Just check the licensing.

I've used fonts with anything with a label inside, including listviews.
 
Upvote 0
Back
Top