cvs: php4 /ext/gd config.m4 gd.c gdttf.c

From: Date: Mon, 16 Oct 2000 13:50:30 +0000
Subject: cvs: php4 /ext/gd config.m4 gd.c gdttf.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2070@lists.php.net to get a copy of this message
hirokawa Mon Oct 16 06:50:30 2000 EDT Modified files: /php4/ext/gd config.m4 gd.c gdttf.c Log: added a option to use the truetype string handling function in gd.\n it is useful for japanese because the truetype string function in gd supports some japanese encodings. Index: php4/ext/gd/config.m4 diff -u php4/ext/gd/config.m4:1.39 php4/ext/gd/config.m4:1.40 --- php4/ext/gd/config.m4:1.39 Sat Oct 14 16:04:26 2000 +++ php4/ext/gd/config.m4 Mon Oct 16 06:50:30 2000 @@ -42,6 +42,18 @@ AC_CHECK_LIB(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])]) ]) +AC_MSG_CHECKING(whether to enable truetype string function in gd) +AC_ARG_ENABLE(gd-native-ttf, +[ --enable-gd-imgstrttf Enable TrueType string function in gd],[ + if test "$enableval" = "yes" ; then + AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ]) + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi +],[ + AC_MSG_RESULT(no) +]) shared=no AC_MSG_CHECKING(whether to include GD support) Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.88 php4/ext/gd/gd.c:1.89 --- php4/ext/gd/gd.c:1.88 Sat Sep 30 09:32:11 2000 +++ php4/ext/gd/gd.c Mon Oct 16 06:50:30 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.88 2000/09/30 16:32:11 dbeu Exp $ */ +/* $Id: gd.c,v 1.89 2000/10/16 13:50:30 hirokawa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -2043,7 +2043,11 @@ l = strlen(str); fontname = (unsigned char *) (*FONTNAME)->value.str.val; +#ifdef USE_GD_IMGSTRTTF + error = gdImageStringTTF(im, brect, col, fontname, ptsize, angle, x, y, str); +#else error = gdttf(im, brect, col, fontname, ptsize, angle, x, y, str); +#endif if (error) { php_error(E_WARNING, error); Index: php4/ext/gd/gdttf.c diff -u php4/ext/gd/gdttf.c:1.12 php4/ext/gd/gdttf.c:1.13 --- php4/ext/gd/gdttf.c:1.12 Sat Oct 14 16:04:26 2000 +++ php4/ext/gd/gdttf.c Mon Oct 16 06:50:30 2000 @@ -2,14 +2,14 @@ /* */ /* John Ellson ellson@lucent.com */ -/* $Id: gdttf.c,v 1.12 2000/10/14 23:04:26 markonen Exp $ */ +/* $Id: gdttf.c,v 1.13 2000/10/16 13:50:30 hirokawa Exp $ */ #if WIN32|WINNT #include "config.w32.h" #else #include "php_config.h" #endif -#if HAVE_LIBTTF +#if HAVE_LIBTTF && !defined(USE_GD_IMGSTRTTF) #include <stdio.h> #include <stdlib.h> #include <string.h>

« previous php.cvs (#2070) next »