From 98357a3ae353069e33f2c0d6b3ec192c46528f95 Mon Sep 17 00:00:00 2001 From: cos Date: Wed, 14 Jan 2015 12:38:48 +0100 Subject: Modify border to make text fit label better. Needs to be re-done propely. --- mat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mat') diff --git a/mat b/mat index 8e86cc2..c480a6d 100755 --- a/mat +++ b/mat @@ -270,7 +270,7 @@ sub print_label { my $fontname = "/usr/share/fonts/truetype/freefont/FreeSans.ttf"; my $fontsize = 15; my $x_border = 40; - my $y_border = 40; + my $y_border = 15; my $iconv = Text::Iconv->new("UTF-8", "ISO8859-1"); my $row0 = $Config{'label_name'}; @@ -339,7 +339,7 @@ sub print_label { $label->copyResized($idbarcode_image, $x_border, $y_border, 0, 0, $idbarcode_image->width() * 5, $idbarcode_image->height() * 5, $idbarcode_image->width(), $idbarcode_image->height()); $label->copyResized($idtext, $x_border * 3, $y_border + $idbarcode_image->height() * 5, 0, 0, $idtext->width() * 2, $idtext->height() * 2, $idtext->width(), $idtext->height()); - $label->copyResized($text0_image, $label->width() - $x_border - 2 * $fontsize, $y_border, 0, 0, $bounds0[1] * 1, $bounds0[2], $bounds0[1], $bounds0[2]); + $label->copyResized($text0_image, $label->width() - $x_border - 2 * $fontsize, $y_border * 2, 0, 0, $bounds0[1] * 1, $bounds0[2], $bounds0[1], $bounds0[2]); $label->copyResized($text1_image, $label->width() - $x_border - 4 * $fontsize, $y_border, 0, 0, $bounds1[1] * 1, $bounds1[2], $bounds1[1], $bounds1[2]); $label->copyResized($text2_image, $label->width() - $x_border - 6 * $fontsize, $y_border, 0, 0, $bounds2[1] * 1, $bounds2[2], $bounds2[1], $bounds2[2]); if ($ENV{'PRINT_WITH_LOGO'}) { -- cgit v1.2.3