summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index a95ab5e5f774..3d7574418f52 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -488,6 +488,10 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI )
// it becomes reponsible for the ServerFont instantiation
((ImplServerFontEntry*)rFSD.mpFontEntry)->SetServerFont( this );
+ maFaceFT = pFI->GetFaceFT();
+ if( !maFaceFT )
+ return;
+
if( rFSD.mnOrientation != 0 )
{
const double dRad = rFSD.mnOrientation * ( F_2PI / 3600.0 );
@@ -504,10 +508,6 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI )
if( (mnWidth < 0) || (mfStretch > +64.0) || (mfStretch < -64.0) )
return;
- maFaceFT = pFI->GetFaceFT();
- if( !maFaceFT )
- return;
-
FT_New_Size( maFaceFT, &maSizeFT );
FT_Activate_Size( maSizeFT );
FT_Error rc = FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight );
@@ -623,8 +623,7 @@ const OString& ServerFont::GetFontFileName() const
ServerFont::~ServerFont()
{
- if( mpLayoutEngine )
- delete mpLayoutEngine;
+ delete mpLayoutEngine;
if( maSizeFT )
FT_Done_Size( maSizeFT );