diff options
-rw-r--r-- | vcl/inc/win/salgdi.h | 1 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 9 | ||||
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 30 |
3 files changed, 3 insertions, 37 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 974d16c1b427..1f279f36e69e 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -55,7 +55,6 @@ class ImplFontAttrCache; // win32 platform specific options. Move them to the PMK file? -#define GCP_KERN_HACK #define GNG_VERT_HACK #ifdef ENABLE_GRAPHITE diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 4d866f9a59a1..79ff37548944 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -69,9 +69,7 @@ #include "outdev.h" // for ImplGlyphFallbackFontSubstitution #include "sft.hxx" -#ifdef GCP_KERN_HACK #include <algorithm> -#endif #ifdef ENABLE_GRAPHITE #include <graphite2/Font.h> @@ -1797,17 +1795,10 @@ sal_uLong WinSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKer int nCount = ::GetKerningPairsW( mhDC, 0, NULL ); if( nCount ) { - #ifdef GCP_KERN_HACK pPairs = new KERNINGPAIR[ nCount+1 ]; mpFontKernPairs = pPairs; mnFontKernPairCount = nCount; ::GetKerningPairsW( mhDC, nCount, pPairs ); - #else // GCP_KERN_HACK - pPairs = pKernPairs; - nCount = (nCount < nPairs) : nCount : nPairs; - ::GetKerningPairsW( mhDC, nCount, pPairs ); - return nCount; - #endif // GCP_KERN_HACK } mbFontKernInit = FALSE; diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index db52d43ecfab..72f9cf3dac35 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -48,9 +48,7 @@ #define alloca _alloca #endif -#ifdef GCP_KERN_HACK - #include <algorithm> -#endif // GCP_KERN_HACK +#include <algorithm> #include <usp10.h> #include <shlwapi.h> @@ -87,7 +85,6 @@ public: private: // TODO: also add HFONT??? Watch out for issues with too many active fonts... -#ifdef GCP_KERN_HACK public: bool HasKernData() const; void SetKernData( int, const KERNINGPAIR* ); @@ -95,7 +92,6 @@ public: private: KERNINGPAIR* mpKerningPairs; int mnKerningPairs; -#endif // GCP_KERN_HACK public: SCRIPT_CACHE& GetScriptCache() const @@ -389,13 +385,6 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs ) if( rArgs.mnFlags & (SAL_LAYOUT_KERNING_PAIRS | SAL_LAYOUT_KERNING_ASIAN) ) mpGlyphOrigAdvs = new int[ mnGlyphCount ]; -#ifndef GCP_KERN_HACK - DWORD nGcpOption = 0; - // enable kerning if requested - if( rArgs.mnFlags & SAL_LAYOUT_KERNING_PAIRS ) - nGcpOption |= GCP_USEKERNING; -#endif // GCP_KERN_HACK - for( i = 0; i < mnGlyphCount; ++i ) mpOutGlyphs[i] = pBidiStr[ i ]; mnWidth = 0; @@ -478,18 +467,11 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs ) mpGlyphOrigAdvs[i] = mnNotdefWidth; } -#ifdef GCP_KERN_HACK // apply kerning if the layout engine has not yet done it if( rArgs.mnFlags & (SAL_LAYOUT_KERNING_ASIAN|SAL_LAYOUT_KERNING_PAIRS) ) { -#else // GCP_KERN_HACK - // apply just asian kerning - if( rArgs.mnFlags & SAL_LAYOUT_KERNING_ASIAN ) - { - if( !(rArgs.mnFlags & SAL_LAYOUT_KERNING_PAIRS) ) -#endif // GCP_KERN_HACK - for( i = 0; i < mnGlyphCount; ++i ) - mpGlyphOrigAdvs[i] = mpGlyphAdvances[i]; + for( i = 0; i < mnGlyphCount; ++i ) + mpGlyphOrigAdvs[i] = mpGlyphAdvances[i]; // #99658# also apply asian kerning on the substring border int nLen = mnGlyphCount; @@ -497,7 +479,6 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs ) ++nLen; for( i = 1; i < nLen; ++i ) { -#ifdef GCP_KERN_HACK if( rArgs.mnFlags & SAL_LAYOUT_KERNING_PAIRS ) { int nKernAmount = mrWinFontEntry.GetKerning( pBidiStr[i-1], pBidiStr[i] ); @@ -505,7 +486,6 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs ) mnWidth += nKernAmount; } else if( rArgs.mnFlags & SAL_LAYOUT_KERNING_ASIAN ) -#endif // GCP_KERN_HACK if( ( (0x3000 == (0xFF00 & pBidiStr[i-1])) || (0x2010 == (0xFFF0 & pBidiStr[i-1])) || (0xFF00 == (0xFF00 & pBidiStr[i-1]))) && ( (0x3000 == (0xFF00 & pBidiStr[i])) || (0x2010 == (0xFFF0 & pBidiStr[i])) || (0xFF00 == (0xFF00 & pBidiStr[i])) ) ) @@ -2927,7 +2907,6 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe } else { -#ifdef GCP_KERN_HACK if( (rArgs.mnFlags & SAL_LAYOUT_KERNING_PAIRS) && !rFontInstance.HasKernData() ) { // TODO: directly cache kerning info in the rFontInstance @@ -2935,7 +2914,6 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe GetKernPairs( 0, NULL ); rFontInstance.SetKernData( mnFontKernPairCount, mpFontKernPairs ); } -#endif // GCP_KERN_HACK BYTE eCharSet = ANSI_CHARSET; if( mpLogFont ) @@ -2984,9 +2962,7 @@ ImplWinFontEntry::~ImplWinFontEntry() { if( maScriptCache != NULL ) ScriptFreeCache( &maScriptCache ); -#ifdef GCP_KERN_HACK delete[] mpKerningPairs; -#endif // GCP_KERN_HACK } // ----------------------------------------------------------------------- |