Does chr() function only support 2 bytes unicode? also Asc().
I am trying to use the updated Material design icon font, which includes more than 6000 icons now, and its code is more than 2 bytes. If use chr(0xF1A29) it doens't work, however if directly copy the character to label.text it works.
Dim fx As JFX
Dim IconsFont As B4XFont = xui.CreateFont(fx.LoadFont(File.DirAssets,"materialdesignicons-webfont.ttf",64),64)
Label1.Font = IconsFont
Label1.Text = UnicodeToString(0xF1A28) & UnicodeToString(0xF1A29) & UnicodeToString(0xF1A2A)
Hello everyone I'm trying to use new version of Material Design Icons. So i downloaded, copied in files folder, imported with files manager and used the code bellow to show icons. Sub Class_Globals Private Root As B4XView Private xui As XUI Private ASTabMenu_horizontal As ASTabMenu...
Sub UnicodeToString (code As Int) As String
Dim bc As ByteConverter
Dim b() As Byte = bc.IntsToBytes(Array As Int(code))
Return BytesToString(b, 0, 4, "UTF32")
End Sub
Dim fx As JFX
Dim IconsFont As B4XFont = xui.CreateFont(fx.LoadFont(File.DirAssets,"materialdesignicons-webfont.ttf",64),64)
Label1.Font = IconsFont
Label1.Text = UnicodeToString(0xF1A28) & UnicodeToString(0xF1A29) & UnicodeToString(0xF1A2A)