[cairo-commit] cairo/src cairo_pdf_surface.c,1.12,1.13

Kristian Hogsberg commit at pdx.freedesktop.org
Sun Feb 13 12:41:44 PST 2005


Committed by: krh

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv11043/src

Modified Files:
	cairo_pdf_surface.c 
Log Message:
2005-02-10  Kristian Høgsberg  <krh at redhat.com>

        Patches from Owen Taylor:

        * src/cairo_pdf_surface.c
        (_cairo_pdf_surface_show_glyphs): Emit text as octal escapes,
        to avoid problems with \, \r, ), etc.
        (_cairo_pdf_document_write_fonts): Change /Flags to be 4 (symbolic),
        not 32 (non-symbolic), otherwise acroread gets confuse.
        (cairo_pdf_ft_font_write_cmap_table): Use a 1,0 cmap subtable,
        not a 0,0, to conform to the PDF spec.



Index: cairo_pdf_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_pdf_surface.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cairo_pdf_surface.c	2 Feb 2005 04:47:43 -0000	1.12
+++ cairo_pdf_surface.c	13 Feb 2005 20:41:42 -0000	1.13
@@ -436,7 +436,7 @@
     cairo_pdf_ft_font_write_be16 (font, 0);
     cairo_pdf_ft_font_write_be16 (font, 1);
 
-    cairo_pdf_ft_font_write_be16 (font, 0);
+    cairo_pdf_ft_font_write_be16 (font, 1);
     cairo_pdf_ft_font_write_be16 (font, 0);
     cairo_pdf_ft_font_write_be32 (font, 12);
 
@@ -1791,7 +1791,7 @@
 	index = cairo_pdf_font_use_glyph (pdf_font, glyphs[i].index);
 
 	fprintf (file,
-		 " %f %f %f %f %f %f Tm (%c) Tj",
+		 " %f %f %f %f %f %f Tm (\\%o) Tj",
 		 font->scale.matrix[0][0],
 		 font->scale.matrix[0][1],
 		 font->scale.matrix[1][0],
@@ -1963,8 +1963,8 @@
 	fprintf (file,
 		 "%d 0 obj\r\n"
 		 "<< /Type /FontDescriptor\r\n"
-		 "   /FontName /%s\r\n"
-		 "   /Flags 32\r\n"
+		 "   /FontName /7%s\r\n"
+		 "   /Flags 4\r\n"
 		 "   /FontBBox [ %ld %ld %ld %ld ]\r\n"
 		 "   /ItalicAngle 0\r\n"
 		 "   /Ascent %ld\r\n"




More information about the cairo-commit mailing list