Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - What would be the basics to creating a PHP-based image font?
  
User name:
Password:
Reply:
 

UserPost
Acmlm
Posts: 527/1173
I used to have FreeType on my local server, it's nice (allows to output text with TrueType fonts in GD images) ... but just plain GD will work too

All you need is a font image file like this:

(that's what status.php uses)

And then a PHP script that takes a text parameter, and outputs the appropriate section of the font image for each character ... supporting variable width and line breaks can be more work, but that's pretty much how it goes

Of course, it's all done using GD functions, which are all listed and explained at php.net ...
Darth Coby
Posts: 449/1371
You use imagecopy() to take parts from a file containing all the characters. www.php.net has a lot of information on how to use the image_GD librabry etc.
FreeDOS
Posts: 297/1657
I don't see anywhere about how FreeType can be used in PHP (although it's cool nonetheless ).

I already have a copy of the board. I didn't realise that it already had a PHP-based font! Thanks.
Xkeeper
Posts: -4776/-863
Considering I tore NUMGFX apart and crated the font-making script you see in parts ofmy layout [tagbored link, time, posts, and the pulse rank below], you just need a certain thing. GDIMAGELIBRARY or something.

Then you make your font.

Just get a copy of the board and rip up Numgfx for a starter. ;P That's what I did.
setrodox
Posts: 228/238
search about freetype. i think that's a lib you need for that(or makes it a lot easier at least).
FreeDOS
Posts: 293/1657
I don't really know where to start.

I just want basic information, to build up on my own from there.
Acmlm's Board - I2 Archive - Programming - What would be the basics to creating a PHP-based image font?


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.011 seconds.