The TextRenderer class provides functionality for the advanced anti-aliasing capability of
embedded fonts. Advanced anti-aliasing allows font faces to render at very high quality at
small sizes. Use advanced anti-aliasing with applications that have a lot of small text. Adobe does not recommend using advanced
anti-aliasing for very large fonts (larger than 48 points).
Advanced anti-aliasing is available in Flash Player 8 and later only.

To set advanced anti-aliasing on a text field, set the antiAliasType property of
the TextField instance.

Advanced anti-aliasing provides continuous stroke modulation (CSM), which is continuous
modulation of both stroke weight and edge sharpness. As an advanced feature, you can
use the setAdvancedAntiAliasingTable() method to define settings for specific
typefaces and font sizes.

displayMode

Controls the rendering of advanced anti-aliased text. The visual quality of text is very subjective, and while
Flash Player tries to use the best settings for various conditions, designers may choose a different
look or feel for their text. Also, using displayMode allows a designer to override Flash
Player's subpixel choice and create visual consistency independent of the user's hardware. Use the values in the TextDisplayMode class to set this property.

The default value is "default".

Implementation public static function get displayMode():String public static function set displayMode(value:String):void

maxLevel

The adaptively sampled distance fields (ADFs) quality level for advanced anti-aliasing. The only acceptable values are
3, 4, and 7.

Advanced anti-aliasing uses ADFs to
represent the outlines that determine a glyph. The higher the quality, the more
cache space is required for ADF structures. A value of 3 takes the least amount
of memory and provides the lowest quality. Larger fonts require more cache space;
at a font size of 64 pixels, the quality level increases from 3 to 4 or
from 4 to 7 unless, the level is already set to 7.

The default value is 4.

Implementation public static function get maxLevel():int public static function set maxLevel(value:int):void

Sets a custom continuous stroke modulation (CSM) lookup table for a font.
Flash Player attempts to detect the best CSM for your font. If you are not
satisfied with the CSM that the Flash Player provides, you can customize
your own CSM by using the setAdvancedAntiAliasingTable() method.

Parameters

fontName:String — The name of the font for which you are applying settings.

fontStyle:String — The font style indicated by using one of the values from
the flash.text.FontStyle class.

colorType:String — This value determines whether the stroke is dark or whether it is light.
Use one of the values from the flash.text.TextColorType class.

advancedAntiAliasingTable:Array — An array of one or more CSMSettings objects
for the specified font. Each object contains the following properties:

fontSize

insideCutOff

outsideCutOff

The advancedAntiAliasingTable array can contain multiple entries
that specify CSM settings for different font sizes.

The fontSize is the size, in pixels, for which the settings apply.

Advanced anti-aliasing uses adaptively sampled distance fields (ADFs) to
represent the outlines that determine a glyph. Flash Player uses an outside cutoff value
(outsideCutOff),
below which densities are set to zero, and an inside cutoff value (insideCutOff),
above which densities
are set to a maximum density value (such as 255). Between these two cutoff values,
the mapping function is a linear curve ranging from zero at the outside cutoff
to the maximum density at the inside cutoff.

Adjusting the outside and inside cutoff values affects stroke weight and
edge sharpness. The spacing between these two parameters is comparable to twice the
filter radius of classic anti-aliasing methods; a narrow spacing provides a sharper edge,
while a wider spacing provides a softer, more filtered edge. When
the spacing is zero, the resulting density image is a bi-level bitmap. When the
spacing is very wide, the resulting density image has a watercolor-like edge.

Typically, users prefer sharp, high-contrast edges at small point sizes, and
softer edges for animated text and larger point sizes.

The outside cutoff typically has a negative value, and the inside cutoff typically
has a positive value, and their midpoint typically lies near zero. Adjusting these
parameters to shift the midpoint toward negative infinity increases the stroke
weight; shifting the midpoint toward positive infinity decreases the stroke weight.
Make sure that the outside cutoff value is always less than or equal to the inside cutoff value.

The following example creates the TextRendererExample class
to demonstrate visual examples of advanced anti-aliasing settings with small
and large font sizes. Before testing this example, you will need to embed a
font.
If you are using Flex, embed a font in the following manner:

Place the Georgia font, named georgia.ttf in the same directory as this AS file.

Add the following lines directly underneath the class definition:

[Embed(source="georgia.ttf", fontFamily="Georgia")]

private var embeddedFont:String;

If you are using Flash, embed a font in the following manner:

Place a text field on the stage and select it.

In the Property Inspector, set that text field's font to Georgia

In the Property Inspector, press "Embed..." and select "All"

Notes:

You will need to compile the SWF file with "Local playback security" set to "Access local files only".