Class: TextFormat

TextFormat

TextFormat クラスは、文字フォーマット情報を表します。
TextFormat クラスを使用して、テキストフィールドに特定のテキストフォーマットを作成します。

The TextFormat class represents character formatting information.
Use the TextFormat class to create specific text formatting for text fields.

new next2d.text.TextFormat (font, size, color, bold, italic, underline, align, left_margin, right_margin, indent, leading, block_indent)

NameTypeDefaultDescription
fontstringnulloptional
sizenumbernulloptional
colornumbernulloptional
boldbooleannulloptional
italicbooleannulloptional
underlinebooleannulloptional
alignstringnulloptional
left_marginnumbernulloptional
right_marginnumbernulloptional
indentnumbernulloptional
leadingnumbernulloptional
block_indentnumbernulloptional

Members

next2d.text.TextFormat.namespace staticconstant

指定されたクラスの空間名を返します。
Returns the space name of the specified class.

Default Value:
  • next2d.text.TextFormat

align string

段落の行揃えの設定を示します。
Indicates the alignment of the paragraph.

Default Value:
  • null

blockIndent number

ブロックのインデントをピクセル単位で示します。
Indicates the block indentation in pixels.

Default Value:
  • null

bold boolean

テキストをボールドにするかどうかを指定します。
Specifies whether the text is boldface.

Default Value:
  • null

color number

テキストの色を示します。
Indicates the color of the text.

Default Value:
  • null

font string

このテキストフォーマットでのテキストフォント名を示すストリングです。
The name of the font for text in this text format, as a string.

Default Value:
  • null

indent number

左インデントから段落の先頭文字までのインデントを示します。
Indicates the indentation from the left margin
to the first character in the paragraph.

Default Value:
  • null

italic boolean

このテキストフォーマットのテキストをイタリックにするかどうかを示します。
Indicates whether text in this text format is italicized.

Default Value:
  • null

leading number

行間の垂直の行送りを示す整数です。
An integer representing the amount
of vertical space (called leading) between lines.

Default Value:
  • null

leftMargin number

段落の左インデントをピクセル単位で示します。
The left margin of the paragraph, in pixels.

Default Value:
  • null

letterSpacing number

すべての文字の間に均等に配分されるスペースの量を表す数値です。
A object representing the amount
of space that is uniformly distributed between all characters.

Default Value:
  • 0

namespace constant

指定されたオブジェクトの空間名を返します。
Returns the space name of the specified object.

Default Value:
  • next2d.text.TextFormat

rightMargin number

段落の右インデントをピクセル単位で示します。
The right margin of the paragraph, in pixels.

Default Value:
  • null

size number

このテキストフォーマットのテキストのサイズ(ピクセル単位)です。
The size in pixels of text in this text format.

Default Value:
  • null

underline boolean

このテキストフォーマットを使用するテキストに
アンダーラインを表示する(true)か、表示しない(false)かを示します。
Indicates whether the text that uses this text format
is underlined (true) or not (false).

Default Value:
  • null

Methods

next2d.text.TextFormat.toString ()string static

指定されたクラスのストリングを返します。
Returns the string representation of the specified class.

Default Value:
  • [class TextFormat]
Returns:
TypeDescription
string

toString ()string

指定されたオブジェクトのストリングを返します。
Returns the string representation of the specified object.

Default Value:
  • [object TextFormat]
Returns:
TypeDescription
string