• 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: Pixel-perfect migration from ATSUI to Core Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pixel-perfect migration from ATSUI to Core Text


  • Subject: Re: Pixel-perfect migration from ATSUI to Core Text
  • From: Andreas Falkenhahn <email@hidden>
  • Date: Wed, 31 Aug 2016 20:24:04 +0200

On 31.08.2016 at 20:08 Alastair Houghton wrote:

> On 31 Aug 2016, at 15:52, Andreas Falkenhahn <email@hidden> wrote:

>> But I still don't understand how computing glyph positioning manually
>> should work around the fact that there are no APIs that measure the text
>> like ATSUI. I mean, internally, CTLineGetOffsetForStringIndex() probably
>> does exactly that, it returns the positioning obtained from CTRunGetAdvances().

> You need to get the advances of individual glyphs, and sum the rounded values.

Look at the example code I posted. It's just a single glyph in the string.
The string is just a "W".

--
Best regards,
 Andreas Falkenhahn                            mailto:email@hidden

_______________________________________________

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


References: 
 >Re: Pixel-perfect migration from ATSUI to Core Text (From: Ken Thomases <email@hidden>)
 >Re: Pixel-perfect migration from ATSUI to Core Text (From: Andreas Falkenhahn <email@hidden>)
 >Re: Pixel-perfect migration from ATSUI to Core Text (From: Ken Thomases <email@hidden>)
 >Re: Pixel-perfect migration from ATSUI to Core Text (From: Andreas Falkenhahn <email@hidden>)
 >Re: Pixel-perfect migration from ATSUI to Core Text (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: Pixel-perfect migration from ATSUI to Core Text
  • Previous by thread: Re: Pixel-perfect migration from ATSUI to Core Text
  • Next by thread: Toolbar hiding on rotation?
  • Index(es):
    • Date
    • Thread