summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-21 14:18:08 +0100
committerSam James <sam@gentoo.org>2022-10-02 04:31:25 +0100
commita529111f77ff46f4836fe7312e70953bc16587cf (patch)
tree9dc3924cb1a6ef3ef853b7bb45f735365e0b4e6d /psi/zcharout.c
parentImport Ghostscript 9.56.1 (diff)
downloadghostscript-gpl-patches-ghostscript-10.tar.gz
ghostscript-gpl-patches-ghostscript-10.tar.bz2
ghostscript-gpl-patches-ghostscript-10.zip
Import Ghostscript 10.0ghostscript-10.0ghostscript-10
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'psi/zcharout.c')
-rw-r--r--psi/zcharout.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/psi/zcharout.c b/psi/zcharout.c
index c204a956..96e1d355 100644
--- a/psi/zcharout.c
+++ b/psi/zcharout.c
@@ -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
@@ -309,9 +309,25 @@ int
zchar_charstring_data(gs_font *font, const ref *pgref, gs_glyph_data_t *pgd)
{
ref *pcstr;
+ ref *cffcstr;
+ ref *pdr = pfont_dict(font);
if (dict_find(&pfont_data(font)->CharStrings, pgref, &pcstr) <= 0)
return_error(gs_error_undefined);
+
+ if (r_has_type(pcstr, t_integer)
+ && dict_find_string(pdr, "CFFCharStrings", &cffcstr) > 0) {
+ ref *pcstr2;
+ if (dict_find(cffcstr, pcstr, &pcstr2) <= 0) {
+ ref nd;
+ make_int(&nd, 0);
+ if (dict_find(cffcstr, &nd, &pcstr2) <= 0) {
+ return_error(gs_error_undefined);
+ }
+ }
+ pcstr = pcstr2;
+ }
+
if (!r_has_type(pcstr, t_string)) {
/*
* The ADOBEPS4 Windows driver replaces the .notdef entry of