• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem: how to get glyph descent and ascent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem: how to get glyph descent and ascent


  • Subject: Re: Problem: how to get glyph descent and ascent
  • From: Scott Thompson <email@hidden>
  • Date: Tue, 23 Jun 2009 13:39:18 -0500


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 (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


  • Follow-Ups:
    • Re: Problem: how to get glyph descent and ascent
      • From: Anders Lassen <email@hidden>
References: 
 >Problem: how to get glyph descent and ascent (From: Anders Lassen <email@hidden>)
 >Re: Problem: how to get glyph descent and ascent (From: "I. Savant" <email@hidden>)
 >Re: Problem: how to get glyph descent and ascent (From: Anders Lassen <email@hidden>)
 >Re: Problem: how to get glyph descent and ascent (From: "I. Savant" <email@hidden>)
 >Re: Problem: how to get glyph descent and ascent (From: Anders Lassen <email@hidden>)

  • Prev by Date: Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)
  • Next by Date: Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);
  • Previous by thread: Re: Problem: how to get glyph descent and ascent
  • Next by thread: Re: Problem: how to get glyph descent and ascent
  • Index(es):
    • Date
    • Thread