• 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
Forcing typesetter to advance to next text container
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Forcing typesetter to advance to next text container


  • Subject: Forcing typesetter to advance to next text container
  • From: Aram Greenman <email@hidden>
  • Date: Mon, 5 Jul 2004 02:31:55 -0700

I have a text system which uses a series of text containers sharing the same layout manager. During the layout phase, at certain glyphs I want to move to the next text container even if the current text container has room left.

I thought overriding -[NSATSTypesetter willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:] to zero out the the line fragment rect would do this, but this just makes the typesetter think the glyphs will actually fit in a zero rect and messes up the layout.

Basically, here's what I want my typesetter to do, but -advanceToNextTextContainer and -restartLayoutFromGlyphIndex: don't exist ;-)
Any ideas are greatly appreciated, I'm stumped on this one.

@implementation MyATSTypesetter

- (void)willSetLineFragmentRect:(NSRect *)lineRect
forGlyphRange:(NSRange)glyphRange
usedRect:(NSRect *)usedRect
baselineOffset:(float *)baselineOffset
{
if (glyphRange.location == someNumber) {
[self advanceToNextTextContainer];
[self restartLayoutFromGlyphIndex:glyphRange.location];
}
}

@end
_______________________________________________
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.


  • Follow-Ups:
    • Re: Forcing typesetter to advance to next text container
      • From: Aki Inoue <email@hidden>
    • Re: Forcing typesetter to advance to next text container
      • From: Mike Ferris <email@hidden>
  • Prev by Date: Re: Record audio from microphone?
  • Next by Date: NSBoxSeparator in NSTextField
  • Previous by thread: Re: figuring out the length of a string
  • Next by thread: Re: Forcing typesetter to advance to next text container
  • Index(es):
    • Date
    • Thread