Is it possible to make a script like this??...

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

tdv2
New php-forum User
New php-forum User
Posts: 9
Joined: Wed Jul 16, 2003 5:58 pm

Is it possible to make a script like this??...

Postby tdv2 » Wed Jul 16, 2003 6:02 pm

I want to know if it is possible to make a php script where when you type a paragraph it shows something else.

What I mean is if i type this:

Hello and good day

I want it to show images of the letters instead of having to embed the font.

Its sort of like a graphical counter except in paragraph writing form.

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Wed Jul 16, 2003 6:24 pm

While this is generally a bad idea for entire paragraphs of text, it's relatively simple to do if you have the GD library installed. Though if you intend to do anything more complex than a line of text here and there, I recommend you download one of the many available image manipulation classes.

tdv2
New php-forum User
New php-forum User
Posts: 9
Joined: Wed Jul 16, 2003 5:58 pm

Postby tdv2 » Wed Jul 16, 2003 7:56 pm

huh?

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Thu Jul 17, 2003 7:52 am

tdv2 wrote:huh?


Follow the freakin' GD link and read it thoroughly. Then come back with specific questions. "huh?" is not a reasonable response.

tdv2
New php-forum User
New php-forum User
Posts: 9
Joined: Wed Jul 16, 2003 5:58 pm

Postby tdv2 » Thu Jul 17, 2003 1:05 pm

dude i dont even know php im trying to find a script or somethin that does that.

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Thu Jul 17, 2003 1:15 pm

8O

wowser - I just typed 'image manipulation class' into good old google and guess who is at number one? - well, via resourceindex

as to the question:

you would also need the truetype libraries compiled in the GD build (unless you just want the 5 default fonts - tnr, arial etc) - best ones are from freetype.org

useful functions to check in the manual

imagestring() - using default fonts
imagettfbbox() - get bounding area
imagettftext() - write string

try a simple .ttf image write first (bound to be one at php.net) to check whether you can access user font files properly - after that the function coding should be straight forward enough.

mutters 'wowser' again.


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 2 guests