On 2010 Mar 24, at 15:18, Quincey Morris wrote:

> http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference/Articles/GeneralPurposeKeys.html#//apple_ref/doc/uid/TP40009253-SW8

Well, it looks so damned simple.  I can use an app such as SigMaker to make a 
new font containing several symbols which are rendered poorly in my app.  After 
installing this new font my app, the system should use my symbols instead of 
Lucida Grande whenever their unicode points appear in strings.  But the install 
just doesn't work...

• To eliminate my own newbie errors with SigMaker, I go into /Library/Fonts and 
make a copy of a known-good font, Herculanum.ttf.  This font has at least all 
the ASCII characters.

• I put the copy of Herculanum.ttf in my app's Contents/Resources.

• Editing my app's Info.plist, add
             Key: ATSApplicationFontsPath
    String Value: Herculanum.ttf

• Launch my app

Expected Result: Text fields' "System font" is Herculanum.
Actual Result: Text fields' "System font" is still the usual Lucida Grande.

Repeat without the .ttf extension in Info.plist.  Still Lucida Grande.

Move Herculanum.ttf into Contents/Resources/Fonts and try each of the following 
values for key ATSApplicationFontsPath in Info.plist:
   Fonts
   Fonts/Herculanum
   Fonts/Herculanum.ttf

Still, all I ever get is Lucida Grande.

What else do I need to do?

I also looked at Gerriet's code...

On 2010 Mar 24, at 22:54, Gerriet M. Denkmann wrote:

> I have no documentation references but I do it like this:
> 
> NSFont *font = ... something...
> NSString *thaiFont = [ font isFixedPitch ] ? @"Ayuthaya" : @"Thonburi";
> CGFloat size = [ font pointSize ];
> NSFontDescriptor *fode2 = [ NSFontDescriptor fontDescriptorWithName: thaiFont 
> size: size ];
> NSArray *fodArray = [ NSArray arrayWithObject: fode2 ];
> NSDictionary *fodDict = [ NSDictionary dictionaryWithObject: fodArray
>                                                          forKey: 
> NSFontCascadeListAttribute ];                                            
> NSFontDescriptor *fode1 = [ font fontDescriptor ];
> NSFontDescriptor *fofo = [ fode1 fontDescriptorByAddingAttributes: fodDict ];
> NSFont *aFont = [ NSFont fontWithDescriptor: fofo size: size ];
> if ( aFont == nil )    ... error handling
> font = aFont;

But this looks like a different problem, Gerriet.  You've got the font and 
you're creating a font description.

Thanks for reading,

Jerry Krinock

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to