buildInitial(); $x = $this->width / 2; $y = $this->height / 2; $driver = $this->driver === 'gd' ? new GdDriver : new ImagickDriver; $this->image = ImageManager::usingDriver($driver)->createImage($this->width, $this->height); $this->createShape(); if (empty($this->initials)) { return $this; } $this->image->text( $this->initials, (int) $x, (int) $y, function (FontFactory $font) { $font->filepath($this->font); $font->size($this->fontSize); $font->color($this->foreground); $font->align('center', 'center'); } ); return $this; } }