Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Getting Font Metrics with ATS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Font Metrics with ATS



Cyril Murzin wrote:

> Would someone be so kind to explain it? I've read: "If one or more
> measurements are not available for a font, then the appropriate
> fields in the ATSFontMetrics data structure are set to 0." How is
> it possible for ascent or descent values?

There are two font metrics getters: ATSFontGetHorizontalMetrics
and ATSFontGetVerticalMetrics. That implies that we have two sets
of ascent/descent values -- horizontal and vertical.

And it appears that the 'vertical' ascent/descent values are not
usual ascent/descent that many of us are familar with:

* ATSFontGetVerticalMetrics + Osaka font

  ASCENT 0.5
  DESCENT -0.5

* ATSFontGetHorizontalMetrics + Osaka font

  ASCENT 1.0
  DESCENT -0.25

* GetFontInfo + Osaka 12

  ASCENT 12
  DESCENT 3

My /guess/ is that the vertical variants are used (in a way
I do not know) when the lines of text are rendered
vertically
           L
           I
           K
           E

           T
           H
           I
           S
           .


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Getting Font Metrics with ATS (From: Cyril Murzin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.