diff -Nuar poppler-0.5.4/poppler-0.5.4/poppler/TextOutputDev.cc poppler-0.5.4-fix/poppler-0.5.4/poppler/TextOutputDev.cc --- poppler-0.5.4/poppler-0.5.4/poppler/TextOutputDev.cc 2006-09-21 08:53:32.000000000 +0800 +++ poppler-0.5.4-fix/poppler-0.5.4/poppler/TextOutputDev.cc 2006-12-22 18:38:33.000000000 +0800 @@ -1626,6 +1626,7 @@ blocks = NULL; rawWords = NULL; rawLastWord = NULL; + fontChanged = gFalse; fonts = new GooList(); lastFindXMin = lastFindYMin = 0; haveLastFind = gFalse; @@ -1702,6 +1703,7 @@ blocks = NULL; rawWords = NULL; rawLastWord = NULL; + fontChanged = gFalse; fonts = new GooList(); } @@ -1713,6 +1715,7 @@ double w; int i; + fontChanged = gTrue; // get the font info object curFont = NULL; for (i = 0; i < fonts->getLength(); ++i) { @@ -1785,7 +1788,6 @@ ++nest; return; } - // compute the rotation state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]); if (state->getFont()->getType() == fontType3) { @@ -1889,7 +1891,9 @@ if (overlap || lastCharOverlap || sp < -minDupBreakOverlap * curWord->fontSize || sp > minWordBreakSpace * curWord->fontSize || + fontChanged || fabs(base - curWord->base) > 0.5) { + fontChanged = gFalse; endWord(); } lastCharOverlap = overlap; diff -Nuar poppler-0.5.4/poppler-0.5.4/poppler/TextOutputDev.h poppler-0.5.4-fix/poppler-0.5.4/poppler/TextOutputDev.h --- poppler-0.5.4/poppler-0.5.4/poppler/TextOutputDev.h 2006-05-20 05:01:50.000000000 +0800 +++ poppler-0.5.4-fix/poppler-0.5.4/poppler/TextOutputDev.h 2006-12-22 18:38:59.000000000 +0800 @@ -503,6 +503,7 @@ double lastFindXMin, // coordinates of the last "find" result lastFindYMin; GBool haveLastFind; + GBool fontChanged; // friend class TextLine; friend class TextLineFrag;