• 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: Simple way to find out baseline for NSAttributedString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple way to find out baseline for NSAttributedString?


  • Subject: Re: Simple way to find out baseline for NSAttributedString?
  • From: email@hidden
  • Date: Thu, 4 Sep 2003 11:15:18 -0700

Have you looked at NSFont's ascender, descender, and
defaultLineHeightForFont methods?

Yes -- but what I want is not the descender for a single font, but for an attributed string which might consist of several fonts in a row. Imagine a 72-point Helvetica "A" followed by 60-point Palatino "pple" followed by a 7-point "(R)". So I need the descender that was calculated for the entire attributed string.

More ideas?

On Sep 4, 2003, at 10:27 AM, Jonathan E. Jackel wrote:

I am trying to calculate the overall metrics for an NSAttributedString
(to display on a single line) -- basically, its total height, width,
and offset from the bottom the the baseline. I can use
-[NSAttributedString size] to get the width and height of the string --
but what about the baseline?


--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X: http://www.karelia.com/watson/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Simple way to find out baseline for NSAttributedString?
      • From: "Alastair J.Houghton" <email@hidden>
References: 
 >RE: Simple way to find out baseline for NSAttributedString? (From: "Jonathan E. Jackel" <email@hidden>)

  • Prev by Date: Re: programmatically decompress lzw data
  • Next by Date: Re: Using the "package" command-line tool.
  • Previous by thread: RE: Simple way to find out baseline for NSAttributedString?
  • Next by thread: Re: Simple way to find out baseline for NSAttributedString?
  • Index(es):
    • Date
    • Thread