Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: graphics/cairo: Printing regression
To:
Jag Talon <jag@aangat.lahat.computer>
Cc:
Antoine Jacoutot <ajacoutot@openbsd.org>, ports@openbsd.org
Date:
Wed, 25 Sep 2024 22:28:38 +0200

Download raw body.

Thread
Jag Talon:

> I wanted to share that there's a printing regression that seems to be
> caused by cairo and I'm seeing it on my system as well.
> 
> https://gitlab.freedesktop.org/cairo/cairo/-/issues/870

That seems like a low risk fix we can still get in for 7.6.
OK?

-----------------------------------------------
commit 499b64ef075b5debc47b1ecc0f2b157c3a3a76f0 (mystuff)
from: Christian Weisgerber <naddy@mips.inka.de>
date: Wed Sep 25 20:23:41 2024 UTC
 
 Add upstream fix for regression when writing PDFs with fonts.
 
diff 01e126746918306a724eafa8da03b5011b2a2781 499b64ef075b5debc47b1ecc0f2b157c3a3a76f0
commit - 01e126746918306a724eafa8da03b5011b2a2781
commit + 499b64ef075b5debc47b1ecc0f2b157c3a3a76f0
blob - 64adc863f62ea53ffbfefc42bce9c9f741ecf0b5
blob + cedca662304b1ff148b1fc5e5446ec56f5cb1e7c
--- graphics/cairo/Makefile
+++ graphics/cairo/Makefile
@@ -2,6 +2,7 @@ COMMENT=		vector graphics library
 
 GNOME_PROJECT=		cairo
 GNOME_VERSION=		1.18.2
+REVISION=		0
 
 CATEGORIES=		graphics
 DPB_PROPERTIES=		parallel
blob - /dev/null
blob + 5dfbe32d827895db1409f87db509b310f2bbc3b9 (mode 644)
--- /dev/null
+++ graphics/cairo/patches/patch-src_cairo-cff-subset_c
@@ -0,0 +1,23 @@
+cff: Don't fail if no local subs
+https://gitlab.freedesktop.org/cairo/cairo/-/commit/b9eed915f9a67380e7ef9d8746656455c43f67e2
+
+Index: src/cairo-cff-subset.c
+--- src/cairo-cff-subset.c.orig
++++ src/cairo-cff-subset.c
+@@ -952,9 +952,13 @@ cairo_cff_font_read_private_dict (cairo_cff_font_t   *
+ 	 decode_number (operand, nominal_width);
+ 
+     num_subs = _cairo_array_num_elements (local_sub_index);
+-    *local_subs_used = _cairo_calloc_ab (num_subs, sizeof (cairo_bool_t));
+-    if (unlikely (*local_subs_used == NULL))
+-	return _cairo_error (CAIRO_STATUS_NO_MEMORY);
++    if (num_subs > 0) {
++	*local_subs_used = _cairo_calloc_ab (num_subs, sizeof (cairo_bool_t));
++	if (unlikely (*local_subs_used == NULL))
++	    return _cairo_error (CAIRO_STATUS_NO_MEMORY);
++    } else {
++	*local_subs_used = NULL;
++    }
+ 
+     if (num_subs < 1240)
+ 	*local_sub_bias = 107;

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de