ooo-build r13105 - in trunk: . patches/dev300
- From: brosenk svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13105 - in trunk: . patches/dev300
- Date: Mon, 7 Jul 2008 20:04:20 +0000 (UTC)
Author: brosenk
Date: Mon Jul 7 20:04:20 2008
New Revision: 13105
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13105&view=rev
Log:
m22-ify ooo64508
Added:
trunk/patches/dev300/ooo64508.vcl.honourfontconfighinting-m21.diff
- copied unchanged from r13104, /trunk/patches/dev300/ooo64508.vcl.honourfontconfighinting.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/ooo64508.vcl.honourfontconfighinting.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Mon Jul 7 20:04:20 2008
@@ -1792,7 +1792,10 @@
#gccXXXXX.solenv.javaregistration.diff
ubuntu-mstopdf.diff, ccheney
-[ FedoraLinuxOnlyFixes ]
+[ FedoraLinuxOnlyFixes <= dev680-m21 ]
+ooo64508.vcl.honourfontconfighinting-m21.diff
+
+[ FedoraLinuxOnlyFixes >= dev680-m22 ]
ooo64508.vcl.honourfontconfighinting.diff
[ FedoraCommonFixes ]
Modified: trunk/patches/dev300/ooo64508.vcl.honourfontconfighinting.diff
==============================================================================
--- trunk/patches/dev300/ooo64508.vcl.honourfontconfighinting.diff (original)
+++ trunk/patches/dev300/ooo64508.vcl.honourfontconfighinting.diff Mon Jul 7 20:04:20 2008
@@ -1,464 +1,6 @@
-diff -ru vcl/inc/impfont.hxx vcl/inc/impfont.hxx
---- vcl/inc/vcl/impfont.hxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/inc/vcl/impfont.hxx 2006-05-05 09:39:11.000000000 +0100
-@@ -155,6 +155,42 @@
- bool operator==( const ImplFontMetric& ) const;
- };
-
-+// ------------------
-+// - ImplFontHints -
-+// ------------------
-+
-+class ImplFontHints
-+{
-+public:
-+ FontEmbeddedBitmap meEmbeddedBitmap; // whether the embedded bitmaps should be used
-+ FontAntiAlias meAntiAlias; // whether the font should be antialiased
-+ 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
-+public:
-+ ImplFontHints() :
-+ meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW),
-+ meAntiAlias(ANTIALIAS_DONTKNOW),
-+ meAutoHint(AUTOHINT_DONTKNOW),
-+ meHinting(HINTING_DONTKNOW),
-+ meHintStyle(HINT_FULL)
-+ {}
-+ ImplFontHints(FontEmbeddedBitmap eEmbeddedBitmap, FontAntiAlias eAntiAlias,
-+ FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle) :
-+ meEmbeddedBitmap(eEmbeddedBitmap),
-+ meAntiAlias(eAntiAlias),
-+ meAutoHint(eAutoHint),
-+ meHinting(eHinting),
-+ meHintStyle(eHintStyle)
-+ {}
-+ FontAutoHint GetUseAutoHint() const { return meAutoHint; }
-+ FontHintStyle GetHintStyle() const { return meHintStyle; }
-+ bool DontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; }
-+ bool DontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; }
-+ bool DontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); }
-+};
-+
-+
- // -------------------
- // - ImplFontCharMap -
- // -------------------
-diff -ru vcl/inc/outdev.hxx vcl/inc/outdev.hxx
---- vcl/inc/vcl/outdev.hxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/inc/vcl/outdev.hxx 2006-05-05 10:27:05.000000000 +0100
-@@ -106,6 +106,8 @@
- class FontCharMap;
- class SalLayout;
- class ImplLayoutArgs;
-+class ImplFontHints;
-+class ImplFontAttributes;
- class VirtualDevice;
-
- namespace basegfx {
-@@ -566,6 +568,7 @@
-
- SAL_DLLPRIVATE static FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont );
- SAL_DLLPRIVATE static BOOL ImplIsUnderlineAbove( const Font& );
-+ SAL_DLLPRIVATE void ImplGetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
- //#endif
-
- protected:
-diff -ru vcl/inc/outfont.hxx vcl/inc/outfont.hxx
---- vcl/inc/vcl/outfont.hxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/inc/vcl/outfont.hxx 2006-05-04 14:37:46.000000000 +0100
-@@ -118,8 +118,6 @@
- bool IsDeviceFont() const { return mbDevice; }
- bool IsEmbeddable() const { return mbEmbeddable; }
- bool IsSubsettable() const { return mbSubsettable; }
-- FontEmbeddedBitmap UseEmbeddedBitmap() const { return meEmbeddedBitmap; }
-- FontAntiAlias UseAntiAlias() const { return meAntiAlias; }
-
- public: // TODO: hide members behind accessor methods
- String maMapNames; // List of family name aliass separated with ';'
-@@ -128,8 +126,6 @@
- bool mbDevice; // true: built in font
- bool mbSubsettable; // true: a subset of the font can be created
- bool mbEmbeddable; // true: the font can be embedded
-- FontEmbeddedBitmap meEmbeddedBitmap; // whether the embedded bitmaps should be used
-- FontAntiAlias meAntiAlias; // whether the font should be antialiased
- };
-
- // ----------------
-diff -ru vcl/inc/salgdi.hxx vcl/inc/salgdi.hxx
---- vcl/inc/vcl/salgdi.hxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/inc/vcl/salgdi.hxx 2006-05-05 10:40:08.000000000 +0100
-@@ -215,6 +215,8 @@
- void ReleaseFonts() { SetFont( NULL, 0 ); }
- // get the current font's metrics
- virtual void GetFontMetric( ImplFontMetricData* ) = 0;
-+ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const = 0;
-+
- // get kernign pairs of the current font
- // return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ) = 0;
-diff -ru vcl/inc/vclenum.hxx vcl/inc/vclenum.hxx
---- vcl/inc/vcl/vclenum.hxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/inc/vcl/vclenum.hxx 2006-05-04 15:53:15.000000000 +0100
-@@ -289,6 +289,27 @@
-
- #endif
-
-+#ifndef ENUM_FONTAUTOHINT_DECLARED
-+#define ENUM_FONTAUTOHINT_DECLARED
-+
-+enum FontAutoHint { AUTOHINT_DONTKNOW, AUTOHINT_FALSE, AUTOHINT_TRUE };
-+
-+#endif
-+
-+#ifndef ENUM_FONTHINTING_DECLARED
-+#define ENUM_FONTHINTING_DECLARED
-+
-+enum FontHinting { HINTING_DONTKNOW, HINTING_FALSE, HINTING_TRUE };
-+
-+#endif
-+
-+#ifndef ENUM_FONTHINTSTYLE_DECLARED
-+#define ENUM_FONTHINTSTYLE_DECLARED
-+
-+enum FontHintStyle { HINT_NONE, HINT_SLIGHT, HINT_MEDIUM, HINT_FULL };
-+
-+#endif
-+
- // ------------------------------------------------------------
-
- #ifndef ENUM_KEYFUNCTYPE_DECLARED
-diff -ru vcl/source/gdi/outdev3.cxx vcl/source/gdi/outdev3.cxx
---- vcl/source/gdi/outdev3.cxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/source/gdi/outdev3.cxx 2006-05-05 10:27:34.000000000 +0100
-@@ -7250,6 +7250,14 @@
-
- // -----------------------------------------------------------------------
-
-+void OutputDevice::ImplGetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints &rHints) const
-+{
-+ if ( mpGraphics )
-+ mpGraphics->GetFontHints( rFontAttributes, nSize, rHints );
-+}
-+
-+// -----------------------------------------------------------------------
-+
- FontMetric OutputDevice::GetFontMetric() const
- {
- DBG_TRACE( "OutputDevice::GetFontMetric()" );
-diff -ru vcl/source/glyphs/gcach_ftyp.hxx vcl/source/glyphs/gcach_ftyp.hxx
---- vcl/source/glyphs/gcach_ftyp.hxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/source/glyphs/gcach_ftyp.hxx 2006-05-04 14:53:16.000000000 +0100
-@@ -93,10 +93,6 @@
- int GetFaceNum() const { return mnFaceNum; }
- int GetSynthetic() const { return mnSynthetic; }
- sal_IntPtr GetFontId() const { return mnFontId; }
-- bool DontUseAntiAlias() const
-- { return maDevFontAttributes.UseAntiAlias() == ANTIALIAS_FALSE; }
-- bool DontUseEmbeddedBitmaps() const
-- { return maDevFontAttributes.UseEmbeddedBitmap() == EMBEDDEDBITMAP_FALSE; }
- bool IsSymbolFont() const { return maDevFontAttributes.IsSymbolFont(); }
- const ImplFontAttributes& GetFontAttributes() const { return maDevFontAttributes; }
-
-@@ -212,6 +208,7 @@
- int mnWidth;
- int mnPrioEmbedded;
- int mnPrioAntiAlias;
-+ int mnPrioAutoHint;
- FtFontInfo* mpFontInfo;
- FT_Int mnLoadFlags;
- double mfStretch;
-diff -ru vcl/unx/inc/pspgraphics.h vcl/unx/inc/pspgraphics.h
---- vcl/unx/inc/pspgraphics.h 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/unx/inc/pspgraphics.h 2006-05-05 10:41:23.000000000 +0100
-@@ -121,6 +121,7 @@
- virtual void SetTextColor( SalColor nSalColor );
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- virtual void GetFontMetric( ImplFontMetricData* );
-+ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
- virtual ImplFontCharMap* GetImplFontCharMap() const;
- virtual void GetDevFontList( ImplDevFontList* );
-diff -ru vcl/unx/inc/salgdi.h vcl/unx/inc/salgdi.h
---- vcl/unx/inc/salgdi.h 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/unx/inc/salgdi.h 2006-05-05 10:41:12.000000000 +0100
-@@ -238,6 +238,7 @@
- virtual void SetTextColor( SalColor nSalColor );
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- virtual void GetFontMetric( ImplFontMetricData* );
-+ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
- virtual ImplFontCharMap* GetImplFontCharMap() const;
- virtual void GetDevFontList( ImplDevFontList* );
-diff -ru vcl/unx/source/gdi/pspgraphics.cxx vcl/unx/source/gdi/pspgraphics.cxx
---- vcl/unx/source/gdi/pspgraphics.cxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/unx/source/gdi/pspgraphics.cxx 2006-05-05 10:28:18.000000000 +0100
-@@ -862,6 +862,10 @@
- }
- }
-
-+void PspGraphics::GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const
-+{
-+}
-+
- void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric )
- {
- const psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
-@@ -1230,32 +1234,6 @@
- aDFA.mePitch = ToFontPitch (rInfo.m_ePitch);
- aDFA.mbSymbolFlag = (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL);
-
-- switch (rInfo.m_eEmbeddedbitmap)
-- {
-- default:
-- aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
-- break;
-- case psp::fcstatus::istrue:
-- aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_TRUE;
-- break;
-- case psp::fcstatus::isfalse:
-- aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_FALSE;
-- break;
-- }
--
-- switch (rInfo.m_eAntialias)
-- {
-- default:
-- aDFA.meAntiAlias = ANTIALIAS_DONTKNOW;
-- break;
-- case psp::fcstatus::istrue:
-- aDFA.meAntiAlias = ANTIALIAS_TRUE;
-- break;
-- case psp::fcstatus::isfalse:
-- aDFA.meAntiAlias = ANTIALIAS_FALSE;
-- break;
-- }
--
- // special case for the ghostscript fonts
- if( aDFA.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL )
- aDFA.maName = aDFA.maName.Copy( 4 );
-diff -ru vcl/unx/source/gdi/salgdi3.cxx vcl/unx/source/gdi/salgdi3.cxx
---- vcl/unx/source/gdi/salgdi3.cxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/unx/source/gdi/salgdi3.cxx 2006-05-05 10:30:18.000000000 +0100
-@@ -1367,6 +1367,174 @@
-
- // ----------------------------------------------------------------------------
-
-+void X11SalGraphics::GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const
-+{
-+ psp::FastPrintFontInfo aInfo;
-+ // set family name
-+ aInfo.m_aFamilyName = rFontAttributes.GetFamilyName();
-+ // set italic
-+ switch( rFontAttributes.GetSlant() )
-+ {
-+ case ITALIC_NONE:
-+ aInfo.m_eItalic = psp::italic::Upright;
-+ break;
-+ case ITALIC_NORMAL:
-+ aInfo.m_eItalic = psp::italic::Italic;
-+ break;
-+ case ITALIC_OBLIQUE:
-+ aInfo.m_eItalic = psp::italic::Oblique;
-+ break;
-+ default:
-+ aInfo.m_eItalic = psp::italic::Unknown;
-+ break;
-+
-+ }
-+ // set weight
-+ switch( rFontAttributes.GetWeight() )
-+ {
-+ case WEIGHT_THIN:
-+ aInfo.m_eWeight = psp::weight::Thin;
-+ break;
-+ case WEIGHT_ULTRALIGHT:
-+ aInfo.m_eWeight = psp::weight::UltraLight;
-+ break;
-+ case WEIGHT_LIGHT:
-+ aInfo.m_eWeight = psp::weight::Light;
-+ break;
-+ case WEIGHT_SEMILIGHT:
-+ aInfo.m_eWeight = psp::weight::SemiLight;
-+ break;
-+ case WEIGHT_NORMAL:
-+ aInfo.m_eWeight = psp::weight::Normal;
-+ break;
-+ case WEIGHT_MEDIUM:
-+ aInfo.m_eWeight = psp::weight::Medium;
-+ break;
-+ case WEIGHT_SEMIBOLD:
-+ aInfo.m_eWeight = psp::weight::SemiBold;
-+ break;
-+ case WEIGHT_BOLD:
-+ aInfo.m_eWeight = psp::weight::Bold;
-+ break;
-+ case WEIGHT_ULTRABOLD:
-+ aInfo.m_eWeight = psp::weight::UltraBold;
-+ break;
-+ case WEIGHT_BLACK:
-+ aInfo.m_eWeight = psp::weight::Black;
-+ break;
-+ default:
-+ aInfo.m_eWeight = psp::weight::Unknown;
-+ break;
-+ }
-+ // set width
-+ switch( rFontAttributes.GetWidthType() )
-+ {
-+ case WIDTH_ULTRA_CONDENSED:
-+ aInfo.m_eWidth = psp::width::UltraCondensed;
-+ break;
-+ case WIDTH_EXTRA_CONDENSED:
-+ aInfo.m_eWidth = psp::width::ExtraCondensed;
-+ break;
-+ case WIDTH_CONDENSED:
-+ aInfo.m_eWidth = psp::width::Condensed;
-+ break;
-+ case WIDTH_SEMI_CONDENSED:
-+ aInfo.m_eWidth = psp::width::SemiCondensed;
-+ break;
-+ case WIDTH_NORMAL:
-+ aInfo.m_eWidth = psp::width::Normal;
-+ break;
-+ case WIDTH_SEMI_EXPANDED:
-+ aInfo.m_eWidth = psp::width::SemiExpanded;
-+ break;
-+ case WIDTH_EXPANDED:
-+ aInfo.m_eWidth = psp::width::Expanded;
-+ break;
-+ case WIDTH_EXTRA_EXPANDED:
-+ aInfo.m_eWidth = psp::width::ExtraExpanded;
-+ break;
-+ case WIDTH_ULTRA_EXPANDED:
-+ aInfo.m_eWidth = psp::width::UltraExpanded;
-+ break;
-+ default:
-+ aInfo.m_eWidth = psp::width::Unknown;
-+ break;
-+ }
-+
-+ psp::FontConfigHints aHints(psp::PrintFontManager::get().getFontConfigHints(aInfo, nSize));
-+
-+ switch (aHints.m_eEmbeddedbitmap)
-+ {
-+ default:
-+ rFontHints.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
-+ break;
-+ case psp::fcstatus::istrue:
-+ rFontHints.meEmbeddedBitmap = EMBEDDEDBITMAP_TRUE;
-+ break;
-+ case psp::fcstatus::isfalse:
-+ rFontHints.meEmbeddedBitmap = EMBEDDEDBITMAP_FALSE;
-+ break;
-+ }
-+
-+ switch (aHints.m_eAntialias)
-+ {
-+ default:
-+ rFontHints.meAntiAlias = ANTIALIAS_DONTKNOW;
-+ break;
-+ case psp::fcstatus::istrue:
-+ rFontHints.meAntiAlias = ANTIALIAS_TRUE;
-+ break;
-+ case psp::fcstatus::isfalse:
-+ rFontHints.meAntiAlias = ANTIALIAS_FALSE;
-+ break;
-+ }
-+
-+ switch (aHints.m_eAutoHint)
-+ {
-+ default:
-+ rFontHints.meAutoHint = AUTOHINT_DONTKNOW;
-+ break;
-+ case psp::fcstatus::istrue:
-+ rFontHints.meAutoHint = AUTOHINT_TRUE;
-+ break;
-+ case psp::fcstatus::isfalse:
-+ rFontHints.meAutoHint = AUTOHINT_FALSE;
-+ break;
-+ }
-+
-+ switch (aHints.m_eHinting)
-+ {
-+ default:
-+ rFontHints.meHinting = HINTING_DONTKNOW;
-+ break;
-+ case psp::fcstatus::istrue:
-+ rFontHints.meHinting = HINTING_TRUE;
-+ break;
-+ case psp::fcstatus::isfalse:
-+ rFontHints.meHinting = HINTING_FALSE;
-+ break;
-+ }
-+
-+ switch (aHints.m_eHintStyle)
-+ {
-+ case psp::fchint::Nohint:
-+ rFontHints.meHintStyle = HINT_NONE;
-+ break;
-+ case psp::fchint::Slight:
-+ rFontHints.meHintStyle = HINT_SLIGHT;
-+ break;
-+ case psp::fchint::Medium:
-+ rFontHints.meHintStyle = HINT_MEDIUM;
-+ break;
-+ default:
-+ case psp::fchint::Full:
-+ rFontHints.meHintStyle = HINT_FULL;
-+ break;
-+ }
-+}
-+
-+// ----------------------------------------------------------------------------
-+
- void
- X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric )
- {
-diff -ru vcl/unx/source/gdi/xlfd_extd.cxx vcl/unx/source/gdi/xlfd_extd.cxx
---- vcl/unx/source/gdi/xlfd_extd.cxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/unx/source/gdi/xlfd_extd.cxx 2006-05-04 14:51:52.000000000 +0100
-@@ -114,9 +114,6 @@
- mbSubsettable = false;
- mbEmbeddable = false;
-
-- meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
-- meAntiAlias = ANTIALIAS_DONTKNOW;
--
- mnQuality = -1;
- }
-
-diff -ru vcl/win/inc/salgdi.h vcl/win/inc/salgdi.h
---- vcl/win/inc/salgdi.h 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/win/inc/salgdi.h 2006-05-05 10:40:44.000000000 +0100
-@@ -270,6 +270,7 @@
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- // get the current font's etrics
- virtual void GetFontMetric( ImplFontMetricData* );
-+ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nHints, ImplFontHints& rFontHints);
- // get kernign pairs of the current font
- // return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
-diff -ru vcl/win/source/gdi/salgdi3.cxx vcl/win/source/gdi/salgdi3.cxx
---- vcl/win/source/gdi/salgdi3.cxx 2006-05-04 08:55:40.000000000 +0100
-+++ vcl/win/source/gdi/salgdi3.cxx 2006-05-05 10:40:47.000000000 +0100
-@@ -1250,6 +1250,12 @@
-
- // -----------------------------------------------------------------------
-
-+void WinSalGraphics::GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints)
-+{
-+}
-+
-+// -----------------------------------------------------------------------
-+
- void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric )
- {
- if ( aSalShlData.mbWNT )
-diff -ru psprint/inc/psprint/fontmanager.hxx psprint/inc/psprint/fontmanager.hxx
---- psprint/inc/psprint/fontmanager.hxx 2006-05-08 16:00:09.000000000 -0400
-+++ psprint/inc/psprint/fontmanager.hxx 2006-05-08 16:01:09.000000000 -0400
-@@ -155,6 +155,33 @@
+--- psprint/inc/psprint/fontmanager.hxx.64508~ 2008-04-11 12:09:55.000000000 +0200
++++ psprint/inc/psprint/fontmanager.hxx 2008-07-07 21:56:18.321847827 +0200
+@@ -142,6 +142,33 @@ enum type {
};
}
@@ -492,7 +34,7 @@
/*
* the difference between FastPrintFontInfo and PrintFontInfo
* is that the information in FastPrintFontInfo can usually
-@@ -180,8 +207,6 @@
+@@ -167,8 +194,6 @@ struct FastPrintFontInfo
weight::type m_eWeight;
pitch::type m_ePitch;
rtl_TextEncoding m_aEncoding;
@@ -501,7 +43,7 @@
FastPrintFontInfo() :
m_nID( 0 ),
-@@ -191,9 +216,7 @@
+@@ -178,9 +203,7 @@ struct FastPrintFontInfo
m_eWidth( width::Unknown ),
m_eWeight( weight::Unknown ),
m_ePitch( pitch::Unknown ),
@@ -512,7 +54,7 @@
{}
};
-@@ -308,9 +331,6 @@
+@@ -297,9 +320,6 @@ class PrintFontManager
bool m_bHaveVerticalSubstitutedGlyphs;
bool m_bUserOverride;
@@ -522,18 +64,17 @@
std::map< sal_Unicode, sal_Int32 > m_aEncodingVector;
std::map< sal_Unicode, rtl::OString > m_aNonEncoded;
-@@ -726,6 +746,7 @@
+@@ -742,6 +762,7 @@ public:
false else
*/
bool matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale );
+ FontConfigHints getFontConfigHints(const FastPrintFontInfo& rInfo, int nSize);
- String Substitute(const std::vector<String> &rNames, const std::vector<sal_Unicode> &rGlyphs,
- const ByteString &rLangAttrib, italic::type eItalic, weight::type eWeight,
-diff -ru psprint/source/fontmanager/fontcache.cxx psprint/source/fontmanager/fontcache.cxx
---- psprint/source/fontmanager/fontcache.cxx 2006-05-08 16:00:10.000000000 -0400
-+++ psprint/source/fontmanager/fontcache.cxx 2006-05-08 16:00:32.000000000 -0400
-@@ -220,9 +220,9 @@
+ rtl::OUString Substitute( const rtl::OUString& rFontName, rtl::OUString& rMissingCodes,
+ const rtl::OString& rLangAttrib, italic::type eItalic, weight::type eWeight,
+--- psprint/source/fontmanager/fontcache.cxx.64508~ 2008-04-11 12:12:37.000000000 +0200
++++ psprint/source/fontmanager/fontcache.cxx 2008-07-07 21:56:18.323846545 +0200
+@@ -214,9 +214,9 @@ void FontCache::flush()
aLine.Append( ';' );
aLine.Append( (*it)->m_bUserOverride ? "1" : "0" );
aLine.Append( ';' );
@@ -545,7 +86,7 @@
switch( (*it)->m_eType )
{
-@@ -432,9 +432,6 @@
+@@ -426,9 +426,6 @@ void FontCache::read()
= atoi( pLine + nTokenPos[14] );
pFont->m_bUserOverride
= (atoi( pLine + nTokenPos[15] ) != 0);
@@ -555,7 +96,7 @@
int nStyleTokenNr = 18;
switch( eType )
{
-@@ -564,8 +561,6 @@
+@@ -560,8 +557,6 @@ void FontCache::copyPrintFont( const Pri
pTo->m_nYMax = pFrom->m_nYMax;
pTo->m_bHaveVerticalSubstitutedGlyphs = pFrom->m_bHaveVerticalSubstitutedGlyphs;
pTo->m_bUserOverride = pFrom->m_bUserOverride;
@@ -564,7 +105,7 @@
}
/*
-@@ -627,9 +622,7 @@
+@@ -623,9 +618,7 @@ bool FontCache::equalsPrintFont( const P
pRight->m_nXMax != pLeft->m_nXMax ||
pRight->m_nYMax != pLeft->m_nYMax ||
pRight->m_bHaveVerticalSubstitutedGlyphs != pLeft->m_bHaveVerticalSubstitutedGlyphs ||
@@ -575,18 +116,17 @@
)
return false;
std::list< int >::const_iterator lit, rit;
-diff -ru psprint/source/fontmanager/fontconfig.cxx psprint/source/fontmanager/fontconfig.cxx
---- psprint/source/fontmanager/fontconfig.cxx 2006-05-08 16:00:10.000000000 -0400
-+++ psprint/source/fontmanager/fontconfig.cxx 2006-05-08 16:03:34.000000000 -0400
-@@ -106,6 +106,7 @@
- FcPattern* (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*);
+--- psprint/source/fontmanager/fontconfig.cxx.64508~ 2008-04-11 12:12:55.000000000 +0200
++++ psprint/source/fontmanager/fontconfig.cxx 2008-07-07 21:56:18.326845878 +0200
+@@ -122,6 +122,7 @@ class FontCfgWrapper
+ FcBool (*m_pFcConfigAppFontAddDir)(FcConfig*, const FcChar8*);
FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind);
FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int);
+ FcBool (*m_pFcPatternAddDouble)(FcPattern*,const char*,double);
FcBool (*m_pFcPatternAddBool)(FcPattern*,const char*,FcBool);
FcBool (*m_pFcPatternAddCharSet)(FcPattern*,const char*,const FcCharSet*);
FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*);
-@@ -194,6 +195,8 @@
+@@ -226,6 +227,8 @@ public:
{ return m_pFcConfigSubstitute( pConfig, pPattern, eKind ); }
FcBool FcPatternAddInteger( FcPattern* pPattern, const char* pObject, int nValue )
{ return m_pFcPatternAddInteger( pPattern, pObject, nValue ); }
@@ -595,7 +135,7 @@
FcBool FcPatternAddString( FcPattern* pPattern, const char* pObject, const FcChar8* pString )
{ return m_pFcPatternAddString( pPattern, pObject, pString ); }
FcBool FcPatternAddBool( FcPattern* pPattern, const char* pObject, bool nValue )
-@@ -279,6 +282,8 @@
+@@ -327,6 +330,8 @@ FontCfgWrapper::FontCfgWrapper()
loadSymbol( "FcConfigSubstitute" );
m_pFcPatternAddInteger = (FcBool(*)(FcPattern*,const char*,int))
loadSymbol( "FcPatternAddInteger" );
@@ -604,7 +144,7 @@
m_pFcPatternAddBool = (FcBool(*)(FcPattern*,const char*,FcBool))
loadSymbol( "FcPatternAddBool" );
m_pFcPatternAddCharSet = (FcBool(*)(FcPattern*,const char*,const FcCharSet *))
-@@ -308,6 +313,7 @@
+@@ -364,6 +369,7 @@ FontCfgWrapper::FontCfgWrapper()
m_pFcDefaultSubstitute &&
m_pFcConfigSubstitute &&
m_pFcPatternAddInteger &&
@@ -612,7 +152,7 @@
m_pFcPatternAddCharSet &&
m_pFcPatternAddBool &&
m_pFcPatternAddString
-@@ -410,7 +416,7 @@
+@@ -580,7 +586,7 @@ int PrintFontManager::countFontconfigFon
int weight = 0;
int spacing = 0;
int nCollectionEntry = -1;
@@ -620,8 +160,8 @@
+ FcBool outline = false;
FcResult eFileRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_FILE, 0, &file );
- FcResult eFamilyRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_FAMILY, 0, &family );
-@@ -420,8 +426,6 @@
+ FcResult eFamilyRes = lcl_FamilyFromPattern(rWrapper, pFSet->fonts[i], &family, rWrapper.m_aFontconfigNameToLocalized );
+@@ -590,8 +596,6 @@ int PrintFontManager::countFontconfigFon
FcResult eSpacRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SPACING, 0, &spacing );
FcResult eOutRes = rWrapper.FcPatternGetBool( pFSet->fonts[i], FC_OUTLINE, 0, &outline );
FcResult eIndexRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry );
@@ -630,7 +170,7 @@
if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eOutRes != FcResultMatch )
continue;
-@@ -559,15 +563,6 @@
+@@ -731,15 +735,6 @@ int PrintFontManager::countFontconfigFon
{
pUpdate->m_aStyleName = OStringToOUString( OString( (sal_Char*)style ), RTL_TEXTENCODING_UTF8 );
}
@@ -646,7 +186,7 @@
// update font cache
m_pFontCache->updateFontCacheEntry( pUpdate, false );
-@@ -751,6 +746,78 @@
+@@ -975,6 +970,78 @@ rtl::OUString PrintFontManager::Substitu
return aName;
}
@@ -724,8 +264,8 @@
+
bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale )
{
- #ifdef ENABLE_FONTCONFIG
-@@ -777,11 +843,7 @@
+ FontCfgWrapper& rWrapper = FontCfgWrapper::get();
+@@ -1000,11 +1067,7 @@ bool PrintFontManager::matchFont( FastPr
if( aLangAttrib.getLength() )
rWrapper.FcPatternAddString( pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr() );
@@ -738,10 +278,9 @@
rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern );
rWrapper.FcDefaultSubstitute( pPattern );
-diff -ru psprint/source/fontmanager/fontmanager.cxx psprint/source/fontmanager/fontmanager.cxx
---- psprint/source/fontmanager/fontmanager.cxx 2006-05-08 16:00:10.000000000 -0400
-+++ psprint/source/fontmanager/fontmanager.cxx 2006-05-08 16:00:32.000000000 -0400
-@@ -391,9 +391,7 @@
+--- psprint/source/fontmanager/fontmanager.cxx.64508~ 2008-04-11 12:13:15.000000000 +0200
++++ psprint/source/fontmanager/fontmanager.cxx 2008-07-07 21:56:18.333845720 +0200
+@@ -355,9 +355,7 @@ PrintFontManager::PrintFont::PrintFont(
m_nXMax( 0 ),
m_nYMax( 0 ),
m_bHaveVerticalSubstitutedGlyphs( false ),
@@ -752,7 +291,7 @@
{
}
-@@ -2761,8 +2759,6 @@
+@@ -2731,8 +2729,6 @@ void PrintFontManager::fillPrintFontInfo
rInfo.m_eWeight = pFont->m_eWeight;
rInfo.m_ePitch = pFont->m_ePitch;
rInfo.m_aEncoding = pFont->m_aEncoding;
@@ -761,7 +300,7 @@
rInfo.m_aAliases.clear();
for( ::std::list< int >::iterator it = pFont->m_aAliases.begin(); it != pFont->m_aAliases.end(); ++it )
rInfo.m_aAliases.push_back( m_pAtoms->getString( ATOM_FAMILYNAME, *it ) );
-@@ -4006,8 +4002,6 @@
+@@ -3976,8 +3972,6 @@ bool PrintFontManager::readOverrideMetri
BuiltinFont* pFont = new BuiltinFont();
pFont->m_nDirectory = 0;
pFont->m_bUserOverride = false;
@@ -770,14 +309,151 @@
pFont->m_pMetrics = new PrintFontMetrics;
memset( pFont->m_pMetrics->m_aPages, 0xff, sizeof( pFont->m_pMetrics->m_aPages ) );
pFont->m_pMetrics->m_bKernPairsQueried = true;
-Index: source/glyphs/gcach_ftyp.cxx
-===================================================================
-RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.cxx,v
-retrieving revision 1.139.12.2
-diff -u -r1.139.12.2 gcach_ftyp.cxx
---- vcl/source/glyphs/gcach_ftyp.cxx 24 Jan 2007 15:08:39 -0000 1.139.12.2
-+++ vcl/source/glyphs/gcach_ftyp.cxx 13 Apr 2007 11:33:47 -0000
-@@ -44,6 +44,7 @@
+--- vcl/inc/vcl/impfont.hxx.64508~ 2008-04-11 09:39:29.000000000 +0200
++++ vcl/inc/vcl/impfont.hxx 2008-07-07 21:56:18.192846377 +0200
+@@ -135,6 +135,42 @@ public:
+ bool operator==( const ImplFontMetric& ) const;
+ };
+
++// ------------------
++// - ImplFontHints -
++// ------------------
++
++class ImplFontHints
++{
++public:
++ FontEmbeddedBitmap meEmbeddedBitmap; // whether the embedded bitmaps should be used
++ FontAntiAlias meAntiAlias; // whether the font should be antialiased
++ 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
++public:
++ ImplFontHints() :
++ meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW),
++ meAntiAlias(ANTIALIAS_DONTKNOW),
++ meAutoHint(AUTOHINT_DONTKNOW),
++ meHinting(HINTING_DONTKNOW),
++ meHintStyle(HINT_FULL)
++ {}
++ ImplFontHints(FontEmbeddedBitmap eEmbeddedBitmap, FontAntiAlias eAntiAlias,
++ FontAutoHint eAutoHint, FontHinting eHinting, FontHintStyle eHintStyle) :
++ meEmbeddedBitmap(eEmbeddedBitmap),
++ meAntiAlias(eAntiAlias),
++ meAutoHint(eAutoHint),
++ meHinting(eHinting),
++ meHintStyle(eHintStyle)
++ {}
++ FontAutoHint GetUseAutoHint() const { return meAutoHint; }
++ FontHintStyle GetHintStyle() const { return meHintStyle; }
++ bool DontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; }
++ bool DontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; }
++ bool DontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); }
++};
++
++
+ // -------------------
+ // - ImplFontCharMap -
+ // -------------------
+--- vcl/inc/vcl/outdev.hxx.64508~ 2008-06-24 13:38:45.000000000 +0200
++++ vcl/inc/vcl/outdev.hxx 2008-07-07 21:56:18.195847177 +0200
+@@ -77,6 +77,8 @@ class AlphaMask;
+ class FontCharMap;
+ class SalLayout;
+ class ImplLayoutArgs;
++class ImplFontHints;
++class ImplFontAttributes;
+ class VirtualDevice;
+
+ namespace com {
+@@ -549,6 +551,7 @@ public:
+
+ SAL_DLLPRIVATE static FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont );
+ SAL_DLLPRIVATE static BOOL ImplIsUnderlineAbove( const Font& );
++ SAL_DLLPRIVATE void ImplGetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
+ //#endif
+
+ protected:
+--- vcl/inc/vcl/outfont.hxx.64508~ 2008-04-11 09:48:01.000000000 +0200
++++ vcl/inc/vcl/outfont.hxx 2008-07-07 21:56:18.252846251 +0200
+@@ -101,8 +101,6 @@ public: // TODO: create matching interfa
+ bool IsDeviceFont() const { return mbDevice; }
+ bool IsEmbeddable() const { return mbEmbeddable; }
+ bool IsSubsettable() const { return mbSubsettable; }
+- FontEmbeddedBitmap UseEmbeddedBitmap() const { return meEmbeddedBitmap; }
+- FontAntiAlias UseAntiAlias() const { return meAntiAlias; }
+
+ public: // TODO: hide members behind accessor methods
+ String maMapNames; // List of family name aliass separated with ';'
+@@ -111,8 +109,6 @@ public: // TODO: hide members behind acc
+ bool mbDevice; // true: built in font
+ bool mbSubsettable; // true: a subset of the font can be created
+ bool mbEmbeddable; // true: the font can be embedded
+- FontEmbeddedBitmap meEmbeddedBitmap; // whether the embedded bitmaps should be used
+- FontAntiAlias meAntiAlias; // whether the font should be antialiased
+ };
+
+ // ----------------
+--- vcl/inc/vcl/salgdi.hxx.64508~ 2008-06-24 13:39:01.000000000 +0200
++++ vcl/inc/vcl/salgdi.hxx 2008-07-07 21:56:18.253846518 +0200
+@@ -230,6 +230,8 @@ public:
+ void ReleaseFonts() { SetFont( NULL, 0 ); }
+ // get the current font's metrics
+ virtual void GetFontMetric( ImplFontMetricData* ) = 0;
++ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const = 0;
++
+ // get kernign pairs of the current font
+ // return only PairCount if (pKernPairs == NULL)
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ) = 0;
+--- vcl/inc/vcl/vclenum.hxx.64508~ 2008-05-30 12:05:37.000000000 +0200
++++ vcl/inc/vcl/vclenum.hxx 2008-07-07 21:56:18.255846492 +0200
+@@ -284,6 +284,27 @@ enum FontAntiAlias { ANTIALIAS_DONTKNOW,
+
+ #endif
+
++#ifndef ENUM_FONTAUTOHINT_DECLARED
++#define ENUM_FONTAUTOHINT_DECLARED
++
++enum FontAutoHint { AUTOHINT_DONTKNOW, AUTOHINT_FALSE, AUTOHINT_TRUE };
++
++#endif
++
++#ifndef ENUM_FONTHINTING_DECLARED
++#define ENUM_FONTHINTING_DECLARED
++
++enum FontHinting { HINTING_DONTKNOW, HINTING_FALSE, HINTING_TRUE };
++
++#endif
++
++#ifndef ENUM_FONTHINTSTYLE_DECLARED
++#define ENUM_FONTHINTSTYLE_DECLARED
++
++enum FontHintStyle { HINT_NONE, HINT_SLIGHT, HINT_MEDIUM, HINT_FULL };
++
++#endif
++
+ // ------------------------------------------------------------
+
+ #ifndef ENUM_KEYFUNCTYPE_DECLARED
+--- vcl/source/gdi/outdev3.cxx.64508~ 2008-04-11 10:49:58.000000000 +0200
++++ vcl/source/gdi/outdev3.cxx 2008-07-07 21:56:18.262847312 +0200
+@@ -7332,6 +7332,14 @@ BOOL OutputDevice::IsFontAvailable( cons
+
+ // -----------------------------------------------------------------------
+
++void OutputDevice::ImplGetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints &rHints) const
++{
++ if ( mpGraphics )
++ mpGraphics->GetFontHints( rFontAttributes, nSize, rHints );
++}
++
++// -----------------------------------------------------------------------
++
+ FontMetric OutputDevice::GetFontMetric() const
+ {
+ DBG_TRACE( "OutputDevice::GetFontMetric()" );
+--- vcl/source/glyphs/gcach_ftyp.cxx.64508~ 2008-04-11 10:57:28.000000000 +0200
++++ vcl/source/glyphs/gcach_ftyp.cxx 2008-07-07 21:56:18.337846718 +0200
+@@ -43,6 +43,7 @@
#include <vcl/impfont.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/bmpacc.hxx>
@@ -785,7 +461,7 @@
#include <tools/poly.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-@@ -616,9 +617,6 @@
+@@ -623,9 +624,6 @@ long FreetypeManager::AddFontDir( const
aDFA.mbSubsettable= false;
aDFA.mbEmbeddable = false;
@@ -795,7 +471,7 @@
FT_Done_Face( aFaceFT );
AddFontFile( aCFileName, nFaceNum, ++mnNextFontId, aDFA, NULL );
++nCount;
-@@ -698,6 +696,7 @@
+@@ -705,6 +703,7 @@ FreetypeServerFont::FreetypeServerFont(
: ServerFont( rFSD ),
mnPrioEmbedded(nDefaultPrioEmbedded),
mnPrioAntiAlias(nDefaultPrioAntiAlias),
@@ -803,7 +479,7 @@
mpFontInfo( pFI ),
maFaceFT( NULL ),
maSizeFT( NULL ),
-@@ -830,42 +829,69 @@
+@@ -834,42 +833,69 @@ FreetypeServerFont::FreetypeServerFont(
mbArtItalic = (rFSD.meItalic != ITALIC_NONE && pFI->GetFontAttributes().GetSlant() == ITALIC_NONE);
mbArtBold = (rFSD.meWeight > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM);
@@ -893,40 +569,161 @@
+ }
+ }
+
- #endif
-
- if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) )
-@@ -1334,11 +1377,11 @@
- #if (FTVERSION >= 2002)
- // for 0/90/180/270 degree fonts enable autohinting even if not advisable
- // non-hinted and non-antialiased bitmaps just look too ugly
-- if( (mnCos==0 || mnSin==0) && (nDefaultPrioAutoHint > 0) )
-+ if( (mnCos==0 || mnSin==0) && (mnPrioAutoHint > 0) )
- nLoadFlags &= ~FT_LOAD_NO_HINTING;
- #endif
+ #endif
+
+ if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) )
+@@ -1341,11 +1367,11 @@ bool FreetypeServerFont::GetGlyphBitmap1
+ #if (FTVERSION >= 2002)
+ // for 0/90/180/270 degree fonts enable autohinting even if not advisable
+ // non-hinted and non-antialiased bitmaps just look too ugly
+- if( (mnCos==0 || mnSin==0) && (nDefaultPrioAutoHint > 0) )
++ if( (mnCos==0 || mnSin==0) && (mnPrioAutoHint > 0) )
+ nLoadFlags &= ~FT_LOAD_NO_HINTING;
+ #endif
+
+- if( mnPrioEmbedded <= nDefaultPrioAutoHint )
++ if( mnPrioEmbedded <= mnPrioAutoHint )
+ nLoadFlags |= FT_LOAD_NO_BITMAP;
+
+ FT_Error rc = -1;
+@@ -1496,7 +1522,7 @@ bool FreetypeServerFont::GetGlyphBitmap8
+ // autohinting in FT<=2.0.4 makes antialiased glyphs look worse
+ nLoadFlags |= FT_LOAD_NO_HINTING;
+ #else
+- if( (nGlyphFlags & GF_UNHINTED) || (nDefaultPrioAutoHint < mnPrioAntiAlias) )
++ if( (nGlyphFlags & GF_UNHINTED) || (mnPrioAutoHint < mnPrioAntiAlias) )
+ nLoadFlags |= FT_LOAD_NO_HINTING;
+ #endif
+
+--- vcl/source/glyphs/gcach_ftyp.hxx.64508~ 2008-04-11 10:57:45.000000000 +0200
++++ vcl/source/glyphs/gcach_ftyp.hxx 2008-07-07 21:56:18.264846728 +0200
+@@ -88,10 +88,6 @@ public:
+ int GetFaceNum() const { return mnFaceNum; }
+ int GetSynthetic() const { return mnSynthetic; }
+ sal_IntPtr GetFontId() const { return mnFontId; }
+- bool DontUseAntiAlias() const
+- { return maDevFontAttributes.UseAntiAlias() == ANTIALIAS_FALSE; }
+- bool DontUseEmbeddedBitmaps() const
+- { return maDevFontAttributes.UseEmbeddedBitmap() == EMBEDDEDBITMAP_FALSE; }
+ bool IsSymbolFont() const { return maDevFontAttributes.IsSymbolFont(); }
+ const ImplFontAttributes& GetFontAttributes() const { return maDevFontAttributes; }
+
+@@ -216,6 +212,7 @@ private:
+ int mnWidth;
+ int mnPrioEmbedded;
+ int mnPrioAntiAlias;
++ int mnPrioAutoHint;
+ FtFontInfo* mpFontInfo;
+ FT_Int mnLoadFlags;
+ double mfStretch;
+--- vcl/unx/headless/svpgdi.cxx.64508~ 2008-06-24 13:43:16.000000000 +0200
++++ vcl/unx/headless/svpgdi.cxx 2008-07-07 21:56:18.347846802 +0200
+@@ -576,3 +576,7 @@ bool SvpSalGraphics::supportsOperation(
+ {
+ return false;
+ }
++
++void SvpSalGraphics::GetFontHints( const ImplFontAttributes& , int , ImplFontHints& ) const
++{
++}
+--- vcl/unx/headless/svpgdi.hxx.64508~ 2008-06-24 13:43:31.000000000 +0200
++++ vcl/unx/headless/svpgdi.hxx 2008-07-07 21:57:29.801845635 +0200
+@@ -168,6 +168,8 @@ public:
+
+ virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+
++ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes,int nSize, ImplFontHints& rFontHints) const;
++
+ virtual SystemGraphicsData GetGraphicsData() const;
+ };
+
+--- vcl/unx/headless/svppspgraphics.cxx.64508~ 2008-06-25 16:35:27.000000000 +0200
++++ vcl/unx/headless/svppspgraphics.cxx 2008-07-07 21:58:28.536095519 +0200
+@@ -1194,32 +1194,6 @@ ImplDevFontAttributes PspGraphics::Info2
+ aDFA.mePitch = ToFontPitch (rInfo.m_ePitch);
+ aDFA.mbSymbolFlag = (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL);
+
+- switch (rInfo.m_eEmbeddedbitmap)
+- {
+- default:
+- aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
+- break;
+- case psp::fcstatus::istrue:
+- aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_TRUE;
+- break;
+- case psp::fcstatus::isfalse:
+- aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_FALSE;
+- break;
+- }
+-
+- switch (rInfo.m_eAntialias)
+- {
+- default:
+- aDFA.meAntiAlias = ANTIALIAS_DONTKNOW;
+- break;
+- case psp::fcstatus::istrue:
+- aDFA.meAntiAlias = ANTIALIAS_TRUE;
+- break;
+- case psp::fcstatus::isfalse:
+- aDFA.meAntiAlias = ANTIALIAS_FALSE;
+- break;
+- }
+-
+ switch( rInfo.m_eType )
+ {
+ case psp::fonttype::Builtin:
+@@ -1410,3 +1384,7 @@ SystemGraphicsData PspGraphics::GetGraph
+ return aRes;
+ }
+
++void PspGraphics::GetFontHints( const ImplFontAttributes& , int , ImplFontHints& ) const
++{
++}
++
+--- vcl/unx/headless/svppspgraphics.hxx.64508~ 2008-06-24 13:44:04.000000000 +0200
++++ vcl/unx/headless/svppspgraphics.hxx 2008-07-07 21:59:02.507846188 +0200
+@@ -196,6 +196,7 @@ public:
-- if( mnPrioEmbedded <= nDefaultPrioAutoHint )
-+ if( mnPrioEmbedded <= mnPrioAutoHint )
- nLoadFlags |= FT_LOAD_NO_BITMAP;
+ virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+ virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
++ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes,int nSize, ImplFontHints& rFontHints) const;
+ virtual SystemGraphicsData GetGraphicsData() const;
+ };
- FT_Error rc = -1;
-@@ -1489,7 +1532,7 @@
- // autohinting in FT<=2.0.4 makes antialiased glyphs look worse
- nLoadFlags |= FT_LOAD_NO_HINTING;
- #else
-- if( (nGlyphFlags & GF_UNHINTED) || (nDefaultPrioAutoHint < mnPrioAntiAlias) )
-+ if( (nGlyphFlags & GF_UNHINTED) || (mnPrioAutoHint < mnPrioAntiAlias) )
- nLoadFlags |= FT_LOAD_NO_HINTING;
- #endif
+--- vcl/unx/inc/pspgraphics.h.64508~ 2008-06-24 13:44:18.000000000 +0200
++++ vcl/unx/inc/pspgraphics.h 2008-07-07 21:56:18.265847554 +0200
+@@ -118,6 +118,7 @@ public:
+ virtual void SetTextColor( SalColor nSalColor );
+ virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData* );
++ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual ImplFontCharMap* GetImplFontCharMap() const;
+ virtual void GetDevFontList( ImplDevFontList* );
+--- vcl/unx/inc/salgdi.h.64508~ 2008-06-24 13:44:34.000000000 +0200
++++ vcl/unx/inc/salgdi.h 2008-07-07 21:56:18.267846761 +0200
+@@ -248,6 +248,7 @@ public:
+ virtual void SetTextColor( SalColor nSalColor );
+ virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData* );
++ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual ImplFontCharMap* GetImplFontCharMap() const;
+ virtual void GetDevFontList( ImplDevFontList* );
+--- vcl/unx/source/gdi/pspgraphics.cxx.64508~ 2008-06-25 16:37:04.000000000 +0200
++++ vcl/unx/source/gdi/pspgraphics.cxx 2008-07-07 21:59:59.777097098 +0200
+@@ -866,6 +866,10 @@ void PspGraphics::GetDevFontSubstList( O
+ }
+ }
-Index: svppspgraphics.cxx
-===================================================================
-RCS file: /cvs/gsl/vcl/unx/headless/svppspgraphics.cxx,v
-retrieving revision 1.2
-diff -u -r1.2 svppspgraphics.cxx
---- vcl/unx/headless/svppspgraphics.cxx 24 Jul 2007 10:28:29 -0000 1.2
-+++ vcl/unx/headless/svppspgraphics.cxx 15 Aug 2007 11:59:04 -0000
-@@ -1175,32 +1175,6 @@
++void PspGraphics::GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const
++{
++}
++
+ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric )
+ {
+ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
+@@ -1278,32 +1282,6 @@ ImplDevFontAttributes PspGraphics::Info2
aDFA.mePitch = ToFontPitch (rInfo.m_ePitch);
aDFA.mbSymbolFlag = (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL);
@@ -956,60 +753,220 @@
- break;
- }
-
- // special case for the ghostscript fonts
- if( aDFA.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL )
- aDFA.maName = aDFA.maName.Copy( 4 );
-@@ -1386,3 +1360,7 @@
- return bRet && m_bSwallowFaxNo;
- }
+ switch( rInfo.m_eType )
+ {
+ case psp::fonttype::Builtin:
+--- vcl/unx/source/gdi/salgdi3.cxx.64508~ 2008-04-11 11:55:12.000000000 +0200
++++ vcl/unx/source/gdi/salgdi3.cxx 2008-07-07 21:56:18.272847047 +0200
+@@ -1612,6 +1612,174 @@ void X11SalGraphics::GetDevFontSubstList
-+void PspGraphics::GetFontHints( const ImplFontAttributes& , int , ImplFontHints& ) const
+ // ----------------------------------------------------------------------------
+
++void X11SalGraphics::GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const
+{
++ psp::FastPrintFontInfo aInfo;
++ // set family name
++ aInfo.m_aFamilyName = rFontAttributes.GetFamilyName();
++ // set italic
++ switch( rFontAttributes.GetSlant() )
++ {
++ case ITALIC_NONE:
++ aInfo.m_eItalic = psp::italic::Upright;
++ break;
++ case ITALIC_NORMAL:
++ aInfo.m_eItalic = psp::italic::Italic;
++ break;
++ case ITALIC_OBLIQUE:
++ aInfo.m_eItalic = psp::italic::Oblique;
++ break;
++ default:
++ aInfo.m_eItalic = psp::italic::Unknown;
++ break;
++
++ }
++ // set weight
++ switch( rFontAttributes.GetWeight() )
++ {
++ case WEIGHT_THIN:
++ aInfo.m_eWeight = psp::weight::Thin;
++ break;
++ case WEIGHT_ULTRALIGHT:
++ aInfo.m_eWeight = psp::weight::UltraLight;
++ break;
++ case WEIGHT_LIGHT:
++ aInfo.m_eWeight = psp::weight::Light;
++ break;
++ case WEIGHT_SEMILIGHT:
++ aInfo.m_eWeight = psp::weight::SemiLight;
++ break;
++ case WEIGHT_NORMAL:
++ aInfo.m_eWeight = psp::weight::Normal;
++ break;
++ case WEIGHT_MEDIUM:
++ aInfo.m_eWeight = psp::weight::Medium;
++ break;
++ case WEIGHT_SEMIBOLD:
++ aInfo.m_eWeight = psp::weight::SemiBold;
++ break;
++ case WEIGHT_BOLD:
++ aInfo.m_eWeight = psp::weight::Bold;
++ break;
++ case WEIGHT_ULTRABOLD:
++ aInfo.m_eWeight = psp::weight::UltraBold;
++ break;
++ case WEIGHT_BLACK:
++ aInfo.m_eWeight = psp::weight::Black;
++ break;
++ default:
++ aInfo.m_eWeight = psp::weight::Unknown;
++ break;
++ }
++ // set width
++ switch( rFontAttributes.GetWidthType() )
++ {
++ case WIDTH_ULTRA_CONDENSED:
++ aInfo.m_eWidth = psp::width::UltraCondensed;
++ break;
++ case WIDTH_EXTRA_CONDENSED:
++ aInfo.m_eWidth = psp::width::ExtraCondensed;
++ break;
++ case WIDTH_CONDENSED:
++ aInfo.m_eWidth = psp::width::Condensed;
++ break;
++ case WIDTH_SEMI_CONDENSED:
++ aInfo.m_eWidth = psp::width::SemiCondensed;
++ break;
++ case WIDTH_NORMAL:
++ aInfo.m_eWidth = psp::width::Normal;
++ break;
++ case WIDTH_SEMI_EXPANDED:
++ aInfo.m_eWidth = psp::width::SemiExpanded;
++ break;
++ case WIDTH_EXPANDED:
++ aInfo.m_eWidth = psp::width::Expanded;
++ break;
++ case WIDTH_EXTRA_EXPANDED:
++ aInfo.m_eWidth = psp::width::ExtraExpanded;
++ break;
++ case WIDTH_ULTRA_EXPANDED:
++ aInfo.m_eWidth = psp::width::UltraExpanded;
++ break;
++ default:
++ aInfo.m_eWidth = psp::width::Unknown;
++ break;
++ }
++
++ psp::FontConfigHints aHints(psp::PrintFontManager::get().getFontConfigHints(aInfo, nSize));
++
++ switch (aHints.m_eEmbeddedbitmap)
++ {
++ default:
++ rFontHints.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
++ break;
++ case psp::fcstatus::istrue:
++ rFontHints.meEmbeddedBitmap = EMBEDDEDBITMAP_TRUE;
++ break;
++ case psp::fcstatus::isfalse:
++ rFontHints.meEmbeddedBitmap = EMBEDDEDBITMAP_FALSE;
++ break;
++ }
++
++ switch (aHints.m_eAntialias)
++ {
++ default:
++ rFontHints.meAntiAlias = ANTIALIAS_DONTKNOW;
++ break;
++ case psp::fcstatus::istrue:
++ rFontHints.meAntiAlias = ANTIALIAS_TRUE;
++ break;
++ case psp::fcstatus::isfalse:
++ rFontHints.meAntiAlias = ANTIALIAS_FALSE;
++ break;
++ }
++
++ switch (aHints.m_eAutoHint)
++ {
++ default:
++ rFontHints.meAutoHint = AUTOHINT_DONTKNOW;
++ break;
++ case psp::fcstatus::istrue:
++ rFontHints.meAutoHint = AUTOHINT_TRUE;
++ break;
++ case psp::fcstatus::isfalse:
++ rFontHints.meAutoHint = AUTOHINT_FALSE;
++ break;
++ }
++
++ switch (aHints.m_eHinting)
++ {
++ default:
++ rFontHints.meHinting = HINTING_DONTKNOW;
++ break;
++ case psp::fcstatus::istrue:
++ rFontHints.meHinting = HINTING_TRUE;
++ break;
++ case psp::fcstatus::isfalse:
++ rFontHints.meHinting = HINTING_FALSE;
++ break;
++ }
++
++ switch (aHints.m_eHintStyle)
++ {
++ case psp::fchint::Nohint:
++ rFontHints.meHintStyle = HINT_NONE;
++ break;
++ case psp::fchint::Slight:
++ rFontHints.meHintStyle = HINT_SLIGHT;
++ break;
++ case psp::fchint::Medium:
++ rFontHints.meHintStyle = HINT_MEDIUM;
++ break;
++ default:
++ case psp::fchint::Full:
++ rFontHints.meHintStyle = HINT_FULL;
++ break;
++ }
+}
+
-Index: svppspgraphics.hxx
-===================================================================
-RCS file: /cvs/gsl/vcl/unx/headless/svppspgraphics.hxx,v
-retrieving revision 1.2
-diff -u -r1.2 svppspgraphics.hxx
---- vcl/unx/headless/svppspgraphics.hxx 24 Jul 2007 10:28:40 -0000 1.2
-+++ vcl/unx/headless/svppspgraphics.hxx 15 Aug 2007 12:02:57 -0000
-@@ -201,6 +201,7 @@
-
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
- virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
-+ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
- };
-
- #endif // _SVP_PSPGRAPHICS_HXX
-Index: svpgdi.cxx
-===================================================================
-RCS file: /cvs/gsl/vcl/unx/headless/svpgdi.cxx,v
-retrieving revision 1.2
-diff -u -r1.2 svpgdi.cxx
---- vcl/unx/headless/svpgdi.cxx 24 Jul 2007 10:27:28 -0000 1.2
-+++ vcl/unx/headless/svpgdi.cxx 15 Aug 2007 12:06:47 -0000
-@@ -535,3 +535,7 @@
++// ----------------------------------------------------------------------------
++
+ void
+ X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric )
{
- return FALSE;
+--- vcl/unx/source/gdi/xlfd_extd.cxx.64508~ 2008-06-25 16:37:42.000000000 +0200
++++ vcl/unx/source/gdi/xlfd_extd.cxx 2008-07-07 21:56:18.273847942 +0200
+@@ -105,9 +105,6 @@ ExtendedXlfd::ExtendedXlfd( bool bScalab
+ mbSubsettable = false;
+ mbEmbeddable = false;
+
+- meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW;
+- meAntiAlias = ANTIALIAS_DONTKNOW;
+-
+ mnQuality = -1;
}
-+
-+void SvpSalGraphics::GetFontHints( const ImplFontAttributes& , int , ImplFontHints& ) const
+
+--- vcl/win/inc/salgdi.h.64508~ 2008-06-24 13:46:21.000000000 +0200
++++ vcl/win/inc/salgdi.h 2008-07-07 21:56:18.274847581 +0200
+@@ -277,6 +277,7 @@ public:
+ virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ // get the current font's etrics
+ virtual void GetFontMetric( ImplFontMetricData* );
++ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nHints, ImplFontHints& rFontHints);
+ // get kernign pairs of the current font
+ // return only PairCount if (pKernPairs == NULL)
+ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+--- vcl/win/source/gdi/salgdi3.cxx.64508~ 2008-04-11 12:48:39.000000000 +0200
++++ vcl/win/source/gdi/salgdi3.cxx 2008-07-07 21:56:18.277846635 +0200
+@@ -1388,6 +1388,12 @@ USHORT WinSalGraphics::SetFont( ImplFont
+
+ // -----------------------------------------------------------------------
+
++void WinSalGraphics::GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints)
+{
+}
-Index: svpgdi.hxx
-===================================================================
-RCS file: /cvs/gsl/vcl/unx/headless/svpgdi.hxx,v
-retrieving revision 1.2
-diff -u -r1.2 svpgdi.hxx
---- vcl/unx/headless/svpgdi.hxx 24 Jul 2007 10:27:38 -0000 1.2
-+++ vcl/unx/headless/svpgdi.hxx 15 Aug 2007 12:07:36 -0000
-@@ -176,6 +176,8 @@
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
-
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+
-+ virtual void GetFontHints( const ImplFontAttributes& rFontAttributes, int nSize, ImplFontHints& rFontHints) const;
- };
-
- #endif
++// -----------------------------------------------------------------------
++
+ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric )
+ {
+ if ( aSalShlData.mbWNT )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]