Hi! Can anyone explain how can i right use b4x font?
I have a code module utils in which i load some fonts, i want to use same code on b4i.. thanks
B4X:
Public const SansSemibold As Typeface = Typeface.LoadFromAssets("SourceSansPro-Semibold.otf")
Public const SansLight As Typeface = Typeface.LoadFromAssets("SourceSansPro-Light.ttf")
Public const SansBold As Typeface = Typeface.LoadFromAssets("SourceSansPro-Bold.otf")
Public const SansBlack As Typeface = Typeface.LoadFromAssets("SourceSansPro-Black.ttf")
Public const SansRegular As Typeface = Typeface.LoadFromAssets("SourceSansPro-Regular.otf")
Hi! Can anyone explain how can i right use b4x font?
I have a code module utils in which i load some fonts, i want to use same code on b4i.. thanks
B4X:
Public const SansSemibold As Typeface = Typeface.LoadFromAssets("SourceSansPro-Semibold.otf")
Public const SansLight As Typeface = Typeface.LoadFromAssets("SourceSansPro-Light.ttf")
Public const SansBold As Typeface = Typeface.LoadFromAssets("SourceSansPro-Bold.otf")
Public const SansBlack As Typeface = Typeface.LoadFromAssets("SourceSansPro-Black.ttf")
Public const SansRegular As Typeface = Typeface.LoadFromAssets("SourceSansPro-Regular.otf")
I know this, but i don't know how use XUI Font and if is possibile to use same code. Obviously in b4i we need to declare apps font as wrote in tutorial
So there is not a general load from assets.. i need something like this?
B4X:
#If b4a
Public SansSemibold As B4XFont= xui.CreateFont(Typeface.LoadFromAssets("SourceSansPro-Semibold.otf"), 16)
#else if b4i
Public SansSemibold As B4XFont= xui.CreateFont(Font.CreateNew2("SourceSansPro-Semibold", 30), 16)
#end if