From c43ff33c43821c555756cc8281c9a2578c217723 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 11 Feb 2020 11:24:16 +0100 Subject: [PATCH 1/7] Fix conversion from ISO 8601 to PDF date string The code used to unintentionally drop the minutes from the timezone offset, see issue #392. This is now fixed. --- src/cairo-pdf-interchange.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cairo-pdf-interchange.c b/src/cairo-pdf-interchange.c index 7d8981b09..0f896d351 100644 --- a/src/cairo-pdf-interchange.c +++ b/src/cairo-pdf-interchange.c @@ -1666,7 +1666,8 @@ iso8601_to_pdf_date_string (const char *iso) if (strlen (p) < 3) goto finish; - strncat (buf, p + 1, 3); + strncat (buf, p + 1, 2); + strcat (buf, "'"); finish: strcat (buf, ")"); From 590122daa8f6daaf83ead7f16cb7adf732d25cd9 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 27 Mar 2020 19:39:46 +0100 Subject: [PATCH 2/7] cff: Allow empty array of operands for certain operators Operators BlueValues, OtherBlues, FamilyBlues, FamilyOtherBlues, StemSnapH and StemSnapV have operands of type delta which can be a number or an array of delta-encoded numbers. This array can be empty according to freetype developers. This commit checks whether current operator is among those listed and permits empty operand in such case. --- src/cairo-cff-subset.c | 78 ++++++++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c index 37727eddb..fce4195e9 100644 --- a/src/cairo-cff-subset.c +++ b/src/cairo-cff-subset.c @@ -56,30 +56,36 @@ /* CFF Dict Operators. If the high byte is 0 the command is encoded * with a single byte. */ -#define BASEFONTNAME_OP 0x0c16 -#define CIDCOUNT_OP 0x0c22 -#define CHARSET_OP 0x000f -#define CHARSTRINGS_OP 0x0011 -#define COPYRIGHT_OP 0x0c00 -#define DEFAULTWIDTH_OP 0x0014 -#define ENCODING_OP 0x0010 -#define FAMILYNAME_OP 0x0003 -#define FDARRAY_OP 0x0c24 -#define FDSELECT_OP 0x0c25 -#define FONTBBOX_OP 0x0005 -#define FONTMATRIX_OP 0x0c07 -#define FONTNAME_OP 0x0c26 -#define FULLNAME_OP 0x0002 -#define LOCAL_SUB_OP 0x0013 -#define NOMINALWIDTH_OP 0x0015 -#define NOTICE_OP 0x0001 -#define POSTSCRIPT_OP 0x0c15 -#define PRIVATE_OP 0x0012 -#define ROS_OP 0x0c1e -#define UNIQUEID_OP 0x000d -#define VERSION_OP 0x0000 -#define WEIGHT_OP 0x0004 -#define XUID_OP 0x000e +#define BASEFONTNAME_OP 0x0c16 +#define CIDCOUNT_OP 0x0c22 +#define CHARSET_OP 0x000f +#define CHARSTRINGS_OP 0x0011 +#define COPYRIGHT_OP 0x0c00 +#define DEFAULTWIDTH_OP 0x0014 +#define ENCODING_OP 0x0010 +#define FAMILYNAME_OP 0x0003 +#define FDARRAY_OP 0x0c24 +#define FDSELECT_OP 0x0c25 +#define FONTBBOX_OP 0x0005 +#define FONTMATRIX_OP 0x0c07 +#define FONTNAME_OP 0x0c26 +#define FULLNAME_OP 0x0002 +#define LOCAL_SUB_OP 0x0013 +#define NOMINALWIDTH_OP 0x0015 +#define NOTICE_OP 0x0001 +#define POSTSCRIPT_OP 0x0c15 +#define PRIVATE_OP 0x0012 +#define ROS_OP 0x0c1e +#define UNIQUEID_OP 0x000d +#define VERSION_OP 0x0000 +#define WEIGHT_OP 0x0004 +#define XUID_OP 0x000e +#define BLUEVALUES_OP 0x0006 +#define OTHERBLUES_OP 0x0007 +#define FAMILYBLUES_OP 0x0008 +#define FAMILYOTHERBLUES_OP 0x0009 +#define STEMSNAPH_OP 0x0c0c +#define STEMSNAPV_OP 0x0c0d #define NUM_STD_STRINGS 391 @@ -615,13 +621,27 @@ cff_dict_create_operator (int operator, return _cairo_error (CAIRO_STATUS_NO_MEMORY); _cairo_dict_init_key (op, operator); - op->operand = _cairo_malloc (size); - if (unlikely (op->operand == NULL)) { - free (op); - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + if (size != 0) { + op->operand = _cairo_malloc (size); + if (unlikely (op->operand == NULL)) { + free (op); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } + memcpy (op->operand, operand, size); + } else { + op->operand = NULL; + /* Delta-encoded arrays can be empty. */ + if (operator != BLUEVALUES_OP && + operator != OTHERBLUES_OP && + operator != FAMILYBLUES_OP && + operator != FAMILYOTHERBLUES_OP && + operator != STEMSNAPH_OP && + operator != STEMSNAPV_OP) { + free (op); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } } - memcpy (op->operand, operand, size); op->operand_length = size; op->operand_offset = -1; From 825154fef78d6d0bd2fad4328a55ba95cafd12c0 Mon Sep 17 00:00:00 2001 From: George Matsumura Date: Mon, 31 Aug 2020 22:15:21 -0600 Subject: [PATCH 3/7] cairo-trace: Fix escape character encoding in string literals This fixes a typo wherein both a return character and a tab character were encoded when only a return character was specified for encoding. Signed-off-by: George Matsumura --- util/cairo-trace/trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c index 84952a365..26ed2e506 100644 --- a/util/cairo-trace/trace.c +++ b/util/cairo-trace/trace.c @@ -1824,6 +1824,7 @@ _encode_string_literal (char *out, int max, *out++ = '\\'; *out++ = 'r'; max -= 2; + break; case '\t': *out++ = '\\'; *out++ = 't'; From 9e9081a8f6745dcbacadf42d529b14fe86ab54b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Poisot?= Date: Sat, 21 Nov 2020 11:58:59 +0000 Subject: [PATCH 4/7] The array introduced in bff47b43 isn't cleared on surface finish --- src/cairo-pdf-surface.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 93fc9022c..4a7afe960 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -2207,6 +2207,7 @@ _cairo_pdf_surface_finish (void *abstract_surface) cairo_pdf_resource_t catalog; cairo_status_t status, status2; int size, i; + cairo_pdf_source_surface_t doc_surface; cairo_pdf_jbig2_global_t *global; char *label; @@ -2287,6 +2288,12 @@ _cairo_pdf_surface_finish (void *abstract_surface) _cairo_array_fini (&surface->alpha_linear_functions); _cairo_array_fini (&surface->page_patterns); _cairo_array_fini (&surface->page_surfaces); + + size = _cairo_array_num_elements (&surface->doc_surfaces); + for (i = 0; i < size; i++) { + _cairo_array_copy_element (&surface->doc_surfaces, i, &doc_surface); + cairo_surface_destroy (doc_surface.surface); + } _cairo_array_fini (&surface->doc_surfaces); _cairo_hash_table_foreach (surface->all_surfaces, _cairo_pdf_source_surface_entry_pluck, From 5de0d6b97895364fe84a3a255a4bab1a9c140143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 22 Nov 2020 18:44:20 +0000 Subject: [PATCH 5/7] ci: fix default options in meson ci Follow-up fix to !78 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d125c7b08..0f87e34c9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ variables: --default-library=both -Dgl-backend=auto -Dglesv2=auto - -Dglesv2=auto + -Dglesv3=auto stages: - prep From dfbc57f9a3b7036ed3a31ff47082c1331ae3e1a7 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Fri, 27 Nov 2020 17:00:16 -0800 Subject: [PATCH 6/7] build: Update ssh url for cairographics.org --- build/Makefile.am.releasing | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Makefile.am.releasing b/build/Makefile.am.releasing index 329d49c8c..c8fd01a13 100644 --- a/build/Makefile.am.releasing +++ b/build/Makefile.am.releasing @@ -28,7 +28,7 @@ snapshot-dist: dist sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' RELEASE_OR_SNAPSHOT = $$(if test "x$(CAIRO_VERSION_MINOR)" = "x$$(echo "$(CAIRO_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi) -RELEASE_UPLOAD_HOST = cairographics.org +RELEASE_UPLOAD_HOST = cairo.freedesktop.org RELEASE_UPLOAD_BASE = /srv/cairo.freedesktop.org/www RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)/$(RELEASE_OR_SNAPSHOT)s RELEASE_URL_BASE = https://cairographics.org/$(RELEASE_OR_SNAPSHOT)s From 156cd3eaaebfd8635517c2baf61fcf3627ff7ec2 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Fri, 27 Nov 2020 16:57:18 -0800 Subject: [PATCH 7/7] Release 1.17.4 --- NEWS | 40 ++++++++++++++++++++++++++++++++++++++++ src/cairo-version.h | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index baef8bec5..3eeb1c389 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,43 @@ +Release 1.17.4 (2020-11-27 Bryce Harrington ) +======================================================================== + +Thank you to the many people who have contributed the large number of +bug fixes and refinements since 1.17.2. + +A particularly noteworthy improvement in this release is the addition of +the meson build system as an alternative to autotools. Autotools is +still used for producing the releases, so will be the default in the +tarball and presumably will still be preferred by distro packagers of +Cairo. It should be possible to build the release tarball using meson, +but as this is new functionality consider it still a work in progress. +The meson configuration has striven to track the autotools +implementation but be aware there may still be some differences between +the two. + +Continuous Integration configurations have been added that enable +testing on a variety of platforms including Fedora, Windows MSVC, etc. +This work has helped in identifying updates and fixes including +adjusting to changes in API calls in dependencies like rsvg and +fontconfig, and to fix platform-specific build issues. + +The cogl Cairo backend underwent significant development this cycle. +Cogl provides GPU accelerated drawing support. The development work +includes implementation of core functionality, performance +optimizations, and stabilization. + +Subpixel positioning support allows improved glyph outlines with the +Freetype font backend. + +For a complete log of changes, please see + + https://cairographics.org/releases/ChangeLog.1.17.4 + +[On a personal note, this will be my last release for Cairo. My Cairo +time availability has been non-existent (particularly this crazy past +year). The release process is well documented and hopefully will help +whomever picks up the baton from here.] + + Release 1.17.2 (2019-01-31 Bryce Harrington ) ======================================================================== This snapshot provides the new support for writing floating point diff --git a/src/cairo-version.h b/src/cairo-version.h index 605ec1a7c..9fd69fb45 100644 --- a/src/cairo-version.h +++ b/src/cairo-version.h @@ -3,6 +3,6 @@ #define CAIRO_VERSION_MAJOR 1 #define CAIRO_VERSION_MINOR 17 -#define CAIRO_VERSION_MICRO 3 +#define CAIRO_VERSION_MICRO 4 #endif