Creates an empty font or copies an existing font.
sourceOptionalReturns the ascent in pixels for the specified pixel character size.
sizeReturns the descent in pixels for the specified pixel character size.
sizeGets the cached glyph for a Unicode code point; size and outline thickness are in pixels, and bold controls emboldening.
codePointcharacterSizeboldoutlineThicknessGets a glyph by its internal font glyph index; size and outline thickness are in pixels.
idcharacterSizeboldoutlineThicknessReturns kerning between two Unicode code points in pixels.
firstsecondcharacterSizeboldReturns recommended baseline spacing for the specified pixel character size.
sizeReturns a read-only glyph atlas texture reference for the specified pixel character size; loading more glyphs may update its contents.
characterSizeReturns the underline position relative to the baseline in pixels.
sizeReturns the underline thickness in pixels.
sizeReturns whether the font has a glyph for the specified Unicode code point.
codePointReturns whether font textures use smooth filtering.
Opens a font file asynchronously; on success replaces the font and clears metric caches. Returns whether it succeeded.
filenameOpens encoded font bytes asynchronously and returns whether it succeeded.
dataReads all font bytes from the start of the stream and opens asynchronously; returns success, and stream errors reject the Promise.
streamSets whether font textures use smooth filtering.
smooth
Native-owned font face, input storage and retained glyph atlases.