MemoryFontSource

MemoryFontSource class

Represents the single TrueType font file stored in memory.

class MemoryFontSource extends FontSourceBase;

Constructors

ConstructorDescription
constructor(FontSourceBase)Constructs from a parent object convertible to this.
constructor(Uint8Array)Ctor.

Properties

PropertyTypeDescription
fontDataUint8ArrayReadonly. Binary font data.

Methods

MethodDescription
getFontData()@deprecated. Please use the ‘fontData’ property instead. Binary font data.
isNull()Checks whether the implementation object is null.
getType()Returns the type of the font source.

constructor(FontSourceBase)

Constructs from a parent object convertible to this.

constructor(obj: FontSourceBase);

Parameters:

ParameterTypeDescription
objFontSourceBaseThe parent object.

constructor(Uint8Array)

Ctor.

constructor(fontData: Uint8Array);

Parameters:

ParameterTypeDescription
fontDatanumber[]Binary font data.

fontData

Readonly. Binary font data.

fontData : Uint8Array;

getFontData()

@deprecated. Please use the ‘fontData’ property instead. Binary font data.

getFontData() : Uint8Array;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;

getType()

Returns the type of the font source.

getType() : FontSourceType;

Returns

FontSourceType