• 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: Getting glyphs for surrogate characters ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting glyphs for surrogate characters ??


  • Subject: Re: Getting glyphs for surrogate characters ??
  • From: Anders Lassen <email@hidden>
  • Date: Sun, 27 Sep 2009 17:51:38 +0200

Hi

I may have solved the problem described above.

The method glyphAtIndex returns two glyphs. The first one is actually the correct glyph for the surrogate character. The next one is zero.

If someone knows a better method to obtain glyphs, without using the LayoutManager, I am glad to know.

Anders Lassen


On Sep 26, 2009, at 7:17 PM, Anders Lassen wrote:

Hi,

I have a problem generating glyph for surrogate characters.

I have considered not to use glyphs directly, but since I need very fine control of the drawing of the glyph, this is a good solution for me. Having a glyph gives direct acces to both the boundingbox, the path and the advancement.

The documentation for the GlyphGenerator says that only one glyph is generated per character.

This is also what I see, if I use a LayoutManager to generate glyph.

If for instance NSTextStorage is set to @"\U0001D400", the following call to:

NSGlyph glyph = [layoutManager glyphAtIndex:i isValidIndex:&hasGlyph];

generates two glyphs, and not one as I hoped.

I have tried using glyphnames instead, but this is not an option, because not all glyphs in a font is name encoded. (I am not absolutely sure about this, but I can only retrieve glyphs with simple name like "tau", "delta", "infinity").


Kind regards,

Anders Lassen


_______________________________________________

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

_______________________________________________

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: Getting glyphs for surrogate characters ??
      • From: Alastair Houghton <email@hidden>
References: 
 >Getting glyphs for surrogate characters ?? (From: Anders Lassen <email@hidden>)

  • Prev by Date: Re: redrawing a particular subview in non mainWindows.
  • Next by Date: Re: redrawing a particular subview in non mainWindows.
  • Previous by thread: Getting glyphs for surrogate characters ??
  • Next by thread: Re: Getting glyphs for surrogate characters ??
  • Index(es):
    • Date
    • Thread