diff --git a/bin/pdf2htmlEX b/bin/pdf2htmlEX index eec482c..96ba05e 100755 --- a/bin/pdf2htmlEX +++ b/bin/pdf2htmlEX @@ -12,6 +12,7 @@ echo -n "Converting fonts: " for f in *.ttf; do if [ -f $f ]; then + cp $f $f.old fontforge -script "${SCRIPT_DIR}/convert.pe" $f 2>/dev/null echo -n "." fi @@ -19,6 +20,7 @@ done for f in *.pfa; do if [ -f $f ]; then + cp $f $f.old fontforge -script "${SCRIPT_DIR}/convert.pe" $f 2>/dev/null rm $f echo -n "." diff --git a/src/HTMLRenderer.cc b/src/HTMLRenderer.cc index fdea29d..92bbe0d 100644 --- a/src/HTMLRenderer.cc +++ b/src/HTMLRenderer.cc @@ -461,7 +461,20 @@ void HTMLRenderer::drawChar(GfxState *state, double x, double y, if(uLen > 0) cur_string->addUnicodes(state, x, y, dx, dy, u, uLen); else + { + if(nBytes > 0) + { + std::cerr << "Cannot map to Unicode!" << std::endl; + std::cerr << cur_fn_id << std::endl; + std::cerr << "*"; + for(int i = 0; i < nBytes; ++i) + { + std::cerr << (int)(((char*)&code)[i]); + } + std::cerr << std::endl; + } cur_string->addChars(state, x, y, dx, dy, code, nBytes); + } } // TODO