1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +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())
{
maxcode = 0xff;
if(suffix == ".ttf")
{
maxcode = 0xff;
script_fout << "Reencode(\"original\")" << endl;
int buflen;
char * buf = nullptr;
@ -155,8 +155,6 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const string & suffix,
}
else
{
// don't reencode non-ttf 8bit fonts with ToUnicode
maxcode = 0;
script_fout << "Reencode(\"unicode\")" << endl;
}
}

View File

@ -185,7 +185,7 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
while (len > 0) {
auto n = font->getNextChar(p, len, &code, &u, &uLen, &dx1, &dy1, &ox, &oy);
if(!(_equal(ox, 0) && _equal(oy, 0)))
{
cerr << "TODO: non-zero origins" << endl;
@ -195,6 +195,8 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
{
++nSpaces;
}
// TODO: don't use ToUnicode Map for nonttf fonts
if((uLen > 0) && (all_of(u, u+uLen, isLegalUnicode)))
{