diff --git a/cairo-render-thin-lines.patch b/cairo-render-thin-lines.patch new file mode 100644 index 0000000..3841b2b --- /dev/null +++ b/cairo-render-thin-lines.patch @@ -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; diff --git a/cairo.changes b/cairo.changes index 7a7e3de..7bcc187 100644 --- a/cairo.changes +++ b/cairo.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Apr 11 12:55:12 UTC 2014 - jw@suse.com + +- Add cairo-render-thin-lines.patch: Fix rendering of thin lines, + so that inkscape can export 0.01mm lines again to PDF. Regression + introduced with 1.12.3. + ------------------------------------------------------------------- Wed Aug 28 20:42:58 UTC 2013 - idonmez@suse.com diff --git a/cairo.spec b/cairo.spec index 99bc302..cf7a11b 100644 --- a/cairo.spec +++ b/cairo.spec @@ -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 +# PATCH-FIX-UPSTREAM cairo-render-thin-lines.patch fdo#77298 jw@suse.com -- Fix rendering of thin lines +Patch2: cairo-render-thin-lines.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