Yes, thanks, I am sure this will help.

On Jun 23, 2009, at 8:02 PM, Quincey Morris wrote:

On Jun 23, 2009, at 10:32, Anders Lassen wrote:

I am working on a project that involves writing math formulas.:

2 * x^2 + sqrt(3)
---------------------  + aB
          3

note that the above is only to explain, what I mean by math formulas.

In my project, I have a object type that handles letters. Because letters must be aligned to special math symbols I need to know the ascent and descent of the character.

But maybe, I have now found a way to do this, although it is not tested yet.

I hope that the function:

ATSUGetUnjustifiedBounds

will help me.

It sounds like you want the glyph bounding boxes -- "glyph ascent" is not really a standard term like "font ascent", so it could mean one of several possible metrics. I tried searching developer.apple.com for "glyph metrics" and the second hit was this tech note:

        http://developer.apple.com/technotes/tn/tn2033.html

which explains how to get glyph metrics (include glyph bounding boxes) using ATSUI. The 19th hit was:

http://developer.apple.com/documentation/Carbon/Reference/CTFontRef/Reference/reference.html#/ /apple_ref/c/func/CTFontGetBoundingRectsForGlyphs

which explains how to get the same information using Core Text.

Is that the information you need?


_______________________________________________

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/anders.lassen%40mac.com

This email sent to anders.las...@mac.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