' 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