On May 7, 2010, at 9:36 AM, Gwynne Raskind 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.

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to