1
0
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:
Steven
2018-12-06 16:06:49 +01:00
committed by GitHub
parent e82d274f78
commit d5b2fcb00e

View File

@@ -67,7 +67,7 @@ class Font extends \Intervention\Image\AbstractFont
break;
case 'top':
$posy = $posy + $dimensions['textHeight'] * 0.65;
$posy = $posy + $dimensions['characterHeight'];
break;
}
}