| Package | starling.text |
| Class | public class TextOptions |
| Inheritance | TextOptions Object |
Note that not all properties are supported by all text compositors.
| Property | Defined By | ||
|---|---|---|---|
| autoScale : Boolean Indicates whether the font size is automatically reduced if the complete text does
not fit into the TextField. | TextOptions | ||
| isHtmlText : Boolean Indicates if text should be interpreted as HTML code. | TextOptions | ||
| textureFormat : String The Context3DTextureFormat of any textures that are created during text composition. | TextOptions | ||
| textureScale : Number The scale factor of any textures that are created during text composition. | TextOptions | ||
| wordWrap : Boolean Indicates if the text should be wrapped at word boundaries if it does not fit into
the TextField otherwise. | TextOptions | ||
| Method | Defined By | ||
|---|---|---|---|
TextOptions(wordWrap:Boolean = true, autoScale:Boolean = false) Creates a new TextOptions instance with the given properties. | TextOptions | ||
Creates a clone of this instance. | TextOptions | ||
copyFrom(options:TextOptions):void Copies all properties from another TextOptions instance. | TextOptions | ||
| autoScale | property |
autoScale:BooleanIndicates whether the font size is automatically reduced if the complete text does not fit into the TextField.
The default value is false.
public function get autoScale():Boolean public function set autoScale(value:Boolean):void| isHtmlText | property |
isHtmlText:BooleanIndicates if text should be interpreted as HTML code. For a description of the supported HTML subset, refer to the classic Flash 'TextField' documentation. Beware: Only supported for TrueType fonts.
The default value is false.
public function get isHtmlText():Boolean public function set isHtmlText(value:Boolean):void| textureFormat | property |
textureFormat:StringThe Context3DTextureFormat of any textures that are created during text composition.
The default value is Context3DTextureFormat.BGRA_PACKED.
public function get textureFormat():String public function set textureFormat(value:String):void| textureScale | property |
textureScale:NumberThe scale factor of any textures that are created during text composition.
The default value is Starling.contentScaleFactor.
public function get textureScale():Number public function set textureScale(value:Number):void| wordWrap | property |
wordWrap:BooleanIndicates if the text should be wrapped at word boundaries if it does not fit into the TextField otherwise.
The default value is true.
public function get wordWrap():Boolean public function set wordWrap(value:Boolean):void| TextOptions | () | Constructor |
public function TextOptions(wordWrap:Boolean = true, autoScale:Boolean = false)Creates a new TextOptions instance with the given properties.
ParameterswordWrap:Boolean (default = true) | |
autoScale:Boolean (default = false) |
| clone | () | method |
| copyFrom | () | method |
public function copyFrom(options:TextOptions):voidCopies all properties from another TextOptions instance.
Parameters
options:TextOptions |