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. 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 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

displayMode:String

Controls the rendering of advanced anti-aliased text.

static

maxLevel:Number

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

Properties inherited from class Object

constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)


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 (Object.addProperty method), hasOwnProperty (Object.hasOwnProperty method), isPropertyEnumerable (Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf method), registerClass (Object.registerClass method), toString (Object.toString method), unwatch (Object.unwatch method), valueOf (Object.valueOf method), watch (Object.watch method)



Flash CS3


 

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

Current page: http://livedocs.adobe.com/flash/9.0/main/00002282.html