Don't ignore target init() failures, causes mod_libavcodec to crash synfig
[synfig.git] / synfig-core / trunk / src / modules / lyr_freetype / lyr_freetype.cpp
index bd98e85..8c9aac6 100644 (file)
@@ -377,7 +377,7 @@ lyr_freetype::new_face(const String &newfont)
                FcResult result;
                if( !FcInit() )
                {
-                       synfig::warning("lyr_freetype: fontconfig: %s",_("unable to initialise")));
+                       synfig::warning("lyr_freetype: fontconfig: %s",_("unable to initialise"));
                        error = 1;
                } else {
                        FcPattern* pat = FcNameParse((FcChar8 *) newfont.c_str());
@@ -396,7 +396,7 @@ lyr_freetype::new_face(const String &newfont)
                                        error=FT_New_Face(ft_library,(const char*)file,face_index,&face);
                                FcFontSetDestroy(fs);
                        } else
-                               synfig::warning("lyr_freetype: fontconfig: %s",_("empty font set")));
+                               synfig::warning("lyr_freetype: fontconfig: %s",_("empty font set"));
                }
        }
 #endif
@@ -679,8 +679,7 @@ lyr_freetype::accelerated_render(Context context,Surface *surface,int quality, c
 
        if(error)
        {
-               if(cb)cb->error(string("lyr_freetype:")+_("Unable to set face size.")+strprintf(" (err=%d)",error));
-               return false;
+               if(cb)cb->warning(string("lyr_freetype:")+_("Unable to set face size.")+strprintf(" (err=%d)",error));
        }
 
        FT_GlyphSlot  slot = face->glyph;  // a small shortcut