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:
parent
3b44d3059c
commit
4f49f6b795
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user