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

better bold/italic recognition

This commit is contained in:
Lu Wang 2012-08-27 07:17:48 +08:00
parent 0103e02d70
commit a65c4924c2

View File

@ -55,12 +55,12 @@ void HTMLRenderer::export_local_font(long long fn_id, GfxFont * font, const stri
allcss_fout << format(".f%|1$x|{") % fn_id;
allcss_fout << "font-family:" << ((cssfont == "") ? (original_font_name + "," + general_font_family(font)) : cssfont) << ";";
if(font->isBold())
if(font->isBold() || ifind_first(original_font_name, "bold"))
allcss_fout << "font-weight:bold;";
if(ifind_first(original_font_name, "oblique"))
allcss_fout << "font-style:oblique;";
else if(font->isItalic())
else if(font->isItalic() || ifind_first(original_font_name, "italic"))
allcss_fout << "font-style:italic;";
allcss_fout << "}" << endl;