Skip to content

Class: FontRequest

FontRequest specifies all information required to prepare and render a font. Once a font request has been processed the font will be available to be drawn with if the processing is successful.

Table of contents

Constructors

Properties

Constructors

constructor

+ new FontRequest(name: string, family: string, weight: string, size: number, fontOptions?: IFontOptions, textureOptions?: ITextureOptions): FontRequest

Parameters:

Name Type
name string
family string
weight string
size number
fontOptions IFontOptions
textureOptions ITextureOptions

Returns: FontRequest

Properties

buffer

buffer: number

Whitespace buffer around a glyph in the atlas in pixels.


characters

characters: string

Characters to pre-render for the font, should be all characters that will be displayed with the font.


cutoff

cutoff: number

How much of the radius (relative) is used for the inside part the glyph.


family

family: string

CSS font family, for example "Roboto".


generateMipmaps

generateMipmaps: boolean

Texture option for generating mipmaps or not. True = generate mipmaps, false = don't generate mipmaps.


magFilter

magFilter: TextureFiltering

Texture magnification filter.


minFilter

minFilter: TextureFiltering

Texture minification filter.


name

name: string

Unique name to identify the font and settings combination.


radius

radius: number

How many pixels around the glyph shape in the atlas to use for encoding distance.


size

size: number

CSS font size in pixels.


weight

weight: string

CSS font weight.


xWrap

xWrap: TextureWrapping

Texture wrapping along x axis.


yWrap

yWrap: TextureWrapping

Texture wrapping along y axis.


MESSAGE_REQUEST_LOAD

Readonly Static MESSAGE_REQUEST_LOAD: request_font_load= "request_font_load"

Message to request a font asset to be loaded.