Skip to content

TextMetrics

Generated from idl/canvas.webidl when the site was built at 7aa23e2.

TextMetrics is an interface in idl/canvas.webidl, exposed in Window, Worker. What it does is on MDN; this page says what niso has of it.

NisoValue: TextMetrics has no state, so it crosses the C API as a struct.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
2D canvas Widely available Partial 77% 1209 of 1553 subtests pass 13
attribute
readonly attribute double width;
attribute
readonly attribute double actualBoundingBoxLeft;
attribute
readonly attribute double actualBoundingBoxRight;
attribute
readonly attribute double fontBoundingBoxAscent;
attribute
readonly attribute double fontBoundingBoxDescent;
attribute
readonly attribute double actualBoundingBoxAscent;
attribute
readonly attribute double actualBoundingBoxDescent;
attribute
readonly attribute double emHeightAscent;
attribute
readonly attribute double emHeightDescent;
attribute
readonly attribute double hangingBaseline;
attribute
readonly attribute double alphabeticBaseline;
attribute
readonly attribute double ideographicBaseline;