Include custom fonts into a Mac OS X application

From REALbasicWiki

Jump to: navigation, search
Overall article skill Skill ranges from beginner (green) to expert (red)

 Available on Mac OS only  This article applies only to Mac  

Mac OS X applications are bundles, so they can contain any type of file, including custom fonts.

However, you need to inform the system that your application wants to use fonts which are not located in a standard place. You can achieve this by modifying the Info.plist file inside your application bundle (see Build a faceless background application).

  • If you have only one font:
    • Add the font file inside the Resources folder (or any subfolder of it) of your application bundle
    • Add the property ATSApplicationFontsPath as a string
    • Set the property value to the path to the font file relative to Resources
  • If you have several fonts:
    • Add all the font files into a subfolder in the Resources folder (or any subfolder of it) of your application bundle
    • Add the property ATSApplicationFontsPath as a string
    • Set the property value to the path to the folder containing the font files relative to Resources

Now your font(s) will be available to your application.


Image:Warning24.png You MUST NOT distribute applications containing copyrighted fonts (in their original or modified version). Helvetica, Times, Arial and so on are all copyrighted !
Personal tools
related