Re: Font-related crash in drawing method on PowerPC machines
Re: Font-related crash in drawing method on PowerPC machines
- Subject: Re: Font-related crash in drawing method on PowerPC machines
- From: Rob Keniger <email@hidden>
- Date: Wed, 23 Apr 2008 15:33:25 +1000
On 23/04/2008, at 1:16 AM, I. Savant wrote:
I haven't looked at this in detail and don't know if this has
anything to do with your problem, but how are you handling the case
where the user has disabled or otherwise modified their fonts? Even
system fonts can be screwed with and if the font is not available,
assuming it always will be is probably "Not a Good Idea™".
To be more specific, in this case you are asking for these fonts:
[NSFont fontWithName:@"Lucida Grande" size:16.0]
[NSFont fontWithName:@"Lucida Grande Bold" size:16.0]
When you should probably be using:
[NSFont systemFontOfSize:16.0];
[NSFont boldSystemFontOfSize:16.0];
I also don't think you need to call -beginEditing and -endEditing on a
normal NSMutableAttributedString, this only makes sense if the string
is an NSTextStorage or similar.
That said, I can't see anything obvious that would cause a crash.
--
Rob Keniger
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden