Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of LTjake (4001)

Thursday February 19, 2004
08:11 AM


[ #17489 ]

I recently emailed Lincoln asking about PHP's imageloadfont(). Basically, I was wondering why Perl's GD didn't have something similar. The structure of the fonts loaded by said function are pretty simple:

byte 00-03 int number of characters in the font
byte 04-07 int value of first character in the font (often 32 for space)
byte 08-11 int pixel width of each character
byte 12-15 int pixel height of each character
byte 16-   char array with character data, one byte per pixel in each character, for a
           total of (nchars*width*height) bytes.

This is essentially the struct used to for all internal GD Fonts (e.g. GD::Font->Small).

Within a couple days Lincoln had sent me a new version of GD with this support which worked flawlessly. Awesome! He also plans to write support for X11 bitmap fonts -- Bonus.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.