<?php
/*************************************************************
* This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com
* Feel free to distribute and modify code, but keep reference to its creator
*
* Image Font class can generate text taking images of symbols as font.
* You can provide path to directory with images, using symbols as file names,
* or you can provide and array with symbols as keys and paths to images as values.
* It is also possible to set a maximal width restriction and alignment of text.
*
* For more information, examples and online documentation visit:
* http://webcodingeasy.com/PHP-classes/Generate-text-using-images-as-letters
**************************************************************/
if(isset($_GET["type"]))
{
include("image_font.php");
$imf = new image_font("./digits/");
switch($_GET["type"])
{
case "right":
$imf->apply_font("324324 5435 3123123 436554645
234324 43545345 3435345
345345345 345345345
345345345345345 34534534534534
345345345345 34435345
443534534534435345345", "right");
break;
case "center":
$imf->apply_font("324324 5435 3123123 436554645
234324 43545345 3435345
345345345 345345345
345345345345345 34534534534534
345345345345 34435345
443534534534435345345", "center");
break;
case "justify":
$imf->apply_font("324324 5435 3123123 436554645
234324 43545345 3435345
345345345 345345345
345345345345345 34534534534534
345345345345 34435345
443534534534435345345", "justify");
break;
case "max_width":
$imf->apply_font("324324 5435 3123123 436554645
234324 43545345 3435345
345345345 345345345
345345345345345 34534534534534
345345345345 34435345
443534534534435345345", "left", 500);
break;
default:
$imf->apply_font("324324 5435 3123123 436554645
234324 43545345 3435345
345345345 345345345
345345345345345 34534534534534
345345345345 34435345
443534534534435345345");
break;
}
$imf->output();
}
?>
|