• 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: Graham Cox <email@hidden>
  • Date: Wed, 24 Jun 2009 11:08:30 +1000


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 (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: WT <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: Cascade Delete won't delete Department in Apple Sample Code
  • Next by Date: Re: Problem: how to get glyph descent and ascent
  • 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