Rasterizer:getBoundingBox
EditReturns the bounding box of a glyph, or the bounding box surrounding all glyphs. Note that font coordinates use a cartesian "y up" coordinate system.
Get the bounding box of a single glyph.
Arguments
| Name | Type | Description |
| glyph | string | number | A character or 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. |
Get the bounding box around all glyphs in the font.
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. |