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

Re: Glyph from Character


  • Subject: Re: Glyph from Character
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 21 Mar 2007 11:56:03 -0700


On Mar 21, 2007, at 11:27 AM, Gordon Apple wrote:

Simple question, to which I've found a multitude of ridiculously complex
answers in the archives. I just want the Bezier path of a character, e.g.,
"A", "?", "&".


        [path appendBezierPathWithGlyph:(NSGlyph)something(@"A")
                                 infont:[NSFont systemFontOfSize:400];

There must be a simple function "something" that will map the glyph
index of a given character. What is it?

The problem is that it's not a simple question. NSGlyphGenerator maps characters to glyphs, but in general the mapping is many-to-many and context-dependent; to obtain a correct mapping of characters to glyphs, use an NSLayoutManager and let it perform layout, then ask it for the glyphs.


Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Glyph from Character (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Play loop issue when using QuickTime to play .qtz file
  • Next by Date: Re: NSData dataWithBytes problem on Intel
  • Previous by thread: Glyph from Character
  • Next by thread: Re: Glyph from Character
  • Index(es):
    • Date
    • Thread