problem with sizew parameter
problem with handling of canon option to bounding_box
}
bbox[0] = start;
- bbox[1] = handle->face->size->metrics.ascender / 64;
- bbox[2] = width + start;
- bbox[3] = handle->face->size->metrics.descender / 64;
+ bbox[1] = handle->face->size->metrics.descender / 64;
+ bbox[2] = width;
+ bbox[3] = handle->face->size->metrics.ascender / 64;
bbox[4] = descent;
bbox[5] = ascent;
return;
}
$input{size} ||= $self->{size};
+ $input{sizew} = _first($input{sizew}, $self->{sizew}, 0);
my @box = $self->_bounding_box(%input);
$box[3]=$input{'y'}-$gdescent; # bottom = base - descent (Y is down, descent is negative)
$box[0]+=$input{'x'};
$box[2]+=$input{'x'};
- } elsif (exists $input{'canon'}) {
+ } elsif ($input{'canon'}) {
$box[3]-=$box[1]; # make it cannoical (ie (0,0) - (width, height))
$box[2]-=$box[0];
}
sub _bounding_box {
my $self = shift;
my %input = @_;
+
return i_ft2_bbox($self->{id}, $input{size}, $input{sizew}, $input{string});
}