MyFocal
12-14-2006, 01:56 PM
I've looked everywhere, high and low, and cannot find a way to make text bold before handing it over to PHP/GD to make an image with text on it (except for the user example in PHP.net's documentation notes, which does not look good). I can create an image using PHP/GD that has regular text, but I just cant find anything that will allow me to make that text bold.
Googled
12-14-2006, 06:22 PM
Hi,
if you look in your Windows font directory (C:\Windows\Fonts, C:\WINNT\Fonts). You'll notice each font has different version to accomplish such thing ex:
Arial:
Arial.ttf
Arial Bold.ttf
Arial Italic.ttf
Arial Bold Italic.ttf
Take the one you need because there's no way with GD to do such thing.
Regards,
G
MyFocal
12-14-2006, 06:48 PM
I tried that already, thats the obvious first choice. However, "Arial Bold" with a "regular" style gives me something different than "Arial" with a "bold" style, and the latter of the two is what I want. I hate to settle for less, but if nobody knows how to bold text with GD (or if its not possible), that is what I'll have to settle for.
Ks Jeppe
12-17-2006, 08:31 PM
with the current version og GD it's not directly posible, however you can do two things:
1) use the bold ttf, however as you pointed out it's not always the nicest output as you pointed out
2) First print the text, and then print the text again 1 pixel to the left/right, this will give a bold'ish effect, however, it's not the 100% bold effect.
Those are the two methods i know off, and from what i'm able to find out, there are no better/other ways to do it atm... However there is talk of GD in future versions will expand the text features.