• 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: NSLayoutManager - measuring text with trailing space
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLayoutManager - measuring text with trailing space


  • Subject: Re: NSLayoutManager - measuring text with trailing space
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 3 Oct 2006 09:19:06 -0700


On Oct 2, 2006, at 1:01 PM, Scott Thompson wrote:

I asked about a similar issue a while back, but this time I'm trying to do something different.

I have a line of text in an NSAttributedString that contains trailing spaces. I want to measure the text taking the whitespace into account. The NSLayoutManager routines I've used return the actual bounds that are covered with glyphs, but ignore the trailing space. Is there some way to measure the text with that space accounted for?

Try the -rectArrayForCharacter/GlyphRange:withinSelectedCharacter/ GlyphRange:inTextContainer:rectCount: methods. These are the methods used to obtain the selection highlight rects.


Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSLayoutManager - measuring text with trailing space (From: Scott Thompson <email@hidden>)

  • Prev by Date: Re: Overriding NSCell's editWithFrame:...
  • Next by Date: Re: serial comm with GPS, not quite an NMEA sentence
  • Previous by thread: NSLayoutManager - measuring text with trailing space
  • Next by thread: Re: ireegular shaped TextContainer
  • Index(es):
    • Date
    • Thread