Hi,
I`m using BCtextengine on a B4X app, all is working well in B4A, but I`m getting an error in B4i "Object was not initialized (UIFont)"
The font file is in the Special directory, I`m using the fonts name without spaces as shown in the attached picture.
Appreciate any advice as this is killing my B4i apps release ?
I`m using BCtextengine on a B4X app, all is working well in B4A, but I`m getting an error in B4i "Object was not initialized (UIFont)"
The font file is in the Special directory, I`m using the fonts name without spaces as shown in the attached picture.
Appreciate any advice as this is killing my B4i apps release ?
B4X:
#Region Project Attributes
#ApplicationLabel: B4i Example
#Version: 1.0.0
'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
#iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
#iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
#Target: iPhone, iPad
#ATSEnabled: True
#MinVersion: 8
#AppFont: ocfont1-regular.ttf
#End Region
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region40
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Public TE As BCTextEngine
Private BBCodeView1 As BBCodeView
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
TE.CustomFonts.Put("MyFont", xui.CreateFont(Font.CreateNew2("OCFont1", 40), 40))
'[font=MyFont size=30]e[/font]
BBCodeView1.Text = $"[indent=-1][Alignment=Left][TextSize=14][list]
[*][Color=#e1e3e7][b]Don't take[/b] anything that belongs in the ocean[/color]
[*][Color=#e1e3e7][b]Leave all[/b] marine life in the ocean, where they belong[/color]
[*][Color=#e1e3e7]Say [b]NO[/b] to single-use plastics[/color]"$
End Sub