Jump to content

[SOLVED] Fonts and PHP


Wes1890

Recommended Posts

I'm messin around with GD scripts, just bored off my ass, and I was wondering...

 

Is there a way to load truetype fonts (.ttf) into PHP GD?  I'm tired of the original font, and using GDF fonts make the font really look like crap... Does anyone have an suggestions on what I could to?

 

I'm wanting fonts like "impact", "arial", "dolphin" etc.. also bold, italic etc. and possibly different colors..

 

How would i do this? Ive searched far and wide

Link to comment
Share on other sites

^ Yeah.. i wish it was that easy. But its not

 

I got an error:

Cannot modify header information....

 

So I moved the header() to the top of the file and got this error:

The image “http://...my_image.png” cannot be displayed, because it contains errors.

 

But it does work if I use a crappy looking gdf font... so any more ideas?

Link to comment
Share on other sites

Code that's causing the problem? We're not mind readers.

 

Ken

 

No need to get "smart".. there is no code to show because I'm ASKING how I can load TrueType Fonts.

 

 

Refer to this thread to use your load your own font

 

http://us2.php.net/manual/en/function.imageloadfont.php

 

I've looked at that page thousands of times.. but since you posted it, I read it again... I searched the page for "truetype" and found out that PHP has a built in function imagettftext() that loads ttf font files... how sweet is that..

 

Thanks atlanta

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.