1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-07 18:30:34 +00:00

fixed formatting

This commit is contained in:
John Hewson 2013-01-29 13:38:34 +00:00
parent 6fda07bec3
commit b2d28e2490

View File

@ -43,8 +43,8 @@ namespace pdf2htmlEX {
} }
f_css.fs << "@font-face{" f_css.fs << "@font-face{"
<< "font-family:f" << info.id << ";" << "font-family:f" << info.id << ";"
<< "src:url("; << "src:url(";
{ {
auto fn = str_fmt("f%llx%s", info.id, suffix.c_str()); auto fn = str_fmt("f%llx%s", info.id, suffix.c_str());
@ -63,23 +63,23 @@ namespace pdf2htmlEX {
} }
f_css.fs << ")" f_css.fs << ")"
<< "format(\"" << format << "\");" << "format(\"" << format << "\");"
<< "}" // end of @font-face << "}" // end of @font-face
<< ".f" << info.id << "{" << ".f" << info.id << "{"
<< "font-family:f" << info.id << ";" << "font-family:f" << info.id << ";"
<< "line-height:" << round(info.ascent - info.descent) << ";" << "line-height:" << round(info.ascent - info.descent) << ";"
<< "font-style:normal;" << "font-style:normal;"
<< "font-weight:normal;" << "font-weight:normal;"
<< "visibility:visible;" << "visibility:visible;"
<< "}" // end of .f << "}" // end of .f
<< endl; << endl;
} }
static string general_font_family(GfxFont * font) static string general_font_family(GfxFont * font)
{ {
if(font -> isFixedWidth()) if(font->isFixedWidth())
return "monospace"; return "monospace";
else if (font -> isSerif()) else if (font->isSerif())
return "serif"; return "serif";
else else
return "sans-serif"; return "sans-serif";