From 58c0a706d87dd1eb6fc62c5dd8b15a6fabb3d480 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Fri, 10 Aug 2012 13:15:44 +0800 Subject: [PATCH] Revert "working on fonts without ToUnicode" move it into devv This reverts commit 86578b4c674aae4cd11d810a26dd85f78e4ca723. --- bin/pdf2htmlEX | 2 +- src/HTMLRenderer.cc | 21 ++------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/bin/pdf2htmlEX b/bin/pdf2htmlEX index 8469cdc..ffd80e8 100755 --- a/bin/pdf2htmlEX +++ b/bin/pdf2htmlEX @@ -12,7 +12,7 @@ if [ -f convert.pe ]; then echo -n "Converting fonts: " fontforge -script convert.pe 2>/dev/null echo "." -# rm convert.pe + rm convert.pe fi rm *.encoding 2>/dev/null diff --git a/src/HTMLRenderer.cc b/src/HTMLRenderer.cc index 1367399..965f222 100644 --- a/src/HTMLRenderer.cc +++ b/src/HTMLRenderer.cc @@ -306,6 +306,7 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s) //debug //real pos & hori_scale + if(0) { html_fout << "\""; double x,y; @@ -347,25 +348,7 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s) std::cerr << "TODO: non-zero origins" << std::endl; } - if(uLen == 0) - { - CharCode c = 0; - for(int i = 0; i < n; ++i) - { - c = (c<<8) | (code&0xff); - code >>= 8; - } - for(int i = 0; i < n; ++i) - { - Unicode u = (c&0xff); - c >>= 8; - outputUnicodes(&u, 1); - } - } - else - { - outputUnicodes(u, uLen); - } + outputUnicodes(u, uLen); dx += dx1; dy += dy1;