API reference
Preparing search index…

SFML shaping with native vertex storage and batched draw snapshots.

Type hierarchy

Hierarchy

Source & inheritance
Member directory52

Constructors

Properties

Methods

Constructors

Properties

ClusterGrouping: typeof ClusterGrouping = ClusterGrouping

Glyph cluster grouping enumeration.

Source & inheritance
LineAlignment: typeof LineAlignment = LineAlignment

Line alignment enumeration.

Source & inheritance
Style: typeof TextStyle = TextStyle

Text style bit flags.

Source & inheritance
TextDirection: typeof TextDirection = TextDirection

Glyph layout direction enumeration.

Source & inheritance
TextOrientation: typeof TextOrientation = TextOrientation

Horizontal and vertical writing direction enumeration.

Source & inheritance

Methods

  • Returns world coordinates of the specified character; index counts Unicode code points.

    Parameters

    this
    index
    number

    Returns

    Use getShapedGlyphs() to obtain the complete layout.

    Source & inheritance
  • Returns the character size in pixels.

    Returns

    number
    Source & inheritance
  • Returns a copy of the fill color.

    Returns

    Source & inheritance
  • Returns the letter spacing factor.

    Returns

    number
    Source & inheritance
  • Returns the line spacing factor.

    Returns

    number
    Source & inheritance
  • Returns the local axis-aligned bounds of the shaped text.

    Returns

    Source & inheritance
  • Returns a copy of the outline color.

    Returns

    Source & inheritance
  • Returns the outline thickness in pixels.

    Returns

    number
    Source & inheritance
  • Returns mutable outline vertex data; retrieve it again after the next geometry rebuild.

    Returns

    Source & inheritance
  • Return a copy of the rotation normalized to [0°, 360°).

    Returns

    Source & inheritance
  • Shapes on demand and returns glyph layout views; cluster is a JS UTF-16 index.

    Returns

    readonly ShapedGlyph[]
    Source & inheritance
  • Returns the current JS string.

    Returns

    string
    Source & inheritance
  • Returns mutable fill vertex data; retrieve it again after the next geometry rebuild.

    Returns

    Source & inheritance
  • Sets the character size in pixels.

    Parameters

    this
    this
    size
    number

    Returns

    void
    Source & inheritance
  • Sets the glyph cluster grouping strategy for shaping.

    Parameters

    this
    this

    Returns

    void
    Source & inheritance
  • Sets the font and retains its reference.

    Parameters

    this
    this

    Returns

    void
    Source & inheritance
  • Sets a synchronous glyph appearance callback, or null to remove it; the callback runs when geometry is rebuilt.

    Parameters

    this
    this
    processor

    Returns

    void
    Source & inheritance
  • Sets the letter spacing factor; 1 is the default spacing.

    Parameters

    this
    this
    factor
    number

    Returns

    void
    Source & inheritance
  • Sets the alignment of multiline text.

    Parameters

    this
    this
    alignment

    Returns

    void
    Source & inheritance
  • Sets the line spacing factor; 1 is the font's default line spacing.

    Parameters

    this
    this
    factor
    number

    Returns

    void
    Source & inheritance
  • Sets the outline thickness in pixels.

    Parameters

    this
    this
    thickness
    number

    Returns

    void
    Source & inheritance
  • Sets the displayed string, reshaping on the next query or draw.

    Parameters

    this
    this
    value
    string

    Returns

    void
    Source & inheritance
  • Sets TextStyle bit flags, combining styles such as bold and italic.

    Parameters

    this
    this

    Returns

    void
    Source & inheritance
  • Sets horizontal or vertical writing direction.

    Parameters

    this
    this
    orientation

    Returns

    void
    Source & inheritance

Symbol members

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0