On 20 Aug, 2013, at 4:09 PM, Kyle Sluder <k...@ksluder.com> wrote: > The default line height of Helvetica is 14.0. That information is > encoded in the font. You can discover this for yourself by asking your > NSLayoutManager for its defaultLineHeightForFont:. This line height will > be used for text layout if the typesetter returns YES from > -usesFontLeading. > > And of course, since 14 is less than 15, your maximumLineHeight is not > reached and thus you won't see any effect for values greater than 14. > > --Kyle Sluder
That's it ! NSLayoutManager defaultLineHeightForFont works, thanks. But only for NSFont. CTFontRef will the return same font size. I can live with that, get value from NSFont & NSLayoutManager before doing anything else. I tested it, when the Helvetica font size is 12.0, the default line height is 14.0 . If when the Helvetica font size is 18.0, the default line height of is 22.0. Default line height is define by the font size. -- Peter Chan _______________________________________________ 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