16 $text = $this->
argument(0)->required()->value();
17 $x = $this->
argument(1)->type(
'numeric')->value(0);
18 $y = $this->
argument(2)->type(
'numeric')->value(0);
19 $callback = $this->
argument(3)->type(
'closure')->value();
21 $fontclassname = sprintf(
'\Intervention\Image\%s\Font',
22 $image->getDriver()->getDriverName());
24 $font =
new $fontclassname($text);
26 if ($callback instanceof Closure) {
30 $font->applyToImage($image, $x, $y);