Re: drawGlyphsForGlyphRange layout issue
Re: drawGlyphsForGlyphRange layout issue
- Subject: Re: drawGlyphsForGlyphRange layout issue
- From: "email@hidden" <email@hidden>
- Date: Mon, 24 Sep 2012 20:01:50 +0100
On 24 Sep 2012, at 19:19, Aki Inoue <email@hidden> wrote:
> To be compatible with NSLayoutManager, you should use -drawWithRect:options:attributes: here instead of using CT.
Using -drawWithRect:options:attributes: works.
2 questions:
1. Why is -drawWithRect:options:attributes: more compatible with NSLayoutManager?
2. I thought the core text route would be more efficient. I have cached my CTLineRefs. Doesn't -drawWithRect:options:attributes: require instantiating an NSLayoutManager on each call?
>
> Your source of trouble is using -drawAtPoint: which uses NSStringDrawingUsesLineFragmentOrigin option (layout glyphs from the top instead of the glyph origin).
>
Why does the vertical offset only appear for some fonts, not others?
Regards
Jonathan Mitchell
Mugginsoft LLP
_______________________________________________
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