• 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: Subclassing NSLayoutManager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSLayoutManager


  • Subject: Re: Subclassing NSLayoutManager
  • From: Charles Srstka <email@hidden>
  • Date: Mon, 24 Feb 2003 20:44:55 -0600

I managed to get this to work by overriding layoutGlyphsInHorizontalLineFragment:baseline:, altering the size of the rect, and then passing it on to super's implementation. But, I'm having more trouble... I tried to override - (void)typesetterLaidOneGlyph:(NSTypesetterGlyphInfo *)gl to do some stuff. However, the character index doesn't seem to be working - this value:

gl->glyphCharacterIndex

always seems to be equal to 0, no matter what character actually got laid. Why is that?

Charles

On Monday, February 24, 2003, at 07:13 PM, Douglas Davidson wrote:

On Monday, February 24, 2003, at 3:42 PM, Charles Srstka wrote:

Thanks, that sounds like a very reasonable solution. Do you know if there's any way to coerce the default typesetter to wrap the text after a fixed number of characters rather than right at the bounds of the enclosing text container? If I could do that, I could dump my NSTypesetter subclass altogether...

The principal means of forcing wrapping at a particular position is to insert a hard line break. Other than that, the typesetter prefers to wrap at word breaks where possible, and one can override the NSAttributedString methods for determining word breaks to return preferred break points (although this may have other effects as well).

Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Subclassing NSLayoutManager (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Different Menu View?!
  • Next by Date: Re: vtables in objc++
  • Previous by thread: Re: Subclassing NSLayoutManager
  • Next by thread: Objective-C commenting
  • Index(es):
    • Date
    • Thread