[poppler] poppler/PSOutputDev.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Sun Nov 15 10:44:50 PST 2009
poppler/PSOutputDev.cc | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
New commits:
commit 1c3113361fa376093e6fedfbf48feee7dcbc46b7
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Sun Nov 15 19:43:18 2009 +0100
Write out fixed-content portion of Type 1 fonts in PSOutputDev
If /Length3 of a Type 1 FontFile is > 0 the fixed-content from the
FontFile should be used instead of adding the generic 512 zeros and
cleartomark.
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index b784c00..67b5412 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -25,6 +25,7 @@
// Copyright (C) 2009 Carlos Garcia Campos <carlosgc at gnome.org>
// Copyright (C) 2009 William Bader <williambader at hotmail.com>
// Copyright (C) 2009 Kovid Goyal <kovid at kovidgoyal.net>
+// Copyright (C) 2009 Adrian Johnson <ajohnson at redneon.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -2022,12 +2023,19 @@ void PSOutputDev::setupEmbeddedType1Font(Ref *id, GooString *psName) {
if (writePadding)
{
- // write padding and "cleartomark"
- for (i = 0; i < 8; ++i) {
- writePS("00000000000000000000000000000000"
- "00000000000000000000000000000000\n");
+ if (length3 > 0) {
+ // write fixed-content portion
+ while ((c = strObj.streamGetChar()) != EOF) {
+ writePSChar(c);
+ }
+ } else {
+ // write padding and "cleartomark"
+ for (i = 0; i < 8; ++i) {
+ writePS("00000000000000000000000000000000"
+ "00000000000000000000000000000000\n");
+ }
+ writePS("cleartomark\n");
}
- writePS("cleartomark\n");
}
// ending comment
More information about the poppler
mailing list