Android Question Changing the system font shows Material Icons label with Chinese-like chars

Alessandro71

Well-Known Member
Licensed User
Longtime User
I need to create a label by code, by cloning an existing label, which uses Material Icons font.
Here is how it looks: the grey icon is the original label, while the red one is the clone
1726865196306.png


if I set the system font to anything else than the default (SamsungOne in this example)
1726865257317.png

the cloned icon font changes to a strange font
1726865295379.png


proof-of-concept project is attached.
 

Attachments

  • TestFont.zip
    9.8 KB · Views: 5

TILogistic

Expert
Licensed User
Longtime User
Test Clone

B4X:
    Dim new As B4XView = CloneLabelToB4XView(Label1)
    Log(new.Font)
    Log(new.Text)
B4X:
Public Sub CloneLabelToB4XView(lbl As Label) As B4XView
    Dim new As B4XView = lbl
    new.Text = lbl.Text
    new.Font = xui.CreateFont(lbl.Font, lbl.Font.Size)
    new.TextColor = xui.Color_Red
    Return new
End Sub
1726868801431.png
 
Upvote 0
Top