diff -ru vcl/inc/impfont.hxx vcl/inc/impfont.hxx
--- vcl/inc/vcl/impfont.hxx	2006-05-22 13:59:55.000000000 +0100
+++ vcl/inc/vcl/impfont.hxx	2006-05-23 12:26:20.000000000 +0100
@@ -167,24 +167,29 @@
     FontAutoHint       meAutoHint;       // whether the font should be autohinted
     FontHinting        meHinting;        // whether the font should be hinted
     FontHintStyle      meHintStyle;      // type of font hinting to be used
+    FontSubPixel       meSubPixel;       // type of subpixel font hinting to be used
 public:
     ImplFontHints() :
         meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW), 
         meAntiAlias(ANTIALIAS_DONTKNOW), 
         meAutoHint(AUTOHINT_DONTKNOW), 
         meHinting(HINTING_DONTKNOW), 
-        meHintStyle(HINT_FULL)
+        meHintStyle(HINT_FULL),
+        meSubPixel(SUBPIXEL_UNKNOWN)
     {}
     ImplFontHints(FontEmbeddedBitmap eEmbeddedBitmap, FontAntiAlias eAntiAlias, 
-        FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle) :
+        FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle,
+	FontSubPixel eSubPixel) :
         meEmbeddedBitmap(eEmbeddedBitmap), 
         meAntiAlias(eAntiAlias), 
         meAutoHint(eAutoHint), 
         meHinting(eHinting), 
-        meHintStyle(eHintStyle)
+        meHintStyle(eHintStyle),
+        meSubPixel(eSubPixel)
     {}
     FontAutoHint GetUseAutoHint() const { return meAutoHint; }
     FontHintStyle GetHintStyle() const { return meHintStyle; }
+    FontSubPixel GetSubPixel() const { return meSubPixel; }
     bool DontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; }
     bool DontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; }
     bool DontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); }
diff -ru vcl/inc/vclenum.hxx vcl/inc/vclenum.hxx
--- vcl/inc/vcl/vclenum.hxx	2006-05-22 13:59:55.000000000 +0100
+++ vcl/inc/vcl/vclenum.hxx	2006-05-22 14:14:49.000000000 +0100
@@ -310,6 +310,14 @@
 
 #endif
 
+#ifndef ENUM_FONTSUBPIXEL_DECLARED
+#define ENUM_FONTSUBPIXEL_DECLARED
+
+enum FontSubPixel { SUBPIXEL_UNKNOWN, SUBPIXEL_RGB, SUBPIXEL_BGR, SUBPIXEL_VRGB, SUBPIXEL_VBGR, SUBPIXEL_NONE};
+
+#endif
+
+
 // ------------------------------------------------------------
 
 #ifndef ENUM_KEYFUNCTYPE_DECLARED
diff -ru vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/gcach_ftyp.cxx
--- vcl/source/glyphs/gcach_ftyp.cxx	2006-05-23 12:35:49.000000000 +0100
+++ vcl/source/glyphs/gcach_ftyp.cxx	2006-05-23 12:46:15.000000000 +0100
@@ -870,6 +870,22 @@
     }
 #endif
 
+    switch (aHints.GetSubPixel())
+    {
+        default:
+        case SUBPIXEL_UNKNOWN:
+        case SUBPIXEL_NONE:
+            break;
+        case SUBPIXEL_RGB:
+        case SUBPIXEL_BGR:
+            mnLoadFlags |= FT_LOAD_TARGET_LCD;
+            break;
+        case SUBPIXEL_VRGB:
+        case SUBPIXEL_VBGR:
+            mnLoadFlags |= FT_LOAD_TARGET_LCD_V;
+            break;
+    }
+
     if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) )
         mnLoadFlags |= FT_LOAD_NO_BITMAP;
 }
@@ -1176,13 +1216,15 @@
         }
     }
 
-#if !defined(TT_CONFIG_OPTION_BYTECODE_INTERPRETER)
+#if 0
     // #95556# autohinting not yet optimized for non-western glyph styles
     if( !(mnLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_FORCE_AUTOHINT) )
     &&  ( (aChar >= 0x0600 && aChar < 0x1E00)   // south-east asian + arabic
         ||(aChar >= 0x2900 && aChar < 0xD800)   // CJKV
         ||(aChar >= 0xF800) ) )                 // presentation + symbols
+    {
         nGlyphFlags |= GF_UNHINTED;
+    }
 #endif
 
     if( nGlyphIndex != 0 )
diff -ru vcl/unx/source/gdi/salgdi3.cxx vcl/unx/source/gdi/salgdi3.cxx
--- vcl/unx/source/gdi/salgdi3.cxx	2006-05-22 13:59:52.000000000 +0100
+++ vcl/unx/source/gdi/salgdi3.cxx	2006-05-23 12:29:33.000000000 +0100
@@ -1531,6 +1531,29 @@
             rFontHints.meHintStyle = HINT_FULL;
             break;
     }
+
+    switch (aHints.m_eSubPixel)
+    {
+        default:
+        case psp::fcsubpixel::Unknown:
+            rFontHints.meSubPixel = SUBPIXEL_UNKNOWN;
+            break;
+        case psp::fcsubpixel::RGB:
+            rFontHints.meSubPixel = SUBPIXEL_RGB;
+            break;
+        case psp::fcsubpixel::BGR:
+            rFontHints.meSubPixel = SUBPIXEL_BGR;
+            break;
+        case psp::fcsubpixel::VRGB:
+            rFontHints.meSubPixel = SUBPIXEL_VRGB;
+            break;
+        case psp::fcsubpixel::VBGR:
+            rFontHints.meSubPixel = SUBPIXEL_VBGR;
+            break;
+        case psp::fcsubpixel::NONE:
+            rFontHints.meSubPixel = SUBPIXEL_NONE;
+            break;
+    }
 }
 
 // ----------------------------------------------------------------------------
diff -ru psprint/inc/psprint/fontmanager.hxx psprint/inc/psprint/fontmanager.hxx
--- psprint/inc/psprint/fontmanager.hxx	2006-05-22 13:59:50.000000000 +0100
+++ psprint/inc/psprint/fontmanager.hxx	2006-05-22 15:28:40.000000000 +0100
@@ -165,6 +165,19 @@
 };
 }
 
+namespace fcsubpixel
+{
+enum type {
+    Unknown = 0,
+    RGB = 1,
+    BGR = 2,
+    VRGB = 3,
+    VBGR = 4,
+    NONE = 5
+};
+}
+
+
 struct FontConfigHints
 {
     fcstatus::type m_eEmbeddedbitmap;
@@ -172,13 +185,15 @@
     fcstatus::type m_eAutoHint;
     fcstatus::type m_eHinting;
     fchint::type m_eHintStyle;
+    fcsubpixel::type m_eSubPixel;
 
     FontConfigHints() :
         m_eEmbeddedbitmap( fcstatus::isunset ),
         m_eAntialias( fcstatus::isunset ),
         m_eAutoHint( fcstatus::isunset ),
         m_eHinting( fcstatus::isunset ),
-        m_eHintStyle( fchint::Full )
+        m_eHintStyle( fchint::Medium ),
+        m_eSubPixel( fcsubpixel::Unknown )
         {}
 };
 
diff -ru psprint/source/fontmanager/fontconfig.cxx psprint/source/fontmanager/fontconfig.cxx
--- psprint/source/fontmanager/fontconfig.cxx	2006-05-22 13:59:49.000000000 +0100
+++ psprint/source/fontmanager/fontconfig.cxx	2006-05-23 12:23:55.000000000 +0100
@@ -36,6 +36,8 @@
 #ifdef ENABLE_FONTCONFIG
 #include <fontconfig/fontconfig.h>
 // be compatible with fontconfig 2.2.0 release
+#include <cairo-ft.h>
+#include <gdk/gdkscreen.h>
 #ifndef FC_WEIGHT_BOOK
 #define FC_WEIGHT_BOOK 75
 #endif
@@ -774,14 +777,19 @@
     rWrapper.FcPatternAddDouble( pPattern, FC_PIXEL_SIZE, nSize);
 
     FcBool embitmap = true, antialias = true, autohint = true, hinting = true;
-    int hintstyle = FC_HINT_FULL;
+    int hintstyle = FC_HINT_FULL, rgba = FC_RGBA_UNKNOWN;
 
     rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern );
+    GdkScreen *pScreen = gdk_screen_get_default();
+    if (const cairo_font_options_t *pOptions = pScreen ? gdk_screen_get_font_options(pScreen) : 0)
+	cairo_ft_font_options_substitute(pOptions, pPattern);
     rWrapper.FcDefaultSubstitute( pPattern );
     FcResult eEmbeddedBitmap = rWrapper.FcPatternGetBool( pPattern, FC_EMBEDDED_BITMAP, 0, &embitmap );
     FcResult eAntialias = rWrapper.FcPatternGetBool( pPattern, FC_ANTIALIAS, 0, &antialias );
     FcResult eAutoHint = rWrapper.FcPatternGetBool( pPattern, FC_AUTOHINT, 0, &autohint );
+    FcResult eSubPixel = rWrapper.FcPatternGetInteger( pPattern, FC_RGBA, 0, &rgba);
     FcResult eHinting = rWrapper.FcPatternGetBool( pPattern, FC_HINTING, 0, &hinting );
+
     FcResult eHintStyle = rWrapper.FcPatternGetInteger( pPattern, FC_HINT_STYLE, 0, &hintstyle );
 
     if( eEmbeddedBitmap == FcResultMatch )
@@ -813,6 +820,33 @@
                 break;
         }
     }
+    if (eSubPixel != FcResultMatch)
+        aHints.m_eSubPixel = fcsubpixel::Unknown;
+    else 
+    {
+        switch (rgba)
+        {
+	    default:
+	    case FC_RGBA_UNKNOWN:
+	        break;
+                aHints.m_eSubPixel = fcsubpixel::Unknown;
+	    case FC_RGBA_RGB:
+                aHints.m_eSubPixel = fcsubpixel::RGB;
+	        break;
+	    case FC_RGBA_BGR:
+                aHints.m_eSubPixel = fcsubpixel::BGR;
+	        break;
+	    case FC_RGBA_VRGB:
+                aHints.m_eSubPixel = fcsubpixel::VRGB;
+	        break;
+	    case FC_RGBA_VBGR:
+                aHints.m_eSubPixel = fcsubpixel::VBGR;
+	        break;
+            case FC_RGBA_NONE:
+                aHints.m_eSubPixel = fcsubpixel::NONE;
+	        break;
+        }
+    }
 #endif
     return aHints;
 }
diff -ru psprint/source/fontmanager/makefile.mk psprint/source/fontmanager/makefile.mk
--- psprint/source/fontmanager/makefile.mk	2006-05-22 13:59:49.000000000 +0100
+++ psprint/source/fontmanager/makefile.mk	2006-05-23 09:59:14.000000000 +0100
@@ -49,6 +49,9 @@
 CDEFS += -DENABLE_FONTCONFIG
 .ENDIF
 
+PKGCONFIG_MODULES=gdk-2.0 freetype2
+.INCLUDE: pkg_config.mk
+
 # --- Files --------------------------------------------------------
 
 SLOFILES=\
diff -ru psprint/util/makefile.mk psprint/util/makefile.mk
--- psprint/util/makefile.mk	2006-05-22 13:59:49.000000000 +0100
+++ psprint/util/makefile.mk	2006-05-23 10:00:18.000000000 +0100
@@ -90,5 +90,10 @@
 
 # --- Targets ------------------------------------------------------------
 
+PKGCONFIG_MODULES=gdk-2.0 freetype2
+.INCLUDE: pkg_config.mk
+SHL1STDLIBS+=$(PKGCONFIG_LIBS)
+
+
 
 .INCLUDE :	target.mk
--- config_office/configure.in        3 Nov 2006 14:25:09 -0000       1.184.2.2
+++ config_office/configure.in        21 Dec 2006 16:36:54 -0000
@@ -4466,6 +4466,10 @@
 
    if test "$ENABLE_GTK" = "TRUE" ; then
       PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages]))
+        PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.10)
+        if test "x$enable_cairo" == "xno" ; then
+            PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
+        fi
       BUILD_TYPE="$BUILD_TYPE GTK"
 
       if test "x$enable_systray" = "xyes"; then
