[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force Xft SVN commit: r108 - vendor



Author: branden
Date: 2005-03-29 17:39:12 -0500 (Tue, 29 Mar 2005)
New Revision: 108

Modified:
   vendor/ChangeLog
   vendor/Makefile.am
   vendor/Makefile.in
   vendor/Xft.3
   vendor/Xft.h
   vendor/configure
   vendor/configure.ac
   vendor/xftfreetype.c
Log:
Update vendor branch to libXft 2.1.6.


Modified: vendor/ChangeLog
===================================================================
--- vendor/ChangeLog	2005-03-29 22:38:00 UTC (rev 107)
+++ vendor/ChangeLog	2005-03-29 22:39:12 UTC (rev 108)
@@ -1,3 +1,19 @@
+2004-03-22  Keith Packard  <keithp@keithp.com>
+
+	* Makefile.am:
+	* Xft.h:
+	* configure.ac:
+	Bump version number to 2.1.6
+	Bump .so version to 2.1.2
+
+2004-03-19  Keith Packard  <keithp@keithp.com>
+
+	* xftfreetype.c: (_XftSetFace):
+	Rework bitmap instance selection code to make it look prettier.
+	Also, try both y_ppem/x_ppem *and* width/height to see
+	which values will actually manage to load a font -- FreeType 2.1.7
+	has broken bdf/pcf loaders.
+
 2004-03-11  Keith Packard  <keithp@keithp.com>
 
 	* Xft.h:

Modified: vendor/Makefile.am
===================================================================
--- vendor/Makefile.am	2005-03-29 22:38:00 UTC (rev 107)
+++ vendor/Makefile.am	2005-03-29 22:39:12 UTC (rev 108)
@@ -1,5 +1,5 @@
 # 
-#  $Id: Makefile.am,v 1.9 2004/01/15 04:32:29 harold Exp $
+#  $Id: Makefile.am,v 1.10 2004/03/22 15:02:59 keithp Exp $
 # 
 #  Copyright © 2003 Keith Packard, Noah Levitt
 # 
@@ -52,7 +52,7 @@
 libXft_la_LIBADD = @FONTCONFIG_LIBS@ @FREETYPE_LIBS@ @XRENDER_LIBS@
 
 # -version-number requires libtool >= 1.5
-libXft_la_LDFLAGS = -version-number 2:1:1 -no-undefined
+libXft_la_LDFLAGS = -version-number 2:1:2 -no-undefined
 
 libXftincludedir = $(includedir)/X11/Xft
 libXftinclude_HEADERS = Xft.h XftCompat.h 

Modified: vendor/Makefile.in
===================================================================
--- vendor/Makefile.in	2005-03-29 22:38:00 UTC (rev 107)
+++ vendor/Makefile.in	2005-03-29 22:39:12 UTC (rev 108)
@@ -15,7 +15,7 @@
 @SET_MAKE@
 
 # 
-#  $Id: Makefile.am,v 1.9 2004/01/15 04:32:29 harold Exp $
+#  $Id: Makefile.am,v 1.10 2004/03/22 15:02:59 keithp Exp $
 # 
 #  Copyright © 2003 Keith Packard, Noah Levitt
 # 
@@ -196,7 +196,7 @@
 libXft_la_LIBADD = @FONTCONFIG_LIBS@ @FREETYPE_LIBS@ @XRENDER_LIBS@
 
 # -version-number requires libtool >= 1.5
-libXft_la_LDFLAGS = -version-number 2:1:1 -no-undefined
+libXft_la_LDFLAGS = -version-number 2:1:2 -no-undefined
 
 libXftincludedir = $(includedir)/X11/Xft
 libXftinclude_HEADERS = Xft.h XftCompat.h 

Modified: vendor/Xft.3
===================================================================
--- vendor/Xft.3	2005-03-29 22:38:00 UTC (rev 107)
+++ vendor/Xft.3	2005-03-29 22:39:12 UTC (rev 108)
@@ -26,7 +26,7 @@
 .ns
 .TP \\$1
 ..
-.TH XFT 3 "Version 2.1.5" "Xft"
+.TH XFT 3 "Version 2.1.6" "Xft"
 
 .SH NAME
  Xft \- X FreeType interface library

Modified: vendor/Xft.h
===================================================================
--- vendor/Xft.h	2005-03-29 22:38:00 UTC (rev 107)
+++ vendor/Xft.h	2005-03-29 22:39:12 UTC (rev 108)
@@ -1,5 +1,5 @@
 /*
- * $Id: Xft.h,v 1.38 2004/03/10 23:53:50 keithp Exp $
+ * $Id: Xft.h,v 1.40 2004/03/22 15:02:59 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -33,7 +33,7 @@
 
 #define XFT_MAJOR	2
 #define XFT_MINOR	1
-#define XFT_REVISION	5
+#define XFT_REVISION	6
 #define XFT_VERSION	((XFT_MAJOR * 10000) + (XFT_MINOR * 100) + (XFT_REVISION))
 #define XftVersion	XFT_VERSION
 

Modified: vendor/configure
===================================================================
--- vendor/configure	2005-03-29 22:38:00 UTC (rev 107)
+++ vendor/configure	2005-03-29 22:39:12 UTC (rev 108)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for libXft 2.1.5.
+# Generated by GNU Autoconf 2.59 for libXft 2.1.6.
 #
 # Report bugs to <keithp@keithp.com>.
 #
@@ -423,8 +423,8 @@
 # Identity of this package.
 PACKAGE_NAME='libXft'
 PACKAGE_TARNAME='libXft'
-PACKAGE_VERSION='2.1.5'
-PACKAGE_STRING='libXft 2.1.5'
+PACKAGE_VERSION='2.1.6'
+PACKAGE_STRING='libXft 2.1.6'
 PACKAGE_BUGREPORT='keithp@keithp.com'
 
 # Factoring default headers for most tests.
@@ -953,7 +953,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libXft 2.1.5 to adapt to many kinds of systems.
+\`configure' configures libXft 2.1.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1023,7 +1023,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libXft 2.1.5:";;
+     short | recursive ) echo "Configuration of libXft 2.1.6:";;
    esac
   cat <<\_ACEOF
 
@@ -1165,7 +1165,7 @@
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-libXft configure 2.1.5
+libXft configure 2.1.6
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1179,7 +1179,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libXft $as_me 2.1.5, which was
+It was created by libXft $as_me 2.1.6, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1791,7 +1791,7 @@
 
 # Define the identity of the package.
  PACKAGE='libXft'
- VERSION='2.1.5'
+ VERSION='2.1.6'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -20487,7 +20487,7 @@
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by libXft $as_me 2.1.5, which was
+This file was extended by libXft $as_me 2.1.6, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20550,7 +20550,7 @@
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-libXft config.status 2.1.5
+libXft config.status 2.1.6
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 

Modified: vendor/configure.ac
===================================================================
--- vendor/configure.ac	2005-03-29 22:38:00 UTC (rev 107)
+++ vendor/configure.ac	2005-03-29 22:39:12 UTC (rev 108)
@@ -1,5 +1,5 @@
 dnl 
-dnl  $Id: configure.ac,v 1.19 2004/03/10 23:53:50 keithp Exp $
+dnl  $Id: configure.ac,v 1.21 2004/03/22 15:02:59 keithp Exp $
 dnl 
 dnl  Copyright © 2003 Keith Packard, Noah Levitt
 dnl 
@@ -30,8 +30,9 @@
 dnl version.  This same version number must appear in Xft.h
 dnl Yes, it is a pain to synchronize version numbers.  Unfortunately, it's
 dnl not possible to extract the version number here from Xft.h
+dnl Please bump the minor library number at each release as well.
 dnl
-AC_INIT(libXft, 2.1.5, [keithp@keithp.com], libXft)
+AC_INIT(libXft, 2.1.6, [keithp@keithp.com], libXft)
 
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE

Modified: vendor/xftfreetype.c
===================================================================
--- vendor/xftfreetype.c	2005-03-29 22:38:00 UTC (rev 107)
+++ vendor/xftfreetype.c	2005-03-29 22:39:12 UTC (rev 108)
@@ -182,6 +182,14 @@
 	_XftLockError ("too many file unlocks");
 }
 
+#if HAVE_FT_BITMAP_SIZE_Y_PPEM
+#define X_SIZE(face,i) ((face)->available_sizes[i].x_ppem)
+#define Y_SIZE(face,i) ((face)->available_sizes[i].y_ppem)
+#else
+#define X_SIZE(face,i) ((face)->available_sizes[i].width << 6)
+#define Y_SIZE(face,i) ((face)->available_sizes[i].height << 6)
+#endif
+
 FcBool
 _XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix)
 {
@@ -198,39 +206,42 @@
 	 */
 	if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
 	{
-	    FT_Short    width = xsize >> 6;
-	    FT_Short    height = ysize >> 6;
-	    int		i, best = -1;
+	    int		i, best = 0;
 
 #define xft_abs(a)	((a) < 0 ? -(a) : (a))
 #define dist(a,b)	(xft_abs((a)-(b)))
 
-#if !HAVE_FT_BITMAP_SIZE_Y_PPEM
-#define y_ppem height
-#define x_ppem width
-#endif
-	    for (i = 0; i < face->num_fixed_sizes; i++)
+	    for (i = 1; i < face->num_fixed_sizes; i++)
 	    {
-		if (best == -1 ||
-		    dist (height, face->available_sizes[i].y_ppem >> 6) <
-		    dist (height, face->available_sizes[best].y_ppem >> 6) ||
-		    (dist (height, face->available_sizes[i].y_ppem >> 6) ==
-		     dist (height, face->available_sizes[best].y_ppem >> 6) &&
-		     dist (width, face->available_sizes[i].x_ppem >> 6) <
-		     dist (width, face->available_sizes[best].x_ppem >> 6)))
+		if (dist (ysize, Y_SIZE(face,i)) <
+		    dist (ysize, Y_SIZE(face, best)) ||
+		    (dist (ysize, Y_SIZE(face, i)) ==
+		     dist (ysize, Y_SIZE(face, best)) &&
+		     dist (xsize, X_SIZE(face, i)) <
+		     dist (xsize, X_SIZE(face, best))))
 		{
 		    best = i;
 		}
 	    }
-	    if (FT_Set_Char_Size (face, face->available_sizes[best].x_ppem,
-				  face->available_sizes[best].y_ppem, 0, 0) != 0)
+	    /* 
+	     * Freetype 2.1.7 and earlier used width/height
+	     * for matching sizes in the BDF and PCF loaders.
+	     * This has been fixed for 2.1.8.  Because BDF and PCF
+	     * files have but a single strike per file, we can
+	     * simply try both sizes.
+	     */
+	    if (
+#if HAVE_FT_BITMAP_SIZE_Y_PPEM
+		FT_Set_Char_Size (face, face->available_sizes[best].x_ppem,
+				  face->available_sizes[best].y_ppem, 0, 0) != 0
+		&&
+#endif
+		FT_Set_Char_Size (face, face->available_sizes[best].width << 6,
+				  face->available_sizes[best].height << 6,
+				  0, 0) != 0)
 	    {
 		return False;
 	    }
-#if !HAVE_FT_BITMAP_SIZE_Y_PPEM
-#undef y_ppem
-#undef x_ppem
-#endif
 	}
 	else
     	{



Reply to: