Skip to main content
Any TrueType or OpenType font, drawn with render.text like the built-in ones. Global class, no import.
Every glyph in the file works at any size, Cyrillic, CJK and emoji included, as long as the font has them. There are no ranges to set up.
The font shows up on the overlay’s next frame. Until then text drawn with it uses the default font, and the first measureText with it waits for that frame.

Loading

constructor


Reads a .ttf, .otf or .ttc file. path is relative to the script folder. A missing file throws ENOENT, something that isn’t a font throws EINVAL.
Without the filesystem permission the file must be inside the script folder.

fromMemory


A font from the bytes of a font file, say one you downloaded. data is copied.

Options


Properties

toString() gives something like Font(ready, "C:/…/Inter.ttf").

Limits

  • Loading the same file with the same options again reuses the font, so reloading a script is free.
  • A session holds up to 64 different fonts. Past that, loading throws ELIMIT.
  • Files can be up to 64 MB.
  • ESP text still takes only the built-in ESP fonts.