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 | ||
autoSize : String Specifies the type of auto-sizing set on 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:Boolean
Indicates 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
autoSize | property |
autoSize:String
Specifies the type of auto-sizing set on the TextField. Custom text compositors may
take this into account, though the basic implementation (done by the TextField itself)
is often sufficient: it passes a very big size to the fillMeshBatch
method and then trims the result to the actually used area.
The default value is none
.
public function get autoSize():String
public function set autoSize(value:String):void
isHtmlText | property |
isHtmlText:Boolean
Indicates 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:String
The 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:Number
The 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:Boolean
Indicates 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):void
Copies all properties from another TextOptions instance.
Parameters
options:TextOptions |