Font to Image Maker

8 posts Page 1 of 1
Contributors
User avatar
alex6848
VIP - Donator
VIP - Donator
Posts: 201
Joined: Sat Jan 16, 2010 10:26 pm

Font to Image Maker
alex6848
does anybody know a font to image php script that really works and is easy? If you could post it that would be awesome!

Thanks!
Alex
Free Facebook Page Likes - http://fbliker.tk/?ref=gillis
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Font to Image Maker
mandai
Try:
Code: Select all
<?php
$image = imagecreate(75, 20);
imagecolorallocate($image, 255, 255, 255); //fill background as white
$textcolour = imagecolorallocate($image, 0, 0, 0); //black font

imagestring($image, 4, 0, 0, "your text", $textcolour);
header("Content-type: image/png"); //content type
imagepng($image); //output
imagedestroy($image); //dispose
?>
User avatar
alex6848
VIP - Donator
VIP - Donator
Posts: 201
Joined: Sat Jan 16, 2010 10:26 pm

Re: Font to Image Maker
alex6848
thanks madia!
in the mean time I got my website tech46.net hooked up with one.
you should take a look :D

could you help me with one thing though. I have about 5-7 fonts in a folder called fonts (this part is in html) but for some reason I can't add new fonts to a code. the index.php reads entier_field.php and entier field has a list box to select a font which then index reads (in php) to find it in the fonts folder and add ".ttf" to the end of the font.

maybe you could test out my website and see what I'm talking about. http://www.tech46.net

pm me I you need more info :D

Thanks,
Alex
Free Facebook Page Likes - http://fbliker.tk/?ref=gillis
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Font to Image Maker
mandai
I'm not sure what you are asking for, that site seems to work fine with the different font options.
User avatar
alex6848
VIP - Donator
VIP - Donator
Posts: 201
Joined: Sat Jan 16, 2010 10:26 pm

Re: Font to Image Maker
alex6848
sorry. I'm trying to add new fonts into the fonts folder and link them in a list box (which you already saw) for example try to select "Neo Geo" on s.tech46.net my mirror website. mabey seeing the error will help.
Free Facebook Page Likes - http://fbliker.tk/?ref=gillis
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Font to Image Maker
mandai
You could make a PHP script to list the files
Code: Select all
<?php
//This goes just under your select tag
$sub = scandir("fonts");
for ($i = 0; $i < count($sub); $i++)
{
     if (is_file($sub[$i]))
     {
         echo "<option value=\"$sub[$i]\">$sub[$i]</option>\n";
     }
}
?>
User avatar
alex6848
VIP - Donator
VIP - Donator
Posts: 201
Joined: Sat Jan 16, 2010 10:26 pm

Re: Font to Image Maker
alex6848
i don't get it?
do you know what I could do to fix the error on that page other than that
Free Facebook Page Likes - http://fbliker.tk/?ref=gillis
User avatar
alex6848
VIP - Donator
VIP - Donator
Posts: 201
Joined: Sat Jan 16, 2010 10:26 pm

Re: Font to Image Maker
alex6848
I finally fixed the problem - my ftp program wasnt uploading the files probalrly

Everything is all fixed now thanks for all your help! :)
Free Facebook Page Likes - http://fbliker.tk/?ref=gillis
8 posts Page 1 of 1
Return to “Help & Support”