The size of the Font in pixels (TTF only). Larger sizes are slower to initialize and use more memory, but have better quality.
spread
number
4
For signed distance field fonts (currently all fonts), the width of the SDF, in pixels. The greater the distance the font is viewed from, the larger this value needs to be for the font to remain properly antialiased. Increasing this will have a performance penalty similar to increasing the size of the font.
The size of the Font in pixels (TTF only). Larger sizes are slower to initialize and use more memory, but have better quality.
spread
number
4
For signed distance field fonts (currently all fonts), the width of the SDF, in pixels. The greater the distance the font is viewed from, the larger this value needs to be for the font to remain properly antialiased. Increasing this will have a performance penalty similar to increasing the size of the font.
Creates a new Font using the default typeface (Varela Round).
Arguments
Name
Type
Default
Description
size
number
32
The size of the Font in pixels (TTF only). Larger sizes are slower to initialize and use more memory, but have better quality.
spread
number
4
For signed distance field fonts (currently all fonts), the width of the SDF, in pixels. The greater the distance the font is viewed from, the larger this value needs to be for the font to remain properly antialiased. Increasing this will have a performance penalty similar to increasing the size of the font.
An existing Rasterizer to use to load glyph images.
spread
number
4
For signed distance field fonts (currently all fonts), the width of the SDF, in pixels. The greater the distance the font is viewed from, the larger this value needs to be for the font to remain properly antialiased. Increasing this will have a performance penalty similar to increasing the size of the font.