Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kThemeCurrentContextFont?



On Nov 15, 2004, at 10:29, Eric Schlegel wrote:

I would do this by first setting the context's CTM to scale the text size appropriately, and then drawing with HIThemeDrawTextBox and a standard theme font.

That might be a reasonable short-term solution, though it's a little risky to simply do a linear scaling of text, if that's what you mean.


First, an N-point font is not necessarily any particular number of pixels in size, so you don't have as much control over the final size as you might like. If you stick to the system fonts, of course you have a greater chance of success, but I would be a little uncomfortable using this method.

Second, you may not get the best font rendering, since linear scaling isn't the same as optical scaling, and some fonts are tuned to account for optical scaling.

These probably aren't a big deal in this case, but they're something to be aware of.

--
Chris Page - Software Wrangler - Dylan Pundit

 That’s “Chris” with a silent *and* invisible “3”.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >kThemeCurrentContextFont? (From: Bryan Pietrzak <email@hidden>)
 >Re: kThemeCurrentContextFont? (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.