Fonts installed


<?php
// Select the version number from the configeration file
preg_match('/^LIB_VERSION_NUMBER ([0-9,]+)$/m', shell_exec("convert -list configure "), $vnums);

// Seperate the numbers at the ,
$number = explode( ",", $vnums[1] );

// Format the version from 6,3,4,1 format to 06030401
$version = "";
for($i=0;$i<4;$i++)
{
$version .= str_pad( $number[$i], 2, '0', STR_PAD_LEFT );
} 

// The 'list' method used to get the fonts changed in IM v6.3.5-7
$font_list = ( $version > "06030507" ) ? "font" : "type";

// Display the version of Imagemagick, the method to read the fonts and the list of fonts
echo "<h2>IM version: ".$version." </h2>\n
<h3>Method used: convert -list $font_list</h3>\n
<hr>\n<pre>";
system("convert -list $font_list");
echo "</pre>\n<hr>";
?>

You can find which fonts are available to you in your standard installation by using the code below. ( NB: "font" replaced "type" in the latest release due to a name clash for the '-type' options list ).