Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint
Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint
- Subject: Re: Displaying an arbitrary unicode character using CGContextShowTextAtPoint or CGContextShowGlyphsAtPoint
- From: Jeff Schriebman <email@hidden>
- Date: Fri, 30 Mar 2012 13:37:35 -0700
The following code fragment properly displays an up arrow on my view.
Thanks for everyone's patience and help.
NSDictionary* fontAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
[NSColor redColor], NSForegroundColorAttributeName,
[NSFont systemFontOfSize:10], NSFontAttributeName,
nil];
NSString *upArrow = @"\u2B06";
[upArrow drawAtPoint:NSMakePoint(100,100) withAttributes:fontAttrs];
On Mar 30, 2012, at 12:47 PM, David Duncan wrote:
> On Mar 30, 2012, at 12:19 PM, Jeff Schriebman wrote:
>
>> Thanks David.
>>
>> My CGContextRef is the current context. I'm just unfamiliar with how to draw a unicode character into it when I don't know the font containing a specific unicode glyph.
>> I'm doing this for OS X 10.7 which is all I need to support.
>
>
> So have you tried the previously mentioned NSString methods? Did you encounter an issue?
> --
> David Duncan
>
Jeff Schriebman
_______________________________________________
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