On Sat, Feb 14, 2009 at 9:58 PM, Aki Inoue <a...@apple.com> wrote:
The Text System encapsulates the logic to determine the ideal layout. It's not just queried from a font instance. It requires the context of an entire
line.

What if the line is rendered with a single font? Which font attributes
are involved, exactly? Suppose I have a font and I know the content of
the line as a sequence of code points. Surely there are some font
attributes that the Cocoa text system queries that I can also query
myself?
The most simple logic for getting the default line height can be accessible via -[NSLayoutManager defaultLineHeightForFont:]. AppKit puts descent + leading below the baseline, so you should be able to calculate the line spacing delta on top of ascent.

NSATSTypesetter taps into the power of CoreText and still provides
additional abstraction and functionalities (attachment, all the
NSParagraphStyle attributes, etc).

Thanks, I'll take a look. Does NSATSTypesetter work on 64-bit systems?
The documentation mentions it uses ATSUI, and I thought this did not
exist in the 64-bit libraries.
Ah, the documentation didn't get updated to reflect the reality.
Despite of the naming, it's been using CoreText since Tiger.

Aki


Slava
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/aki%40apple.com

This email sent to a...@apple.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to