Options
All
  • Public
  • Public/Protected
  • All
V1.7
  • V1.6
  • V1.7
Menu

Class Font2dResource

A 2D font is a font rendered onto a planar image (whatever the format), as opposed to a 3D model of the glyphs or other graphical representation.

Note, for this implementation, the loadGlyphs() and unloadGlyphs() functions will only work if called on the render thread by the process with the OpenGL context. These two methods are also not needed by Lumin clients, which can create font resources within their prisms; see Prism::createFont2dResource.

Hierarchy

Index

Constructors

constructor

Methods

getAdvanceDirection

getAscender

  • getAscender(): number

getBasePath

  • getBasePath(): string

getDescender

  • getDescender(): number

getFileName

  • getFileName(): string

getFlowDirection

getFontName

  • getFontName(): string

getFontSize

  • getFontSize(): number

getFontStyle

  • getFontStyle(): string

getGlyphHeight

  • getGlyphHeight(): number

getGlyphQuality

getLineSpacing

  • getLineSpacing(): number
  • Get the space between lines of text written with this font.

    This is a value provided by the font designer to indicate how much space should separate lines of text written with the font relative to the size of a tile (which is 1 in glyph space).

    priv

    none

    Returns number

getLoadStatus

getLoadedGlyphs

  • getLoadedGlyphs(): Array<number>

getMinAlphaToDiscard

  • getMinAlphaToDiscard(): number

getResourceId

  • getResourceId(): bigint

getShaderType

getTexture2dArrayIds

  • getTexture2dArrayIds(): Array<number>

getTextureDims

  • getTextureDims(textureId: number): [number, number, number]
  • After the server has loaded the font resource, this will return the dimensions of the texture with the given ID.

    priv

    none

    Parameters

    • textureId: number

    Returns [number, number, number]

    the (height, width, depth) of the texture with the given ID, or else (0, 0, 0) if the textureID equals 0 or is not known.

getTileInfo

  • getTileInfo(character: number): TileInfo
  • Get the information for rendering a particular character.

    priv

    none

    Parameters

    • character: number

      Glyph identifier

    Returns TileInfo

    Information about the glyph representing the given character, which will equal NONE if no such character has been loaded.

getTileSize

  • getTileSize(): number

isProtectedContent

  • isProtectedContent(): boolean

isResourceValid

  • isResourceValid(): boolean

setFont2dDesc

setProtectedContent

  • setProtectedContent(value: boolean): void

Generated using TypeDoc