Returns the horizontal offset from the selected drawing location to
the left edge of the first character drawn. If this is positive, the
first glyph is to the right of the drawing location.
The alias neg_width() is present to match the bounding_box() documentation for list context.
The alias left_bearing() is present to match font terminology.
|advance_width()||The advance width of the string, if the driver supports that, otherwise the same as end_offset.|
The distance from the right of the last glyph to the end of the advance
If the glyph overflows the right side of the advance width this value is negative.
The distance from the left-most pixel of the left-most glyph to the
right-most pixel of the right-most glyph.
Equals advance_width - left_bearing - right_bearing (and implemented that way.)
The lowest position relative to the font baseline that any character
in the font reaches in the character cell. Normally negative.
At least one font weve seen has reported a positive number for this.
|global_ascent()||The highest position relative to the font baseline that any character in the font reaches in the character cell. Normally positive.|
|descent()||The lowest position relative to the font baseline that any character in the supplied string reaches. Negative when any characters glyph reaches below the baseline.|
|ascent()||The highest position relative to the font baseline that any character in the supplied string reaches. Positive if any characters glyph reaches above the baseline.|
|font_height()||The maximum displayed height of any string using this font.|
|text_height()||The displayed height of the supplied string.|
These methods include bugs kept for backwards compatibility and shouldnt be used in new code.
total_width() The total displayed width of the string.
New code should use display_width().
This depends on end_offset(), and is limited by its backward compatibility.
end_offset pos_width The offset from the selected drawing location to the right edge of the last character drawn. Should always be positive.
You can use the alias pos_width() if you are used to the bounding_box() documentation for list context.
For backwards compatibility this method returns the maximum of the advance width and the offset of the right edge of the last glyph.
new(...) Called by Imager::Font->bounding_box() to create the object.
Doesnt reproduce the functionality that you get using the x and y parameters to Imager::Font->bounding_box(). I considered:
my ($left, $top, $right, $bottom) = $box->offset(x=>$x, y=>$y)
but this is about as clumsy as the original.
Tony Cook <firstname.lastname@example.org>
|perl v5.20.3||IMAGER::FONT::BBOX (3)||2012-09-28|