Skip to content

Commit 02badab

Browse files
committed
Bug #18507 SVG output of multi-line axis labels is screwed up.
1 parent 9d9eb59 commit 02badab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Image/Canvas/SVG.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,8 @@ function addText($params)
740740

741741
$attrs = (isset($params['attrs']) && is_array($params['attrs'])) ? $this->_getAttributes($params['attrs']) : null;
742742

743-
$textHeight = $this->textHeight($text);
743+
$lines = explode("\n", $text);
744+
$textHeight = $this->textHeight($lines[0]);
744745

745746
if (!is_array($alignment)) {
746747
$alignment = array('vertical' => 'top', 'horizontal' => 'left');

0 commit comments

Comments
 (0)