Fast Text measuring in Views
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.