Accepting request 229739 from home:jnweiger:branches:GNOME:Factory

- Added fix_for_fdo77298.patch
  So that inkscape can export 0.01mm lines again to PDF. Was broken in 1.12.3
  https://bugs.freedesktop.org/show_bug.cgi?id=77298

OBS-URL: https://build.opensuse.org/request/show/229739
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/cairo?expand=0&rev=80
This commit is contained in:
Dominique Leuenberger 2014-04-15 19:38:17 +00:00 committed by Git OBS Bridge
parent 0065eee66c
commit 7723d5a054
3 changed files with 37 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Apr 11 12:55:12 UTC 2014 - jw@suse.com
- Added fix_for_fdo77298.patch
So that inkscape can export 0.01mm lines again to PDF. Was broken in 1.12.3
-------------------------------------------------------------------
Wed Aug 28 20:42:58 UTC 2013 - idonmez@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package cairo
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -32,6 +32,8 @@ Source99: baselibs.conf
Patch0: cairo-modules-no-version.patch
# PATCH-FIX-OPENSUSE cairo-disable-lto.patch idoenmez@suse.de -- Disable -flto on s390{x}
Patch1: cairo-disable-lto.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=77298
Patch2: fix_for_fdo77298.patch
# These libraries are needed only for tests.
# Do not enable tests in build systems, it causes build loop!
#BuildRequires: librsvg-devel poppler-devel
@ -153,6 +155,8 @@ cairo.
%ifarch s390 s390x
%patch1 -p1
%endif
# fix_for_fdo77298.patch
%patch2 -p1
%build
# Needed by patch0 and patch1

26
fix_for_fdo77298.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/src/cairo-pen.c b/src/cairo-pen.c
index 61be0e8..8eed775 100644
--- a/src/cairo-pen.c
+++ b/src/cairo-pen.c
@@ -284,7 +284,20 @@ _cairo_pen_vertices_needed (double tolerance,
radius);
int num_vertices;
- if (tolerance >= 4*major_axis) { /* XXX relaxed from 2*major for inkscape */
+ if (tolerance >= 100*major_axis) { /* XXX relaxed from 2*major for inkscape */
+ /*
+ * When we decide for num_vertices = 1, the object is not drawn.
+ * To avoid https://bugs.freedesktop.org/show_bug.cgi?id=77298
+ * we use 100*major -- this just helps us to the 0.001mm line width.
+ *
+ * The author of the 'XXX relaxed' comment above, originally used 4*major,
+ * which is not sufficient for my inkscape lasercutter usecase.
+ *
+ * Please double check if num_vertices == 1 should never be done (for PDF).
+ *
+ * jnweiger@gmail.com
+ */
+ // fprintf(stderr, "tolerance=%g major_axis=%g -> num_vertices = 1\n", tolerance, major_axis);
num_vertices = 1;
} else if (tolerance >= major_axis) {
num_vertices = 4;