How to install fonts in your app

Okay… after much trial and error, I got it going.
I’m now going to baby-walk any curious people through it.
I have 3 fonts that I made specifically for my software. During design I had them installed. However, I was wondering how my DMG for worldwide release was going to install the plugin - I almost, heaven forbid, bought another plugin. But hooray - problem solved!

Now, for installation… I build my app. using my tar file I install it on the desktop.
Now for the fun.
a) you have your special fonts somewhere don’t you… right click on them and get the full name.
One of my fonts is GSTMusic.ttf - but it’s full name was GSTMusic - which is cool because I used GSTMusic all the way through my software.

b) Right click on your app and show package contents. You’ll see in there “info.plist” - we’ll be coming back to that later!

c) Open the resource folder. make a folder in there and call it anything. The trendy thing at the moment is to call it appfonts.

d) Put your fonts into this new folder

e) think about being me a beer… We’re almost finished!

f) go out of that folder and right click on info.plist. Open it with the text editor - no fancy Xcode tool needed around here.

g) your command will be this:

<key>ATSApplicationFontsPath</key> <string>appfonts</string>
this appears to be a command for your app. it seems to be

<key>some kind of tool name</key> <string>parameter</string>
in actual fact we don’t care - we want to slap our little command in here somewhere between commands.

Here’s what my start of my info.plist goes - for your wining convenience…

[code]<?xml version="1.0" encoding="UTF-8"?>

CFBundleExecutable Guitar SightReader Toolbox CFBundleName Guitar SightReader Toolbox CFBundleIdentifier GST ATSApplicationFontsPath appfonts CFBundleInfoDictionaryVersion 6.0 CFBundleVersion[/code]

Do you see it there - just after my beautiful software’s name and CFBudleIdentifier. I put it there and it just works!!!
Now, I don’t need to have my fonts installed on another users computer - they come frolicking along with my software.

So, this will now work in runtime. I would suggest that while you design, have your fonts installed, and for your build ready to package, do the above steps!

While you’re at it, you may want to check out this at work in my new software release:
Guitar SightReader Toolbox - the best guitar and bass player training software on the planet

So, I hope that was simple enough for you?


No need to wrap your URL in URL tags since that takes you to :stuck_out_tongue:

Norman - thanks for that… useful to know :slight_smile: