• 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: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sun, 26 Aug 2007 19:38:28 +0200


On 25 Aug 2007, at 19:05, glenn andreas wrote:


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.
You are absolutely right: the first one looks like a valid glyph, the second one is NSNullGlyph.

Gerriet.

_______________________________________________

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

  • Prev by Date: [ANN] ArtistKit v1.1
  • Next by Date: Re: How do you found your way around in the ref docs?
  • Previous by thread: Re: glyphRangeForCharacterRange
  • Next by thread: Drawing on NSDatePicker
  • Index(es):
    • Date
    • Thread