[poppler] [PATCH] enable drawImageMask and make type3 fonts work
Jeff Muizelaar
jrmuizel at nit.ca
Fri Mar 4 11:31:48 PST 2005
2005-03-04 Jeff Muizelaar <jrmuizel at nit.ca>
* poppler/CairoFontEngine.cc (CairoFontEngine::getFont):
Don't print "Type 3 font!" message.
* poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask):
Enable image mask drawing and invert the alpha setting so type3
fonts come out right.
* poppler/CairoOutputDev.h
(CairoOutputDev::interpretType3Chars): Return true so that
Gfx.cc turns type3 characters into calls to drawImageMask
diff -ur 02-drawString/poppler/CairoFontEngine.cc 04-type3-null/poppler/CairoFontEngine.cc
--- 02-drawString/poppler/CairoFontEngine.cc 2005-03-01 15:02:08.000000000 -0500
+++ 04-type3-null/poppler/CairoFontEngine.cc 2005-03-04 13:49:06.000000000 -0500
@@ -332,7 +332,6 @@
fontType = gfxFont->getType();
if (fontType == fontType3) {
- printf ("Type 3 font!\n");
/* Need to figure this out later */
// return NULL;
}
diff -ur 02-drawString/poppler/CairoOutputDev.cc 04-type3-null/poppler/CairoOutputDev.cc
--- 02-drawString/poppler/CairoOutputDev.cc 2005-03-02 12:30:42.000000000 -0500
+++ 04-type3-null/poppler/CairoOutputDev.cc 2005-03-02 12:43:36.000000000 -0500
@@ -461,11 +461,6 @@
double *ctm;
cairo_matrix_t *mat;
- /* TODO: I'm not sure how to implement this, and its currently crashing.
- Disabling for now */
-
- return;
-
buffer = (char *)malloc (width * height);
if (buffer == NULL) {
@@ -486,9 +481,9 @@
pix ^= 1;
if (pix)
- *dest++ = 255;
- else
*dest++ = 0;
+ else
+ *dest++ = 255;
}
}
diff -ur 02-drawString/poppler/CairoOutputDev.h 04-type3-null/poppler/CairoOutputDev.h
--- 02-drawString/poppler/CairoOutputDev.h 2005-03-02 12:30:32.000000000 -0500
+++ 04-type3-null/poppler/CairoOutputDev.h 2005-03-02 12:40:09.000000000 -0500
@@ -52,7 +52,7 @@
// Does this device use beginType3Char/endType3Char? Otherwise,
// text in Type 3 fonts will be drawn with drawChar/drawString.
- virtual GBool interpretType3Chars() { return gFalse; }
+ virtual GBool interpretType3Chars() { return gTrue; }
//----- initialization and control
More information about the poppler
mailing list