• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text


  • Subject: Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • From: Fritz Anderson <email@hidden>
  • Date: Fri, 17 May 2013 09:23:13 -0500

On 17 May 2013, at 8:38 AM, Koen van der Drift <email@hidden> wrote:

> CTFramesetterSuggestFrameSizeWithConstraints

I ran into this problem and had to resort to an ad-hoc kludge (though I guess all kludges are ad-hoc:

lineHeight = CTFontGetSize(self.ctDefaultFont)*1.2;
...
frameSize = CTFramesetterSuggestFrameSizeWithConstraints(ctFramesetter...
...
//  I wish I had a principled reason why this is necessary, or the best solution.
//  It looks good from a cursory examination, but surely this fails in some cases,
//  or with some combination of styles.
frameSize.height += lineHeight / 2.0;

	— F

--
Fritz Anderson
Xcode 4 Unleashed: 4.5 supplement for free!
http://www.informit.com/store/xcode-4-unleashed-9780672333279


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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 email@hidden


References: 
 >CTFramesetterSuggestFrameSizeWithConstraints cuts off text (From: Koen van der Drift <email@hidden>)

  • Prev by Date: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • Next by Date: Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • Previous by thread: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • Next by thread: Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • Index(es):
    • Date
    • Thread