• 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: Unicode to CGGlyph ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode to CGGlyph ?


  • Subject: Re: Unicode to CGGlyph ?
  • From: Christopher Lloyd <email@hidden>
  • Date: Sun, 06 May 2001 07:47:44 -0400

Hi, thanks, hadn't looked at it that way. Are there alternatives or more direct ways to this though? I have unichar buffer[] and just want to generate one glyph for each of the characters and draw it on the screen using my own x,y's (I know this isn't "correct" for all characters/fonts, but that is what I need to do). I need to do this very fast, so I'd have to use NSLayoutManager to build my own unichar to glyph mapping tables/cache for performance. This seems like reinventing the wheel when the underlying systems most definitely have this kind of functionality (Where does NSLayoutManager get this info?). The private function CGFontGetGlyphsForUnicodes() seems like a good candidate for what I want, but alas it is private. NSFont seems to have everything but this functionality.

I should point out this is pretty straightforward to do on NT/2000 using GetCharacterPlacementW()

Oh well...
Chris

At 09:54 AM 5/5/2001 -0700, Ali Ozer wrote:
You can use NSLayoutManager / NSTextStorage combo to generate glyphs for an attributed string (unichars + style info). The glyphs and info about their locations will be available in the layoutmanager, which you can keep around as long as you need.
[...]
From: Christopher Lloyd <email@hidden>
Date: Sat May 05, 2001 02:42:20 AM US/Pacific
Subject: Unicode to CGGlyph ?

Hi, does anyone know how to convert unichar's to CGGlyph's ? I would like to use CGContextShowGlyphsAtPoint and need a way to generate the glyphs. I don't want to use the string drawing stuff in the AppKit for performance reasons.
[...]


References: 
 >Unicode to CGGlyph ? (From: Christopher Lloyd <email@hidden>)
 >Re: Unicode to CGGlyph ? (From: Ali Ozer <email@hidden>)

  • Prev by Date: OutlineView
  • Next by Date: Attaching a data source to a table?
  • Previous by thread: Re: Unicode to CGGlyph ?
  • Next by thread: Possible AppKit bug
  • Index(es):
    • Date
    • Thread