cvs: /php3 ChangeLog acconfig.h config.h.in configure.in /php3/functions gdttf.c
| From: | markonen | Date: | Mon, 12 Jul 1999 15:13:46 +0000 |
| Subject: | cvs: /php3 ChangeLog acconfig.h config.h.in configure.in /php3/functions gdttf.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8407@lists.php.net to get a copy of this message | ||
markonen Mon Jul 12 15:13:46 1999 EDT
Modified files:
/php3 ChangeLog acconfig.h config.h.in configure.in
/php3/functions gdttf.c
Log:
Simple hack to allow 4bit antialiasing with a (simply) hacked FreeType 2
Index: php3/ChangeLog
diff -u php3/ChangeLog:1.723 php3/ChangeLog:1.724
--- php3/ChangeLog:1.723 Mon Jul 12 14:36:53 1999
+++ php3/ChangeLog Mon Jul 12 15:13:45 1999
@@ -2,6 +2,7 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
??, Version 3.0.12
+- A hack to allow 4bit antialiasing by modifying Freetype2 source (markonen)
- Initial Freetype2 support. You need to use the 1.2 compatibility
API <truetype.h> for now.. (markonen)
- added strtotime() function from <nsayer@quack.kfu.com> with some
Index: php3/acconfig.h
diff -u php3/acconfig.h:1.104 php3/acconfig.h:1.105
--- php3/acconfig.h:1.104 Mon Jul 12 14:34:15 1999
+++ php3/acconfig.h Mon Jul 12 15:13:45 1999
@@ -350,4 +350,6 @@
#define HAVE_LIBTTF 0
#define HAVE_LIBFREETYPE 0
+#define FREETYPE_4BIT_ANTIALIAS_HACK 0
+
#define HAVE_POSIX 0
Index: php3/config.h.in
diff -u php3/config.h.in:1.181 php3/config.h.in:1.182
--- php3/config.h.in:1.181 Mon Jul 12 14:34:15 1999
+++ php3/config.h.in Mon Jul 12 15:13:45 1999
@@ -388,6 +388,8 @@
#define HAVE_LIBTTF 0
#define HAVE_LIBFREETYPE 0
+#define FREETYPE_4BIT_ANTIALIAS_HACK 0
+
#define HAVE_POSIX 0
/* The number of bytes in a int. */
Index: php3/configure.in
diff -u php3/configure.in:1.436 php3/configure.in:1.437
--- php3/configure.in:1.436 Mon Jul 12 14:34:15 1999
+++ php3/configure.in Mon Jul 12 15:13:45 1999
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.436 1999/07/12 18:34:15 markonen Exp $
+dnl $Id: configure.in,v 1.437 1999/07/12 19:13:45 markonen Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(main.c)
@@ -800,9 +800,21 @@
else
AC_MSG_RESULT(no)
fi
-fi
+ AC_MSG_CHECKING(whether to enable 4bit antialias hack with FreeType2)
+ AC_ARG_ENABLE(freetype-4bit-antialias-hack,
+ [ --enable-freetype-4bit-antialias-hack For the crazy with FreeType2.],[
+ 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)
+ ])
+fi
AC_MSG_CHECKING(whether to enable t1lib support with GD)
AC_ARG_ENABLE(t1lib,
Index: php3/functions/gdttf.c
diff -u php3/functions/gdttf.c:1.20 php3/functions/gdttf.c:1.21
--- php3/functions/gdttf.c:1.20 Mon Jul 12 14:34:15 1999
+++ php3/functions/gdttf.c Mon Jul 12 15:13:46 1999
@@ -2,7 +2,7 @@
/* */
/* John Ellson ellson@lucent.com */
-/* $Id: gdttf.c,v 1.20 1999/07/12 18:34:15 markonen Exp $ */
+/* $Id: gdttf.c,v 1.21 1999/07/12 19:13:46 markonen Exp $ */
#if WIN32|WINNT
#include "config.w32.h"
@@ -35,7 +35,11 @@
#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
@@ -44,7 +48,11 @@
#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