• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with font display
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with font display


  • Subject: Re: Problem with font display
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 7 May 2010 12:40:30 -0700

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 (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

  • Follow-Ups:
    • Re: Problem with font display
      • From: Gwynne Raskind <email@hidden>
References: 
 >Problem with font display (From: Gwynne Raskind <email@hidden>)

  • Prev by Date: Re: Synthesized ivar for std::tr1::shared_ptr<MyClass>?
  • Next by Date: Re: EXC_BAD_ACCESS on breakpoint
  • Previous by thread: Problem with font display
  • Next by thread: Re: Problem with font display
  • Index(es):
    • Date
    • Thread