Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

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

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

Bug Information
Severity: Important
Broken in: 0.51
Fixed in: 0.52



Subject: the bounding box values for a string containing only spaces is strange
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 845
Download (untitled) / with headers
text/plain 845b
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"; }
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-11326-1153403068-855.20555-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 30
Fixed in the development tree.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-24938-1153824384-692.20555-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 20
fixed in Imager 0.52


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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