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

From: Date: Sat, 14 Oct 2000 23:04:26 +0000
Subject: cvs: php4 /ext/gd config.m4 gdttf.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2055@lists.php.net to get a copy of this message
markonen Sat Oct 14 16:04:26 2000 EDT Modified files: /php4/ext/gd config.m4 gdttf.c Log: We don't support FreeType 2 - let's stop pretending we do Index: php4/ext/gd/config.m4 diff -u php4/ext/gd/config.m4:1.38 php4/ext/gd/config.m4:1.39 --- php4/ext/gd/config.m4:1.38 Sat Oct 14 15:48:38 2000 +++ php4/ext/gd/config.m4 Sat Oct 14 16:04:26 2000 @@ -151,7 +151,7 @@ if test "$with_gd" != "no" && test "$ac_cv_lib_gd_gdImageLine" = "yes"; then CHECK_TTF="yes" AC_ARG_WITH(ttf, - [ --with-ttf[=DIR] GD: Include Freetype support],[ + [ --with-ttf[=DIR] GD: Include FreeType 1.x support],[ if test $withval = "no" ; then CHECK_TTF="" else @@ -159,12 +159,9 @@ fi ]) - AC_MSG_CHECKING(whether to include ttf support) + AC_MSG_CHECKING(whether to include FreeType 1.x support) if test -n "$CHECK_TTF" ; then for i in /usr /usr/local "$CHECK_TTF" ; do - if test -f "$i/include/truetype.h" ; then - FREETYPE_DIR="$i" - fi if test -f "$i/include/freetype.h" ; then TTF_DIR="$i" unset TTF_INC_DIR @@ -174,33 +171,21 @@ TTF_INC_DIR="$i/include/freetype" fi done - if test -n "$FREETYPE_DIR" ; then - AC_DEFINE(HAVE_LIBFREETYPE,1,[ ]) + if test -n "$TTF_DIR" ; then + AC_DEFINE(HAVE_LIBTTF,1,[ ]) if test "$shared" = "yes"; then - GD_LIBS="$GD_LIBS -lfreetype" - GD_LFLAGS="$GD_LFLAGS -L$FREETYPE_DIR/lib" - else - AC_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE_DIR/lib) + GD_LIBS="$GD_LIBS -lttf" + GD_LFLAGS="$GD_LFLAGS -L$TTF_DIR/lib" + else + AC_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/lib) + fi + if test -z "$TTF_INC_DIR"; then + TTF_INC_DIR="$TTF_DIR/include" fi - AC_ADD_INCLUDE($FREETYPE_DIR/include) + AC_ADD_INCLUDE($TTF_INC_DIR) AC_MSG_RESULT(yes) else - if test -n "$TTF_DIR" ; then - AC_DEFINE(HAVE_LIBTTF,1,[ ]) - if test "$shared" = "yes"; then - GD_LIBS="$GD_LIBS -lttf" - GD_LFLAGS="$GD_LFLAGS -L$TTF_DIR/lib" - else - AC_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/lib) - fi - if test -z "$TTF_INC_DIR"; then - TTF_INC_DIR="$TTF_DIR/include" - fi - AC_ADD_INCLUDE($TTF_INC_DIR) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi + AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) @@ -247,21 +232,6 @@ GD_INCLUDE="/usr/include/gd" fi - AC_MSG_CHECKING(whether to enable 4bit antialias hack with FreeType2) - AC_ARG_ENABLE(freetype-4bit-antialias-hack, - [ --enable-freetype-4bit-antialias-hack - GD: Include support for FreeType2 (experimental). - ],[ - if test "$enableval" = "yes" ; then - AC_DEFINE(FREETYPE_4BIT_ANTIALIAS_HACK, 1, [ ]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - ],[ - AC_MSG_RESULT(no) - ]) - AC_EXPAND_PATH($GD_INCLUDE, GD_INCLUDE) AC_ADD_INCLUDE($GD_INCLUDE) PHP_EXTENSION(gd, $shared) Index: php4/ext/gd/gdttf.c diff -u php4/ext/gd/gdttf.c:1.11 php4/ext/gd/gdttf.c:1.12 --- php4/ext/gd/gdttf.c:1.11 Fri Jul 7 07:00:50 2000 +++ php4/ext/gd/gdttf.c Sat Oct 14 16:04:26 2000 @@ -2,14 +2,14 @@ /* */ /* John Ellson ellson@lucent.com */ -/* $Id: gdttf.c,v 1.11 2000/07/07 14:00:50 jah Exp $ */ +/* $Id: gdttf.c,v 1.12 2000/10/14 23:04:26 markonen Exp $ */ #if WIN32|WINNT #include "config.w32.h" #else #include "php_config.h" #endif -#if HAVE_LIBTTF|HAVE_LIBFREETYPE +#if HAVE_LIBTTF #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -17,11 +17,7 @@ #include <gd.h> #include "gdttf.h" #include "gdcache.h" -#if HAVE_LIBFREETYPE -#include <truetype.h> -#else #include <freetype.h> -#endif #ifndef HAVE_GDIMAGECOLORRESOLVE extern int gdImageColorResolve(gdImagePtr, int, int, int); @@ -39,11 +35,7 @@ #define BITMAPCACHESIZE 8 /* number of antialias color lookups cached */ -#if FREETYPE_4BIT_ANTIALIAS_HACK -#define TWEENCOLORCACHESIZE 128 -#else #define TWEENCOLORCACHESIZE 32 -#endif /* ptsize below which anti-aliasing is ineffective */ #define MINANTIALIASPTSIZE 0 @@ -52,11 +44,7 @@ #define RESOLUTION 72 /* Number of colors used for anti-aliasing */ -#if FREETYPE_4BIT_ANTIALIAS_HACK -#define NUMCOLORS 16 -#else #define NUMCOLORS 4 -#endif /* Line separation as a factor of font height. No space between if LINESPACE = 1.00 @@ -355,11 +343,7 @@ a->cos_a = cos(a->angle); a->engine = b->engine; if ((err = TT_Open_Face(*b->engine, a->fontname, &a->face))) { -#if HAVE_LIBFREETYPE - if (err == 0x008) { /* The FT2 oldapi is missing this code */ -#else if (err == TT_Err_Could_Not_Open_File) { -#endif *error = "Could not find/open font"; } else { @@ -866,7 +850,7 @@ return (char *)NULL; } -#endif /* HAVE_LIBTTF|HAVE_LIBFREETYPE */ +#endif /* HAVE_LIBTTF */ /* * Local variables:

« previous php.cvs (#2055) next »