Change-Id: Iaa66eeb3ea1d4f454e17f704cd75a1183959f36b
Signed-off-by: Richard Underhill <r.underhill@partner.samsung.com>
// Keep going unless we prefer a different (color) font
if( !preferColor || foundColor )
{
// Keep going unless we prefer a different (color) font
if( !preferColor || foundColor )
{
+ FcPatternDestroy( match );
+ FcPatternDestroy( pattern );
+ FcPatternDestroy( match );
+ FcPatternDestroy( pattern );
+ }
// match the pattern
FcPattern* match = FcFontMatch( NULL /* use default configure */, fontFamilyPattern, &result );
// match the pattern
FcPattern* match = FcFontMatch( NULL /* use default configure */, fontFamilyPattern, &result );
+ bool isScalable = true;
if( match )
{
// Get the path to the font file name.
FontPath path;
GetFcString( match, FC_FILE, path );
if( match )
{
// Get the path to the font file name.
FontPath path;
GetFcString( match, FC_FILE, path );
- return IsScalable( path );
+ isScalable = IsScalable( path );
+ }
+ else
+ {
+ DALI_LOG_ERROR( "FreeType Cannot check font: %s %s\n", fontFamily.c_str(), fontStyle.c_str() );
- DALI_LOG_ERROR( "FreeType Cannot check font: %s %s\n", fontFamily.c_str(), fontStyle.c_str() );
- return true;
+ FcPatternDestroy( fontFamilyPattern );
+ FcPatternDestroy( match );
+ return isScalable;
}
void FontClient::Plugin::GetFixedSizes( const FontPath& path, Vector< PointSize26Dot6 >& sizes )
}
void FontClient::Plugin::GetFixedSizes( const FontPath& path, Vector< PointSize26Dot6 >& sizes )
// Get the path to the font file name.
FontPath path;
GetFcString( match, FC_FILE, path );
// Get the path to the font file name.
FontPath path;
GetFcString( match, FC_FILE, path );
- return GetFixedSizes( path, sizes );
+ GetFixedSizes( path, sizes );
+ }
+ else
+ {
+ DALI_LOG_ERROR( "FreeType Cannot check font: %s %s\n", fontFamily.c_str(), fontStyle.c_str() );
- DALI_LOG_ERROR( "FreeType Cannot check font: %s %s\n", fontFamily.c_str(), fontStyle.c_str() );
+ FcPatternDestroy( match );
+ FcPatternDestroy( fontFamilyPattern );
}
} // namespace Internal
}
} // namespace Internal