> On Sep 10, 2019, at 10:54 AM, Gabriel Zachmann <z...@cs.uni-bremen.de> wrote: > >> I have had good results with CTLineGetTypographicBounds(). > > This seems to be suitable only for single lines of text. > But , usually, I've got 2 lines of text. > > I looked at Core Text a bit further, but I could not find how to determine > the width/height of a two-line string.
For multiple lines you need to use a framesetter. CTFramesetterCreateWithAttributedString() CTFramesetterSuggestFrameSizeWithConstraints() --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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com