Jump to content

ImageMagick Letter Spacing aka Kerning


AndrewFerrara

Recommended Posts

<?php

$tag = 'somewhere.com';

$output_image = new Imagick();
$output_image->newImage(300, 34, '#000000');

$text_draw = new ImagickDraw();
$text_draw->setFont("files/calibri.ttf"); //path to font file
$text_draw->setFontSize(;
$text_draw->setFillColor("black");
$output_image->annotateImage($text_draw, 123, 34, 0, $tag);
$text_draw->setFillColor("white");
$output_image->annotateImage($text_draw, 122, 33, 0, $tag);

$output_image->setImageFormat('png');

header('Content-type: image/png');
echo $output_image;


?>

Link to comment
Share on other sites

As of release version 2.3.0RC2 the following methods not listed here are also available for use:

 

Currently unstable releases (2.3.0+):

 

* Imagick::getImageMimeType

 

* Imagick::writeimagefile

 

* Imagick::writeimagesfile

 

* Imagick::resetimagepage

 

* Imagick::setimageclipmask

 

* Imagick::getimageclipmask

 

* Imagick::animateimages

 

* Imagick::recolorimage

 

* Imagick::floodfillpaintimage

 

* Imagick::opaquepaintimage

 

* Imagick::transparentpaintimage

 

* Imagick::decipherimage

 

* Imagick::encipherimage

 

* Imagick::getimagealphachannel

 

* Imagick::getimagechanneldistortions

 

* Imagick::getimagegravity

 

* Imagick::setimagegravity

 

* Imagick::remapimage

 

* Imagick::exportimagepixels

 

* Imagick::getimagechannelkurtosis

 

* Imagick::functionimage

 

* Imagick::importImagePixels

 

* Imagick::sparseColorImage

 

* Imagick::deskewImage

 

* Imagick::segmentImage

 

* Imagickdraw::gettextkerning

 

* Imagickdraw::settextkerning

 

* Imagickdraw::gettextinterwordspacing

 

* Imagickdraw::gettextinterwordspacing

 

* ImagickPixel::getColorValueQuantum

 

* ImagickPixel::setColorValueQuamtum

 

* ImagickPixel::getIndex

 

* ImagickPixel::setIndex

 

Latest stable (2.2.2):

 

* Imagick::getImageChannelRange

 

* Imagick::setImageAlphaChannel

 

* Imagick::mergeImageLayers()

 

* Imagick::setPointsize()

 

* Imagick::getPointsize()

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.