1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-20 15:12:26 +00:00

Merge branch 'devv' into exp

This commit is contained in:
Lu Wang 2012-08-24 09:10:51 +02:00
commit 34b12b774c
2 changed files with 4 additions and 4 deletions

View File

@ -135,9 +135,9 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const string & suffix,
if(!font->isCIDFont()) if(!font->isCIDFont())
{ {
maxcode = 0xff;
if(suffix == ".ttf") if(suffix == ".ttf")
{ {
maxcode = 0xff;
script_fout << "Reencode(\"original\")" << endl; script_fout << "Reencode(\"original\")" << endl;
int buflen; int buflen;
char * buf = nullptr; char * buf = nullptr;
@ -155,8 +155,6 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const string & suffix,
} }
else else
{ {
// don't reencode non-ttf 8bit fonts with ToUnicode
maxcode = 0;
script_fout << "Reencode(\"unicode\")" << endl; script_fout << "Reencode(\"unicode\")" << endl;
} }
} }

View File

@ -196,6 +196,8 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
++nSpaces; ++nSpaces;
} }
// TODO: don't use ToUnicode Map for nonttf fonts
if((uLen > 0) && (all_of(u, u+uLen, isLegalUnicode))) if((uLen > 0) && (all_of(u, u+uLen, isLegalUnicode)))
{ {
outputUnicodes(html_fout, u, uLen); outputUnicodes(html_fout, u, uLen);