public function setTextFont($path)
    {
        if (!is_file($path) || !is_readable($path)) {
            throw new \InvalidArgumentException(
                'Unable to load font file at ' . $path
            );
        }

        $this->textFontPath = realpath($path);

        return $this;
    }
public function setTextFont($path)
    {
        if (!is_file($path) || !is_readable($path)) {
            throw new \InvalidArgumentException(
                'Unable to load font file at ' . $path
            );
        }

        $this->textFontPath = realpath($path);

        return $this;
    }
public function setTextFont ( $ path ) { if ( ! is_file ( $ path ) || ! is_readable ( $ path ) ) { throw new \ InvalidArgumentException ( 'Unable to load font file at ' . $ path ) ; } $ this -> textFontPath = realpath ( $ path ) ; return $ this ; }
Sets the path to the font file used for rendering text overlays onto the
image.

@param string $path File system path to TTF font file to be used.

@return $this

@throws \InvalidArgumentException Thrown if the font file could not be loaded.
Sets the path to the font file used for rendering text overlays onto the image .