Renderer · function
textWidthPx
Width of a string in pixels at a given cell size, without laying it out.
Explained in Hello world.
function textWidthPx(text: string, cellSize: number): numberimport { textWidthPx } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | |
cellSize | number |