summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2011-12-15 00:26:26 +0100
committerAlbert Astals Cid <aacid@kde.org>2011-12-15 00:26:26 +0100
commitc11c53037d4ae53f9062249da0eba680f2a70fed (patch)
tree5fa088c1bf3d0c858eb040e12acc91213c5a7353
parentd2a11e205bae35aa05353c147f7648b7c19b906c (diff)
[xpdf303merge 51ca2b7] [xpdf303] Some more changes in TextOutputDev
-rw-r--r--ALL_DIFF55
1 files changed, 0 insertions, 55 deletions
diff --git a/ALL_DIFF b/ALL_DIFF
index 1d0bd4b..5e964a4 100644
--- a/ALL_DIFF
+++ b/ALL_DIFF
@@ -19302,61 +19302,6 @@ diff -ru xpdf-3.02/xpdf/TextOutputDev.cc xpdf-3.03/xpdf/TextOutputDev.cc
}
}
}
-@@ -3367,10 +3578,9 @@
- return gFalse;
- }
-
-- //~ this doesn't correctly handle:
-- //~ - ranges split across multiple lines (the highlighted region
-- //~ is the bounding box of all the parts of the range)
-- //~ - cases where characters don't convert one-to-one into Unicode
-+ //~ this doesn't correctly handle ranges split across multiple lines
-+ //~ (the highlighted region is the bounding box of all the parts of
-+ //~ the range)
- first = gTrue;
- xMin0 = xMax0 = yMin0 = yMax0 = 0; // make gcc happy
- xMin1 = xMax1 = yMin1 = yMax1 = 0; // make gcc happy
-@@ -3491,7 +3699,9 @@
- delete s;
- if (word->next &&
- fabs(word->next->base - word->base) <
-- maxIntraLineDelta * word->fontSize) {
-+ maxIntraLineDelta * word->fontSize &&
-+ word->next->xMin >
-+ word->xMax - minDupBreakOverlap * word->fontSize) {
- if (word->next->xMin > word->xMax + minWordSpacing * word->fontSize) {
- (*outputFunc)(outputStream, space, spaceLen);
- }
-@@ -3752,7 +3962,9 @@
- }
- i = j;
- // output a right-to-left section
-- for (j = i; j < len && !unicodeTypeL(text[j]); ++j) ;
-+ for (j = i;
-+ j < len && !(unicodeTypeL(text[j]) || unicodeTypeNum(text[j]));
-+ ++j) ;
- if (j > i) {
- s->append(rle, rleLen);
- for (k = j - 1; k >= i; --k) {
-@@ -3767,11 +3979,17 @@
-
- } else {
-
-+ // Note: This code treats numeric characters (European and
-+ // Arabic/Indic) as left-to-right, which isn't strictly correct
-+ // (incurs extra LRE/POPDF pairs), but does produce correct
-+ // visual formatting.
- s->append(rle, rleLen);
- i = len - 1;
- while (i >= 0) {
- // output a right-to-left section
-- for (j = i; j >= 0 && !unicodeTypeL(text[j]); --j) ;
-+ for (j = i;
-+ j >= 0 && !(unicodeTypeL(text[j]) || unicodeTypeNum(text[j]));
-+ --j) ;
- for (k = i; k > j; --k) {
- n = uMap->mapUnicode(text[k], buf, sizeof(buf));
- s->append(buf, n);
@@ -3820,10 +4038,20 @@
fwrite(text, 1, len, (FILE *)stream);
}