• 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
Re: text orientation/positioning with layout manager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: text orientation/positioning with layout manager
      • From: Ross Carter <email@hidden>
    • Re: text orientation/positioning with layout manager
      • From: Graham Cox <email@hidden>
References: 
 >text orientation/positioning with layout manager (From: Todd Heberlein <email@hidden>)
 >Re: text orientation/positioning with layout manager (From: Graham Cox <email@hidden>)
 >Re: text orientation/positioning with layout manager (From: Aki Inoue <email@hidden>)

  • Prev by Date: iPhone puzzle about rotation
  • Next by Date: Re: worker thread iterating over array - SLOW
  • Previous by thread: Re: text orientation/positioning with layout manager
  • Next by thread: Re: text orientation/positioning with layout manager
  • Index(es):
    • Date
    • Thread