summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx50
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.hxx1
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx19
3 files changed, 2 insertions, 68 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 8ac55e40b28b..d4f2b02cfb5b 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -341,8 +341,7 @@ FtFontInfo::~FtFontInfo()
delete mpChar2Glyph;
delete mpGlyph2Char;
#ifdef ENABLE_GRAPHITE
- if (mpGraphiteFace)
- delete mpGraphiteFace;
+ delete mpGraphiteFace;
#endif
}
@@ -416,7 +415,7 @@ bool FtFontInfo::HasExtraKerning() const
if( !mpExtraKernInfo )
return false;
// TODO: how to enable the line below without getting #i29881# back?
- // on the other hand being to optimistic doesn't cause problems
+ // on the other hand being too optimistic doesn't cause problems
// return mpExtraKernInfo->HasKernPairs();
return true;
}
@@ -432,19 +431,6 @@ int FtFontInfo::GetExtraKernPairs( ImplKernPairData** ppKernPairs ) const
// -----------------------------------------------------------------------
-int FtFontInfo::GetExtraGlyphKernValue( int nLeftGlyph, int nRightGlyph ) const
-{
- if( !mpExtraKernInfo )
- return 0;
- if( !mpGlyph2Char )
- return 0;
- sal_Unicode cLeftChar = (*mpGlyph2Char)[ nLeftGlyph ];
- sal_Unicode cRightChar = (*mpGlyph2Char)[ nRightGlyph ];
- return mpExtraKernInfo->GetUnscaledKernValue( cLeftChar, cRightChar );
-}
-
-// -----------------------------------------------------------------------
-
static unsigned GetUInt( const unsigned char* p ) { return((p[0]<<24)+(p[1]<<16)+(p[2]<<8)+p[3]);}
static unsigned GetUShort( const unsigned char* p ){ return((p[0]<<8)+p[1]);}
//static signed GetSShort( const unsigned char* p ){ return((short)((p[0]<<8)+p[1]));}
@@ -1843,38 +1829,6 @@ bool ServerFont::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) c
}
// -----------------------------------------------------------------------
-// kerning stuff
-// -----------------------------------------------------------------------
-
-int ServerFont::GetGlyphKernValue( int nGlyphLeft, int nGlyphRight ) const
-{
- // if no kerning info is available from Freetype
- // then we may have to use extra info provided by e.g. psprint
- if( !FT_HAS_KERNING( maFaceFT ) || !FT_IS_SFNT( maFaceFT ) )
- {
- int nKernVal = mpFontInfo->GetExtraGlyphKernValue( nGlyphLeft, nGlyphRight );
- if( !nKernVal )
- return 0;
- // scale the kern value to match the font size
- const FontSelectPattern& rFSD = GetFontSelData();
- nKernVal *= rFSD.mnWidth ? rFSD.mnWidth : rFSD.mnHeight;
- return (nKernVal + 500) / 1000;
- }
-
- // when font faces of different sizes share the same maFaceFT
- // then we have to make sure that it uses the correct maSizeFT
- if( maSizeFT )
- pFTActivateSize( maSizeFT );
-
- // use Freetype's kerning info
- FT_Vector aKernVal;
- FT_Error rcFT = FT_Get_Kerning( maFaceFT, nGlyphLeft, nGlyphRight,
- FT_KERNING_DEFAULT, &aKernVal );
- int nResult = (rcFT == FT_Err_Ok) ? (aKernVal.x + 32) >> 6 : 0;
- return nResult;
-}
-
-// -----------------------------------------------------------------------
sal_uLong ServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
{
diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx
index 192704faaf1a..817b3d51ae53 100644
--- a/vcl/generic/glyphs/gcach_ftyp.hxx
+++ b/vcl/generic/glyphs/gcach_ftyp.hxx
@@ -102,7 +102,6 @@ public:
bool HasExtraKerning() const;
int GetExtraKernPairs( ImplKernPairData** ) const;
- int GetExtraGlyphKernValue( int nLeftGlyph, int nRightGlyph ) const;
private:
FT_FaceRec_* maFaceFT;
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 2ed37a79b14c..dc2f4e5ba00f 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -456,25 +456,6 @@ int ExtraKernInfo::GetUnscaledKernPairs( ImplKernPairData** ppKernPairs ) const
return nKernCount;
}
-//--------------------------------------------------------------------------
-
-int ExtraKernInfo::GetUnscaledKernValue( sal_Unicode cLeft, sal_Unicode cRight ) const
-{
- if( !mbInitialized )
- Initialize();
-
- if( maUnicodeKernPairs.empty() )
- return 0;
-
- ImplKernPairData aKernPair = { cLeft, cRight, 0 };
- UnicodeKernPairs::const_iterator it = maUnicodeKernPairs.find( aKernPair );
- if( it == maUnicodeKernPairs.end() )
- return 0;
-
- int nUnscaledValue = (*it).mnKern;
- return nUnscaledValue;
-}
-
// =======================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */