I am trying to use a custom font with BCTextEngine but I am unable to get it to use it.
Is this even possible and if so how do I get it to work?
BTW I am converting my monospace font "About" info in my app with this since it has Justified Alignment and other nice features. Pretty cool stuff!
B4X:
' Font to use for Header
tfOutline = Typeface.LoadFromAssets("MyFont.ttf")
' TextEngine.CustomFonts.Put("dearest", xui.CreateFont(Typeface.LoadFromAssets("MyFont.ttf"), 10))
' TextEngine.CustomFonts.Put("dearest",xui.CreateFont(tfOutline, 10))
TextEngine.CustomFonts.Put("dearest",xui.CreateFont(Typeface.CreateNew(tfOutline, Typeface.STYLE_BOLD), 10))
BBCodeView1.Text = _
$"[Alignment=Center][font=dearest size=18][b]My Header[/b][/Font][/Alignment]"$
Is this even possible and if so how do I get it to work?
BTW I am converting my monospace font "About" info in my app with this since it has Justified Alignment and other nice features. Pretty cool stuff!