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

Re: glyphRangeForCharacterRange


  • Subject: Re: glyphRangeForCharacterRange
  • From: glenn andreas <email@hidden>
  • Date: Sat, 25 Aug 2007 12:05:47 -0500


On Aug 25, 2007, at 4:33 AM, Gerriet M. Denkmann wrote:

In a NSTextView at index i I have a DESERET CAPITAL LETTER LONG I, which has Unicode 10400(D801+DC00).
That is: it uses two internal characters in NSString and one glyph. There is no apparent way to decompose this character.



The result is:
glyphRange {i, 2} actualCharRange {i, 2}

Why has the glyphRange a length of 2 ?

From my understanding of the text system, it tries to maintain the same number of glyphs as characters, since that keeps the mapping between the easier and faster (i.e., it only has to start special casing thing when multiple glyphs are used for a single character). If you look at the glyphs you'll probably see that one of the two glyphs is NSNullGlyph (i.e., 0x0) and that the other one is the glyph.



Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________

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: glyphRangeForCharacterRange
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >glyphRangeForCharacterRange (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: glyphRangeForCharacterRange
  • Next by Date: Re: How do you found your way around in the ref docs?
  • Previous by thread: glyphRangeForCharacterRange
  • Next by thread: Re: glyphRangeForCharacterRange
  • Index(es):
    • Date
    • Thread