• 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 19:34:05 +0200


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

What are you trying to do?  Display them in a grid like the Characters
palette does?  Or typeset them like Font Book does?  Or something
else?

--Kyle Sluder


Hi Kyle,

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.

For unicode characters in the 16 bits range I use the following code:

   NSGlyph glyph = [font _defaultGlyphForChar:ch];

   NSBezierPath* path = [[NSBezierPath alloc] init];

   [path moveToPoint:NSMakePoint(rect.origin.x,rect.origin.y)];

   [path appendBezierPathWithGlyph:glyph inFont:font];


This works fine for characters in the 16 bits range. Outside this range, I am in trouble since input to _defaultGlyphForChar is 16 bit.



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


  • Follow-Ups:
    • Re: Displaying characters from the 'Unicode Symbols' font ??
      • From: Douglas Davidson <email@hidden>
    • Re: Displaying characters from the 'Unicode Symbols' font ??
      • From: Kyle Sluder <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>)

  • Prev by Date: Re: Displaying characters from the 'Unicode Symbols' font ??
  • Next by Date: re: Re: [__NSFastEnumerationEnumerator nextObject] unexpectedly not very fast!
  • 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