From 4c04f4fa3f2ed741b3967ae7e3697d36d05e5a06 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Sun, 23 Sep 2012 23:01:25 +0800 Subject: [PATCH] check ttfautohint failure --- src/HTMLRenderer/text.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/HTMLRenderer/text.cc b/src/HTMLRenderer/text.cc index 84b0c7f..9b46c3b 100644 --- a/src/HTMLRenderer/text.cc +++ b/src/HTMLRenderer/text.cc @@ -413,7 +413,10 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo if(param->external_hint_tool != "") { rename(fn.c_str(), tmp_fn.c_str()); - system((char*)str_fmt("%s %s %s", param->external_hint_tool.c_str(), tmp_fn.c_str(), fn.c_str())); + if(system((char*)str_fmt("%s %s %s", param->external_hint_tool.c_str(), tmp_fn.c_str(), fn.c_str())) != 0) + { + rename(tmp_fn.c_str(), fn.c_str()); + } } /*