mirror of
https://github.com/Intervention/image.git
synced 2025-09-02 18:32:56 +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;
|
||||
|
||||
case 'top':
|
||||
$posy = $posy + $dimensions['textHeight'] * 0.65;
|
||||
$posy = $posy + $dimensions['characterHeight'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user