1 --- vcl/inc/vcl/impfont.hxx.old 2009-04-06 16:42:09.000000000 +0000
2 +++ vcl/inc/vcl/impfont.hxx 2009-04-06 16:42:09.000000000 +0000
3 @@ -148,24 +148,29 @@ public:
4 FontAutoHint meAutoHint; // whether the font should be autohinted
5 FontHinting meHinting; // whether the font should be hinted
6 FontHintStyle meHintStyle; // type of font hinting to be used
7 + FontSubPixel meSubPixel; // type of subpixel font hinting to be used
10 meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW),
11 meAntiAlias(ANTIALIAS_DONTKNOW),
12 meAutoHint(AUTOHINT_DONTKNOW),
13 meHinting(HINTING_DONTKNOW),
14 - meHintStyle(HINT_FULL)
15 + meHintStyle(HINT_FULL),
16 + meSubPixel(SUBPIXEL_UNKNOWN)
18 ImplFontHints(FontEmbeddedBitmap eEmbeddedBitmap, FontAntiAlias eAntiAlias,
19 - FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle) :
20 + FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle,
21 + FontSubPixel eSubPixel) :
22 meEmbeddedBitmap(eEmbeddedBitmap),
23 meAntiAlias(eAntiAlias),
24 meAutoHint(eAutoHint),
26 - meHintStyle(eHintStyle)
27 + meHintStyle(eHintStyle),
28 + meSubPixel(eSubPixel)
30 FontAutoHint GetUseAutoHint() const { return meAutoHint; }
31 FontHintStyle GetHintStyle() const { return meHintStyle; }
32 + FontSubPixel GetSubPixel() const { return meSubPixel; }
33 bool DontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; }
34 bool DontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; }
35 bool DontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); }
36 --- vcl/inc/vcl/vclenum.hxx.old 2009-04-06 16:42:09.000000000 +0000
37 +++ vcl/inc/vcl/vclenum.hxx 2009-04-06 16:42:09.000000000 +0000
38 @@ -305,6 +305,14 @@ enum FontHintStyle { HINT_NONE, HINT_SLI
42 +#ifndef ENUM_FONTSUBPIXEL_DECLARED
43 +#define ENUM_FONTSUBPIXEL_DECLARED
45 +enum FontSubPixel { SUBPIXEL_UNKNOWN, SUBPIXEL_RGB, SUBPIXEL_BGR, SUBPIXEL_VRGB, SUBPIXEL_VBGR, SUBPIXEL_NONE};
50 // ------------------------------------------------------------
52 #ifndef ENUM_KEYFUNCTYPE_DECLARED
53 --- vcl/source/glyphs/gcach_ftyp.cxx.old 2009-04-06 16:42:09.000000000 +0000
54 +++ vcl/source/glyphs/gcach_ftyp.cxx 2009-04-06 16:42:09.000000000 +0000
55 @@ -896,6 +896,21 @@ FreetypeServerFont::FreetypeServerFont(
59 + switch (aHints.GetSubPixel())
64 + case SUBPIXEL_UNKNOWN:
67 + mnLoadFlags |= FT_LOAD_TARGET_LCD;
71 + mnLoadFlags |= FT_LOAD_TARGET_LCD_V;
77 @@ -1257,13 +1272,15 @@ int FreetypeServerFont::FixupGlyphIndex(
81 -#if !defined(TT_CONFIG_OPTION_BYTECODE_INTERPRETER)
83 // #95556# autohinting not yet optimized for non-western glyph styles
84 if( !(mnLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_FORCE_AUTOHINT) )
85 && ( (aChar >= 0x0600 && aChar < 0x1E00) // south-east asian + arabic
86 ||(aChar >= 0x2900 && aChar < 0xD800) // CJKV
87 ||(aChar >= 0xF800) ) ) // presentation + symbols
89 nGlyphFlags |= GF_UNHINTED;
93 if( nGlyphIndex != 0 )
94 --- vcl/unx/source/gdi/salgdi3.cxx.old 2009-04-06 16:42:09.000000000 +0000
95 +++ vcl/unx/source/gdi/salgdi3.cxx 2009-04-06 16:42:09.000000000 +0000
96 @@ -1778,6 +1778,29 @@ void X11SalGraphics::GetFontHints( const
97 rFontHints.meHintStyle = HINT_FULL;
101 + switch (aHints.m_eSubPixel)
104 + case psp::fcsubpixel::Unknown:
105 + rFontHints.meSubPixel = SUBPIXEL_UNKNOWN;
107 + case psp::fcsubpixel::RGB:
108 + rFontHints.meSubPixel = SUBPIXEL_RGB;
110 + case psp::fcsubpixel::BGR:
111 + rFontHints.meSubPixel = SUBPIXEL_BGR;
113 + case psp::fcsubpixel::VRGB:
114 + rFontHints.meSubPixel = SUBPIXEL_VRGB;
116 + case psp::fcsubpixel::VBGR:
117 + rFontHints.meSubPixel = SUBPIXEL_VBGR;
119 + case psp::fcsubpixel::NONE:
120 + rFontHints.meSubPixel = SUBPIXEL_NONE;
125 // ----------------------------------------------------------------------------
126 --- psprint/inc/psprint/fontmanager.hxx.old 2009-04-06 16:42:09.000000000 +0000
127 +++ psprint/inc/psprint/fontmanager.hxx 2009-04-06 16:42:09.000000000 +0000
128 @@ -152,6 +152,19 @@ enum type {
132 +namespace fcsubpixel
145 struct FontConfigHints
147 fcstatus::type m_eEmbeddedbitmap;
148 @@ -159,13 +172,15 @@ struct FontConfigHints
149 fcstatus::type m_eAutoHint;
150 fcstatus::type m_eHinting;
151 fchint::type m_eHintStyle;
152 + fcsubpixel::type m_eSubPixel;
155 m_eEmbeddedbitmap( fcstatus::isunset ),
156 m_eAntialias( fcstatus::isunset ),
157 m_eAutoHint( fcstatus::isunset ),
158 m_eHinting( fcstatus::isunset ),
159 - m_eHintStyle( fchint::Full )
160 + m_eHintStyle( fchint::Medium ),
161 + m_eSubPixel( fcsubpixel::Unknown )
165 --- psprint/source/fontmanager/fontconfig.cxx.old 2009-04-06 16:42:09.000000000 +0000
166 +++ psprint/source/fontmanager/fontconfig.cxx 2009-04-06 16:42:09.000000000 +0000
167 @@ -41,6 +41,8 @@ using namespace psp;
168 #include <ft2build.h>
169 #include <fontconfig/fcfreetype.h>
170 // be compatible with fontconfig 2.2.0 release
171 +#include <cairo-ft.h>
172 +#include <gdk/gdkscreen.h>
173 #ifndef FC_WEIGHT_BOOK
174 #define FC_WEIGHT_BOOK 75
176 @@ -168,7 +170,7 @@ public:
178 void FcPatternDestroy( FcPattern* pPattern )
179 { m_pFcPatternDestroy( pPattern ); }
182 FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet )
183 { return m_pFcFontList( pConfig, pPattern, pSet ); }
185 @@ -995,14 +997,19 @@ FontConfigHints PrintFontManager::getFon
186 rWrapper.FcPatternAddDouble( pPattern, FC_PIXEL_SIZE, nSize);
188 FcBool embitmap = true, antialias = true, autohint = true, hinting = true;
189 - int hintstyle = FC_HINT_FULL;
190 + int hintstyle = FC_HINT_FULL, rgba = FC_RGBA_UNKNOWN;
192 rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchFont );
193 + GdkScreen *pScreen = gdk_screen_get_default();
194 + if (const cairo_font_options_t *pOptions = pScreen ? gdk_screen_get_font_options(pScreen) : 0)
195 + cairo_ft_font_options_substitute(pOptions, pPattern);
196 rWrapper.FcDefaultSubstitute( pPattern );
197 FcResult eEmbeddedBitmap = rWrapper.FcPatternGetBool( pPattern, FC_EMBEDDED_BITMAP, 0, &embitmap );
198 FcResult eAntialias = rWrapper.FcPatternGetBool( pPattern, FC_ANTIALIAS, 0, &antialias );
199 FcResult eAutoHint = rWrapper.FcPatternGetBool( pPattern, FC_AUTOHINT, 0, &autohint );
200 + FcResult eSubPixel = rWrapper.FcPatternGetInteger( pPattern, FC_RGBA, 0, &rgba);
201 FcResult eHinting = rWrapper.FcPatternGetBool( pPattern, FC_HINTING, 0, &hinting );
203 FcResult eHintStyle = rWrapper.FcPatternGetInteger( pPattern, FC_HINT_STYLE, 0, &hintstyle );
204 rWrapper.FcPatternDestroy(pPattern);
206 @@ -1035,6 +1042,33 @@ FontConfigHints PrintFontManager::getFon
210 + if (eSubPixel != FcResultMatch)
211 + aHints.m_eSubPixel = fcsubpixel::Unknown;
217 + case FC_RGBA_UNKNOWN:
218 + aHints.m_eSubPixel = fcsubpixel::Unknown;
221 + aHints.m_eSubPixel = fcsubpixel::RGB;
224 + aHints.m_eSubPixel = fcsubpixel::BGR;
227 + aHints.m_eSubPixel = fcsubpixel::VRGB;
230 + aHints.m_eSubPixel = fcsubpixel::VBGR;
233 + aHints.m_eSubPixel = fcsubpixel::NONE;
240 --- psprint/source/fontmanager/makefile.mk.old 2009-04-02 10:57:53.000000000 +0000
241 +++ psprint/source/fontmanager/makefile.mk 2009-04-06 16:42:09.000000000 +0000
242 @@ -49,6 +49,9 @@ CDEFS += -DENABLE_FONTCONFIG
243 CFLAGS+=$(FREETYPE_CFLAGS)
246 +PKGCONFIG_MODULES=gdk-2.0 freetype2
247 +.INCLUDE: pkg_config.mk
249 # --- Files --------------------------------------------------------
251 .IF "$(GUIBASE)"=="aqua"
252 --- psprint/util/makefile.mk.old 2009-04-02 10:57:56.000000000 +0000
253 +++ psprint/util/makefile.mk 2009-04-06 16:42:09.000000000 +0000
254 @@ -83,5 +83,10 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def
256 # --- Targets ------------------------------------------------------------
258 +PKGCONFIG_MODULES=gdk-2.0 freetype2
259 +.INCLUDE: pkg_config.mk
260 +SHL1STDLIBS+=$(PKGCONFIG_LIBS)
265 --- configure.in.old 2009-04-06 16:42:08.000000000 +0000
266 +++ configure.in 2009-04-06 16:42:09.000000000 +0000
267 @@ -5494,6 +5494,10 @@ if test "$test_gtk" = "yes"; then
269 if test "$ENABLE_GTK" = "TRUE" ; then
270 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]))
271 + PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.10)
272 + if test "x$enable_cairo" == "xno" ; then
273 + PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
275 BUILD_TYPE="$BUILD_TYPE GTK"
277 if test "x$enable_systray" = "xyes"; then