Help Center

Local Navigation

Object: TextMetrics

Availability

BlackBerry® Device Software 6.0 or later

The TextMetrics object is returned by CanvasRenderingContext2D.measureText(). It has a single attribute, width, which returns the width of a block of text.

Properties

Property name

Type

Description

Status

Support level

Availability

width

float

Returns the width of a block of text, in pixels.

read only

HTML 5

6.0 or later

Next topic: Core API
Previous topic: Properties

Was this information helpful? Send us your comments.