|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-07-11 16:08 UTC] rip at undernet dot org
<? imagettfbbox(5, 0, "x.ttf", "the text"); ?> shows : Warning: libgd was not built with TrueType font support in /www/test2.php on line 1 phpinfo(); shows : gd GD Support enabled GD Version 1.6.2 or higher FreeType Support enabled FreeType Linkage with freetype JPG Support enabled PNG Support enabled WBMP Support enabled So basically I'd say something is not working correctly. I have tried with PHP 4.0.6 on 2 FreeBSD servers I have. Here's my configure line : ./configure --enable-inline-optimization --with-apxs --enable-calendar --enable-ftp --enable-track-vars --with-gd=/usr/local --with-freetype-dir=/usr/local --with-mysql All looks ok during config & compilation of PHP. Here's what shows: checking whether to include GD support... yes checking whether to enable truetype string function in gd... no checking for freetype(2)... yes checking whether to include include FreeType 1.x support... no checking whether to include T1lib support... no checking for gdImageString16 in -lgd... (cached) yes checking for gdImagePaletteCopy in -lgd... (cached) yes checking for gdImageCreateFromPng in -lgd... (cached) yes checking for gdImageCreateFromGif in -lgd... (cached) no ... I tried with --enable-gd-native-ttf and --enable-gd-imgstrttf, it's not better. Also note that there is an error in the configure script : > cat configure | grep -i native-tt --enable-gd-native-ttf GD: Enable TrueType string function in gd" # Check whether --enable-gd-native-tt or --disable-gd-native-tt was given. It's confusing... --enable-gd-native-tt or --enable-gd-native-ttf ? Thanks, Philippe Bourcier PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
Try this short program: #include <stdio.h> #include <stdlib.h> #include "gd.h" int main (int argc, char **argv) { gdImagePtr im; im = gdImageCreate(100,100); printf("TTF returns %s\n", gdImageStringTTF(im, NULL, 1, "dummy.ttf", 12, 0, 0, 0, "test")); gdImageDestroy (im); return 0; } Then do: gcc gdttf.c -lgd -ljpeg -lpng -lfreetype -lm Try -lttf instead of -lfreetype, depending on which you have installed. If you still get the "libgd was not built with TrueType font support", then you haven't build gd with TrueType font support. If you get any other error, then something screwy is going on. --Wez.