diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-10-14 16:03:31 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-10-15 10:24:09 +0200 |
commit | fb8e271a03da09112e08031c8a40d7d9ce70bec4 (patch) | |
tree | 28d104434e7d69591dc7859829d3e1aba452ef63 /source | |
parent | 2ce181d1ed49784aa20d415b8866dab4bdfb733a (diff) | |
download | mupdf-fb8e271a03da09112e08031c8a40d7d9ce70bec4.tar.xz |
Fix 696241: fix bracketing of begin_group/end_group for text objects.
Diffstat (limited to 'source')
-rw-r--r-- | source/pdf/pdf-op-run.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index 5fcf2c71..faed37a5 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -754,7 +754,8 @@ pdf_flush_text(fz_context *ctx, pdf_run_processor *pr) if (text->len == 0) break; - gstate = pdf_begin_group(ctx, pr, &tb, &softmask); + if (dofill || dostroke) + gstate = pdf_begin_group(ctx, pr, &tb, &softmask); if (doinvisible) fz_ignore_text(ctx, pr->dev, text, &gstate->ctm); @@ -818,6 +819,9 @@ pdf_flush_text(fz_context *ctx, pdf_run_processor *pr) } } + if (dofill || dostroke) + pdf_end_group(ctx, pr, &softmask); + if (doclip) { if (pr->accumulate < 2) @@ -825,8 +829,6 @@ pdf_flush_text(fz_context *ctx, pdf_run_processor *pr) fz_clip_text(ctx, pr->dev, text, &gstate->ctm, pr->accumulate); pr->accumulate = 2; } - - pdf_end_group(ctx, pr, &softmask); } fz_always(ctx) { |