PHP4 + FreeType -- segfault?
| From: | (Sean Straw / PSE) | Date: | Mon, 04 Dec 2000 17:30:03 +0000 |
| Subject: | PHP4 + FreeType -- segfault? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-28602@lists.php.net to get a copy of this message | ||
Server: Apache/1.3.14 Ben-SSL/1.42 (Unix) PHP/4.0.3pl1
Optional libraries: GD, PDFLib, jpeg, png, tiff, mysql, ttf
I'm having troubles with TTF library calls (FreeType 1.3.1)
They seemed to compile and install okay (AND I recompiled PHP to include them - phpinfo reports), and the server restarts successfully.
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with TTF library
GIF Support enabled
PNG Support enabled
JPG Support enabled
WBMP Support enabled
ImageTTFBBox() results in expected values (most importantly, it doesn't crash - thus I know the font file is readable and file is being opened an interpreted by the freetype library).
ImageString sort of works -- it produces rather small output, but seems indifferent from font to font (unless I specify a number for a static font), while ImageTTFText causes the httpd to close outright:
[Sun Dec 3 23:45:23 2000] [notice] child pid 10555 exit signal Segmentation fault (11)
This results in the client getting the "Document contains no data" type of error message, which isn't surprising considering the server daemon closed down.
If I deliberatley specify a non-existant font filename (or a file which is not a font), I get an error displayed by PHP. But woe is me if it IS a font. FTR, I'm initially dealing with the common fonts, such as times and arial, so I don't suspect the TTF files.
Absolute path IS being specified to the TTF file.
At first, I assumed that FreeType might actually require X in order to render font images, but the README for it clearly states otherwise (I run my servers in console mode only).
Also, I didn't spot this in the documentation - but just how does one go about specifying a subfont in a TTF library, or does PHP4 not allow for this?
Pointers anyone?
---
Please DO NOT carbon me on list replies. I'll get my copy from the list.
Sean B. Straw / Professional Software Engineering
Post Box 2395 / San Rafael, CA 94912-2395