Location: PHPKode > scripts > TTF Info > ttf-info/classTTFInfo-sample.php5
<?
	include("classTTFInfo.php5");

	# This sample detects the ttf-information of the mentioned ttf-files (path relatively to the script):
	$ttf_font_filename="fonts/georgia.ttf";
	$ttf = new ttf;
	$ttf_info=$ttf->get_friendly_ttf_name($ttf_font_filename);

	echo "<table border=\"\1\">";
	echo "<tr><td colspan=\"2\"><b>$ttf_font_filename</b></td></tr>";
	echo "<tr><td>fontfamily</td><td>".$ttf_info["fontfamily"]."</td></tr>";
	echo "<tr><td>fontsubfamily</td><td>".$ttf_info["fontsubfamily"]."</td></tr>";
	echo "<tr><td>fullfontname</td><td>".$ttf_info["fullfontname"]."</td></tr>";
	echo "<tr><td>copyright</td><td>".$ttf_info["copyright"]."</td></tr>";
	echo "</table><br>";

?>
Return current item: TTF Info