Returns the bounding box of a glyph, or the bounding box surrounding all glyphs. Note that font coordinates use a cartesian "y up" coordinate system.
Arguments
Name | Type | Description |
character | string |
A character.
|
Returns
Name | Type | Description |
x1 | number |
The left edge of the bounding box, in pixels.
|
y1 | number |
The bottom edge of the bounding box, in pixels.
|
x2 | number |
The right edge of the bounding box, in pixels.
|
y2 | number |
The top edge of the bounding box, in pixels.
|
Arguments
Name | Type | Description |
codepoint | number |
A codepoint.
|
Returns
Name | Type | Description |
x1 | number |
The left edge of the bounding box, in pixels.
|
y1 | number |
The bottom edge of the bounding box, in pixels.
|
x2 | number |
The right edge of the bounding box, in pixels.
|
y2 | number |
The top edge of the bounding box, in pixels.
|
Arguments
None
Returns
Name | Type | Description |
x1 | number |
The left edge of the bounding box, in pixels.
|
y1 | number |
The bottom edge of the bounding box, in pixels.
|
x2 | number |
The right edge of the bounding box, in pixels.
|
y2 | number |
The top edge of the bounding box, in pixels.
|
See also