From 835c1de43619eacaa0a29d231330bdff9d999e3e Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Tue, 25 Sep 2012 19:32:55 +0800 Subject: [PATCH] remove debug info --- share/pdf2htmlEX.js | 5 ----- src/HTMLRenderer/export.cc | 10 +++++++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/share/pdf2htmlEX.js b/share/pdf2htmlEX.js index 74229b3..9942f74 100644 --- a/share/pdf2htmlEX.js +++ b/share/pdf2htmlEX.js @@ -241,13 +241,8 @@ var pdf2htmlEX = (function(){ var pos = [(detail[2] == null) ? cur_pos[0] : detail[2] ,(detail[3] == null) ? cur_pos[1] : detail[3]]; pos = transform(cur_page.ctm, pos); - - console.log(pos); - var off = target_page.p.position(); - console.log(off); - _.container.scrollLeft(_.container.scrollLeft()+off.left+pos[0]); _.container.scrollTop(_.container.scrollTop()+off.top+target_page.p.height()-pos[1]); ok = true; diff --git a/src/HTMLRenderer/export.cc b/src/HTMLRenderer/export.cc index 8244d8d..5fb5a5b 100644 --- a/src/HTMLRenderer/export.cc +++ b/src/HTMLRenderer/export.cc @@ -35,7 +35,11 @@ void HTMLRenderer::export_remote_font(const FontInfo & info, const string & suff } } - css_fout << ")format(\"" << fontfileformat << "\");}.f" << info.id << "{font-family:f" << info.id << ";line-height:" << _round(info.ascent - info.descent) << ";}"; + css_fout << ")format(\"" << fontfileformat + << "\");}.f" << info.id + << "{font-family:f" << info.id + << ";line-height:" << _round(info.ascent - info.descent) + << ";font-style:normal;font-weight:normal;}"; // when ' ' is not vaild in the font, when we use ' ' in padding // the browser will use the fallback font, whose metrics could be (very) different, then the layout will be affected @@ -73,11 +77,15 @@ void HTMLRenderer::export_local_font(const FontInfo & info, GfxFont * font, cons if(font->isBold() || (fn.find("bold") != string::npos)) css_fout << "font-weight:bold;"; + else + css_fout << "font-weight:normal;"; if(fn.find("oblique") != string::npos) css_fout << "font-style:oblique;"; else if(font->isItalic() || (fn.find("italic") != string::npos)) css_fout << "font-style:italic;"; + else + css_fout << "font-style:normal;"; css_fout << "line-height:" << _round(info.ascent - info.descent) << ";";