Kaydet (Commit) afab984f authored tarafından Chris Sherlock's avatar Chris Sherlock

vcl: Rename class ImplFTSFontData to FreetypeFontFace

ImplFTSFontData derives from PhysicalFontFace, and implements the
mechanisms specified therein. It's not actually a "data" class, but
also implements a factory function that creates a
LogicalFontInstance object via Freetype. I believe the "S" in "FTS"
stands for "Server", which is a misnomer as Freetype is a font
renderer, not a font server.

Change-Id: Ibacc4bf3f850ddfb37016ea2e3e088279b1b1ba1
Reviewed-on: https://gerrit.libreoffice.org/21285Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
üst 67925c3b
...@@ -331,7 +331,7 @@ const unsigned char* FreetypeFontInfo::GetTable( const char* pTag, sal_uLong* pL ...@@ -331,7 +331,7 @@ const unsigned char* FreetypeFontInfo::GetTable( const char* pTag, sal_uLong* pL
void FreetypeFontInfo::AnnounceFont( PhysicalFontCollection* pFontCollection ) void FreetypeFontInfo::AnnounceFont( PhysicalFontCollection* pFontCollection )
{ {
ImplFTSFontData* pFD = new ImplFTSFontData( this, maDevFontAttributes ); FreetypeFontFace* pFD = new FreetypeFontFace( this, maDevFontAttributes );
pFontCollection->Add( pFD ); pFontCollection->Add( pFD );
} }
...@@ -424,7 +424,7 @@ ServerFont* FreetypeManager::CreateFont( const FontSelectPattern& rFSD ) ...@@ -424,7 +424,7 @@ ServerFont* FreetypeManager::CreateFont( const FontSelectPattern& rFSD )
return pNew; return pNew;
} }
ImplFTSFontData::ImplFTSFontData( FreetypeFontInfo* pFI, const ImplFontAttributes& rDFA ) FreetypeFontFace::FreetypeFontFace( FreetypeFontInfo* pFI, const ImplFontAttributes& rDFA )
: PhysicalFontFace( rDFA ), : PhysicalFontFace( rDFA ),
mpFreetypeFontInfo( pFI ) mpFreetypeFontInfo( pFI )
{ {
...@@ -432,7 +432,7 @@ ImplFTSFontData::ImplFTSFontData( FreetypeFontInfo* pFI, const ImplFontAttribute ...@@ -432,7 +432,7 @@ ImplFTSFontData::ImplFTSFontData( FreetypeFontInfo* pFI, const ImplFontAttribute
SetOrientationFlag( true ); SetOrientationFlag( true );
} }
LogicalFontInstance* ImplFTSFontData::CreateFontInstance( FontSelectPattern& rFSD ) const LogicalFontInstance* FreetypeFontFace::CreateFontInstance( FontSelectPattern& rFSD ) const
{ {
ServerFontInstance* pEntry = new ServerFontInstance( rFSD ); ServerFontInstance* pEntry = new ServerFontInstance( rFSD );
return pEntry; return pEntry;
......
...@@ -146,16 +146,16 @@ private: ...@@ -146,16 +146,16 @@ private:
sal_IntPtr mnMaxFontId; sal_IntPtr mnMaxFontId;
}; };
class ImplFTSFontData : public PhysicalFontFace class FreetypeFontFace : public PhysicalFontFace
{ {
private: private:
FreetypeFontInfo* mpFreetypeFontInfo; FreetypeFontInfo* mpFreetypeFontInfo;
public: public:
ImplFTSFontData( FreetypeFontInfo*, const ImplFontAttributes& ); FreetypeFontFace( FreetypeFontInfo*, const ImplFontAttributes& );
virtual LogicalFontInstance* CreateFontInstance( FontSelectPattern& ) const override; virtual LogicalFontInstance* CreateFontInstance( FontSelectPattern& ) const override;
virtual PhysicalFontFace* Clone() const override { return new ImplFTSFontData( *this ); } virtual PhysicalFontFace* Clone() const override { return new FreetypeFontFace( *this ); }
virtual sal_IntPtr GetFontId() const override { return mpFreetypeFontInfo->GetFontId(); } virtual sal_IntPtr GetFontId() const override { return mpFreetypeFontInfo->GetFontId(); }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment