Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Is it really possible to use ATSUI and Quartz together in device independent manner?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it really possible to use ATSUI and Quartz together in device independent manner?




On Dec 3, 2004, at 7:38 AM, Nick Nallick wrote:

On Dec 3, 2004, at 6:11 AM, Aleksandr Furmanov wrote:

The problem is that distance between glyphs depends on total number characters being drawn in the line, resulting effect of "dancing" text. To illustrate this I have dumped distances between glyphs, retrieved by ATSUGetGlyphBounds(...) for strings composed from 1 up to 10 characters 's'. The ATSUGetGlyphBounds(...)'s iBoundsCharLength parameter is set to kATSUseCaretOrigins. The font used in the test is Charcoal 12. Threshold value is 12, i. e. text is non-antialiased.

I haven't studied your specific problem, but I suspect it has to do with the use (or non-use) of fractional character widths. Perhaps the non-antialiased characters are using integer-only advances.


A workaround for the issue of small fonts not being antialiased is to use a larger point size (e.g., double the size you want) and scale the result back down with the destination context's transform. You might also be able to achieve the same thing using the text matrix. This will fool the text engine into anti-aliasing smaller text than it normally would.

It it's only happening for small fonts it could also be a hinting problem. Drawing with a larger font and then scaling back down can help avoid hinting trouble as well.


Scott

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Is it really possible to use ATSUI and Quartz together in device independent manner? (From: Aleksandr Furmanov <email@hidden>)
 >Re: Is it really possible to use ATSUI and Quartz together in device independent manner? (From: Nick Nallick <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.