[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpms/openoffice.org/devel openoffice.org-2.0.2.ooo59127.vcl.honourcairofont.patch, NONE, 1.1 openoffice.org.spec, 1.845, 1.846 openoffice.org-2.0.2.oooXXXXX.vcl.honourcairofont.patch, 1.4, NONE
- From: fedora-cvs-commits redhat com
- To: fedora-cvs-commits redhat com
- Subject: rpms/openoffice.org/devel openoffice.org-2.0.2.ooo59127.vcl.honourcairofont.patch, NONE, 1.1 openoffice.org.spec, 1.845, 1.846 openoffice.org-2.0.2.oooXXXXX.vcl.honourcairofont.patch, 1.4, NONE
- Date: Tue, 15 Aug 2006 05:54:54 -0400
Author: caolanm
Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv2417
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-2.0.2.ooo59127.vcl.honourcairofont.patch
Removed Files:
openoffice.org-2.0.2.oooXXXXX.vcl.honourcairofont.patch
Log Message:
add an issue number
openoffice.org-2.0.2.ooo59127.vcl.honourcairofont.patch:
psprint/inc/psprint/fontmanager.hxx | 17 ++++++++++++-
psprint/source/fontmanager/fontconfig.cxx | 38 ++++++++++++++++++++++++++++--
psprint/source/fontmanager/makefile.mk | 3 ++
psprint/util/makefile.mk | 5 +++
vcl/inc/impfont.hxx | 11 ++++++--
vcl/inc/vclenum.hxx | 8 ++++++
vcl/source/glyphs/gcach_ftyp.cxx | 20 +++++++++++++++
vcl/unx/source/gdi/salgdi3.cxx | 23 ++++++++++++++++++
8 files changed, 118 insertions(+), 7 deletions(-)
--- NEW FILE openoffice.org-2.0.2.ooo59127.vcl.honourcairofont.patch ---
diff -ru vcl/inc/impfont.hxx vcl/inc/impfont.hxx
--- openoffice.org.orig/vcl/inc/impfont.hxx 2006-05-22 13:59:55.000000000 +0100
+++ openoffice.org/vcl/inc/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
--- openoffice.org.orig/vcl/inc/vclenum.hxx 2006-05-22 13:59:55.000000000 +0100
+++ openoffice.org/vcl/inc/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
--- openoffice.org.orig/vcl/source/glyphs/gcach_ftyp.cxx 2006-05-23 12:35:49.000000000 +0100
+++ openoffice.org/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
--- openoffice.org.orig/vcl/unx/source/gdi/salgdi3.cxx 2006-05-22 13:59:52.000000000 +0100
+++ openoffice.org/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
--- openoffice.org.orig/psprint/inc/psprint/fontmanager.hxx 2006-05-22 13:59:50.000000000 +0100
+++ openoffice.org/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
--- openoffice.org.orig/psprint/source/fontmanager/fontconfig.cxx 2006-05-22 13:59:49.000000000 +0100
+++ openoffice.org/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
@@ -151,7 +153,7 @@
void FcPatternDestroy( FcPattern* pPattern )
{ m_pFcPatternDestroy( pPattern ); }
-
+
FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet )
{ return m_pFcFontList( pConfig, pPattern, pSet ); }
@@ -187,6 +189,7 @@
FcResult FcPatternGetBool( const FcPattern* pPattern, const char* object, int n, FcBool* s )
{ return m_pFcPatternGetBool( pPattern, object, n, s ); }
+
void FcDefaultSubstitute( FcPattern* pPattern )
{ m_pFcDefaultSubstitute( pPattern ); }
FcPattern* FcFontSetMatch( FcConfig* pConfig, FcFontSet **ppFontSet, int nset, FcPattern* pPattern, FcResult* pResult )
@@ -774,14 +777,18 @@
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, FcMatchFont );
+ if (const cairo_font_options_t *pOptions = gdk_screen_get_font_options(gdk_screen_get_default()))
+ 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
--- openoffice.org.orig/psprint/source/fontmanager/makefile.mk 2006-05-22 13:59:49.000000000 +0100
+++ openoffice.org/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
--- openoffice.org.orig/psprint/util/makefile.mk 2006-05-22 13:59:49.000000000 +0100
+++ openoffice.org/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
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.845
retrieving revision 1.846
diff -u -r1.845 -r1.846
--- openoffice.org.spec 14 Aug 2006 19:13:18 -0000 1.845
+++ openoffice.org.spec 15 Aug 2006 09:54:51 -0000 1.846
@@ -94,7 +94,7 @@
Patch26: workspace.fpicker6.patch
Patch27: openoffice.org-2.0.3.oooXXXXX.atkbroken.vcl.patch
Patch28: openoffice.org-2.0.3.oooXXXXX.selinux.bridges.patch
-Patch29: openoffice.org-2.0.2.oooXXXXX.vcl.honourcairofont.patch
+Patch29: openoffice.org-2.0.2.ooo59127.vcl.honourcairofont.patch
Patch30: openoffice.org-2.0.3.rh192588.officecfg.defaultcairooff.patch
Patch31: openoffice.org.2.0.3-ooo66018.cppuhelper.dangerousvisibility.patch
Patch32: openoffice.org-2.0.3.rhXXXXXX.vcl.annoyingbeeps.patch
@@ -948,7 +948,7 @@
%patch26 -p1 -b .workspace.fpicker6.patch
%patch27 -p1 -b .oooXXXXX.atkbroken.vcl.patch
%patch28 -p1 -b .oooXXXXX.selinux.bridges.patch
-%patch29 -p1 -b .oooXXXXX.vcl.honourcairofont.patch
+%patch29 -p1 -b .ooo59127.vcl.honourcairofont.patch
%patch30 -p1 -b .rh192588.officecfg.defaultcairooff.patch
%patch31 -p1 -b .ooo66018.cppuhelper.dangerousvisibility.patch
%patch32 -p1 -b .rhXXXXXX.vcl.annoyingbeeps.patch
--- openoffice.org-2.0.2.oooXXXXX.vcl.honourcairofont.patch DELETED ---
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]