Options
All
  • Public
  • Public/Protected
  • All
Menu

Structure containing all the required information necessary to render a BMFont glyph using TextCanvas.

Hierarchy

  • GlyphData

Index

Constructors

constructor

  • new GlyphData(codePoint: number, block: string, width: number, height: number, advanceX: number, offsetX: number, offsetY: number, u0: number, v0: number, u1: number, v1: number, texture: Texture, font: Font, isReplacement?: boolean): GlyphData
  • Creates a new GlyphData object.

    Parameters

    • codePoint: number

      Unicode code point.

    • block: string

      Unicode block.

    • width: number

      Glyph' width.

    • height: number

      Glyph' height.

    • advanceX: number

      Amount of pixel to move after placing this glyph.

    • offsetX: number

      Horizontal offset from the glyph' origin.

    • offsetY: number

      Vertical offset from the glyph' origin.

    • u0: number

      Glyph' left texture coordinate.

    • v0: number

      Glyph' bottom texture coordinate.

    • u1: number

      Glyph' right texture coordinate.

    • v1: number

      Glyph' top texture coordinate.

    • texture: Texture

      Glyph' source texture atlas page.

    • font: Font

      Glyph' font.

    • Default value isReplacement: boolean = false

      true if glyph is a replacement for a missing glyph.

    Returns GlyphData

    New GlyphData.

Properties

Readonly advanceX

advanceX: number

Amount of pixel to move after placing this glyph.

Readonly block

block: string

Unicode block.

Readonly character

character: string

Unicode character represented by this glyph.

Readonly codePoint

codePoint: number

Unicode code point.

copyIndex

copyIndex: number = 0

Source texture atlas' page copy index.

Readonly direction

direction: Direction

Glyph' direction.

dynamicTextureCoordinates

dynamicTextureCoordinates: Vector2[] = []

Array containing the dynamic texture coordinates for all corners of this glyph. Used to sample the dynamic texture atlas page.

Readonly font

font: Font

Glyph' font.

Readonly height

height: number

Glyph' height.

isInCache

isInCache: boolean = false

Flag indicating if glyph can be currently rendered.

Readonly isReplacement

isReplacement: boolean

true if glyph is a replacement for a missing glyph.

Readonly offsetX

offsetX: number

Horizontal offset from the glyph' origin.

Readonly offsetY

offsetY: number

Vertical offset from the glyph' origin.

positions

positions: Vector3[] = []

Array containing the positions for all corners of this glyph.

sourceTextureCoordinates

sourceTextureCoordinates: Vector2[] = []

Array containing the source texture coordinates for all corners of this glyph. Used to sample the original texture atlas pages.

Readonly texture

texture: Texture

Glyph' source texture atlas page.

Readonly width

width: number

Glyph' width.

Methods

clone

Generated using TypeDoc