I have a problem loading custom fonts in the drop down menu to select fonts in storyboard, I have poppins font and MarvinVisionsBig. I have already added them as target membership, bundle resources and added them to the plist and they are already installed in the system. I tried everything but nothing seems to be working.
The fonts are printed when using this to show them :
for family: String in UIFont.familyNames {
print(family)
for names: String in UIFont.fontNames(forFamilyName: family) {
print("== \(names)")
}
}
Console:
DropDown:
Fonts:
Bundle resources:
Plist:
To add a font file to your Xcode project, select File > Add Files to “Your Project Name” from the menu bar, or drag the file from Finder and drop it into your Xcode project. You can add True Type Font (. ttf) and Open Type Font (. otf) files.
You can download fonts from the App Store app , then use them in documents you create on iPhone. After you download an app containing fonts from the App Store, open the app to install the fonts. To manage installed fonts, go to Settings > General, then tap Fonts.
You can fetch your fonts from Google Fonts. In your React Native project src directory, you should create an assets directory. Here you'll have a directory for each kind of asset (SVG, Fonts, etc). Therefore, create a fonts directory and paste the fonts that you downloaded.
This is a known issue in upgrading to Xcode 11.4, which is seemingly only affecting users who upgraded to Catalina instead of clean install.
In theory, having the fonts in your Info.plist and setting the Font entitlement should work but I could not get it to cooperate. My solution is not recommended as it could corrupt your Xcode but just as quick fix for anyone spending hours on this and don't want to roll back.
This is a no-code solution. What you need to do is compile for 13.4 from Xcode 11.3.1.
Contents > Developer > Platforms > iPhoneOS > DeviceSupport
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With