diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2009-11-07 14:36:49 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2009-11-07 14:54:47 +1030 |
commit | 7f22d9d433599292d1e9778f29df02dbf6985f6f (patch) | |
tree | 7b6a9725acfc56dbf61b54d36849096f8374bd3a /src | |
parent | 0a5ec9802a39dee240a1a3476af1ef8a7db9b6b3 (diff) |
Type 1 subset: Don't add a new line when in binary mode
At the end of the private dictionary a new line is appended so that
the trailing zeros will not exceed 80 columns. In hex mode (used for
PS embedding) extra white space is harmless as it is ignored when
parsing the ascii hex encoded data. But in binary mode (used for PDF
embedding) the new line must not be added as it corrupts the binary
data.
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/419143
(cherry picked from commit a4a59be600cbe17f43afa20422f9d05f3a5d5b52)
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-type1-subset.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c index bbff33d9..a0616e3e 100644 --- a/src/cairo-type1-subset.c +++ b/src/cairo-type1-subset.c @@ -1100,7 +1100,8 @@ cairo_type1_font_subset_write_private_dict (cairo_type1_font_subset_t *font, if (status) return status; - _cairo_output_stream_write (font->output, "\n", 1); + if (font->hex_encode) + _cairo_output_stream_write (font->output, "\n", 1); return CAIRO_STATUS_SUCCESS; } |