diff --git a/src/HTMLRenderer/install.cc b/src/HTMLRenderer/install.cc
index d258c92..7757453 100644
--- a/src/HTMLRenderer/install.cc
+++ b/src/HTMLRenderer/install.cc
@@ -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(font)->getCodeToGIDMap(nullptr, &len);
diff --git a/src/HTMLRenderer/text.cc b/src/HTMLRenderer/text.cc
index 0cfe1af..13fa771 100644
--- a/src/HTMLRenderer/text.cc
+++ b/src/HTMLRenderer/text.cc
@@ -175,6 +175,7 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
// shift left
// TODO, create a class for this
html_fout << format("") % target;
+ draw_tx += target / draw_scale;
}
}