OSX & Using Custom Font’s

In  iOS, you can easily bundle your application with custom fonts and in the info property list you then define a key “Fonts provided by application” and add all the custom font’s that your application will need. Well, in OSX dev you have to go about it in a different way. You can’t specify font’s in your property lists, instead you have to use the ATSFont class, and specify the folder with your font’s. First of all, add your fonts the the app ( you can just drag and drop htem into the xcode file navigator panel or use the File–>add files to project) . Now that the font’s are in your main bundle you can then use the code snippet below to activate your font’s. You can also specify a file/folder directory if the font’s are outside your application main bundle.

Have a look at the code snippet below, its pretty straight forward, but i hope this helps someone out there.




after this you can use your fonts on your labels as follows: