Re: Problem with font display
Re: Problem with font display
- Subject: Re: Problem with font display
- From: Gwynne Raskind <email@hidden>
- Date: Fri, 7 May 2010 16:09:32 -0400
On May 7, 2010, at 3:40 PM, Jens Alfke wrote:
>> In OS 9, a particular string drawn in Geneva 9 with the old DrawString() API was about 60 pixels wide. But when I draw that same string using the NSStringDrawing methods and NSFont, I get much more "squished" text about 50 pixels wide
> On OS 9 were you using screen or real (fractional) character widths? QuickDraw defaults to using screen metrics, which at small point sizes are significantly different from the real widths. CoreGraphics always uses fractional widths, I believe.
>
> Geneva has especially bizarre character widths because it was originally a pixel font, and the character widths at different sizes were chosen for onscreen appearance, not consistency; so the widths were decidedly nonlinear with the point size, especially at 9pt.
>
> The best answer, to be honest, is that you should stop using Geneva. It and Chicago/Charcoal have no place in the Aqua HI, and using them screams “crude Carbon port!” to your users. You should bite the bullet and switch to Lucida Grande, or perhaps Helvetica if this is user-entered text. This will probably mean layout changes since the metrics are different, but as you’ve seen, that will happen anyway.
In any other situation, I'd do just that. This particular project, unfortunately, is supposed to be a "vintage" port of an old game, and the original code isn't even mine. I would strongly prefer to emulate the "look and feel" as much as possible, as is typical of games. Is it at all possible to get CG to render it the old way, short of positioning every single glyph individually (which is a solution I'm ashamed to admit I'd consider if nothing else worked) or pre-rendering the text using SheepShaver where possible?
-- Gwynne
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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