Skip to content

Commit 2797da3

Browse files
committed
Add wrapping method
1 parent 65353f0 commit 2797da3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/FontProcessor.php

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Intervention\Image\Interfaces\SizeInterface;
1515
use Jcupitt\Vips\Align;
1616
use Jcupitt\Vips\Image as VipsImage;
17+
use Jcupitt\Vips\TextWrap;
1718

1819
class FontProcessor extends AbstractFontProcessor
1920
{
@@ -61,6 +62,7 @@ public function textToVipsImage(
6162
'dpi' => 72,
6263
'rgba' => true,
6364
'width' => $font->wrapWidth(),
65+
'wrap' => TextWrap::WORD,
6466
'align' => match ($font->alignment()) {
6567
'center',
6668
'middle' => Align::CENTRE,

0 commit comments

Comments
 (0)