On 24/06/2009, at 4:02 AM, Anders Lassen wrote:

The font descent is the maximum descent for all characters in that font, so it will not help me to position the character correct.


In general, I don't think it's meaningful to ask for the metrics ascender, descender, and so on for an individual glyph. Those metrics apply to a font as a whole. A glyph is just a path that sits inside a bounding box, and certain positions on that path (such as the height of the top of the curved part for the letter 'd' for example) are not recorded. What is noted is the positions of some layout guidelines such as the xHeight, baseline and overall ascender and descender.

However, most rational fonts do stick to the guidelines, so these metrics are useful for positioning glyphs. If you do need finer metrics for the mathematical formula layout task, you may need to choose a couple of fonts and build some supplementary tables yourself for handling the positioning.

This page (and the guide it is part of) are must-reads: 
http://developer.apple.com/documentation/Cocoa/Conceptual/FontHandling/Tasks/GettingFontMetrics.html

--Graham


_______________________________________________

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