Skip to content

measureCellFromBlock

measureCellFromBlock(ctx, fontSize, fontFamily): CanvasMetrics

Defined in: src/driver/web/canvas-renderer.ts:83

Derive the cell box and text baseline from the font itself by measuring the full-block glyph (it fills the em, so its ink bounds are the cell). Use this to drive all render coordinates instead of a fixed line-height ratio.

CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D

number

string

CanvasMetrics