import ghostscript-9.27-6.el8
This commit is contained in:
parent
af3d9cf35a
commit
112b94ac93
@ -0,0 +1,88 @@
|
||||
From 0b74b65ecc0f36d40b8d04a7fa1fa8b5f9d2b3ff Mon Sep 17 00:00:00 2001
|
||||
From: Chris Liddell <chris.liddell@artifex.com>
|
||||
Date: Thu, 13 Oct 2022 14:55:28 +0100
|
||||
Subject: [PATCH] Deal with different VM modes during CIDFont loading
|
||||
|
||||
To help differentiate between a substituted CIDFont and an embedded one, a
|
||||
change was made to store the file path in the CIDFont dictionary. That change
|
||||
failed to account for the possibility that the file object and the CIDFont
|
||||
dictionary may not be in compatible VM modes.
|
||||
|
||||
This adds code to ensure that the string holding the path is in a suitable VM
|
||||
mode to be stored into the dictionary.
|
||||
|
||||
Reported by Richard Lescak <rlescak@redhat.com>
|
||||
---
|
||||
Resource/Init/gs_cidfn.ps | 23 +++++++++++++++++++----
|
||||
1 file changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Resource/Init/gs_cidfn.ps b/Resource/Init/gs_cidfn.ps
|
||||
index 870a2e11c..fa050ed7a 100644
|
||||
--- a/Resource/Init/gs_cidfn.ps
|
||||
+++ b/Resource/Init/gs_cidfn.ps
|
||||
@@ -1,4 +1,4 @@
|
||||
-% Copyright (C) 2001-2019 Artifex Software, Inc.
|
||||
+% Copyright (C) 2001-2022 Artifex Software, Inc.
|
||||
% All Rights Reserved.
|
||||
%
|
||||
% This software is provided AS-IS with no warranty, either express or
|
||||
@@ -36,6 +36,17 @@
|
||||
|
||||
30 dict begin
|
||||
|
||||
+/.gcompatstringcopy % <string> <global> .gcompatstringcopy <string>
|
||||
+{
|
||||
+ dup 2 index gcheck eq
|
||||
+ { pop }
|
||||
+ {
|
||||
+ currentglobal 3 1 roll setglobal
|
||||
+ dup length string copy
|
||||
+ exch setglobal
|
||||
+ } ifelse
|
||||
+} bind def
|
||||
+
|
||||
% The key in .cidfonttypes is the CIDFontType value;
|
||||
% the value is a procedure that takes a font name and the CIDFont dictionary
|
||||
% and replaces the latter with a real font.
|
||||
@@ -58,7 +69,7 @@ dup 0 {
|
||||
end
|
||||
} if
|
||||
1 index exch .buildfont9
|
||||
- .currentresourcefile dup type /filetype eq { //.filename {1 index exch /ResourcePath exch put} if }{ pop} ifelse
|
||||
+ .currentresourcefile dup type /filetype eq { //.filename {1 index gcheck //.gcompatstringcopy exec 1 index exch /ResourcePath exch put} if }{ pop} ifelse
|
||||
exch pop
|
||||
} put % Don't bind it here, because gs_fapi.ps redefines .buildfont9
|
||||
|
||||
@@ -138,10 +149,11 @@ dup 0 {
|
||||
|
||||
% ------ CIDFontType 1 (FontType 10) ------ %
|
||||
|
||||
+
|
||||
dup 1 {
|
||||
10 //.checkfonttype exec pop
|
||||
1 index exch .buildfont10
|
||||
- .currentresourcefile dup type /filetype eq { //.filename {1 index exch /ResourcePath exch put} if }{ pop} ifelse
|
||||
+ .currentresourcefile dup type /filetype eq { //.filename {1 index gcheck //.gcompatstringcopy exec 1 index exch /ResourcePath exch put} if }{ pop} ifelse
|
||||
exch pop
|
||||
} put % Don't bind it here because gs_fapi.ps redefines .buildfont10
|
||||
|
||||
@@ -150,12 +162,15 @@ dup 1 {
|
||||
dup 2 {
|
||||
11 //.checkfonttype exec pop
|
||||
1 index exch .buildfont11
|
||||
- .currentresourcefile dup type /filetype eq { //.filename {1 index exch /ResourcePath exch put} if }{ pop} ifelse
|
||||
+ .currentresourcefile dup type /filetype eq { //.filename {1 index gcheck //.gcompatstringcopy exec 1 index exch /ResourcePath exch put} if }{ pop} ifelse
|
||||
exch pop
|
||||
} put % Don't bind it here because gs_fapi.ps redefines .buildfont11
|
||||
|
||||
+currentdict /.gcompatstringcopy .undef
|
||||
+
|
||||
pop % .cidfonttypes
|
||||
|
||||
+
|
||||
% ---------------- Reading CIDFontType 0 files ---------------- %
|
||||
|
||||
/StartData { % <(Binary)|(Hex)> <datalength> StartData -
|
||||
--
|
||||
2.37.3
|
||||
|
@ -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);
|
@ -37,7 +37,7 @@
|
||||
Name: ghostscript
|
||||
Summary: Interpreter for PostScript language & PDF
|
||||
Version: 9.27
|
||||
Release: 4%{?dist}
|
||||
Release: 6%{?dist}
|
||||
|
||||
License: AGPLv3+
|
||||
|
||||
@ -105,6 +105,8 @@ Patch013: ghostscript-cve-2020-16310.patch
|
||||
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:
|
||||
@ -445,6 +447,14 @@ done
|
||||
# =============================================================================
|
||||
|
||||
%changelog
|
||||
* Thu Feb 02 2023 Richard Lescak <rlescak@redhat.com> - 9.27-6
|
||||
- set the page size for A4 correctly in ESC/Page driver
|
||||
- Resolves: rhbz#2164603
|
||||
|
||||
* Tue Nov 15 2022 Richard Lescak <rlescak@redhat.com> - 9.27-5
|
||||
- fix loading of CIDFonts
|
||||
- Resolves: rhbz#2118538
|
||||
|
||||
* Mon Jul 25 2022 Richard Lescak <rlescak@redhat.com> - 9.27-4
|
||||
- changed requirement to jbig2dec-libs
|
||||
- Resolves: rhbz#2097515, rhbz#2097448
|
||||
|
Loading…
Reference in New Issue
Block a user