From 5da0eb4d45c6ffa9b8b290812edf277736f93f52 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 26 Apr 2014 13:33:02 +0100 Subject: coverity#738920 Uninitialized scalar field Change-Id: I4796075c4727d30178bb6c7d0752e87ab22c36cf --- vcl/generic/glyphs/gcach_ftyp.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'vcl/generic/glyphs') diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index ab5ddd8afa7b..7a058331c2b8 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -475,9 +475,13 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI ) mnPrioAntiAlias(nDefaultPrioAntiAlias), mnPrioAutoHint(nDefaultPrioAutoHint), mpFontInfo( pFI ), + mnLoadFlags( 0 ), maFaceFT( NULL ), maSizeFT( NULL ), mbFaceOk( false ), + mbArtItalic( false ), + mbArtBold( false ), + mbUseGamma( false ), mpLayoutEngine( NULL ) { // TODO: move update of mpFontEntry into FontEntry class when @@ -491,11 +495,6 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI ) mnSin = static_cast( 0x10000 * sin( dRad ) + 0.5 ); } - maFaceFT = pFI->GetFaceFT(); - - if( !maFaceFT ) - return; - // set the pixel size of the font instance mnWidth = rFSD.mnWidth; if( !mnWidth ) @@ -505,6 +504,10 @@ 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 ); @@ -535,7 +538,6 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI ) mbArtItalic = (rFSD.GetSlant() != ITALIC_NONE && pFI->GetFontAttributes().GetSlant() == ITALIC_NONE); mbArtBold = (rFSD.GetWeight() > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM); - mbUseGamma = false; if( mbArtBold ) { //static const int TT_CODEPAGE_RANGE_874 = (1L << 16); // Thai -- cgit