Skip Menu |

This queue is for tickets about the Font-TTF CPAN distribution.

Report information
The Basics
Id: 42746
Status: resolved
Priority: 0/
Queue: Font-TTF

People
Owner: Nobody in particular
Requestors: pjt47 [...] cam.ac.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.47



Subject: Glyph::update_bbox doesn't like negative scales
Date: Sat, 24 Jan 2009 03:20:21 +0000
To: bug-Font-TTF [...] rt.cpan.org
From: Philip Taylor <pjt47 [...] cam.ac.uk>
Glyph::update_bbox calculates a component glyph's transformed bounding box ($gnx, $gny, $gxx, $gxy) by multiplying the glyph's bbox with the scale parameter. If the scale is negative, the min and max values are in the wrong variables, and so the later bounding box calculations break. E.g. I have a glyph with scale -1, which initially has values { "xMax" => 249, "xMin" => 33, "yMax" => 676, "yMin" => -254 } After calling update_bbox, it has values { "xMax" => 32, "xMin" => 248, "yMax" => -255, "yMin" => 675 } i.e. min > max which is wrong. This can be fixed by adding the lines: ($gnx, $gxx) = ($gxx, $gnx) if $gnx > $gxx; ($gny, $gxy) = ($gxy, $gny) if $gny > $gxy; just after the bit where it sets "($gnx, $gny, $gxx, $gxy) = ($gnx*$sxx+$gny*$syx + $comp->{'args'}[0], ...)" -- Philip Taylor pjt47@cam.ac.uk
Subject: Re: [rt.cpan.org #42746] Glyph::update_bbox doesn't like negative scales
Date: Mon, 26 Jan 2009 16:14:34 +0700
To: bug-Font-TTF [...] rt.cpan.org
From: Martin Hosken <martin_hosken [...] sil.org>
Fixed in 0.46
On Mon 26 Jan 2009 04:15:31, martin_hosken@sil.org wrote: Show quoted text
> Fixed in 0.46
On Mon Jul 23 18:01:21 2012, MICHIELB wrote: Show quoted text
> On Mon 26 Jan 2009 04:15:31, martin_hosken@sil.org wrote:
> > Fixed in 0.46
> >