TextRenderer (flash.text.TextRenderer)


Object
    |
    +-flash.text.TextRenderer

public class TextRenderer
extends Object

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. Macromedia does not recommend using advanced anti-aliasing for very large fonts (larger than 48 points). Advanced anti-aliasing is available in Flash Player 8 only.

To set advanced anti-aliasing on a text field, set the antiAliasType property of the TextField instance. The following example requires a shared font in the library with a linkage identifier named, "CustomFont".

var txtFormat:TextFormat = new TextFormat();
txtFormat.font = "CustomFont";

var label:TextField = this.createTextField("label", this.getNextHighestDepth(), 10, 10, 200, 20);
label.setNewTextFormat(txtFormat);
label.text = "Hello World";
label.embedFonts = true;
label.antiAliasType = "advanced";

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.

Availability: ActionScript 1.0; Flash Player 8

See also

antiAliasType (TextField.antiAliasType property)

Property summary

Modifiers

Property

Description

static

maxLevel:Number

The adaptively sampled distance fields (ADFs) quality level for advanced anti-aliasing.

Properties inherited from class Object

constructor, __proto__, prototype, __resolve


Method summary

Modifiers

Signature

Description

static

setAdvancedAntialiasingTable(fontName:String, fontStyle:String, colorType:String, advancedAntialiasingTable:Array) : Void

Sets a custom continuous stroke modulation (CSM) lookup table for a font.

Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch



Version 8

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00002822.html