From 4cc15f9e1a14e8799882d50a432769d52a63410b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Aliste?= Date: Mon, 14 Feb 2011 23:13:59 -0300 Subject: [PATCH] TextOutputDev: Break words when FontInfo changes. See bug #6923. --- poppler/TextOutputDev.cc | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc index 71b946e..8693fe7 100644 --- a/poppler/TextOutputDev.cc +++ b/poppler/TextOutputDev.cc @@ -2208,6 +2208,7 @@ void TextPage::addChar(GfxState *state, double x, double y, // (3) the previous character was an overlap (we want each duplicated // character to be in a word by itself at this stage), // (4) the font size has changed + // (5) the font info has changed if (curWord && curWord->len > 0) { base = sp = delta = 0; // make gcc happy switch (curWord->rot) { @@ -2238,7 +2239,8 @@ void TextPage::addChar(GfxState *state, double x, double y, sp < -minDupBreakOverlap * curWord->fontSize || sp > minWordBreakSpace * curWord->fontSize || fabs(base - curWord->base) > 0.5 || - curFontSize != curWord->fontSize) { + curFontSize != curWord->fontSize || + curFont != curWord->font) { endWord(); } lastCharOverlap = overlap; -- 1.7.3.5