Re: text orientation/positioning with layout manager
Re: text orientation/positioning with layout manager
- Subject: Re: text orientation/positioning with layout manager
- From: Todd Heberlein <email@hidden>
- Date: Mon, 31 Jan 2011 18:04:33 -0800
On Jan 31, 2011, at 3:23 PM, Aki Inoue wrote:
> The precise definition of the point specified by the argument is the top left corner of the text container containing the glyph range in the focused view coordinate system.
This flipped view for fonts confuses me a bit because the fonts are oriented correctly. For example, an 'A' appears upright, not upside down. I'm going to have to ponder/research this a little more.
For now, if I want my string drawn on a base line beginning at the point basePoint, I currently define a glyphPoint which subtracts the font's pointSize from the basePoint's Y value. So far it seems to work on a variety of font sizes. Are there any obvious "gotchas" that I am missing with this approach?
Todd
glyphPoint.x = basePoint.x;
glyphPoint.y = basePoint.y - [myFont pointSize];
[layoutManager drawGlyphsForGlyphRange:glyphRange atPoint:glyphPoint];
_______________________________________________
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