• 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
Fast Text measuring in Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fast Text measuring in Views


  • Subject: Fast Text measuring in Views
  • From: Dix Lorenz <email@hidden>
  • Date: Tue, 16 Sep 2003 19:18:34 +0200

Hi,

I am developing an app where one of my views contains a potentially very large table (not NSTable, my own stuff). Every line can have a different height, depending on the contents of the cells. To lay it out, I need to calculate the height of every cell. A cell contains text with different fonts and should word wrap. Right now I am using an NSQuickDrawView and ::TEGetHeight to calculate the heights. It works, but I would like to move away from NSQuickDrawView. But somehow I don't see how:

NSString/NSAttributedString: they have "size" and sizeWithAttributes, but they don't word wrap to a given width.

NSText, NSLayoutManager/NSTextStorage etc... : Seems to be a lot of overhead for something I need to do thousands of times for short strings.

MLTE: How to I tell TXNDrawCFStringTextBox to use my NSView? Otherwise this seems to be the modern replacement for QD's TEGetHeight and to do everything I need...

ATSUI: Very low level, I haven't yet tried that direction.

Am I missing something obvious? Ideas?

Thanks,
Dix
_______________________________________________
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.

  • Prev by Date: Bug with NSAffineTransform and NSAttributedString?
  • Next by Date: Re: Using NSArchiver with NSDocument - encode the data
  • Previous by thread: Bug with NSAffineTransform and NSAttributedString?
  • Next by thread: Re: Using NSArchiver with NSDocument - encode the data
  • Index(es):
    • Date
    • Thread