MatterGoal
MatterGoal

Reputation: 16430

Embedding font in cocoa App and use it by IB

My OSX app uses Helvetica and MyriadPro for some textfields, i get that some users disable these fonts by font book and consecutively they are replaced by system fonts...

I read other questions here in stackoverflow based on embedding file etc in Cocoa application, but i need something slightly different. I want to setup my textfield with Interface Builder as usual (i haven't text field created with [NSFont fontWithName:@""]) and define my textfields font by IB, than embed fonts in some way... is this a good solution ?

Upvotes: 2

Views: 963

Answers (1)

Rob Keniger
Rob Keniger

Reputation: 46030

If you have configured a text field to use a particular font in Interface Builder and the font is available on the user's system, then it will be used.

It doesn't matter how the font is loaded. If the font is either active in their system or embedded in your app then it will be used.

You should use the method I describe here for embedding a font in your app bundle. Make sure you have permission to distribute the font, you definitely do not have permission to distribute Helvetica or Myriad Pro unless you have specifically licensed those fonts.

Upvotes: 4

Related Questions