On Jun 23, 2009, at 1:02 PM, 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


Unfortunately the documentation on the text system in Mac OS X can be very difficult to navigate (as you have no doubt learned). There is documentation on QuickDraw, ATSUI, Core Text, the Cocoa System etc... etc... some of it's legacy, some of it's deprecated, and it's really hard to know what you should use.

I would recommend looking at the Cocoa Text system (if you are a Cocoa app) then drop down to the Core Text level if that is not sufficient. I would use ATSUI as a last resort.

Speaking in very broad terms, the text systems on the OS are much happier if you start out at the character level and let them manage the conversion from characters to glyphs. You can then get at the glyph information, but the information you can learn about any particular glyph is usually given in the context of an entire line of text that has been arranged for you. To learn about an individual glyph you would have to either arrange for it to be put into it's own style run, or you would have to dig around in the font tables yourself (a practice I would recommend avoiding if at all possible).

You started out asking about glyphs and now are talking about characters. What information are you starting with in your application? Do you have a set of characters that represents some sub- expression of your formula, or are you starting out with a set of glyph ids?

Scott






_______________________________________________

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