summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2011-10-13 12:19:13 +0200
committerAlbert Astals Cid <aacid@kde.org>2011-10-13 12:19:13 +0200
commit880a61e6bb27dd8f8cdbfdbeb3e0e4127cd88992 (patch)
treee538d0892c65684f40d30b534415a82952601dc9
parent78acedf59df47b6ce9391322de0f4689dfe8d963 (diff)
xpdf303: Merge SplashT1Font::getGlyphPath changes
-rw-r--r--ALL_DIFF73
1 files changed, 0 insertions, 73 deletions
diff --git a/ALL_DIFF b/ALL_DIFF
index 9b89adc..41cb956 100644
--- a/ALL_DIFF
+++ b/ALL_DIFF
@@ -5716,79 +5716,6 @@ diff -ru xpdf-3.02/splash/SplashState.h xpdf-3.03/splash/SplashState.h
SplashState *next; // used by Splash class
-diff -ru xpdf-3.02/splash/SplashT1Font.cc xpdf-3.03/splash/SplashT1Font.cc
---- xpdf-3.02/splash/SplashT1Font.cc 2007-02-27 23:05:52.000000000 +0100
-+++ xpdf-3.03/splash/SplashT1Font.cc 2011-08-15 23:08:53.000000000 +0200
-@@ -220,13 +220,12 @@
- T1_OUTLINE *outline;
- T1_PATHSEGMENT *seg;
- T1_BEZIERSEGMENT *bez;
-- SplashCoord x, y, x1, y1;
-+ int x, y, x1, y1;
- GBool needClose;
-
- if (outlineID < 0) {
- outlineID = T1_CopyFont(((SplashT1FontFile *)fontFile)->t1libID);
-- outlineSize = (float)splashSqrt(textMat[2]*textMat[2] +
-- textMat[3]*textMat[3]);
-+ outlineSize = (float)splashDist(0, 0, textMat[2], textMat[3]);
- matrix.cxx = (double)textMat[0] / outlineSize;
- matrix.cxy = (double)textMat[1] / outlineSize;
- matrix.cyx = (double)textMat[2] / outlineSize;
-@@ -240,8 +239,11 @@
-
- path = new SplashPath();
- if ((outline = T1_GetCharOutline(outlineID, c, outlineSize, NULL))) {
-- x = 0;
-- y = 0;
-+ // NB: t1lib uses integer coordinates here; we keep a running
-+ // (x,y) total as integers, so that the final point in the path is
-+ // exactly the same as the first point, thus avoiding weird
-+ // mitered join glitches
-+ x = y = 0;
- needClose = gFalse;
- for (seg = outline; seg; seg = seg->link) {
- switch (seg->type) {
-@@ -250,25 +252,26 @@
- path->close();
- needClose = gFalse;
- }
-- x += seg->dest.x * outlineMul;
-- y += seg->dest.y * outlineMul;
-- path->moveTo(x, -y);
-+ x += seg->dest.x;
-+ y += seg->dest.y;
-+ path->moveTo(outlineMul * x, -outlineMul * y);
- break;
- case T1_PATHTYPE_LINE:
-- x += seg->dest.x * outlineMul;
-- y += seg->dest.y * outlineMul;
-- path->lineTo(x, -y);
-+ x += seg->dest.x;
-+ y += seg->dest.y;
-+ path->lineTo(outlineMul * x, -outlineMul * y);
- needClose = gTrue;
- break;
- case T1_PATHTYPE_BEZIER:
- bez = (T1_BEZIERSEGMENT *)seg;
-- x1 = x + (SplashCoord)(bez->dest.x * outlineMul);
-- y1 = y + (SplashCoord)(bez->dest.y * outlineMul);
-- path->curveTo(x + (SplashCoord)(bez->B.x * outlineMul),
-- -(y + (SplashCoord)(bez->B.y * outlineMul)),
-- x + (SplashCoord)(bez->C.x * outlineMul),
-- -(y + (SplashCoord)(bez->C.y * outlineMul)),
-- x1, -y1);
-+ x1 = x + bez->dest.x;
-+ y1 = y + bez->dest.y;
-+ path->curveTo(outlineMul * (x + bez->B.x),
-+ -outlineMul * (y + bez->B.y),
-+ outlineMul * (x + bez->C.x),
-+ -outlineMul * (y + bez->C.y),
-+ outlineMul * x1,
-+ -outlineMul * y1);
- x = x1;
- y = y1;
- needClose = gTrue;
diff -ru xpdf-3.02/splash/SplashXPath.cc xpdf-3.03/splash/SplashXPath.cc
--- xpdf-3.02/splash/SplashXPath.cc 2007-02-27 23:05:52.000000000 +0100
+++ xpdf-3.03/splash/SplashXPath.cc 2011-08-15 23:08:53.000000000 +0200