Skip to content

charton API


charton API / @chart-on/core / index / measureNumerals

Function: measureNumerals() ​

measureNumerals(ctx, text, numerals): number

Defined in: packages/core/src/typography.ts:152

Width in css px of text in the context's font, digits spaced as numerals says (right-to-left text as fillNumerals draws it, in one piece).

Parameters ​

ctx ​

CanvasRenderingContext2D

text ​

string

numerals ​

NumeralStyle

Returns ​

number