From af5f90df1d9f351e1189d96679979133e1a34379 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 8 Nov 2009 21:46:16 +1030 Subject: PDF: Include Type 1 fixed-content portion in the embedded font Some fonts may contain additional PostScript code after the cleartomark. (cherry picked from commit d962d6bae2681ea1f3c9533a83c8902d76e81c6a) --- src/cairo-pdf-surface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 44f0ed83..7632aeaf 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -3174,16 +3174,16 @@ _cairo_pdf_surface_emit_type1_font (cairo_pdf_surface_t *surface, if (subset_resource.id == 0) return CAIRO_STATUS_SUCCESS; - /* We ignore the zero-trailer and set Length3 to 0. */ - length = subset->header_length + subset->data_length; + length = subset->header_length + subset->data_length + subset->trailer_length; status = _cairo_pdf_surface_open_stream (surface, NULL, TRUE, " /Length1 %lu\n" " /Length2 %lu\n" - " /Length3 0\n", + " /Length3 %lu\n", subset->header_length, - subset->data_length); + subset->data_length, + subset->trailer_length); if (status) return status; -- cgit v1.2.3