Not able to pass custom font added in xcode
I have added open sans in plist , and asset bundle I can access that font in storyboard font dropdown, but using BonMot , app getting crash on font name (OpenSans-Bold)
@iOSUser110 thanks for taking the time to write in! Would you mind posting the stack trace or error message of the crash? That will help us to debug it.
My guess is that the problem is not with BonMot, but with loading the font itself. Can you please try making a font like this? It will help us determine whether the issue is with BonMot, or with font loading in your project.
let font = UIFont(name: "OpenSans-Bold", size: 12)
If your app isn't able to load the font, the name could be incorrect. You can see all the fonts available on your system like this:
print(UIFont.familyNames)
And if you see OpenSans in the list, you can see available font faces (bold, italic, etc) like this:
print(UIFont.fontNames(forFamilyName: "OpenSans"))