• 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: Displaying characters from the 'Unicode Symbols' font ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying characters from the 'Unicode Symbols' font ??


  • Subject: Re: Displaying characters from the 'Unicode Symbols' font ??
  • From: Anders Lassen <email@hidden>
  • Date: Fri, 25 Sep 2009 20:29:02 +0200

Hi Kyle,

I will try to get the glyph name somewhere on the unicode website.

Instead of the methods you suggest I will use:

      NSGlyph name = [font glyphWithName:@"summation"];

Thanks.

Anders Lassen


On Sep 25, 2009, at 7:39 PM, Kyle Sluder wrote:

On Fri, Sep 25, 2009 at 10:34 AM, Anders Lassen <email@hidden> wrote:
I am trying to display them in a custom NSView that displays math. Of course
not all, at the same time, but single characters when needed in a math
formula drawing.

Sounds like you're subverting the Cocoa text system. Not a good idea. Perhaps you should subclass NSLayoutManager to create custom text containers, and NSTypesetter to lay out your math text.

For unicode characters in the 16 bits range I use the following code:
   NSGlyph glyph = [font _defaultGlyphForChar:ch];

I don't see this method documented anywhere. Meanwhile, CTFont has CTFontGetGlyphsForCharacters and CTFontGetGlyphWithName (which is what you're probably going to want).

--Kyle Sluder

_______________________________________________

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: 
 >Displaying characters from the 'Unicode Symbols' font ?? (From: Anders Lassen <email@hidden>)
 >Re: Displaying characters from the 'Unicode Symbols' font ?? (From: Kyle Sluder <email@hidden>)
 >Re: Displaying characters from the 'Unicode Symbols' font ?? (From: Anders Lassen <email@hidden>)
 >Re: Displaying characters from the 'Unicode Symbols' font ?? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Displaying characters from the 'Unicode Symbols' font ??
  • Next by Date: Re: Displaying characters from the 'Unicode Symbols' font ??
  • Previous by thread: Re: Displaying characters from the 'Unicode Symbols' font ??
  • Next by thread: Re: Displaying characters from the 'Unicode Symbols' font ??
  • Index(es):
    • Date
    • Thread