Generate transparent PNG with Text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
M*A*S*H 4077
Forum Newbie
Posts: 3
Joined: Mon Mar 15, 2010 11:37 am

Generate transparent PNG with Text

Post by M*A*S*H 4077 »

Hello!

How can I generate a transparent PNG with white text and a custom font without using Flash please?
I want to be able to let people add items to the menu and these are written with a special font, not websafe, and PNG files.

Thank you!
User avatar
StathisG
Forum Newbie
Posts: 14
Joined: Sat Mar 13, 2010 7:15 pm
Location: UK

Re: Generate transparent PNG with Text

Post by StathisG »

You can do it by using GD Library or a similar solution. You could also consider using a solution like Cufon for using a non-web-safe font without generating images. I never used Cufon but I think it doesn't use Flash. The most popular solution of this kind is sIFR which uses Flash.
M*A*S*H 4077
Forum Newbie
Posts: 3
Joined: Mon Mar 15, 2010 11:37 am

Re: Generate transparent PNG with Text

Post by M*A*S*H 4077 »

Thanks for your reply! Good advice.

I knew about GD2 though, my question was badly formulated, what I meant was how can I do that in GD2.

I am as far as generating a png and having text in it. What I need is how to implement a custom font for that.
User avatar
StathisG
Forum Newbie
Posts: 14
Joined: Sat Mar 13, 2010 7:15 pm
Location: UK

Re: Generate transparent PNG with Text

Post by StathisG »

Try to use imageloadfont
M*A*S*H 4077
Forum Newbie
Posts: 3
Joined: Mon Mar 15, 2010 11:37 am

Re: Generate transparent PNG with Text

Post by M*A*S*H 4077 »

Thank you!
Post Reply