I’m creating a WYSIWYG font menu using a custom view in each NSMenuItem to draw 
the name of the font in its own font. One problem I am having with it is that 
the first item under the mouse when it pops up is drawn highlighted, but when I 
move the mouse to the next item, the first one is not redrawn, even when the 
next one is drawn highlighted. So I have two items shown highlighted. After 
that, every time the mouse moves from one item to another one, both are 
redrawn. If I move back in to the first one, and then out again, the 
highlighting is redrawn correctly. It’s just the first time I exit the first 
item it doesn’t need to get notified to redraw. 

I could try hooking up KVO to the menu’s highlightedItem property, but it 
doesn’t seem like I should have to.

Another question I have regarding the WYSIWYG font menu is that it should 
identify some fonts as unsuitable for drawing their own font names, and revert 
to using the system font for those items. (Some fonts just don’t have alpha 
characters, others seem to font substitute when used but display with really 
goofy vertical metrics. So far I haven’t found any info on NSFont that is 
suitable for this test. I tried coveredCharacterSet and testing to see if it is 
a superset of the title characters, but it didn’t catch all cases and 
eliminated some fonts it shouldn’t have.

David
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to