On Aug 31, 2011, at 2:19 AM, Rimas M. wrote: > On Mon, Aug 29, 2011 at 7:13 PM, Jens Alfke <j...@mooseyard.com> wrote: > > On Aug 28, 2011, at 11:25 PM, Rimas M. wrote: > >> Well.. that worked. Generally. But those images must have transparent >> background. And as I have discovered, when dealing with text drawing, that >> causes loose of sub-pixels antialiasing. This is unacceptable. Will need to >> use NSAttributedString+attributedTitle way... Any hints on speeding up menu >> showing time on the first click? > > Personally, I would find it worse for an app load and render every installed > font (I have something like 1,000), than for it to draw that menu quickly but > slightly less smoothly. > > Can’t you render the text onto a solid background that’s been filled in with > the menu-item background color? > > —Jens > > Not really. Unless I am missing something. Menu-item's background is changing > when item is selected (blue one, by default). > > I am wondering how iWork apps was able to solve this. Their menu has full > antialiasing and responds to keyboard for selecting items by first letter of > title. This suggests AttrbutedString way. But it loads fast... Strange.
Having worked on that code at one time, they are doing *exactly* what I outlined -- they are pre-creating item images (image with mask) and putting plain text titles in the menu item and drawing the images with the proper menu background for the menu item content. They are NOT using AttributedString. -- Glenn L. Austin, Computer Wizard and Race Car Driver <>< <http://www.austin-soft.com> _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com