mirror of
https://github.com/Intervention/image.git
synced 2025-09-03 10:53:01 +02:00
Update Font.php
When setting vertical position to "top" ImageMagic requires the "Vertical offset in pixels to the baseline of text" according to http://php.net/manual/en/imagick.annotateimage.php. Therefore we actually need the yOffset + the characterHeight
This commit is contained in:
@@ -67,7 +67,7 @@ class Font extends \Intervention\Image\AbstractFont
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'top':
|
case 'top':
|
||||||
$posy = $posy + $dimensions['textHeight'] * 0.65;
|
$posy = $posy + $dimensions['characterHeight'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user