Re: Trying to understand [NSFontManager modifyFont:]
Re: Trying to understand [NSFontManager modifyFont:]
- Subject: Re: Trying to understand [NSFontManager modifyFont:]
- From: Shane Stanley <email@hidden>
- Date: Mon, 06 Aug 2012 11:20:31 +1000
On 06/08/2012, at 10:46 AM, Graham Cox <email@hidden> wrote:
> I'm puzzled as to how the standard "Bold" text menu item works, because it too simply calls addFontTrait: (according to the action set in IB) and has a tag indicating bold. How then does it REMOVE the bold trait? Is the Font Manager manipulating the action of the menu item when it validates it? Would make sense but I can find no documentation to that effect.
How about this: "If you provide your own Font menu, you should register it with the font manager using the setFontMenu: method. The font manager is responsible for validating Font menu items and changing their titles and tags according to the selected font. For example, when the selected font is Italic, the font manager adds a check mark to the Italic Font menu item and changes its tag to UnitalicMask. Your Font menu’s items should use the appropriate action methods and tags, as shown in Table 6-4."
Search for "Customizing the Font Conversion System".
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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