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

Simple way to find out baseline for NSAttributedString?


  • Subject: Simple way to find out baseline for NSAttributedString?
  • From: email@hidden
  • Date: Thu, 4 Sep 2003 09:57:32 -0700

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?

I have found some pretty hairy techniques for building up an
NSLayoutManager, NSTextContainer, etc., and querying individual glyphs
(e.g. <http://cocoa.mamasam.com/COCOADEV/2002/11/1/49059.php>), but I
think that what I want is much simpler than this -- so maybe there is a
simpler solution. Any suggestions?

--
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: "Jonathan E. Jackel" <email@hidden>
  • Prev by Date: Re: Save Panel no browser or popup ?
  • Next by Date: programmatically decompress lzw data
  • Previous by thread: Re: Save Panel no browser or popup ?
  • Next by thread: RE: Simple way to find out baseline for NSAttributedString?
  • Index(es):
    • Date
    • Thread