summaryrefslogtreecommitdiff
path: root/vcl/generic/glyphs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-10-27 16:08:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-10-27 16:39:32 +0100
commitbea5e37dd32f30d301aca89ba4875657de7c1025 (patch)
treeb0f0384cdaa9f6ff6d7ce511c7aaa876549fdf30 /vcl/generic/glyphs
parentac1eb33bfc4ce95779e8a1ed252d928c799afa40 (diff)
Rename ImplFontSelectData to FontSelectPattern so I know what it does
Rename ImplFontSelectData to FontSelectPattern because I can never remember the name of the thing. This way I'll be able to remember that its basically the equivalent of fontconfig's FcPattern
Diffstat (limited to 'vcl/generic/glyphs')
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx12
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.hxx4
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx2
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx12
4 files changed, 15 insertions, 15 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index ffa4aa33b642..44d8958a0081 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -640,7 +640,7 @@ void FreetypeManager::ClearFontList( )
// -----------------------------------------------------------------------
-ServerFont* FreetypeManager::CreateFont( const ImplFontSelectData& rFSD )
+ServerFont* FreetypeManager::CreateFont( const FontSelectPattern& rFSD )
{
FtFontInfo* pFontInfo = NULL;
@@ -670,7 +670,7 @@ ImplFTSFontData::ImplFTSFontData( FtFontInfo* pFI, const ImplDevFontAttributes&
// -----------------------------------------------------------------------
-ImplFontEntry* ImplFTSFontData::CreateFontInstance( ImplFontSelectData& rFSD ) const
+ImplFontEntry* ImplFTSFontData::CreateFontInstance( FontSelectPattern& rFSD ) const
{
ImplServerFontEntry* pEntry = new ImplServerFontEntry( rFSD );
return pEntry;
@@ -680,7 +680,7 @@ ImplFontEntry* ImplFTSFontData::CreateFontInstance( ImplFontSelectData& rFSD ) c
// ServerFont
// =======================================================================
-ServerFont::ServerFont( const ImplFontSelectData& rFSD, FtFontInfo* pFI )
+ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI )
: maGlyphList( 0),
maFontSelData(rFSD),
mnExtInfo(0),
@@ -1872,7 +1872,7 @@ int ServerFont::GetGlyphKernValue( int nGlyphLeft, int nGlyphRight ) const
if( !nKernVal )
return 0;
// scale the kern value to match the font size
- const ImplFontSelectData& rFSD = GetFontSelData();
+ const FontSelectPattern& rFSD = GetFontSelData();
nKernVal *= rFSD.mnWidth ? rFSD.mnWidth : rFSD.mnHeight;
return (nKernVal + 500) / 1000;
}
@@ -1901,7 +1901,7 @@ sal_uLong ServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
// then we have may have extra kerning info from e.g. psprint
int nCount = mpFontInfo->GetExtraKernPairs( ppKernPairs );
// scale the kern values to match the font size
- const ImplFontSelectData& rFSD = GetFontSelData();
+ const FontSelectPattern& rFSD = GetFontSelData();
int nFontWidth = rFSD.mnWidth ? rFSD.mnWidth : rFSD.mnHeight;
ImplKernPairData* pKernPair = *ppKernPairs;
for( int i = nCount; --i >= 0; ++pKernPair )
@@ -2388,7 +2388,7 @@ bool ServerFont::GetGlyphOutline( int nGlyphIndex,
// -----------------------------------------------------------------------
-bool ServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
+bool ServerFont::ApplyGSUB( const FontSelectPattern& rFSD )
{
#define MKTAG(s) ((((((s[0]<<8)+s[1])<<8)+s[2])<<8)+s[3])
diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx
index 7386bb3d1e82..79926726be22 100644
--- a/vcl/generic/glyphs/gcach_ftyp.hxx
+++ b/vcl/generic/glyphs/gcach_ftyp.hxx
@@ -164,7 +164,7 @@ public:
void AnnounceFonts( ImplDevFontList* ) const;
void ClearFontList();
- ServerFont* CreateFont( const ImplFontSelectData& );
+ ServerFont* CreateFont( const FontSelectPattern& );
private:
typedef ::boost::unordered_map<sal_IntPtr,FtFontInfo*> FontList;
@@ -187,7 +187,7 @@ public:
FtFontInfo* GetFtFontInfo() const { return mpFtFontInfo; }
- virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const;
+ virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const;
virtual ImplFontData* Clone() const { return new ImplFTSFontData( *this ); }
virtual sal_IntPtr GetFontId() const { return mpFtFontInfo->GetFontId(); }
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index ae5ad511268d..e681c2c4d2d4 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -251,7 +251,7 @@ le_int32 IcuFontFromServerFont::getUnitsPerEM() const
float IcuFontFromServerFont::getXPixelsPerEm() const
{
- const ImplFontSelectData& r = mrServerFont.GetFontSelData();
+ const FontSelectPattern& r = mrServerFont.GetFontSelData();
float fX = r.mnWidth ? r.mnWidth : r.mnHeight;
return fX;
}
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index fa712bb8dc9e..42dddf9912ea 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -102,7 +102,7 @@ void GlyphCache::InvalidateAllGlyphs()
// -----------------------------------------------------------------------
inline
-size_t GlyphCache::IFSD_Hash::operator()( const ImplFontSelectData& rFontSelData ) const
+size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData ) const
{
// TODO: is it worth to improve this hash function?
sal_IntPtr nFontId = reinterpret_cast<sal_IntPtr>( rFontSelData.mpFontData );
@@ -128,7 +128,7 @@ size_t GlyphCache::IFSD_Hash::operator()( const ImplFontSelectData& rFontSelData
// -----------------------------------------------------------------------
-bool GlyphCache::IFSD_Equal::operator()( const ImplFontSelectData& rA, const ImplFontSelectData& rB) const
+bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const FontSelectPattern& rB) const
{
// check font ids
sal_IntPtr nFontIdA = reinterpret_cast<sal_IntPtr>( rA.mpFontData );
@@ -199,7 +199,7 @@ void GlyphCache::AnnounceFonts( ImplDevFontList* pList ) const
// -----------------------------------------------------------------------
-ServerFont* GlyphCache::CacheFont( const ImplFontSelectData& rFontSelData )
+ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
{
// a serverfont request has pFontData
if( rFontSelData.mpFontData == NULL )
@@ -210,7 +210,7 @@ ServerFont* GlyphCache::CacheFont( const ImplFontSelectData& rFontSelData )
return NULL;
// the FontList's key mpFontData member is reinterpreted as font id
- ImplFontSelectData aFontSelData = rFontSelData;
+ FontSelectPattern aFontSelData = rFontSelData;
aFontSelData.mpFontData = reinterpret_cast<ImplFontData*>( nFontId );
FontList::iterator it = maFontList.find( aFontSelData );
if( it != maFontList.end() )
@@ -301,7 +301,7 @@ void GlyphCache::GarbageCollect()
pServerFont->GarbageCollect( mnLruIndex+0x10000000 );
if( pServerFont == mpCurrentGCFont )
mpCurrentGCFont = NULL;
- const ImplFontSelectData& rIFSD = pServerFont->GetFontSelData();
+ const FontSelectPattern& rIFSD = pServerFont->GetFontSelData();
maFontList.erase( rIFSD );
mrPeer.RemovingFont( *pServerFont );
mnBytesUsed -= pServerFont->GetByteCount();
@@ -432,7 +432,7 @@ bool ServerFont::IsGlyphInvisible( int nGlyphIndex )
// =======================================================================
-ImplServerFontEntry::ImplServerFontEntry( ImplFontSelectData& rFSD )
+ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD )
: ImplFontEntry( rFSD )
, mpServerFont( NULL )
, mbGotFontOptions( false )