• 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: Gordon Apple <email@hidden>
  • Date: Wed, 21 Mar 2007 15:56:12 -0500

    Well, I was wondering who the idiot was that screwed up that post, then
realized it was moi.  Sorry about that -- something else on my double check
list next time.

    Ok, so apparently there's no easy way to get just one glyph index.  I
don't understand why it should be so difficult.  I'm not dealing with
context, I just want the index of one lone glyph.  At the point I'm using
it, I'm simply dealing with geometry and would like to keep it that way.  So
I guess I'll have to write a separate routine to isolate the layout stuff.
It seems like it defeats the whole purpose of the appendBezierPathWithGlyph
routine I was going to use.


> 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

  • Follow-Ups:
    • Re: Glyph from Character
      • From: glenn andreas <email@hidden>
  • Prev by Date: Re: NSData dataWithBytes problem on Intel
  • Next by Date: NSDocument printInfo always returns same instance?
  • Previous by thread: Re: Glyph from Character
  • Next by thread: Re: Glyph from Character
  • Index(es):
    • Date
    • Thread