Rasterizer:getBoundingBox

Edit

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

NameTypeDescription
characterstring A character.

Returns

NameTypeDescription
x1number The left edge of the bounding box, in pixels.
y1number The bottom edge of the bounding box, in pixels.
x2number The right edge of the bounding box, in pixels.
y2number The top edge of the bounding box, in pixels.

Arguments

NameTypeDescription
codepointnumber A codepoint.

Returns

NameTypeDescription
x1number The left edge of the bounding box, in pixels.
y1number The bottom edge of the bounding box, in pixels.
x2number The right edge of the bounding box, in pixels.
y2number The top edge of the bounding box, in pixels.

Arguments

None

Returns

NameTypeDescription
x1number The left edge of the bounding box, in pixels.
y1number The bottom edge of the bounding box, in pixels.
x2number The right edge of the bounding box, in pixels.
y2number The top edge of the bounding box, in pixels.

See also