TextMetrics.actualBoundingBoxLeft

The read-only actualBoundingBoxLeft property of the TextMetrics interface is a double giving the distance parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign property to the left side of the bounding rectangle of the given text, in CSS pixels.

Examples

const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const text = ctx.measureText('foo'); // returns TextMetrics object

text.actualBoundingBoxLeft; // 0;

Specifications

Specification
HTML Living Standard
The definition of 'TextMetrics.actualBoundingBoxLeft' in that specification.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
actualBoundingBoxLeft
Experimental
Chrome Full support 77
Full support 77
No support ? — 77
Disabled
Disabled Until version 77 (exclusive): this feature is behind the Experimental Web Platform Features preference. To change preferences in Chrome, visit chrome://flags.
Edge Full support 79Firefox Full support 74IE No support NoOpera ? Safari Full support YesWebView Android Full support 77Chrome Android Full support 77
Full support 77
No support ? — 77
Disabled
Disabled Until version 77 (exclusive): this feature is behind the Experimental Web Platform Features preference. To change preferences in Chrome, visit chrome://flags.
Firefox Android No support NoOpera Android ? Safari iOS Full support YesSamsung Internet Android Full support 12.0

Legend

Full support
Full support
No support
No support
Compatibility unknown
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also