Re: Issues with implementing WYWIWYG font menu
Re: Issues with implementing WYWIWYG font menu
- Subject: Re: Issues with implementing WYWIWYG font menu
- From: Lee Ann Rucker <email@hidden>
- Date: Tue, 05 May 2015 22:04:29 +0000
- Thread-topic: Issues with implementing WYWIWYG font menu
On May 5, 2015, at 2:21 PM, David Durkee <email@hidden> wrote:
> Yes, this approach has worked much better. I see only two drawbacks.
>
> 1) The first time the menu is opened, it takes as much as two seconds for it to appear. This only seems to be true for the first instance of the menu that is opened. (It’s a popup menu in a document window, so different documents will each have their own instance of it.) Is there a way I can precache whatever it is that takes so long that first time (the fonts I’m guessing)?
>
> 2) The attributed title is also displayed in the NSPopupButton, where I would rather see the font name displayed int he system font. (As in the font popup in Pages.) Is there a way to force the button to not use the attributedTitle of the selected NSMenuItem?
At a guess, subclass the NSPopuButtonCell and override its attributedTitle to return one with the system font. It’s probably just returning what it gets from the menuItem.
>
> David
>
>> On Apr 29, 2015, at 9:44 PM, Graham Cox <email@hidden> wrote:
>>
>>
>>> On 30 Apr 2015, at 6:33 am, David Durkee <email@hidden> wrote:
>>>
>>> using a custom view in each NSMenuItem to draw the name of the font in its own font
>>
>>
>> This isn’t really necessary - you can just set an attributed title on a standard menu item and it will draw in the Font given in the attributes. You might find that is easier and less buggy than adding a view to the item.
>>
>> —Graham
>>
>>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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