Just to add one small but important detail after testing this in B4i release mode:
The font file can indeed be included in the .b4xlib under:
and the consuming B4i app still needs to add the
#AppFont attribute. What was not obvious to me at first: the filename used in
#AppFont must be
lowercase.
I initially used:
#AppFont: B4X_FontAwesome.otf
#AppFont: B4X_MaterialIcons.ttf
The files were present with lower case letters in the app bundle, but iOS did not register them. This caused the a runtime error when calling
xui.CreateFontAwesome().
The working version was:
#AppFont: b4x_fontawesome.otf
#AppFont: b4x_materialicons.ttf
So the rule seems to be:
- Put the font files in the .b4xlib under
Files\Special.
- Add
#AppFont in the consuming B4i project.
- Make sure that the
#AppFont filename exactly matches the copied bundle filename, that is lowercase.
This is easy to miss on Windows, where filename casing usually does not matter during development.