I am using font awesome in a label with text and symols:
lblInfo.Text = Chr(0xF0A4) & " Töne"
On some devices it works perfect, but on others I have problems with the encoding.
So the umlaut 'ö' is not displayed.
Can I set a label property or force something in the Manifest-Editor to fix that?
Use CSBuilder to create the text with two typefaces:
B4X:
Dim cs As CSBuilder
lblScreen.Text = cs.Initialize.Typeface(Typeface.FONTAWESOME).Append(Chr(0xF0A4)).Pop.Typeface(Typeface.DEFAULT).Append(" Töne").PopAll
This sub makes it easy to mix awesome symbols and text in a label
B4X:
Sub SetLabelAwesomeText(lab As Label, text As String)
Dim cs As CSBuilder
If text = "" Then
lab.Text = ""
else If Asc(text.CharAt(0)) >= 0xF000 Then 'Starts with a Awesome symbol
lab.Text = cs.Initialize.Typeface(Typeface.FONTAWESOME).Append(text.CharAt(0)).Pop.Typeface(Typeface.DEFAULT).Append(text.SubString(1)).PopAll
Else 'normal text
lab.Text = cs.Initialize.Typeface(Typeface.DEFAULT).Append(text).PopAll
End If
End Sub