The Textrenderer ClassThe TexTRenderer class was created to provide more control over the advanced anti-aliasing capabilities of embedded fonts. It is important when using this class to import it first at the beginning of your script, like this: import flash.text.TextRenderer; PropertiesantiAliasTypeAvailability: FP:8, AS:1.0 Generic Template: Textrenderer.antiAliasType; Description: This string literal property controls the specific anti-aliasing type for the movie. Available options are
Example: This example will set anti-aliasing for all text fields to normal: import flash.text.TextRenderer; TextRenderer.antiAliasType = "off"; maxLevelAvailability: FP:8, AS:1.0 Generic Template: Textrenderer.maxLevel; Description: This numerical value controls the level of ADF (Advanced Distance Fields) for all text fields in a movie; it can accept 3, 4, or 7, with 7 being of the highest quality. Example: This example will set ADF level to the maximum setting: import flash.text.TextRenderer; TextRenderer.maxLevel = 7; MethodssetAdvancedAntialiasingTableAvailability: FP:8, AS:1.0 Generic Template: TexTRenderer.setAdvancedAntialiasingTable(font, style, color, advancedTable); Parameters:
Description: This method will set up a custom CSM lookup table for a given font. Example: This example will create a lookup table for the Arial font: import flash.text.TextRenderer; //items to add to the arrau var item_obj:Object = {fontSize:12, insideCutoff:.5, outsideCutoff:-.5}; var item_obj2:Object = {fontSize:15, insideCutoff:.9, outsideCutoff:-.91}; //create the array var lookup_array:Array = new Array(item_obj, item_obj2); //setup the lookout table TextRenderer.setAdvancedAntialiasingTable("Arial", "bold", "dark", lookup_array); |