• 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: Missing font?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing font?


  • Subject: Re: Missing font?
  • From: Fritz Anderson <email@hidden>
  • Date: Fri, 9 Sep 2005 20:35:38 -0500

On 9 Sep 2005, at 12:17 AM, Matt Baker wrote:

[textView setFont:[NSFont fontWithName:[plist valueForKeyPath:@"defaultFont"] size:[[plist valueForKeyPath:@"defaultSize"] doubleValue]]];

Will crash if the defaultFont described in the plist file doesn't exist.

How do I check if the font exists first?

By checking whether +[NSFont fontWithName:size:] returns nil before you pass it to the system?


    -- F


_______________________________________________ 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: 
 >Missing font? (From: Matt Baker <email@hidden>)

  • Prev by Date: Load a movie into QTMovieView
  • Next by Date: Newbie Q - Variables not being retained in class
  • Previous by thread: Missing font?
  • Next by thread: scaling NSPDFImageRep?
  • Index(es):
    • Date
    • Thread