Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / textWidth

Function: textWidth() โ€‹

textWidth(s, bold): number

Defined in: core/values/book.ts:107

A string's rendered width in pixels; bold adds 1px per character.

Parameters โ€‹

s โ€‹

string

bold โ€‹

boolean

Returns โ€‹

number

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.