[futurebasic] Re: [FB] Fonts in the Resources Folder

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2010 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Wed, 3 Nov 2010 13:32:15 +1300
Rich Love wrote:

> My installer has always installed fonts in /Library.Fonts
> Is there a way to avoid that and just use my fonts from the Resources folder within the package of my app?
> I tried...
>  include resources "Fonts" 
> (where Fonts is my folder of fonts).
> That does copy my Fonts folder to the Resources folder.
> But the fonts are not being used by my app.

You can get a (non-zero) font num for such fonts with either GetFNum() or ATSFontFamilyFindFromQuickDrawName(). These functions evidently look in <appname.app>/Contents/Resources/Fonts as you would expect.

But setting the port font to a fontNum retrieved in that way has no effect, whether you use text fNum or SetPortTextFont( thePort, fNum ) etc.

Looks like you will have find a way to install your fonts. I should be surprised if Apple lets you modify /Library/Fonts. The correct place would be ~/Library/Fonts

Robert P.