This queue is for tickets about the Imager CPAN distribution.

Maintainer(s)' notes

Tickets for Imager are now on github at https://github.com/tonycoz/imager

Report information
The Basics
Id:
20555
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
TONYC [...] cpan.org
Requestors:
TONYC [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.51
Fixed in:
0.52



Subject: the bounding box values for a string containing only spaces is strange
Using the T1 with some fonts gives strange results for the values derived from T1_GetStringBBox when the string is empty, or for some fonts when the string contains only spaces. Also, if the string has spaces at the beginning or end the spaces are not included in the bbox, which may not be a bug, but is inconsistent with the ft2 driver and probably the tt driver. use Imager; use strict; use warnings; my $font = "hll_____.pfb"; my $ifont = Imager::Font->new(file => $font, size => 36) or die "$font: $!"; foreach my $string ("", " ", " ", "a", "a ", " a") { print qq{"$string"\t}; my $bbox = $ifont->bounding_box(string => $string); print join ", ", ($bbox->font_height, $bbox->total_width, $bbox->start_offset, $bbox->global_descent); print "\n"; }
Fixed in the development tree.
fixed in Imager 0.52


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.