[poppler] poppler/splash: SplashT1Font.cc, 1.1.1.1,
1.2 SplashT1Font.h, 1.1.1.1, 1.2
Albert Astals Cid
aacid at freedesktop.org
Thu Sep 15 15:25:04 PDT 2005
Update of /cvs/poppler/poppler/splash
In directory gabe:/tmp/cvs-serv15157
Modified Files:
SplashT1Font.cc SplashT1Font.h
Log Message:
Merge xpdf 3.00 -> 3.01 changes in SplashT1Font.* files
Index: SplashT1Font.cc
===================================================================
RCS file: /cvs/poppler/poppler/splash/SplashT1Font.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- SplashT1Font.cc 3 Mar 2005 19:46:00 -0000 1.1.1.1
+++ SplashT1Font.cc 15 Sep 2005 22:24:55 -0000 1.2
@@ -159,10 +159,10 @@
}
// transform the font
- matrix.cxx = mat[0] / size;
- matrix.cxy = mat[1] / size;
- matrix.cyx = mat[2] / size;
- matrix.cyy = mat[3] / size;
+ matrix.cxx = (double)mat[0] / size;
+ matrix.cxy = (double)mat[1] / size;
+ matrix.cyx = (double)mat[2] / size;
+ matrix.cyy = (double)mat[3] / size;
T1_TransformFont(t1libID, &matrix);
}
@@ -215,14 +215,22 @@
T1_PATHSEGMENT *seg;
T1_BEZIERSEGMENT *bez;
SplashCoord x, y, x1, y1;
+ GBool needClose;
path = new SplashPath();
- outline = T1_GetCharOutline(t1libID, c, size, NULL);
+ if (!(outline = T1_GetCharOutline(t1libID, c, size, NULL))) {
+ return path;
+ }
x = 0;
y = 0;
+ needClose = gFalse;
for (seg = outline; seg; seg = seg->link) {
switch (seg->type) {
case T1_PATHTYPE_MOVE:
+ if (needClose) {
+ path->close();
+ needClose = gFalse;
+ }
x += seg->dest.x / 65536.0;
y += seg->dest.y / 65536.0;
path->moveTo(x, y);
@@ -231,6 +239,7 @@
x += seg->dest.x / 65536.0;
y += seg->dest.y / 65536.0;
path->lineTo(x, y);
+ needClose = gTrue;
break;
case T1_PATHTYPE_BEZIER:
bez = (T1_BEZIERSEGMENT *)seg;
@@ -241,9 +250,13 @@
x1, y1);
x = x1;
y = y1;
+ needClose = gTrue;
break;
}
}
+ if (needClose) {
+ path->close();
+ }
T1_FreeOutline(outline);
return path;
}
Index: SplashT1Font.h
===================================================================
RCS file: /cvs/poppler/poppler/splash/SplashT1Font.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- SplashT1Font.h 3 Mar 2005 19:45:59 -0000 1.1.1.1
+++ SplashT1Font.h 15 Sep 2005 22:24:57 -0000 1.2
@@ -15,6 +15,8 @@
#include "SplashFont.h"
+class SplashT1FontFile;
+
//------------------------------------------------------------------------
// SplashT1Font
//------------------------------------------------------------------------
More information about the poppler
mailing list