[xorg-commit-diffs] xc/lib/Xft ChangeLog, 1.1.2.2, 1.1.2.2.6.1 Makefile.am, 1.1.2.2, 1.1.2.2.6.1 Xft.3.in, 1.1.2.1, 1.1.2.1.6.1 Xft.h, 1.1.4.1.6.4, 1.1.4.1.6.4.6.1 Xft.man, 1.1.4.1.6.4, 1.1.4.1.6.4.6.1 configure.ac, 1.1.2.3, 1.1.2.3.6.1 xftfreetype.c, 1.1.4.1.6.4, 1.1.4.1.6.4.6.1

Roland Mainz xorg-commit at pdx.freedesktop.org
Sat Apr 10 02:04:10 PDT 2004


Committed by: gisburn

Update of /cvs/xorg/xc/lib/Xft
In directory pdx:/tmp/cvs-serv7662/xc/lib/Xft

Modified Files:
      Tag: XPRINT
	ChangeLog Makefile.am Xft.3.in Xft.h Xft.man configure.ac 
	xftfreetype.c 
Log Message:
Resync to 2004-04-10 XORG-RELEASE-1 branch

Index: ChangeLog
===================================================================
RCS file: /cvs/xorg/xc/lib/Xft/Attic/ChangeLog,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.6.1
diff -u -d -r1.1.2.2 -r1.1.2.2.6.1
--- a/ChangeLog	12 Mar 2004 11:18:23 -0000	1.1.2.2
+++ b/ChangeLog	10 Apr 2004 09:04:07 -0000	1.1.2.2.6.1
@@ -1,3 +1,19 @@
+2004-03-22  Keith Packard  <keithp at 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 at 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 at keithp.com>
 
 	* Xft.h:

Index: Makefile.am
===================================================================
RCS file: /cvs/xorg/xc/lib/Xft/Attic/Makefile.am,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.6.1
diff -u -d -r1.1.2.2 -r1.1.2.2.6.1
--- a/Makefile.am	11 Mar 2004 14:16:09 -0000	1.1.2.2
+++ b/Makefile.am	10 Apr 2004 09:04:07 -0000	1.1.2.2.6.1
@@ -1,5 +1,5 @@
 # 
-#  $Id: Makefile.am,v 1.9 2004/01/15 04:32:29 harold Exp $
+#  $Id: Makefile.am,v 1.1.2.2.4.1 2004/03/22 15:20:26 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 

Index: Xft.3.in
===================================================================
RCS file: /cvs/xorg/xc/lib/Xft/Attic/Xft.3.in,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.6.1
diff -u -d -r1.1.2.1 -r1.1.2.1.6.1
--- a/Xft.3.in	11 Mar 2004 14:16:10 -0000	1.1.2.1
+++ b/Xft.3.in	10 Apr 2004 09:04:07 -0000	1.1.2.1.6.1
@@ -1,5 +1,5 @@
 .\"
-.\" $Id: Xft.3.in,v 1.2 2003/04/25 16:11:35 keithp Exp $
+.\" $Id: Xft.3.in,v 1.1.2.1 2004/03/11 14:16:10 eich Exp $
 .\"
 .\" Copyright © 2000 Keith Packard
 .\"
@@ -138,4 +138,4 @@
 compatibility in future releases.
 
 .SH AUTHOR
-Keith Packard, member of the XFree86 Project, Inc.
+Keith Packard

Index: Xft.h
===================================================================
RCS file: /cvs/xorg/xc/lib/Xft/Xft.h,v
retrieving revision 1.1.4.1.6.4
retrieving revision 1.1.4.1.6.4.6.1
diff -u -d -r1.1.4.1.6.4 -r1.1.4.1.6.4.6.1
--- a/Xft.h	12 Mar 2004 11:18:23 -0000	1.1.4.1.6.4
+++ b/Xft.h	10 Apr 2004 09:04:07 -0000	1.1.4.1.6.4.6.1
@@ -1,5 +1,5 @@
 /*
- * $Id: Xft.h,v 1.1.4.1.6.3 2004/03/11 14:16:10 eich Exp $
+ * $Id: Xft.h,v 1.1.4.1.6.4.4.1 2004/03/22 15:20:26 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
 

Index: Xft.man
===================================================================
RCS file: /cvs/xorg/xc/lib/Xft/Xft.man,v
retrieving revision 1.1.4.1.6.4
retrieving revision 1.1.4.1.6.4.6.1
diff -u -d -r1.1.4.1.6.4 -r1.1.4.1.6.4.6.1
--- a/Xft.man	12 Mar 2004 11:18:23 -0000	1.1.4.1.6.4
+++ b/Xft.man	10 Apr 2004 09:04:07 -0000	1.1.4.1.6.4.6.1
@@ -1,5 +1,5 @@
 .\"
-.\" $Id: Xft.man,v 1.1.4.1.6.3 2004/03/11 14:16:10 eich Exp $
+.\" $Id: Xft.man,v 1.1.4.1.6.4 2004/03/12 11:18:23 eich Exp $
 .\"
 .\" Copyright © 2000 Keith Packard
 .\"
@@ -26,7 +26,7 @@
 .ns
 .TP \\$1
 ..
-.TH XFT 3 "Version 2.1.5" "Xft"
+.TH XFT __libmansuffix__ __vendorversion__
 
 .SH NAME
  Xft \- X FreeType interface library
@@ -138,4 +138,4 @@
 compatibility in future releases.
 
 .SH AUTHOR
-Keith Packard, member of the XFree86 Project, Inc.
+Keith Packard

Index: configure.ac
===================================================================
RCS file: /cvs/xorg/xc/lib/Xft/Attic/configure.ac,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.6.1
diff -u -d -r1.1.2.3 -r1.1.2.3.6.1
--- a/configure.ac	12 Mar 2004 11:18:23 -0000	1.1.2.3
+++ b/configure.ac	10 Apr 2004 09:04:07 -0000	1.1.2.3.6.1
@@ -1,5 +1,5 @@
 dnl 
-dnl  $Id: configure.ac,v 1.1.2.2 2004/03/11 14:16:10 eich Exp $
+dnl  $Id: configure.ac,v 1.1.2.3.4.1 2004/03/22 15:20:26 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 at keithp.com], libXft)
+AC_INIT(libXft, 2.1.6, [keithp at keithp.com], libXft)
 
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE

Index: xftfreetype.c
===================================================================
RCS file: /cvs/xorg/xc/lib/Xft/xftfreetype.c,v
retrieving revision 1.1.4.1.6.4
retrieving revision 1.1.4.1.6.4.6.1
diff -u -d -r1.1.4.1.6.4 -r1.1.4.1.6.4.6.1
--- a/xftfreetype.c	12 Mar 2004 11:18:23 -0000	1.1.4.1.6.4
+++ b/xftfreetype.c	10 Apr 2004 09:04:07 -0000	1.1.4.1.6.4.6.1
@@ -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
     	{




More information about the xorg-commit-diffs mailing list