D DawningTruth Active Member Licensed User Aug 25, 2019 #1 I have the following code to set the button font for a B4xDialog B4X: dialog.ButtonsFont = XUI.CreateFont(File.OpenInput(File.DirAssets,"myfont.ttf"),16) When I execute this code I get the following error: Access to the path 'C:\B4x Projects\My Android Project\MyProject\Objects\bin\extra\assets\myfont.ttf' is denied. The font is in the assets folder. But access denied. Any suggestions?
I have the following code to set the button font for a B4xDialog B4X: dialog.ButtonsFont = XUI.CreateFont(File.OpenInput(File.DirAssets,"myfont.ttf"),16) When I execute this code I get the following error: Access to the path 'C:\B4x Projects\My Android Project\MyProject\Objects\bin\extra\assets\myfont.ttf' is denied. The font is in the assets folder. But access denied. Any suggestions?
D DawningTruth Active Member Licensed User Aug 25, 2019 #2 Figured it out. For reference for others the code for loading the font should be: B4X: dialog.ButtonsFont = XUI.CreateFont(Typeface.LoadFromAssets("myfont.ttf"),16) The access denied was caused by windows locking the directory. Nothing to do with B4A. Upvote 0
Figured it out. For reference for others the code for loading the font should be: B4X: dialog.ButtonsFont = XUI.CreateFont(Typeface.LoadFromAssets("myfont.ttf"),16) The access denied was caused by windows locking the directory. Nothing to do with B4A.