• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why is NSFontManager lying to me ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is NSFontManager lying to me ?


  • Subject: Re: Why is NSFontManager lying to me ?
  • From: John Nunez <email@hidden>
  • Date: Mon, 27 Feb 2006 23:12:18 -0500

Hi Robert,

I was discussing this issue with a Mac IT Admin and he emailed me the following link:
http://www.adobe.com/support/techdocs/329299.html


It's an Adobe Tech Doc. It seems that Adobe apps have similar issues. He stated that it could be when the Application (Acrobat Reader?) was first installed and the font exist on a the Adobe CD.

Not really sure how "AdobeFnt06.lst" can add/affect the "availableFonts".

Hope this helps.

Thanks,
John Nunez



On Feb 27, 2006, at 8:10 AM, Robert Clair wrote:

A friend was testing an app for me and it crashed on his system at start-up. The immediate problem was a piece of code like this:

NSArray* fontList = [[NSFontManager sharedFontManager] availableFonts];
int fontCount = [fontList count];
for ( j=0; j < fontCount; j++ )
{
NSFont* font =
[NSFont fontWithName: [fontList objectAtIndex: j] size: 18.0];


NSDictionary* fontStringAttributes =
[NSDictionary dictionaryWithObject: font
forKey: NSFontAttributeName];


          ...

    }

The problem is that font came back nil at some point and [NSDictionary dictionaryWithObject: forKey] spit up and crashed because it didn't like the nil.

OK - My fault for not checking for nil and easy to fix. But the larger issue is why is NSFontManger telling me a font is available when NSFont refuses to create an instance ?

On further investigation the guilty fonts are:

     GloucesterMT-ExtraCondensed

and

     AbadiMT-CondensedExtraBold

Looking in the usual font locations there are no font files of these names nor does

find / -name "*GloucesterMT-ExtraCondensed*" -print > findResults, etc show up any font files. A good reason not to create an instance.

A Spotlight search showed that those names appear in:

  ~Library/Application Support/Adobe/TypeSpt/AdobeFnt06.lst.

I don't know about AdobeFnt.lst files, but a little Googling shows they seem to be the cause of lots of trouble. The friend is a math type not a graphic arts type and says he didn't consciously install those fonts.

Bob Clair



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40coolmacgames.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Why is NSFontManager lying to me ? (From: Robert Clair <email@hidden>)

  • Prev by Date: How to send myself an AppleEvent?
  • Next by Date: Re: Menu Item Hot Key
  • Previous by thread: Re: Why is NSFontManager lying to me ?
  • Next by thread: Re: Why is NSFontManager lying to me ?
  • Index(es):
    • Date
    • Thread