FontResource

lumin. FontResource

Interface for objects that manage font resources, which
describe how text will be rendered with Lumin.

Extends

Methods

getAdvanceDirection() → {lumin.glyph.AdvanceDirection}

Get the advance direction.

Returns:
Type
lumin.glyph.AdvanceDirection

getAscender() → {number}

The ascender is the vertical distance from the horizontal
baseline to the highest glyph coordinate.

Returns:
Type
number

getBasePath() → {string}

Inherited From:

Gets the base path of the resource.

Returns:

Base path

Type
string

getDescender() → {number}

The descender is the vertical distance from the horizontal
baseline to the lowest glyph coordinate, which is negative
if any glyphs extend below the baseline (usually they do).

Returns:
Type
number

getFileName() → {string}

Inherited From:

Gets the FileName Associated with this resource.

Returns:

Filename

Type
string

getFlowDirection() → {lumin.text.FlowDirection}

Get the text-flow direction.

Returns:
Type
lumin.text.FlowDirection

getFontName() → {string}

Returns:
Type
string

getFontSize() → {number}

Get the size of the font; the units are not specified by the interface.

Returns:
Type
number

getFontStyle() → {string}

Get the font style; e.g., "Italic".

Returns:
Type
string

getGlyphHeight() → {number}

Get the global glyph height for the font.

Formally, this is the difference between the ascender and descender,
which is what getGlyphHeight() returns.

Returns:
Type
number

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).

Returns:
Type
number

getLoadedGlyphs() → {Array.<number>}

Get the list of character codes for which glyphs have been loaded.

Returns:
Type
Array.<number>

getLoadStatus() → {lumin.resources.LoadStatus}

Inherited From:

Return a int that contains the result of loading this resource.

Returns:

int with the result value.

Type
lumin.resources.LoadStatus

getResourceId() → {BigInt}

Inherited From:

Returns the Unique ID of this resource

Returns:

Resource ID

Type
BigInt

isResourceValid() → {boolean}

Inherited From:

Returns True if the Resource was successfully loaded

Loading only happens on the server-side so this call is
only useful to the server

Returns:

TRUE = Successfully loaded

Type
boolean