Re: Update of Typography panel
Re: Update of Typography panel
- Subject: Re: Update of Typography panel
- From: Martin Wierschin <email@hidden>
- Date: Mon, 30 Jan 2012 18:34:31 -0800
> But if i set a new active font with [[NSFontManager sharedFontManager] setSelectedFont:isMultiple:], an already opened Typography panel is not adjusted to the features of the new font. Instead it continues to show the features of the last font.
>
> How can I refresh the Typography panel to show the features of the active font?
It's been a while since I looked at this annoying problem, but IIRC NSTextView's "updateFontPanel" was the only method with the magic needed to update the Typography panel. You'll have to call NSTextView's "setTypingAttributes:" and "updateFontPanel" methods.
If you're not using NSTextView in your GUI, maybe you can create one offscreen, make it first responder temporarily, and then use its update methods. That would be pretty horrible, but perhaps better than using some promising sounding private methods on NSFontPanel.
~Martin
_______________________________________________
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