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) << ";";