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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to