• 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: drawGlyphsForGlyphRange layout issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: drawGlyphsForGlyphRange layout issue
      • From: Aki Inoue <email@hidden>
References: 
 >drawGlyphsForGlyphRange layout issue (From: "email@hidden" <email@hidden>)
 >Re: drawGlyphsForGlyphRange layout issue (From: Graham Cox <email@hidden>)
 >Re: drawGlyphsForGlyphRange layout issue (From: "email@hidden" <email@hidden>)
 >Re: drawGlyphsForGlyphRange layout issue (From: Kyle Sluder <email@hidden>)
 >Re: drawGlyphsForGlyphRange layout issue (From: "email@hidden" <email@hidden>)
 >Re: drawGlyphsForGlyphRange layout issue (From: "email@hidden" <email@hidden>)
 >Re: drawGlyphsForGlyphRange layout issue (From: Aki Inoue <email@hidden>)

  • Prev by Date: Re: iOS encrypt and stream local video file
  • Next by Date: Re: How to calculate NSToolbar height in fullscreen mode
  • Previous by thread: Re: drawGlyphsForGlyphRange layout issue
  • Next by thread: Re: drawGlyphsForGlyphRange layout issue
  • Index(es):
    • Date
    • Thread