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

fixed bugs of font & offset

This commit is contained in:
Lu Wang 2012-08-16 13:24:22 +08:00
parent 3b44d3059c
commit 4f49f6b795
2 changed files with 6 additions and 1 deletions

View File

@ -135,6 +135,10 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const string & suffix,
if(!font->isCIDFont())
{
maxcode = 0xff;
if(suffix != ".ttf")
{
script_fout << "Reencode(\"unicode\")" << endl;
}
}
else
{
@ -145,7 +149,7 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const string & suffix,
}
else
{
script_fout << format("Reencode(\"original\")") << endl;
script_fout << "Reencode(\"original\")" << endl;
int len;
// code2GID has been stored for embedded CID fonts
code2GID = dynamic_cast<GfxCIDFont*>(font)->getCodeToGIDMap(nullptr, &len);

View File

@ -175,6 +175,7 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
// shift left
// TODO, create a class for this
html_fout << format("<span style=\"margin-left:%1%px\"></span>") % target;
draw_tx += target / draw_scale;
}
}