[poppler] poppler/splash: SplashFont.cc, 1.2, 1.3 SplashFont.h,
1.1.1.1, 1.2
Albert Astals Cid
aacid at freedesktop.org
Thu Sep 15 15:15:49 PDT 2005
Update of /cvs/poppler/poppler/splash
In directory gabe:/tmp/cvs-serv13927
Modified Files:
SplashFont.cc SplashFont.h
Log Message:
Merge xpdf 3.00 -> 3.01 changes in SplashFont.* files
Index: SplashFont.cc
===================================================================
RCS file: /cvs/poppler/poppler/splash/SplashFont.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- SplashFont.cc 27 Aug 2005 08:43:43 -0000 1.2
+++ SplashFont.cc 15 Sep 2005 22:15:47 -0000 1.3
@@ -95,6 +95,12 @@
Guchar *p;
int i, j, k;
+ // no fractional coordinates for large glyphs or non-anti-aliased
+ // glyphs
+ if (!aa || glyphH > 50) {
+ xFrac = yFrac = 0;
+ }
+
// check the cache
i = (c & (cacheSets - 1)) * cacheAssoc;
for (j = 0; j < cacheAssoc; ++j) {
Index: SplashFont.h
===================================================================
RCS file: /cvs/poppler/poppler/splash/SplashFont.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- SplashFont.h 3 Mar 2005 19:45:59 -0000 1.1.1.1
+++ SplashFont.h 15 Sep 2005 22:15:47 -0000 1.2
@@ -25,7 +25,8 @@
// decimal points.
#define splashFontFractionBits 2
#define splashFontFraction (1 << splashFontFractionBits)
-#define splashFontFractionMul (1 / (SplashCoord)splashFontFraction)
+#define splashFontFractionMul \
+ ((SplashCoord)1 / (SplashCoord)splashFontFraction)
//------------------------------------------------------------------------
// SplashFont
@@ -69,6 +70,13 @@
// Return the path for a glyph.
virtual SplashPath *getGlyphPath(int c) = 0;
+ // Return the font transform matrix.
+ SplashCoord *getMatrix() { return mat; }
+
+ // Return the glyph bounding box.
+ void getBBox(int *xMinA, int *yMinA, int *xMaxA, int *yMaxA)
+ { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; }
+
protected:
SplashFontFile *fontFile;
More information about the poppler
mailing list