2004-12-22 Suresh Chandrasekharan <
[email protected]>
Bugtraq #5083233
[cinnabar] gpdf: Crossed square boxes are displayed instead of
right texts.
--- a/ChangeLog Wed Dec 22 15:58:40 2004 +0000
+++ b/ChangeLog Wed Dec 22 19:01:50 2004 +0000
@@ -1,3 +1,12 @@
+2004-12-22 Suresh Chandrasekharan <[email protected]>
+
+ Fix for 5083233
+
+ * libgnomeprint.spec:
+ Added ibgnomeprint-11-gpdf-mixed-text-issue-5083233.diff
+
+ * patches/ibgnomeprint-11-gpdf-mixed-text-issue-5083233.diff: Added new.
+
2004-12-22 Leena Gunda <[email protected]>
* gdm.spec: Update
--- a/libgnomeprint.spec Wed Dec 22 15:58:40 2004 +0000
+++ b/libgnomeprint.spec Wed Dec 22 19:01:50 2004 +0000
@@ -20,6 +20,7 @@
Patch8: libgnomeprint-08-g11n-i18n-ui.diff
Patch9: libgnomeprint-09-g11n-potfiles.diff
Patch10: libgnomeprint-10-chinese-ASCII-5090546.diff
+Patch11: libgnomeprint-11-gpdf-mixed-text-issue-5083233.diff
URL: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Autoreqprov: on
@@ -79,6 +80,7 @@
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1
bash -x %SOURCE3
@@ -147,6 +149,9 @@
%{_mandir}/man3/*
%changelog
+* Tue Dec 21 2004 - [email protected]
+- Fix for 5083233. Added libgnomeprint-11-gpdf-mixed-text-issue-5083233.diff
+
* Tue Dec 14 2004 - [email protected]
- Remove the $(datadir)/fonts/pfbs and $(datadir)/gnome-print from
being created. No idea where this came from, but it's wrong.
--- /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,