Re: Unicode Problem
Re: Unicode Problem
- Subject: Re: Unicode Problem
- From: Carl Norum <email@hidden>
- Date: Wed, 28 May 2003 08:58:54 -0600
On Wednesday, May 28, 2003, at 01:50 AM, Aki Inoue wrote:
Since ZapfDingbatsITC is the only bundled font that covers the
character, it is more efficient to explicitly specify the font in the
attribute than relying on the system.
OK, but that's what I tried in the first place, and I just get the
regular "o", instead of ZapfDingbats' box character. Here's the code I
used:
NSDictionary *dingbats = [NSDictionary dictionaryWithObject:
[NSFont fontWithName:@"ZapfDingbatsITC" size:10]
forKey:NSFontAttributeName];
[s2 setString:@"o"];
[s2 drawInRect:r2 withAttributes:dingbats];
So instead of the box I want, I get a lowercase "o", in what looks like
the system font (which I am using elsewhere, so maybe it is a problem
with the font getting set properly?).
What's missing here? I choose the correct character ("o", I only
checked in MS Word though - it appears that TextEdit doesn't handle
dingbats properly?) and set the font. "ZapfDingbatsITC" appears to be
the correct font name according to [[NSFontManager sharedFontManager]
availableFonts].
Thanks for any further insight!
--
Carl J Norum
5th Year Electrical Engineering/Computer Science Student
University of Saskatchewan
Saskatoon, Canada
http://norum.homeunix.net/~carl/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.