1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

remove debug info

This commit is contained in:
Lu Wang 2012-09-25 19:32:55 +08:00
parent e8d09a0115
commit 835c1de436
2 changed files with 9 additions and 6 deletions

View File

@ -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;

View File

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