Description: OpenOffice.org subpixel font rendering broken with new cairo
Bug: https://bugs.launchpad.net/bugs/271283

Index: gnome-settings-daemon-3.3.91/plugins/xsettings/gsd-xsettings-manager.c
===================================================================
--- gnome-settings-daemon-3.3.91.orig/plugins/xsettings/gsd-xsettings-manager.c	2012-02-08 17:59:31.000000000 +0100
+++ gnome-settings-daemon-3.3.91/plugins/xsettings/gsd-xsettings-manager.c	2012-03-05 21:04:18.289981325 +0100
@@ -383,6 +383,9 @@
         int         dpi;
         const char *rgba;
         const char *hintstyle;
+
+	/* priv helper for OOO lcdfilter */
+	gboolean use_rgba;
 } GnomeXftSettings;
 
 /* Read GSettings and determine the appropriate Xft settings based on them. */
@@ -404,6 +407,7 @@
         settings->dpi = get_dpi_from_gsettings (manager) * 1024; /* Xft wants 1/1024ths of an inch */
         settings->rgba = "rgb";
         settings->hintstyle = "hintfull";
+        settings->use_rgba = FALSE;
 
         switch (hinting) {
         case GSD_FONT_HINTING_NONE:
@@ -447,10 +451,10 @@
                 break;
         case GSD_FONT_ANTIALIASING_MODE_RGBA:
                 settings->antialias = 1;
-                use_rgba = TRUE;
+                settings->use_rgba = TRUE;
         }
 
-        if (!use_rgba) {
+        if (!settings->use_rgba) {
                 settings->rgba = "none";
         }
 }
@@ -469,6 +473,7 @@
                 xsettings_manager_set_string (manager->priv->managers [i], "Xft/HintStyle", settings->hintstyle);
                 xsettings_manager_set_int (manager->priv->managers [i], "Xft/DPI", settings->dpi);
                 xsettings_manager_set_string (manager->priv->managers [i], "Xft/RGBA", settings->rgba);
+                xsettings_manager_set_string (manager->priv->managers [i], "Xft/lcdfilter", settings->use_rgba ? "lcddefault" : "none");
         }
         gnome_settings_profile_end (NULL);
 }
@@ -530,6 +535,8 @@
                                 settings->hintstyle);
         update_property (add_string, "Xft.rgba",
                                 settings->rgba);
+        update_property (add_string, "Xft.lcdfilter",
+                                settings->use_rgba ? "lcddefault" : "none");
 
         g_debug("xft_settings_set_xresources: new res '%s'", add_string->str);
 
