I'm trying to use a custom font in my iPhone app.
I created a key for it in my info.plist as follows:
<key>UIAppFonts</key>
<array>
<string>CloisterBlack.ttf</string>
</array>
and I'm accessing the font like this:
[UIFont fontWithName:@"CloisterBlack" size:64.0]
but the font is not displaying. What could be the reason?
Easiest fix: Download and reinstall the correct version of the file, making sure the font is compatible with your operating system. Locate the font files on your system and remove any duplicates. If that doesn't work, use the font in a different app to see if the font works at all.
Restart the computer. Apple OS X will rebuild its font cache, and Word will rebuild its font cache from that. For best performance in Word, try to run with all your fonts enabled all the time. Each time that Word starts, it compares its font cache with the system font cache.
Make sure you give the real font name in above code. The font file name and its “real font name” can be different, so just open the font in FontBook app and there you can see the real name of the font.
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