summaryrefslogtreecommitdiff
path: root/Resource
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-06-17 15:59:14 +0100
committerChris Liddell <chris.liddell@artifex.com>2022-07-04 09:15:07 +0100
commit4422012f6b40f0627d3527dba92f3a1ba30017d3 (patch)
treec3a14183d8e946a4ff36227674b3c907a11313cb /Resource
parent5485c1b2254ca360d4526796bdd6c7929089321d (diff)
downloadghostpdl-4422012f6b40f0627d3527dba92f3a1ba30017d3.tar.gz
SUBSTFONT functionality
This was missing from pdfi, so is added here. Also, change the functionality so setting the SUBSTFONT key to "/None" will result in any attempt to fall back to the default font to throw an invalidfont error. Lastly, fix some typos on the parameters being passed from Postscript into pdfi.
Diffstat (limited to 'Resource')
-rw-r--r--Resource/Init/gs_fonts.ps8
-rw-r--r--Resource/Init/pdf_main.ps2
2 files changed, 7 insertions, 3 deletions
diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps
index aaee616f4..9ed9ca5c0 100644
--- a/Resource/Init/gs_fonts.ps
+++ b/Resource/Init/gs_fonts.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2021 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
@@ -929,10 +929,14 @@ FAKEFONTS not { (%END FAKEFONTS) .skipeof } if
} if
% No aliasing.
% This mode is incompatible with high level devices.
+ defaultfontname /None eq { /findfont cvx /invalidfont signalerror } if
cleartomark mark defaultfontname
} {
dup .substitutefont
- 2 copy eq { pop defaultfontname } if
+ 2 copy eq {
+ defaultfontname /None eq { /findfont cvx /invalidfont signalerror } if
+ pop defaultfontname
+ } if
//.checkalias exec
QUIET not {
SHORTERRORS {
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
index 8c37eba1c..2a622eb88 100644
--- a/Resource/Init/pdf_main.ps
+++ b/Resource/Init/pdf_main.ps
@@ -780,7 +780,7 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
/PDFNOCIDFALLBACK /NO_PDFMARK_OUTLINES /NO_PDFMARK_DESTS /PDFFitPage /Printed /UsePDFX3Profile
/UseBleedBox /UseCropBox /UseArtBox /UseTrimBox /ShowAcroForm /ShowAnnots /PreserveAnnots
/NoUserUnit /RENDERTTNOTDEF /DOPDFMARKS /PDFINFO /SHOWANNOTTYPES /PRESERVEANNOTTYPES
- /CIDSubstPath /CIDSubstFont /IgnoreToUnicode /NONATIVEFONTMAP ] def
+ /CIDFSubstPath /CIDFSubstFont /SUBSTFONT /IgnoreToUnicode /NONATIVEFONTMAP ] def
/newpdf_gather_parameters
{