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: what can cause ATSUI to not anti-alias?




On Feb 7, 2005, at 3:56 PM, Bryan Pietrzak wrote:


On Feb 7, 2005, at 3:43 PM, Nick Nallick wrote:


On Feb 7, 2005, at 2:22 PM, Bryan Pietrzak wrote:

OK, I have the strangest problem. I'm drawing text with ATSUI via ATSUDrawText, but the text is not being anti-aliased. I know this because when I use universal access to zoom way in, it's clear there's no aliasing. On top of that, the text just looks terrible: the tracking and spacing of some glyphs seems to be just wrong.

FWIW, I've seen this happen when drawing very small text. Probably font sizes that fall below the minimum text smoothing size set in the system preferences. I haven't noticed this in a some time but I don't know if it's changed or if it's because I've set my text smoothing preference to the minimum value.

Hmm... yeah, that could be it ... I'm dealing a 6.5 font size, though in this particular test case the context is scaled 400%. And sure, enough, once I changed the point size to 26.0 and changed the document's scale back to 100% the text looked correct.


This is quite a problem. Yes, in this case, I'm drawing 6.5 pt type, but two questions:

1) Why does tracking get completely borked? Especially on spaces?

I had a similar problem at one time where I was trying to draw text at 1 pt and then scale it up. The other problem was that the scaled text looked very odd. The letter shapes were just not right.


I took the problem to a Carbon Kitchen and worked with the Apple Engineers to figure out why. As it turns out, at the time, the text system used 32 bit Fixed point numbers to handle the outlines. With a very small font like 1 pt, the text system could not represent numbers that were small enough to properly draw the text. I don't know if the font system still uses fixed point numbers, or if the 6.5 point characters would be small enough to under-run the precision of a fixed point number... but it's something to keep in mind.

The kerning trouble turned out to be related to font hinting. When you get to small point sizes, the fonts sometimes contain hinting which basically adjusts the positions of the characters in small text. At the time we were able to fix the problem by changing the hinting settings.

I believe for the scaling issues I ended up drawing everything at 100 pt and setting up the scaling matrix to get it to the right size. (i.e. the solution you already found).

Scott

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

This email sent to email@hidden
References: 
 >what can cause ATSUI to not anti-alias? (From: Bryan Pietrzak <email@hidden>)
 >Re: what can cause ATSUI to not anti-alias? (From: Nick Nallick <email@hidden>)
 >Re: what can cause ATSUI to not anti-alias? (From: Bryan Pietrzak <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.