AntiAliasing in Flash
Aug 21st, 2008 by Leo A. Geis
There are some points of contention and confusion when dealing with AntiAliasing in the Flash IDE relative to High Quality AntiAliasing. It’s even more complicated in the API.
High Quality (or Advanced) AntiAliasing is default when Publish Settings are set to Player 8 or 9 (thus not limited to AVM2) and AntiAlias for Readability or Custom AntiAlias are selected.
However, there are some manipulations that send AntiAliasing, particularly Advanced AntiAliasing, into detent. One of them is Transforming with other than symmetrical Scale and Rotation (symmetrical Scale refers to scaling equally along both axes). If you Skew your Text Field, it will not enjoy Advanced Antialiasing.
Selecting AntiAlias for Animation also denies Advanced AntiAliasing. AntiAlias for Animation is purposefully of more coarse visual quality (it ignores some character positioning parameters) in order to facilitate less resource-intensive rendering and smoother transitions between Frames. The workaround is to simply instantiate (small “i”-not a formal Instantiation) a copy of an animated Text Field to use during animation, then another (with Advanced Animation applied) to use when the artifact is static, provided that all other requirements for Advanced AntiAliasing are satisfied (e.g. no disqualifying Transformations).
Of course, other concerns about Text Fields, such as registering them to Pixel integers (not TWIPS) and using BitMapped or Device Fonts when appropriate survive the above concerns.
Finally, if a .fla is being exported to .png, High Quality AntiAliasing is unavialable. This is a tricky problem since folks rely on lossless .png to be particularly crisp and clean-the absence of Advanced AntiAliasing can frustrate that design goal.
A Blur Filter should be considered no therapy for aliased or “jaggy” text elements. Even if it is confined to a small radius, formulated as a low quality Glow with Knockout, or Converted to a Symbol and cached as a Bitmap it is still much more demanding on local resources and much less discriminating than the formal AntiAlias capabilities.
Finally, there is a relatively easy way to differentially AntiAlias various characters & glyphs in a (static) TextField: Simply break the Text apart (Ctl-B) and apply specific AntiAliases. Of course, your ability to edit the text is then gone…
I wouldn’t feel comfortable without including a bit of technical background on AntiAliasing, or Continuous Stroke Modulation (CSM). As of CS3 it’s all a matter of Saffron, a product of Mitsubishi Electrical Research Labs, and you can read all about it here.
You can become familiar with the API implementation of CSM in the flash.text.CMSSettings Class. Check the CSMSettings Method and the insideCutoff and outsideCutoff Properties.
L


