Core Text: Determining Line Height of CTFramesetter
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