• 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
Core Text: Determining Line Height of CTFramesetter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Text: Determining Line Height of CTFramesetter


  • Subject: Core Text: Determining Line Height of CTFramesetter
  • From: Milen Dzhumerov <email@hidden>
  • Date: Sat, 14 Jun 2008 19:57:05 +0100

Hi all,

I've been looking for ways to draw text in a CALayer and it seems that the new Core Text framework is the best way to do so (it supports 64bit and it's up to twice as fast as ATSUI). But I'm having a bit of trouble determining the height of the text before drawing it (I know the width beforehand). When I create a CTFrame from CTFramesetter, I need to provide a path into which it will get drawn but I did not find a straightforward way to calculate that path such that the text fits in perfectly. My only option at the moment is generating a CTFrame with a huge rectangular path so that all CTLines are generated and then doing my own layout of the lines. Is there another simpler way to do it (either using Core Text or drawing with some other API)?

Thanks,
M
_______________________________________________

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


  • Prev by Date: Re: NSNotifications & background apps?
  • Next by Date: Re: Transparent content view of NSWindow clicks through
  • Previous by thread: Re: Transparent content view of NSWindow clicks through
  • Next by thread: NSSplitview. Stopping the split moving
  • Index(es):
    • Date
    • Thread