iDevGames Forums

Full Version: Cocoa font loading
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My project targets both iOS and mac osx. I'm trying to embed a true type font using the "fonts provided by application" key in both target's info.plist however, it only works for the iOS version - additionally I tried using ATSApplicationFontsPath for the osx target but no luck either. Any ideas?
Did you (for example) set ATSApplicationFontsPath to "Fonts" and then add a Fonts folder into the Resources folder of the application bundle? (Has to be a blue folder in Xcode, not a yellow folder.) Or you can add a custom Copy Files build phase to copy into a Fonts subfolder of Resources and make sure the ttf file is added to that build phase rather than the standard Resources phase.
ATSApplicationFontsPath is pretty finicky and I'm pretty sure (from memory) not all the cases mentioned in the documentation actually work.

For Extendaword I apparently couldn't make it work at all, and ended up doing this:
Reference URL's