I would like to integrate a custom font into a CustomView (B4xlib-library) without having to use the “#AppFont:” attribute in the main module.
The custom font is available in the B4xlib-library under “..\File\Special”.
Is this possible? If so, how?
I have no programming experience with B4I, but in B4J and B4A I load a font via XUI program code from the assets file folder. See also [B4X] MaterialIcons Web Font Chooser
Possible B4X solution:
' Declare a variable for the custom font
Private CustomFont As B4XFont
' Initialize the font from the assets directory
CustomFont = xui.CreateFont(File.OpenInput(File.DirAssets, "CustomFont.ttf"), 16)
' Apply the font to a label
Label1.Font = CustomFont