--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libgnomeprint-11-gpdf-mixed-text-issue-5083233.diff Wed Dec 22 19:01:50 2004 +0000
@@ -0,0 +1,79 @@
+diff -ru libgnomeprint-2.6.0.orig/ChangeLog libgnomeprint-2.6.0/ChangeLog
+--- libgnomeprint-2.6.0.orig/ChangeLog 2004-12-21 17:18:35.286549000 -0800
++++ libgnomeprint-2.6.0/ChangeLog 2004-12-21 17:23:55.988426000 -0800
+@@ -1,3 +1,18 @@
++2004-12-21 Suresh Chandrasekharan <[email protected]>
++
++ Bugtraq #5083233
++
++ [cinnabar] gpdf: Crossed square boxes are displayed instead of
++ right texts.
++
++ Seems like with the following change in libgnomeprint creates PDF
++ which is displayable by gpdf.
++
++ * libgnomeprint/gnome-print-pdf.c: Added
++ gnome_print_pdf_get_subfont_name to indicate the BaseFont is derived.
++
++ (gnome_print_embed_pdf_font): Call to gnome_print_pdf_get_subfont_name.
++
+ 2004-10-27 Suresh Chandrasekharan <[email protected]>
+
+ Bugtraq #5090546
+diff -ru libgnomeprint-2.6.0.orig/libgnomeprint/gnome-print-pdf.c libgnomeprint-2.6.0/libgnomeprint/gnome-print-pdf.c
+--- libgnomeprint-2.6.0.orig/libgnomeprint/gnome-print-pdf.c 2004-12-21 17:18:34.117868000 -0800
++++ libgnomeprint-2.6.0/libgnomeprint/gnome-print-pdf.c 2004-12-21 17:24:43.219002000 -0800
+@@ -1627,9 +1627,34 @@
+ return GNOME_PRINT_OK;
+ }
+
++/*
++ * BaseFont name for subfont needs to be 'XXXXXX+Original Font's BaseFont name'
++ */
++
++static guchar *
++gnome_print_pdf_get_subfont_name (guchar *basefont, guint unique_subfont_id) {
++ int i;
++ guchar *full_basefont;
++
++ if (!basefont)
++ return NULL;
++ /* 6 letters, a '+' and ending NUL */
++ full_basefont = (guchar *)g_malloc (strlen(basefont) + 6 + 1 + 1);
++
++ for (i = 0; i < 6; i++) {
++ int offset = unique_subfont_id%26;
++ unique_subfont_id /= 26;
++ full_basefont[i] = 'A'+offset;
++ }
++ full_basefont[6] = '+';
++ sprintf(full_basefont + 7,"%s",basefont);
++ return (full_basefont);
++}
++
+ void
+ gnome_print_embed_pdf_font (GnomePrintPdf *pdf, GnomePrintPdfFont *font) {
+ gint object_number_descriptor = 0;
++ guchar *basefont_name;
+ gboolean plan_b = FALSE; /* TRUE if we could not embed the font */
+
+ if (!font->is_basic_14) {
+@@ -1644,6 +1669,7 @@
+ }
+ }
+
++ basefont_name = gnome_print_pdf_get_subfont_name ((guchar *)gnome_font_face_get_ps_name (font->face), font->object_number);
+ /* Write the object data */
+ gnome_print_pdf_object_start (pdf, font->object_number, FALSE);
+ gnome_print_pdf_fprintf (pdf,
+@@ -1652,8 +1678,9 @@
+ "/BaseFont /%s" EOL
+ "/Name /F%i" EOL,
+ font->is_type_1 ? "Type1" : "TrueType",
+- plan_b ? (const guchar *) "Times-Roman" : gnome_font_face_get_ps_name (font->face),
++ plan_b ? (const guchar *) "Times-Roman" : basefont_name,
+ font->object_number);
++ g_free (basefont_name);
+
+ if (!font->is_basic_14) {
+ gnome_print_pdf_fprintf (pdf,