Constructor

@:value({ _size : 10, _color : FlxColor.WHITE })new(_color:FlxColor = FlxColor.WHITE, _size:Int = 10)

Inherited Variables

Defined by TextFormat

align:TextFormatAlign

Indicates the alignment of the paragraph. Valid values are TextFormatAlign constants.

Throws:

ArgumentError

The align specified is not a member of openfl.text.TextFormatAlign.

blockIndent:Null<Int>

Indicates the block indentation in pixels. Block indentation is applied to an entire block of text; that is, to all lines of the text. In contrast, normal indentation(TextFormat.indent) affects only the first line of each paragraph. If this property is null, the TextFormat object does not specify block indentation (block indentation is 0).

bold:Null<Bool>

Specifies whether the text is boldface. The default value is null, which means no boldface is used. If the value is true, then the text is boldface.

bullet:Null<Bool>

Indicates that the text is part of a bulleted list. In a bulleted list, each paragraph of text is indented. To the left of the first line of each paragraph, a bullet symbol is displayed. The default value is null, which means no bulleted list is used.

color:Null<Int>

Indicates the color of the text. A number containing three 8-bit RGB components; for example, 0xFF0000 is red, and 0x00FF00 is green. The default value is null, which means that Flash Player uses the color black(0x000000).

font:String

The name of the font for text in this text format, as a string. The default value is null, which means that Flash Player uses Times New Roman font for the text.

indent:Null<Int>

Indicates the indentation from the left margin to the first character in the paragraph. The default value is null, which indicates that no indentation is used.

italic:Null<Bool>

Indicates whether text in this text format is italicized. The default value is null, which means no italics are used.

kerning:Null<Bool>

A Boolean value that indicates whether kerning is enabled (true) or disabled (false). Kerning adjusts the pixels between certain character pairs to improve readability, and should be used only when necessary, such as with headings in large fonts. Kerning is supported for embedded fonts only.

Certain fonts such as Verdana and monospaced fonts, such as Courier New, do not support kerning.

The default value is null, which means that kerning is not enabled.

leading:Null<Int>

An integer representing the amount of vertical space (called leading) between lines. The default value is null, which indicates that the amount of leading used is 0.

leftMargin:Null<Int>

The left margin of the paragraph, in pixels. The default value is null, which indicates that the left margin is 0 pixels.

letterSpacing:Null<Float>

A number representing the amount of space that is uniformly distributed between all characters. The value specifies the number of pixels that are added to the advance after each character. The default value is null, which means that 0 pixels of letter spacing is used. You can use decimal values such as 1.75.

rightMargin:Null<Int>

The right margin of the paragraph, in pixels. The default value is null, which indicates that the right margin is 0 pixels.

size:Null<Int>

The size in pixels of text in this text format. The default value is null, which means that a size of 12 is used.

tabStops:Array<Int>

Specifies custom tab stops as an array of non-negative integers. Each tab stop is specified in pixels. If custom tab stops are not specified (null), the default tab stop is 4 (average character width).

target:String

Indicates the target window where the hyperlink is displayed. If the target window is an empty string, the text is displayed in the default target window _self. You can choose a custom name or one of the following four names: _self specifies the current frame in the current window, _blank specifies a new window, _parent specifies the parent of the current frame, and _top specifies the top-level frame in the current window. If the TextFormat.url property is an empty string or null, you can get or set this property, but the property will have no effect.

underline:Null<Bool>

Indicates whether the text that uses this text format is underlined (true) or not (false). This underlining is similar to that produced by the <U> tag, but the latter is not true underlining, because it does not skip descenders correctly. The default value is null, which indicates that underlining is not used.

url:String

Indicates the target URL for the text in this text format. If the url property is an empty string, the text does not have a hyperlink. The default value is null, which indicates that the text does not have a hyperlink.

Note: The text with the assigned text format must be set with the htmlText property for the hyperlink to work.

Inherited Methods