Re: Fixed pitch font - glyphs sometimes drawn fixed, sometimes variable
Re: Fixed pitch font - glyphs sometimes drawn fixed, sometimes variable
- Subject: Re: Fixed pitch font - glyphs sometimes drawn fixed, sometimes variable
- From: John Stiles <email@hidden>
- Date: Tue, 8 Mar 2005 10:23:53 -0800
How are you displaying these strings?
Could it be that the system is choosing a different font for Case 2
than for Case 1?
Screenshots couldn't hurt...
On Mar 8, 2005, at 9:41 AM, Simon Liu wrote:
Hi,
Using an NSAttributedString, with a fixed pitch font (Courier New,
Size 11.0) I am trying to display black stars and centre blocks to
simulate an iTunes style rating cell. This works okay, except for the
case where no stars are displayed and only 5 centre blocks are
displayed.
// Case 1 --> 3 stars with 2 blocks [OK]
stringWithFormat:@"%C%C%C%C%C",0x2605, 0x2605, 0x2605, 0x25aa, 0x25aa];
// Case 2 --> 0 stars with 5 blocks [FAILS , the blocks are not
displayed in fixed width, and are bunched up]
stringWithFormat:@"%C%C%C%C%C",0x25aa, 0x25aa, 0x25aa, 0x25aa, 0x25aa];
I am not sure why Case 2 fails. Can anybody shed some light on this?
Thanks.
Regards,
Simon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden