Include custom fonts into a Mac OS X application
From REALbasicWiki
| This article is a stub. You can help the REALbasicWiki community by expanding it. |
| Overall article skill | ✭ |
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
Resourcesfolder (or any subfolder of it) of your application bundle - Add the property
ATSApplicationFontsPathas a string - Set the property value to the path to the font file relative to
Resources
- Add the font file inside the
- If you have several fonts:
- Add all the font files into a subfolder in the
Resourcesfolder (or any subfolder of it) of your application bundle - Add the property
ATSApplicationFontsPathas a string - Set the property value to the path to the folder containing the font files relative to
Resources
- Add all the font files into a subfolder in the
Now your font(s) will be available to your application.
| | You MUST NOT distribute applications containing copyrighted fonts (in their original or modified version). Helvetica, Times, Arial and so on are all copyrighted ! |
