fold GetGlyphMetric and GetGlyphData together
Change-Id: I12ea240bab223fb62a58a14fecc821e9075fa59e Reviewed-on: https://gerrit.libreoffice.org/31114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -168,8 +168,7 @@ public:
|
||||
const FontCharMapRef GetFontCharMap() const;
|
||||
bool GetFontCapabilities(vcl::FontCapabilities &) const;
|
||||
|
||||
const GlyphMetric& GetGlyphMetric( sal_GlyphId aGlyphId )
|
||||
{ return GetGlyphData( aGlyphId ).GetMetric(); }
|
||||
const GlyphMetric& GetGlyphMetric(sal_GlyphId aGlyphId);
|
||||
|
||||
#if ENABLE_GRAPHITE
|
||||
GraphiteFaceWrapper* GetGraphiteFace() const;
|
||||
@@ -201,7 +200,6 @@ private:
|
||||
|
||||
void ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_* ) const;
|
||||
void ApplyGSUB( const FontSelectPattern& );
|
||||
GlyphData& GetGlyphData( sal_GlyphId );
|
||||
|
||||
ServerFontLayoutEngine* GetLayoutEngine();
|
||||
|
||||
|
@@ -304,14 +304,14 @@ long FreetypeFont::Release() const
|
||||
return --mnRefCount;
|
||||
}
|
||||
|
||||
GlyphData& FreetypeFont::GetGlyphData( sal_GlyphId aGlyphId )
|
||||
const GlyphMetric& FreetypeFont::GetGlyphMetric(sal_GlyphId aGlyphId)
|
||||
{
|
||||
// usually the GlyphData is cached
|
||||
GlyphList::iterator it = maGlyphList.find( aGlyphId );
|
||||
if( it != maGlyphList.end() ) {
|
||||
GlyphData& rGlyphData = it->second;
|
||||
GlyphCache::GetInstance().UsingGlyph( *this, rGlyphData );
|
||||
return rGlyphData;
|
||||
return rGlyphData.GetMetric();
|
||||
}
|
||||
|
||||
// sometimes not => we need to create and initialize it ourselves
|
||||
@@ -319,7 +319,7 @@ GlyphData& FreetypeFont::GetGlyphData( sal_GlyphId aGlyphId )
|
||||
mnBytesUsed += sizeof( GlyphData );
|
||||
InitGlyphData( aGlyphId, rGlyphData );
|
||||
GlyphCache::GetInstance().AddedGlyph( *this, rGlyphData );
|
||||
return rGlyphData;
|
||||
return rGlyphData.GetMetric();
|
||||
}
|
||||
|
||||
void FreetypeFont::GarbageCollect( long nMinLruIndex )
|
||||
|
Reference in New Issue
Block a user