From 894f6c5f59a3b695f3913a12a50244f129048854 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sat, 18 Feb 2023 00:20:48 +0000 Subject: [PATCH] Auto sync2gitlab import of ghostscript-9.27-6.el8.src.rpm --- ...ver-does-not-set-page-size-correctly.patch | 22 +++++++++++++++++++ ghostscript.spec | 7 +++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch diff --git a/ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch b/ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch new file mode 100644 index 0000000..e0ba1fe --- /dev/null +++ b/ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch @@ -0,0 +1,22 @@ +diff -x .git -Napur ghostscript-9.27.old/contrib/japanese/gdevespg.c ghostscript-9.27.new/contrib/japanese/gdevespg.c +--- ghostscript-9.27.old/contrib/japanese/gdevespg.c 2019-04-04 00:43:14.000000000 -0700 ++++ ghostscript-9.27.new/contrib/japanese/gdevespg.c 2023-01-24 11:25:32.588189093 -0800 +@@ -273,6 +273,9 @@ escpage_paper_set(gx_device_printer * pd + int width, height, w, h, wp, hp, bLandscape; + EpagPaperTable *pt; + ++ /* Page size match tolerance in points */ ++ #define TOL 5 ++ + width = pdev->MediaSize[0]; + height = pdev->MediaSize[1]; + +@@ -291,7 +294,7 @@ escpage_paper_set(gx_device_printer * pd + } + + for (pt = epagPaperTable; pt->escpage > 0; pt++) +- if (pt->width == w && pt->height == h) ++ if (abs(w - pt->width) <= TOL && abs(h - pt->height) <= TOL) + break; + + fprintf(fp, "%c%d", GS, pt->escpage); diff --git a/ghostscript.spec b/ghostscript.spec index 244c3d0..d670979 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -37,7 +37,7 @@ Name: ghostscript Summary: Interpreter for PostScript language & PDF Version: 9.27 -Release: 5%{?dist} +Release: 6%{?dist} License: AGPLv3+ @@ -106,6 +106,7 @@ Patch014: ghostscript-cve-2020-16301.patch # 2097448 - printed text drifts to the right Patch015: ghostscript-9.27-fix-use-of-HWMargins.patch Patch016: ghostscript-9.27-Deal-with-different-VM-modes-during-CIDFont-loading.patch +Patch017: ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch # Downstream patches -- these should be always included when doing rebase: @@ -446,6 +447,10 @@ done # ============================================================================= %changelog +* Thu Feb 02 2023 Richard Lescak - 9.27-6 +- set the page size for A4 correctly in ESC/Page driver +- Resolves: rhbz#2164603 + * Tue Nov 15 2022 Richard Lescak - 9.27-5 - fix loading of CIDFonts - Resolves: rhbz#2118538