Button Text Extended characters

Rusty

Well-Known Member
Licensed User
Longtime User
Is there a way to display extended characters such as ᎣᏍᏓᏑᎾᎴᎢ in a button, editText and radio button...basically any view?
I am currently successfully displaying Chinese characters in all views, but can't seem to get Cherokee to display.
Thanks,
 

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Erel.
How do I "include a font"?
I have a font on my machine that works, how do I get it onto my Android?
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Excellent!
Thanks for the fast response.
For others, I have included my solution:
1. add the true type font to Files (Files.DirAssets) within the app
2. declare a font in the Globals or Process globals
Dim Cherokee As Typeface

3.
B4X:
'set special fonts for non standard languages
Sub SetFont() As Typeface
   Select Case MYLANGUAGECODE.ToLowerCase
      Case  "che"                                             'this is Cherokee
         If Cherokee.IsInitialized = False Then
            Cherokee = Typeface.LoadFromAssets("plantc.ttf")         'load the special font for this language
         End If
         Return Cherokee
      Case Else
         Return Typeface.DEFAULT
   End Select
End Sub
4. For any control set the Typeface
B4X:
Dim L As Button
   L.Initialize("btn")
   L.Typeface = SpecialFont.setfont               'set any special fonts
5. no additional libraries are required
 
Last edited:
Upvote 0
Top