• 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: Finding the height of a piece of text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding the height of a piece of text


  • Subject: Re: Finding the height of a piece of text
  • From: Nygard Steve <email@hidden>
  • Date: Thu, 22 Nov 2007 23:39:30 -0700


On Nov 22, 2007, at 5:56 PM, Vincent Coetzee wrote:

I however always end up with the same problem, in that the height that I calculate for my text (as per the code in the "Text Layout Programming Guide") is always too small (by about ~1 line height) . Does anyone have a working solution to this problem or a more elegant method of solving it ?

To calculate a height that matches an NSTextFieldCell, the line fragment padding should be 2 (or 4 for a center alignment). And the layout manager's typesetter behavior should be NSTypesetterBehavior_10_2_WithCompatibility.


--
Steve

_______________________________________________

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


  • Follow-Ups:
    • Re: Finding the height of a piece of text
      • From: Vincent Coetzee <email@hidden>
References: 
 >Finding the height of a piece of text (From: Vincent Coetzee <email@hidden>)

  • Prev by Date: HUD controls
  • Next by Date: Re: nodeForXPath leaks memory
  • Previous by thread: Finding the height of a piece of text
  • Next by thread: Re: Finding the height of a piece of text
  • Index(es):
    • Date
    • Thread