On Wed, May 25, 2011 at 2:37 PM, Ajay Sabhaney <co...@mothercreative.com> wrote: > Currently, zooming modifies the font sizes in the attributed string. I.e. if > the text in a particular text box is 12pt at 100%, then zooming to 200% > increases the font size to 24pt. Image representations of text are generated > by using NSLayoutManager's drawGlyphsForGlyphRange:atPoint: method to draw > the text to an image. All text box image representations are rendered as if > the zoom level is the max zoom level, so that regardless of the zoom level, > the quality of the text is always high. > > Everything works great, except that the text in a text box while it is being > edited does not always perfectly overlap with the text from the image > representation. The reason for this seems to be that the glyph metrics > (particularly glyph advancement, line height, and baseline offset) do not > scale linearly.
You will need to re-render your image representations every time the zoom factor changes. --Kyle Sluder _______________________________________________ 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