diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php index 395a2a367807469e2d2596233e4cfab44f1dcbf0..7c38107ac18572981bc0cba5a9fa3dcf9a5106d7 100644 --- a/module/VuFind/src/VuFind/Cover/Generator.php +++ b/module/VuFind/src/VuFind/Cover/Generator.php @@ -64,6 +64,7 @@ class Generator { $this->themeTools = $themeTools; $default = array( + 'mode' => 'grid', 'authorFont' => 'DroidSerif-Bold.ttf', 'fontSize' => 7, 'lightness' => 220, @@ -434,7 +435,7 @@ class Generator * @return void */ protected function drawText($im, $text, $x, $y, - $font, $fontSize, $mcolor, $scolor, $align = null + $font, $fontSize, $mcolor, $scolor=false, $align=null ) { $txtWidth = $this->textWidth( $text, @@ -460,10 +461,12 @@ class Generator } // Generate 5 lines of text, 4 offset in a border color - imagettftext($im, $fontSize, 0, $x, $y+1, $scolor, $font, $text); - imagettftext($im, $fontSize, 0, $x, $y-1, $scolor, $font, $text); - imagettftext($im, $fontSize, 0, $x+1, $y, $scolor, $font, $text); - imagettftext($im, $fontSize, 0, $x-1, $y, $scolor, $font, $text); + if ($scolor) { + imagettftext($im, $fontSize, 0, $x, $y+1, $scolor, $font, $text); + imagettftext($im, $fontSize, 0, $x, $y-1, $scolor, $font, $text); + imagettftext($im, $fontSize, 0, $x+1, $y, $scolor, $font, $text); + imagettftext($im, $fontSize, 0, $x-1, $y, $scolor, $font, $text); + } // 1 centered in main color imagettftext($im, $fontSize, 0, $x, $y, $mcolor, $font, $text); }