• 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: conflict between Core Graphics and NSView graphics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: conflict between Core Graphics and NSView graphics


  • Subject: Re: conflict between Core Graphics and NSView graphics
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 26 Apr 2010 13:29:43 -0700


On Apr 26, 2010, at 12:50 PM, Aki Inoue wrote:

In CG, there are 3 font properties that determine the font rendering: font name, font size, and text matrix.
You need to manage all 3.

Is the text matrix just used for special effects like obliquing? Using it to scale the text could produce the wrong results if the font has behaviors that are nonlinear with the point size, since those behaviors would be based on the font size not the scaling in the text matrix.


In other words, it's possible that a glyph at 24pt is not identical to the same glyph at 12pt scaled up by a factor of 2. Some fonts change their proportions and stroke widths at different point sizes to improve legibility. (This "optical scaling" was actually common in the days of metal type, vanished with optical and computer typesetting, and has I believe returned with OpenType.)

The thing developers need to keep in mind is that, if you're drawing 12pt text that's been zoomed in to 200%, you should keep the font size at 12 and scale the drawing coords by 2, instead of just changing the font size to 24.

—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: conflict between Core Graphics and NSView graphics
      • From: Aki Inoue <email@hidden>
References: 
 >conflict between Core Graphics and NSView graphics (From: Bill Appleton <email@hidden>)
 >Re: conflict between Core Graphics and NSView graphics (From: Aki Inoue <email@hidden>)
 >Re: conflict between Core Graphics and NSView graphics (From: Bill Appleton <email@hidden>)
 >Re: conflict between Core Graphics and NSView graphics (From: Aki Inoue <email@hidden>)

  • Prev by Date: Re: why doesn't the compiler complain?
  • Next by Date: Re: [iPhone] File coping application
  • Previous by thread: Re: conflict between Core Graphics and NSView graphics
  • Next by thread: Re: conflict between Core Graphics and NSView graphics
  • Index(es):
    • Date
    • Thread