[cairo-commit] Branch '1.8' - src/cairo-type1-subset.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Fri Nov 6 20:27:26 PST 2009

 src/cairo-type1-subset.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7f22d9d433599292d1e9778f29df02dbf6985f6f
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Nov 7 14:36:49 2009 +1030

    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
    (cherry picked from commit a4a59be600cbe17f43afa20422f9d05f3a5d5b52)

diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index bbff33d..a0616e3 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);

More information about the cairo-commit mailing list