[poppler] poppler/poppler: UGooString.cc,1.1,1.2
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat Jun 10 15:23:21 PDT 2006
Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv26432/poppler
Modified Files:
UGooString.cc
Log Message:
* poppler/UGooString.cc: When any of the chars that we
are passing to the UGooString is not pdfencodable, do not
encode the string, because we loose information if we do,
this fixes rendering of
http://publikationen.ub.uni-frankfurt.de/volltexte/2005/890/pdf/TR_abs_g.pdf
and other docs with type3 fonts and ligatures
Index: UGooString.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/UGooString.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- UGooString.cc 18 Jan 2006 22:36:01 -0000 1.1
+++ UGooString.cc 10 Jun 2006 22:23:19 -0000 1.2
@@ -51,8 +51,16 @@
{
length = str.getLength();
s = (Unicode *)gmallocn(length, sizeof(Unicode));
+ bool anyNonEncoded = false;
for (int j = 0; j < length; ++j) {
s[j] = pdfDocEncoding[str.getChar(j) & 0xff];
+ if (!s[j]) anyNonEncoded = true;
+ }
+ if ( anyNonEncoded )
+ {
+ for (int j = 0; j < length; ++j) {
+ s[j] = str.getChar(j);
+ }
}
}
More information about the poppler
mailing list