PHP | ImagickDraw setTextKerning() Function Last Updated : 17 Dec, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The ImagickDraw::setTextKerning() function is an inbuilt function in PHP which is used to set the text kerning which defines the spacing between the text. Syntax: bool ImagickDraw::setTextKerning( float $kerning ) Parameters: This function accepts a single parameter $kerning which holds the text kerning. Return Value: This function returns TRUE on success. Exceptions: This function throws ImagickException on error. Below given programs illustrate the ImagickDraw::setTextKerning() function in PHP: Program 1: php <?php // Create a new ImagickDraw object $draw = new ImagickDraw(); // Set the text Kerning $draw->setTextKerning(10); // Get the text Kerning $textKerning = $draw->getTextKerning(); echo $textKerning; ?> Output: 10 Program 2: php <?php // Create a new imagick object $imagick = new Imagick(); // Create a image on imagick object $imagick->newImage(800, 250, 'black'); // Create a new ImagickDraw object $draw = new ImagickDraw(); // Set the fill color $draw->setFillColor('red'); // Set the text kerning $draw->setTextKerning(30); // Set the font size $draw->setFontSize(50); // Annotate a text $draw->annotation(50, 200, 'GeeksforGeeks'); // Render the draw commands $imagick->drawImage($draw); // Show the output $imagick->setImageFormat('png'); header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagickdraw.settextkerning.php Comment More infoAdvertise with us Next Article PHP | ImagickDraw setTextInterlineSpacing() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | ImagickDraw setTextEncoding() Function The ImagickDraw::setTextEncoding() function is an inbuilt function in PHP which is used to set the code set used for text annotations. These code sets tell the computer how to interpret raw zeroes and ones into real characters. Usually, they produce the same text but use different code sets. Syntax: 2 min read PHP | GmagickDraw settextencoding() function The GmagickDraw::settextencoding() function is an inbuilt function in PHP which is used to set the code set used for text annotations. These code sets tell the computer how to interpret raw zeroes and ones into real characters. Usually, they produce the same text but use different code sets. Syntax: 2 min read PHP | ImagickDraw setTextDecoration() Function The ImagickDraw::setTextDecoration() function is an inbuilt function in PHP which is used to specify the decoration to be applied when annotating with text. Syntax: bool ImagickDraw::setTextDecoration( $decoration ) Parameters: This function accepts a single parameter $decoration which is used to ho 2 min read PHP | ImagickDraw setTextInterlineSpacing() Function The ImagickDraw::setTextInterlineSpacing() function is an inbuilt function in PHP which is used to set the text interline spacing. Syntax: bool ImagickDraw::setTextInterlineSpacing( float $spacing ) Parameters: This function accepts a single parameter $spacing which holds the text interline spacing. 1 min read PHP | GmagickDraw settextdecoration() Function The GmagickDraw ::settextdecoration() function is an inbuilt function in PHP that is used to specify the decoration to be applied when annotating with text. Syntax: public GmagickDraw::settextdecoration( $decoration ) : GmagickDraw Parameters: This function accepts a single parameter $decoration wh 2 min read PHP | ImagickDraw setTextAntialias() Function The ImagickDraw::setTextAntialias() function is an inbuilt function in PHP which is used to control whether the text is antialiased. The text is antialiased by default. Syntax: bool ImagickDraw::setTextAntialias( $antiAlias ) Parameters: This function accepts a single parameter $antiAlias which is u 2 min read Like