> On Aug 28, 2019, at 1:33 PM, Gabriel Zachmann via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> I am trying to determine the size of a piece of text using 
> boundingRectWithSize.
> The problem is that this method does not return the correct width. (The 
> height seems to be about right.) Sometimes, the width is only a little bit 
> too wide, sometimes it is much too wide.

I have had good results with CTLineGetTypographicBounds().

--Richard Charles


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:

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

Reply via email to