• 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: Quincey Morris <email@hidden>
  • Date: Tue, 23 Jun 2009 11:02:39 -0700

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


  • 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: renaming executable files
  • 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