Re: Problem: how to get glyph descent and ascent
Re: Problem: how to get glyph descent and ascent
- Subject: Re: Problem: how to get glyph descent and ascent
- From: Anders Lassen <email@hidden>
- Date: Tue, 23 Jun 2009 22:03:40 +0200
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 (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden