Packagestarling.text
Classpublic class TextOptions
InheritanceTextOptions Inheritance Object

The TextOptions class contains data that describes how the letters of a text should be assembled on text composition.

Note that not all properties are supported by all text compositors.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Property Detail
autoScaleproperty
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.


Implementation
    public function get autoScale():Boolean
    public function set autoScale(value:Boolean):void
autoSizeproperty 
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.


Implementation
    public function get autoSize():String
    public function set autoSize(value:String):void
isHtmlTextproperty 
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.


Implementation
    public function get isHtmlText():Boolean
    public function set isHtmlText(value:Boolean):void
textureFormatproperty 
textureFormat:String

The Context3DTextureFormat of any textures that are created during text composition.

The default value is Context3DTextureFormat.BGRA_PACKED.


Implementation
    public function get textureFormat():String
    public function set textureFormat(value:String):void
textureScaleproperty 
textureScale:Number

The scale factor of any textures that are created during text composition.

The default value is Starling.contentScaleFactor.


Implementation
    public function get textureScale():Number
    public function set textureScale(value:Number):void
wordWrapproperty 
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.


Implementation
    public function get wordWrap():Boolean
    public function set wordWrap(value:Boolean):void
Constructor Detail
TextOptions()Constructor
public function TextOptions(wordWrap:Boolean = true, autoScale:Boolean = false)

Creates a new TextOptions instance with the given properties.

Parameters
wordWrap:Boolean (default = true)
 
autoScale:Boolean (default = false)
Method Detail
clone()method
public function clone():TextOptions

Creates a clone of this instance.

Returns
TextOptions
copyFrom()method 
public function copyFrom(options:TextOptions):void

Copies all properties from another TextOptions instance.

Parameters

options:TextOptions