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

xft: Changes to 'debian-unstable'



 ChangeLog                |  228 +++++++++++++++
 NEWS                     |   16 -
 README                   |    2 
 configure.ac             |  149 ++--------
 debian/changelog         |    7 
 include/X11/Xft/Xft.h.in |   42 +-
 src/xftcolor.c           |    6 
 src/xftcore.c            |   96 +++---
 src/xftdpy.c             |   62 ++--
 src/xftdraw.c            |   46 +--
 src/xftextent.c          |   14 
 src/xftfont.c            |   16 -
 src/xftfreetype.c        |  161 ++++------
 src/xftglyphs.c          |  696 +++++++++++++++++++++++++++--------------------
 src/xftinit.c            |    4 
 src/xftint.h             |   23 -
 src/xftlist.c            |    6 
 src/xftname.c            |    8 
 src/xftrender.c          |   54 +--
 src/xftswap.c            |    2 
 src/xftxlfd.c            |   28 -
 21 files changed, 971 insertions(+), 695 deletions(-)

New commits:
commit 0c27f7dcb858bd7da4fa4318cb881a282348b715
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sat Jun 16 22:04:47 2012 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index be0924b..6aa0c0d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xft (2.3.1-1) UNRELEASED; urgency=low
+xft (2.3.1-1) unstable; urgency=low
 
   * New upstream release:
     - Subpixel LCD text rendering improvements (Closes: #641197).
 
- -- Cyril Brulebois <kibi@debian.org>  Sat, 16 Jun 2012 19:58:53 +0000
+ -- Cyril Brulebois <kibi@debian.org>  Sat, 16 Jun 2012 22:04:44 +0200
 
 xft (2.2.0-3) unstable; urgency=low
 

commit 8ee0cb0aaf7ddaa088334df2423488cc1c4d0d20
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sat Jun 16 22:03:47 2012 +0200

    Add bug closure for #641197.

diff --git a/debian/changelog b/debian/changelog
index 842c02e..be0924b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xft (2.3.1-1) UNRELEASED; urgency=low
 
-  * New upstream release.
+  * New upstream release:
+    - Subpixel LCD text rendering improvements (Closes: #641197).
 
  -- Cyril Brulebois <kibi@debian.org>  Sat, 16 Jun 2012 19:58:53 +0000
 

commit df13b2392a3bbf043e4b40ac6fe2d90390707a07
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sat Jun 16 19:59:05 2012 +0000

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 6a6d960..150f3a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,231 @@
+commit 0847b64af14acefaa7aa86b3cec8632497babe73
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Jun 2 09:36:29 2012 -0700
+
+    libXft 2.3.1
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 1066d2b34db6124fbb0105f5d30f560217fd2a5a
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat Mar 10 23:09:21 2012 -0800
+
+    Dead code removal
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 84b8b5b46773f9b686d57f28092824b86bffed9d
+Author: Mikael Magnusson <mikachu@gmail.com>
+Date:   Sun Mar 11 02:41:55 2012 +0100
+
+    Fixup for 550b2f76401c2 which broke bold fonts
+    
+    The commit removed the line
+    AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_GlyphSlot_Embolden)
+    but failed to remove the #if lines that this commit removes, resulting
+    in that code never being executed.
+    
+    Fixes: https://bugs.freedesktop.org/attachment.cgi?id=58280
+    
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit b543efafefb71fb1f87ee9c1c261e86c8ca29e76
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Mar 7 20:12:27 2012 -0800
+
+    libXft 2.3.0
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 301029c9a1d9429009eaf08bb726357d4e94780d
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Mon Oct 24 23:39:25 2011 -0700
+
+    Fix undefined ftbit in XftFontLoadGlyphs
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=42173
+    
+    Fixes regression from: 6f1d7bcdd461b1f6cc64370793f52d7c170187d0
+    
+    Fixed by examining original patch before rebase from:
+    https://bugs.freedesktop.org/show_bug.cgi?id=29151
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 550b2f76401c292d982700b60326e0a837e391b4
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Mon Oct 10 13:00:35 2011 -0700
+
+    Remove fontconfig and freetype ifdef-fu and instead require non-ancinet versions of both
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 21a59c10803582c8f90d3b5f32e8f0240c050adf
+Author: Tom \"spot\" Callaway <tcallawa@redhat.com>
+Date:   Thu Oct 6 15:58:29 2011 -0400
+
+    compiler noise cleanups related to subpixel LCD support
+    
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 6f1d7bcdd461b1f6cc64370793f52d7c170187d0
+Author: Tom \"spot\" Callaway <tcallawa@redhat.com>
+Date:   Thu Oct 6 15:41:10 2011 -0400
+
+    Subpixel LCD text rendering improvements
+    
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 0e0efb8b26a241f8370053bc3686f7abc69357c1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Sep 26 15:41:49 2011 -0700
+
+    Add const attributes to fix gcc -Wwrite-strings warnings
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit df353cc7fe40fadc6e48586e95a0cbf1d2e33cfa
+Author: Ross Burton <ross@burtonini.com>
+Date:   Sun Sep 25 17:47:15 2011 -0700
+
+    constify some bits
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=2658
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 5cac9764a55c96fee64f63748c054be81fcaadf4
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sun Sep 25 11:11:01 2011 -0700
+
+    Remove dependency on libXext
+    
+    ldd -r -u reports:
+    Unused direct dependencies:
+         .../lib/libXext.so.6
+    
+    Reported-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit d39337048d31245b69e1b72b98beb957f52ba4e6
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat Sep 24 21:05:27 2011 -0700
+
+    Remove broken fallback on non-pkg-config search for libXrender
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=5425
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3ad77b636978746786546ab2b779730997839f63
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Sep 16 22:42:59 2011 -0700
+
+    Strip trailing whitespace
+    
+    Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
+    git diff -w & git diff -b show no diffs from this change
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d274ffc91b22bb8f3a2447237491cbe04f2ee0c3
+Author: Derek Wang <Derek.Wang@sun.com>
+Date:   Wed Feb 2 22:15:13 2011 -0800
+
+    XftGlyphFontSpecCore: check to make sure glyphs are in range
+    
+    This fixes a crash reported when selecting "View Page Source" in Mozilla
+    on Solaris 10, due to invalid parameters being given to XPutImage.
+    
+    http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6261221
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 652d9b47fc902e12c8e28481742c382676f1d035
+Author: Jay Cotton <jay.cotton@oracle.com>
+Date:   Wed Feb 2 22:09:34 2011 -0800
+
+    XftDrawSrcPicture: fail if info->solidFormat is NULL
+    
+    Fixed a core dump in x11perf render tests when a driver was returning
+    incorrect information due to a bug in the driver.
+    
+    http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6872780
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 1e03ac60d1221d5c16b7f4797ab0c461f13b123a
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Feb 2 11:43:42 2011 -0500
+
+    config: comment, minor upgrade, quote and layout configure.ac
+    
+    Group statements per section as per Autoconf standard layout
+    Quote statements where appropriate.
+    Autoconf recommends not using dnl instead of # for comments
+    
+    Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
+    Add AC_CONFIG_SRCDIR([Makefile.am])
+    
+    This helps automated maintenance and release activities.
+    Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
+
+commit bcc24bf5bd4141cf5ca62bdd2c52d971ea88d421
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jan 28 19:41:37 2011 -0500
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 791d10dbac030d6a164f54a7adb9b6c816c68930
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jan 28 16:34:14 2011 -0500
+
+    config: remove unrequired AC_CONFIG_AUX_DIR
+    
+    The default location for the generation of configuation files is the current
+    package root directory. These files are config.* and friends.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 28d61e969800820b1483d41445befcd1bf35fa85
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Jan 27 16:12:55 2011 -0500
+
+    config: remove already included AC_PROG_SED
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    Use the appropriate platform version of sed
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 0e3c21ab0aeb99ca76ac2535f4618cb1949b7f40
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Jan 27 16:09:03 2011 -0500
+
+    config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
+    
+    XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
+    AC_PROG_C_C99. This sets gcc with -std=gnu99.
+    If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
+    
+    Reported-by: Roberto Branciforti <rbbrnc@gmail.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 9c23173cf1ff861bdb8538e3aa21ec509b0d87d8
+Author: Roberto Branciforti <rbbrnc@gmail.com>
+Date:   Mon Jan 17 22:32:15 2011 +0100
+
+    libXft: Fix variable assignment.
+    
+    Signed-off-by: Roberto Branciforti <rbbrnc@gmail.com>
+    Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
 commit b9d4a2b5be71ca883f5a876500edb0a1a9add0cf
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Fri Oct 29 16:21:18 2010 -0700
diff --git a/debian/changelog b/debian/changelog
index b5e57f5..842c02e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xft (2.3.1-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Cyril Brulebois <kibi@debian.org>  Sat, 16 Jun 2012 19:58:53 +0000
+
 xft (2.2.0-3) unstable; urgency=low
 
   * Team upload.

commit 0847b64af14acefaa7aa86b3cec8632497babe73
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jun 2 09:36:29 2012 -0700

    libXft 2.3.1
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index b54311e..dd415ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@ AC_PREREQ([2.60])
 # version.  This version number will be substituted into Xft.h
 # Please bump the minor library number at each release as well.
 #
-AC_INIT([libXft], [2.3.0],
+AC_INIT([libXft], [2.3.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXft])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])

commit 1066d2b34db6124fbb0105f5d30f560217fd2a5a
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sat Mar 10 23:09:21 2012 -0800

    Dead code removal
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/xftint.h b/src/xftint.h
index 5cb57ae..1658977 100644
--- a/src/xftint.h
+++ b/src/xftint.h
@@ -68,16 +68,6 @@
 # define _X_EXPORT /**/
 #endif
 
-#ifndef HAVE_CONFIG_H
-# if (FREETYPE_MAJOR > 2 ||						    \
-      (FREETYPE_MAJOR == 2 && (FREETYPE_MINOR > 1 ||			    \
-			       (FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 5))))
-#  define HAVE_FT_BITMAP_SIZE_Y_PPEM 1
-# else
-#  define HAVE_FT_BITMAP_SIZE_Y_PPEM 0
-# endif
-#endif
-
 typedef struct _XftMatcher {
     char    *object;
     double  (*compare) (char *object, FcValue value1, FcValue value2);

commit 84b8b5b46773f9b686d57f28092824b86bffed9d
Author: Mikael Magnusson <mikachu@gmail.com>
Date:   Sun Mar 11 02:41:55 2012 +0100

    Fixup for 550b2f76401c2 which broke bold fonts
    
    The commit removed the line
    AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_GlyphSlot_Embolden)
    but failed to remove the #if lines that this commit removes, resulting
    in that code never being executed.
    
    Fixes: https://bugs.freedesktop.org/attachment.cgi?id=58280
    
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/xftglyphs.c b/src/xftglyphs.c
index 4a3b9d6..2f3dc5a 100644
--- a/src/xftglyphs.c
+++ b/src/xftglyphs.c
@@ -24,9 +24,7 @@
 #include <freetype/ftoutln.h>
 #include <freetype/ftlcdfil.h>
 
-#if HAVE_FT_GLYPHSLOT_EMBOLDEN
 #include <freetype/ftsynth.h>
-#endif
 
 /*
  * Validate the memory info for a font
@@ -434,12 +432,10 @@ XftFontLoadGlyphs (Display	    *dpy,
 
 	glyphslot = face->glyph;
 
-#if HAVE_FT_GLYPHSLOT_EMBOLDEN
 	/*
 	 * Embolden if required
 	 */
 	if (font->info.embolden) FT_GlyphSlot_Embolden(glyphslot);
-#endif
 
 	/*
 	 * Compute glyph metrics from FreeType information

commit b543efafefb71fb1f87ee9c1c261e86c8ca29e76
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Mar 7 20:12:27 2012 -0800

    libXft 2.3.0
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/NEWS b/NEWS
index 01e6dbe..b547c78 100644
--- a/NEWS
+++ b/NEWS
@@ -1,12 +1,22 @@
 			Xft
 		X FreeType library
-		  Version 2.2.0
-		    2010-10-29
+		  Version 2.3.0
+		    2012-03-07
 
-Xft version 2.1 is the first stand alone release of Xft, a library that
+Xft version 2.1 was the first stand alone release of Xft, a library that
 connects X applications with the FreeType font rasterization library. Xft
 uses fontconfig to locate fonts so it has no configuration files.
 
+Version 2.3.0
+
+Subpixel LCD text rendering improvements
+
+Dropped support for versions of freetype2, fontconfig & libXrender that
+pre-dated pkgconfig support.
+
+Raised minimum required versions to freetype2 2.1.6 & fontconfig 2.5.92.
+
+
 Version 2.2.0
 
 Dropped xft-config, now that pkg-config is well established.
diff --git a/README b/README
index b1097eb..3dede12 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 			Xft
 		X FreeType library
 
-Xft version 2.1 is the first stand alone release of Xft, a library that
+Xft version 2.1 was the first stand alone release of Xft, a library that
 connects X applications with the FreeType font rasterization library. Xft
 uses fontconfig to locate fonts so it has no configuration files.
 
diff --git a/configure.ac b/configure.ac
index 61d6c4d..b54311e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@ AC_PREREQ([2.60])
 # version.  This version number will be substituted into Xft.h
 # Please bump the minor library number at each release as well.
 #
-AC_INIT([libXft], [2.2.0],
+AC_INIT([libXft], [2.3.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXft])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])

commit 301029c9a1d9429009eaf08bb726357d4e94780d
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Oct 24 23:39:25 2011 -0700

    Fix undefined ftbit in XftFontLoadGlyphs
    
    https://bugs.freedesktop.org/show_bug.cgi?id=42173
    
    Fixes regression from: 6f1d7bcdd461b1f6cc64370793f52d7c170187d0
    
    Fixed by examining original patch before rebase from:
    https://bugs.freedesktop.org/show_bug.cgi?id=29151
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/xftglyphs.c b/src/xftglyphs.c
index 2639d12..4a3b9d6 100644
--- a/src/xftglyphs.c
+++ b/src/xftglyphs.c
@@ -570,6 +570,9 @@ XftFontLoadGlyphs (Display	    *dpy,
 	    xftg->metrics.yOff = -TRUNC(ROUND(glyphslot->advance.y));
 	}
 
+	// compute the size of the final bitmap
+	ftbit = &glyphslot->bitmap;
+
 	width = ftbit->width;
 	height = ftbit->rows;
 

commit 550b2f76401c292d982700b60326e0a837e391b4
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Oct 10 13:00:35 2011 -0700

    Remove fontconfig and freetype ifdef-fu and instead require non-ancinet versions of both
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/configure.ac b/configure.ac
index 8df0cb0..61d6c4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,29 +67,10 @@ AC_SUBST([XFT_LT_VERSION])
 PKG_CHECK_MODULES(XRENDER, xrender >= 0.8.2 x11)
 
 # Check freetype configuration
-AC_ARG_WITH(freetype-config, [  --with-freetype-config=PROG   Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=auto)
-
-if test "$freetype_config" = "auto"; then
-	PKG_CHECK_MODULES(FREETYPE, freetype2,
-		freetype_config=no, freetype_config=yes)
-fi
-
-if test "$freetype_config" = "yes"; then
-	AC_PATH_PROG(ft_config,freetype-config,no)
-	if test "$ft_config" = "no"; then
-		AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/])
-	fi
-else
-	ft_config="$freetype_config"
-fi
-
-if test "$freetype_config" != "no"; then
-	FREETYPE_CFLAGS="`$ft_config --cflags`"
-	FREETYPE_LIBS="`$ft_config --libs`"
-fi
+PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.1.6)
 
 # Check fontconfig configuration
-PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2)
+PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.5.92)
 
 AC_SUBST(XRENDER_CFLAGS)
 AC_SUBST(XRENDER_LIBS)
@@ -98,22 +79,6 @@ AC_SUBST(FREETYPE_LIBS)
 AC_SUBST(FONTCONFIG_CFLAGS)
 AC_SUBST(FONTCONFIG_LIBS)
 
-fontconfig_save_libs="$LIBS"
-fontconfig_save_cflags="$CFLAGS"
-LIBS="$LIBS $FREETYPE_LIBS"
-CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
-AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_GlyphSlot_Embolden)
-AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
-		HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
-		HAVE_FT_BITMAP_SIZE_Y_PPEM=0,
-[#include <ft2build.h>
-#include FT_FREETYPE_H])
-AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM,
-		   [FT_Bitmap_Size structure includes y_ppem field])
-
-LIBS="$fontconfig_save_libs"
-CFLAGS="$fontconfig_save_cflags"
-
 if test "$VERSION" = "" ; then
        VERSION=$PACKAGE_VERSION;
 fi
diff --git a/src/xftdpy.c b/src/xftdpy.c
index 73b0bed..c5b756e 100644
--- a/src/xftdpy.c
+++ b/src/xftdpy.c
@@ -369,22 +369,16 @@ _XftDefaultInit (Display *dpy)
 	goto bail1;
     if (!_XftDefaultInitInteger (dpy, pat, FC_RGBA))
 	goto bail1;
-#ifdef FC_LCD_FILTER
     if (!_XftDefaultInitInteger (dpy, pat, FC_LCD_FILTER))
 	goto bail1;
-#endif
     if (!_XftDefaultInitBool (dpy, pat, FC_ANTIALIAS))
 	goto bail1;
-#ifdef FC_EMBOLDEN
     if (!_XftDefaultInitBool (dpy, pat, FC_EMBOLDEN))
 	goto bail1;
-#endif
     if (!_XftDefaultInitBool (dpy, pat, FC_AUTOHINT))
 	goto bail1;
-#ifdef FC_HINT_STYLE
     if (!_XftDefaultInitInteger (dpy, pat, FC_HINT_STYLE))
 	goto bail1;
-#endif
     if (!_XftDefaultInitBool (dpy, pat, FC_HINTING))
 	goto bail1;
     if (!_XftDefaultInitBool (dpy, pat, FC_MINSPACE))
@@ -475,28 +469,24 @@ XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern)
 			   XftDefaultGetBool (dpy, FC_ANTIALIAS, screen,
 					      True));
     }
-#ifdef FC_EMBOLDEN
     if (FcPatternGet (pattern, FC_EMBOLDEN, 0, &v) == FcResultNoMatch)
     {
 	FcPatternAddBool (pattern, FC_EMBOLDEN,
 			   XftDefaultGetBool (dpy, FC_EMBOLDEN, screen,
 					      False));
     }
-#endif
     if (FcPatternGet (pattern, FC_HINTING, 0, &v) == FcResultNoMatch)
     {
 	FcPatternAddBool (pattern, FC_HINTING,
 			  XftDefaultGetBool (dpy, FC_HINTING, screen,
 					     True));
     }
-#ifdef FC_HINT_STYLE
     if (FcPatternGet (pattern, FC_HINT_STYLE, 0, &v) == FcResultNoMatch)
     {
 	FcPatternAddInteger (pattern, FC_HINT_STYLE,
 			     XftDefaultGetInteger (dpy, FC_HINT_STYLE, screen,
 						   FC_HINT_FULL));
     }
-#endif
     if (FcPatternGet (pattern, FC_AUTOHINT, 0, &v) == FcResultNoMatch)
     {
 	FcPatternAddBool (pattern, FC_AUTOHINT,
@@ -525,14 +515,12 @@ XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern)
 			      XftDefaultGetInteger (dpy, FC_RGBA, screen,
 						    subpixel));
     }
-#ifdef FC_LCD_FILTER
     if (FcPatternGet (pattern, FC_LCD_FILTER, 0, &v) == FcResultNoMatch)
     {
 	FcPatternAddInteger (pattern, FC_LCD_FILTER,
 			     XftDefaultGetInteger (dpy, FC_LCD_FILTER, screen,
 						   FC_LCD_DEFAULT));
     }
-#endif
     if (FcPatternGet (pattern, FC_MINSPACE, 0, &v) == FcResultNoMatch)
     {
 	FcPatternAddBool (pattern, FC_MINSPACE,
diff --git a/src/xftfreetype.c b/src/xftfreetype.c
index 4f71023..a3b8332 100644
--- a/src/xftfreetype.c
+++ b/src/xftfreetype.c
@@ -176,13 +176,8 @@ _XftUnlockFile (XftFtFile *f)
 	_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
 
 _X_HIDDEN FcBool
 _XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix)
@@ -224,12 +219,9 @@ _XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix
 	     * 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,
+	    if (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)
@@ -379,9 +371,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
     double	    aspect;
     FcMatrix	    *font_matrix;
     FcBool	    hinting, vertical_layout, autohint, global_advance;
-#ifdef FC_HINT_STYLE
     int             hint_style;
-#endif
     FcChar32	    hash, *hashp;
     FT_Face	    face;
     int		    nhash;
@@ -469,7 +459,6 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
 	goto bail1;
     }
 
-#ifdef FC_LCD_FILTER
     /*
      * Get lcd_filter value
      */
@@ -482,7 +471,6 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
     default:
 	goto bail1;
     }
-#endif
 
     /*
      * Get matrix and transform values
@@ -557,7 +545,6 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
 	goto bail1;
     }
 
-#ifdef FC_EMBOLDEN
     switch (FcPatternGetBool (pattern, FC_EMBOLDEN, 0, &fi->embolden)) {
     case FcResultNoMatch:
 	fi->embolden = FcFalse;
@@ -567,11 +554,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
     default:
 	goto bail1;
     }
-#else
-    fi->embolden = FcFalse;
-#endif
 
-#ifdef FC_HINT_STYLE
     switch (FcPatternGetInteger (pattern, FC_HINT_STYLE, 0, &hint_style)) {
     case FcResultNoMatch:
 	hint_style = FC_HINT_FULL;
@@ -581,12 +564,9 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
     default:
 	goto bail1;
     }
-#endif
 
     if (!hinting
-#ifdef FC_HINT_STYLE
 	|| hint_style == FC_HINT_NONE
-#endif
 	)
     {
 	fi->load_flags |= FT_LOAD_NO_HINTING;
@@ -597,15 +577,11 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
      */
     if (fi->antialias)
     {
-#ifdef FC_HINT_STYLE
-#ifdef FT_LOAD_TARGET_LIGHT
 	if (FC_HINT_NONE < hint_style && hint_style < FC_HINT_FULL)
 	{
 	    fi->load_flags |= FT_LOAD_TARGET_LIGHT;
 	}
 	else
-#endif
-#endif
 	{
 	    /* autohinter will snap stems to integer widths, when
 	     * the LCD targets are used.
@@ -613,23 +589,17 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
 	    switch (fi->rgba) {
 	    case FC_RGBA_RGB:
 	    case FC_RGBA_BGR:
-#ifdef FT_LOAD_TARGET_LCD
 		fi->load_flags |= FT_LOAD_TARGET_LCD;
-#endif
 		break;
 	    case FC_RGBA_VRGB:
 	    case FC_RGBA_VBGR:
-#ifdef FT_LOAD_TARGET_LCD_V
 		fi->load_flags |= FT_LOAD_TARGET_LCD_V;
-#endif
 		break;
 	    }
 	}
     }
-#ifdef FT_LOAD_TARGET_MONO
     else
 	fi->load_flags |= FT_LOAD_TARGET_MONO;
-#endif
 
     /* set vertical layout if requested */
     switch (FcPatternGetBool (pattern, FC_VERTICAL_LAYOUT, 0, &vertical_layout)) {

commit 21a59c10803582c8f90d3b5f32e8f0240c050adf
Author: Tom \"spot\" Callaway <tcallawa@redhat.com>
Date:   Thu Oct 6 15:58:29 2011 -0400

    compiler noise cleanups related to subpixel LCD support
    
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/xftglyphs.c b/src/xftglyphs.c
index 03d94ed..2639d12 100644
--- a/src/xftglyphs.c
+++ b/src/xftglyphs.c
@@ -358,7 +358,7 @@ XftFontLoadGlyphs (Display	    *dpy,
     unsigned char   bufLocal[4096];
     unsigned char   *bufBitmap = bufLocal;
     int		    bufSize = sizeof (bufLocal);
-    int		    size, pitch;
+    int		    size;
     int		    width;
     int		    height;
     int		    left, right, top, bottom;
@@ -572,7 +572,6 @@ XftFontLoadGlyphs (Display	    *dpy,
 
 	width = ftbit->width;
 	height = ftbit->rows;
-	pitch = (width+3) & ~3;
 
 	if (XftDebug() & XFT_DBG_GLYPH)
 	{
@@ -674,12 +673,9 @@ XftFontLoadGlyphs (Display	    *dpy,
 		/* swap bits in each byte */
 		if (BitmapBitOrder (dpy) != MSBFirst)
 		{
-		    unsigned char   *line;
-		    unsigned char   c;
-		    int		    i;
+		    unsigned char   *line = (unsigned char*)bufBitmap;
+		    int		    i = size;
 
-		    line = (unsigned char *) bufBitmap;
-		    i = size;
 		    while (i--)
 		    {
 			int c = *line;

commit 6f1d7bcdd461b1f6cc64370793f52d7c170187d0
Author: Tom \"spot\" Callaway <tcallawa@redhat.com>
Date:   Thu Oct 6 15:41:10 2011 -0400

    Subpixel LCD text rendering improvements
    
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/xftdpy.c b/src/xftdpy.c
index 8f453b3..73b0bed 100644
--- a/src/xftdpy.c
+++ b/src/xftdpy.c
@@ -369,6 +369,10 @@ _XftDefaultInit (Display *dpy)
 	goto bail1;
     if (!_XftDefaultInitInteger (dpy, pat, FC_RGBA))
 	goto bail1;
+#ifdef FC_LCD_FILTER
+    if (!_XftDefaultInitInteger (dpy, pat, FC_LCD_FILTER))
+	goto bail1;
+#endif
     if (!_XftDefaultInitBool (dpy, pat, FC_ANTIALIAS))
 	goto bail1;
 #ifdef FC_EMBOLDEN
@@ -521,6 +525,14 @@ XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern)
 			      XftDefaultGetInteger (dpy, FC_RGBA, screen,
 						    subpixel));
     }
+#ifdef FC_LCD_FILTER
+    if (FcPatternGet (pattern, FC_LCD_FILTER, 0, &v) == FcResultNoMatch)
+    {
+	FcPatternAddInteger (pattern, FC_LCD_FILTER,
+			     XftDefaultGetInteger (dpy, FC_LCD_FILTER, screen,
+						   FC_LCD_DEFAULT));
+    }
+#endif
     if (FcPatternGet (pattern, FC_MINSPACE, 0, &v) == FcResultNoMatch)
     {
 	FcPatternAddBool (pattern, FC_MINSPACE,
diff --git a/src/xftfreetype.c b/src/xftfreetype.c
index 3f8dfef..4f71023 100644
--- a/src/xftfreetype.c
+++ b/src/xftfreetype.c
@@ -469,6 +469,21 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
 	goto bail1;
     }
 
+#ifdef FC_LCD_FILTER
+    /*
+     * Get lcd_filter value
+     */
+    switch (FcPatternGetInteger (pattern, FC_LCD_FILTER, 0, &fi->lcd_filter)) {
+    case FcResultNoMatch:
+	fi->lcd_filter = FC_LCD_DEFAULT;
+	break;
+    case FcResultMatch:
+	break;
+    default:
+	goto bail1;
+    }
+#endif
+
     /*
      * Get matrix and transform values
      */
diff --git a/src/xftglyphs.c b/src/xftglyphs.c
index e0cfdea..03d94ed 100644
--- a/src/xftglyphs.c
+++ b/src/xftglyphs.c
@@ -22,27 +22,12 @@
 
 #include "xftint.h"
 #include <freetype/ftoutln.h>
+#include <freetype/ftlcdfil.h>
 
 #if HAVE_FT_GLYPHSLOT_EMBOLDEN
 #include <freetype/ftsynth.h>
 #endif
 
-static const int    filters[3][3] = {
-    /* red */
-#if 0
-{    65538*4/7,65538*2/7,65538*1/7 },
-    /* green */
-{    65536*1/4, 65536*2/4, 65537*1/4 },
-    /* blue */
-{    65538*1/7,65538*2/7,65538*4/7 },
-#endif
-{    65538*9/13,65538*3/13,65538*1/13 },
-    /* green */
-{    65538*1/6, 65538*4/6, 65538*1/6 },
-    /* blue */
-{    65538*1/13,65538*3/13,65538*9/13 },
-};
-
 /*
  * Validate the memory info for a font
  */
@@ -69,6 +54,293 @@ _XftFontValidateMemory (Display *dpy, XftFont *public)
 		font->glyph_memory, glyph_memory);
 }
 
+/* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
+ * into a different format. For example, we want to convert a
+ * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
+ * ARGB or ABGR bitmap.
+ *
+ * this function prepares a target descriptor for this operation.
+ *
+ * input :: target bitmap descriptor. The function will set its
+ *          'width', 'rows' and 'pitch' fields, and only these
+ *
+ * slot  :: the glyph slot containing the source bitmap. this
+ *          function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
+ *
+ * mode  :: the requested final rendering mode. supported values are
+ *          MONO, NORMAL (i.e. gray), LCD and LCD_V
+ *
+ * the function returns the size in bytes of the corresponding buffer,
+ * it's up to the caller to allocate the corresponding memory block
+ * before calling _fill_xrender_bitmap
+ *
+ * it also returns -1 in case of error (e.g. incompatible arguments,
+ * like trying to convert a gray bitmap into a monochrome one)
+ */
+static int
+_compute_xrender_bitmap_size( FT_Bitmap*	target,
+			      FT_GlyphSlot	slot,
+			      FT_Render_Mode	mode )
+{
+    FT_Bitmap*	ftbit;
+    int		width, height, pitch;
+
+    if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
+	return -1;
+
+    // compute the size of the final bitmap
+    ftbit = &slot->bitmap;
+
+    width = ftbit->width;
+    height = ftbit->rows;
+    pitch = (width+3) & ~3;
+
+    switch ( ftbit->pixel_mode )
+    {
+    case FT_PIXEL_MODE_MONO:
+	if ( mode == FT_RENDER_MODE_MONO )
+	{
+	    pitch = (((width+31) & ~31) >> 3);
+	    break;
+	}
+	/* fall-through */
+
+    case FT_PIXEL_MODE_GRAY:
+	if ( mode == FT_RENDER_MODE_LCD ||
+	     mode == FT_RENDER_MODE_LCD_V )
+	{
+	    /* each pixel is replicated into a 32-bit ARGB value */
+	    pitch = width*4;
+	}
+	break;
+
+    case FT_PIXEL_MODE_LCD:
+	if ( mode != FT_RENDER_MODE_LCD )
+	    return -1;
+
+	/* horz pixel triplets are packed into 32-bit ARGB values */
+	width /= 3;
+	pitch = width*4;
+	break;
+
+    case FT_PIXEL_MODE_LCD_V:


Reply to: