diff options
author | cos <cos> | 2015-01-14 12:38:48 +0100 |
---|---|---|
committer | cos <cos> | 2015-01-14 12:38:48 +0100 |
commit | 98357a3ae353069e33f2c0d6b3ec192c46528f95 (patch) | |
tree | da0cebf1c5a39a304208e57513a79df0594a6745 | |
parent | 56cc3091ed3074c6deca5345e5ce775c6077bf13 (diff) | |
download | mat-98357a3ae353069e33f2c0d6b3ec192c46528f95.zip |
Modify border to make text fit label better. Needs to be re-done propely.
-rwxr-xr-x | mat | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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'}) { |