// Keep going unless we prefer a different (color) font
if( !preferColor || foundColor )
{
+ FcPatternDestroy( match );
+ FcPatternDestroy( pattern );
break;
}
}
- }
+ FcPatternDestroy( match );
+ FcPatternDestroy( pattern );
+ }
return fontId;
}
// 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 );
- 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 )
// 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