Hello,
I'm getting this error when trying to create my own FontAwesome typeface to use as a font for a list of labels I'm creating programmatically. Each label when created has a hex value which is converted to decimal to then display the relevant icon. I think the issue is either that the icons don't exist in the internal library or it's something to do with the sizing.
I would like to say I am aware that there is already an internal B4X_FontAwesome.otf font which so far I've used and it's been great. The problem I have now is that in B4i there are some icons which are not showing with the default FA library - showing a question mark instead (screenshot below is an example). I had the same issue in B4A and solved it by downloading the official free file from the FontAwesome website and loading it in like this:
For reference the icon which is displaying correctly above is https://fontawesome.com/icons/users, the one which is not displaying correctly is: https://fontawesome.com/icons/store
I saw this thread but it is more related to the designer: https://www.b4x.com/android/forum/threads/solved-fontawesome-not-working-as-button-icons.105581/
Anyone know what else I can try?
Thanks!
I'm getting this error when trying to create my own FontAwesome typeface to use as a font for a list of labels I'm creating programmatically. Each label when created has a hex value which is converted to decimal to then display the relevant icon. I think the issue is either that the icons don't exist in the internal library or it's something to do with the sizing.
B4X:
lblWPIcon.Font = Font.CreateNew2("Font Awesome 5 Free Solid",17)
B4X:
Error occurred on line: 913 (Main)
Object was not initialized (UIFont)
)
I would like to say I am aware that there is already an internal B4X_FontAwesome.otf font which so far I've used and it's been great. The problem I have now is that in B4i there are some icons which are not showing with the default FA library - showing a question mark instead (screenshot below is an example). I had the same issue in B4A and solved it by downloading the official free file from the FontAwesome website and loading it in like this:
B4X:
Dim FontAwesome As Typeface
FontAwesome = Typeface.LoadFromAssets("FontAwesome5Free_Solid_900.otf")
lblWPAIcon.Typeface = FontAwesome
lblWPAIcon.Text = Chr(hexa2Decimal("f5a2"))
For reference the icon which is displaying correctly above is https://fontawesome.com/icons/users, the one which is not displaying correctly is: https://fontawesome.com/icons/store
I saw this thread but it is more related to the designer: https://www.b4x.com/android/forum/threads/solved-fontawesome-not-working-as-button-icons.105581/
Anyone know what else I can try?
Thanks!