Cocoa font loading

Apprentice
Posts: 15
Joined: 2012.03
Post: #1
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?
Quote this message in a reply
⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #2
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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
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: https://github.com/OneSadCookie/Extendaw...ord/main.m
Quote this message in a reply
Post Reply