From e518885c18d8495e794287a78d948fd41c28be9b Mon Sep 17 00:00:00 2001 From: Ken Sharp Date: Mon, 29 Nov 2010 14:35:25 +0000 Subject: Fix (pdfwrite) : Type 3 font capture and charpath operations Bug #691033 "Regression: 14-01.PS fails with pdfwrite" The first time a type 3 glyphis encountered we start a charproc accumulatiopn and exit to run the BuildChar/BuildGlyph. On return to the text processing, if the operation was a charpath, this would take precedence over closing the accumulator which would lead to significant later problems. Modified the code path to allow for the charproc accumulation to finish and if this is a charpath operation to rerun the operation using the newly captured glyph program. Note this can only occur if the first operation on a given glyph in a type 3 font is for a charpath. Expected differences None. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11921 a1074d23-0009-0410-80fe-cf8c14f379e6 --- gs/base/gdevpdtt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gs/base/gdevpdtt.c') diff --git a/gs/base/gdevpdtt.c b/gs/base/gdevpdtt.c index 732755aa0..c5b7c97e7 100644 --- a/gs/base/gdevpdtt.c +++ b/gs/base/gdevpdtt.c @@ -2578,6 +2578,7 @@ pdf_text_process(gs_text_enum_t *pte) if (penum->current_font->FontType == ft_user_defined && (penum->text.operation & TEXT_DO_ANY_CHARPATH) && !pdev->type3charpath) { pdev->type3charpath = true; + if (!penum->charproc_accum) goto default_impl; } @@ -2632,7 +2633,10 @@ pdf_text_process(gs_text_enum_t *pte) return code; gs_text_release(pte_default, "pdf_text_process"); penum->pte_default = 0; - goto top; + if (!pdev->type3charpath) + goto top; + else + goto default_impl; } pdev->pte = pte_default; /* CAUTION: See comment in gdevpdfx.h . */ code = gs_text_process(pte_default); -- cgit v1.2.3