freetypy.BBox¶
-
class
freetypy.BBox¶ An outline’s bounding box.
The bounding box is specified with the coordinates of the lower left and the upper right corner. In PostScript, those values are often called
(llx, lly)and(urx, ury), respectively.If
y_minis negative, this value gives the glyph’s descender. Otherwise, the glyph doesn’t descend below the baseline. Similarly, ify_maxis positive, this value gives the glyph’s ascender.x_mingives the horizontal distance from the glyph’s origin to the left edge of the glyph’s bounding box. Ifx_minis negative, the glyph extends to the left of the origin.BBoxalso works as a Python sequence, so it is easy to do:x_min, y_min, x_max, y_max = bbox
Attributes
ascentThe height of the bounding box above the baseline. depthThe depth of the bounding box below the baseline. heightThe height of the bounding box ( y_max - y_min).widthThe width of the bounding box ( x_max - x_min).x_maxThe horizontal maximum (right-most). x_minThe horizontal minimum (left-most). y_maxThe vertical maximum (top-most). y_minThe vertical minimum (bottom-most).