Creates a new TextOptions instance with the given properties.
Indicates whether the font size is automatically reduced if the complete text does not fit into the TextField. @default false
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. @default none
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. @default false
The padding (in points) that's added to the sides of text that's rendered to a Bitmap. If your text is truncated on the sides (which may happen if the font returns incorrect bounds), padding can make up for that. Value must be positive. @default 0.0
The Context3DTextureFormat of any textures that are created during text composition. @default Context3DTextureFormat.BGRA_PACKED
The scale factor of any textures that are created during text composition. @default Starling.contentScaleFactor
Indicates if the text should be wrapped at word boundaries if it does not fit into the TextField otherwise. @default true
Registers an event listener at a certain object.
Creates a clone of this instance.
Copies all properties from another TextOptions instance.
Dispatches an event to all objects that have registered listeners for its type. If an event with enabled 'bubble' property is dispatched to a display object, it will travel up along the line of parents, until it either hits the root object or someone stops its propagation manually.
Dispatches an event with the given parameters to all objects that have registered listeners for the given type. The method uses an internal pool of event objects to avoid allocations.
If called with one argument, figures out if there are any listeners registered for the given event type. If called with two arguments, also determines if a specific listener is registered.
Removes an event listener from the object.
Removes all event listeners with a certain type, or all of them if type is null. Be careful when removing all event listeners: you never know who else was listening.
Generated using TypeDoc
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.