diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2021-05-22 12:29:03 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2021-05-22 12:29:03 +0100 |
commit | 33b6a34d6e14e3689dbcf0b0c0585033f84a37aa (patch) | |
tree | 1e8c3a96b14990ab022d88c6795f90ead888551e /xps | |
parent | 5486b2356a0aa7a47adaef281b04372d3a756000 (diff) | |
download | ghostpdl-33b6a34d6e14e3689dbcf0b0c0585033f84a37aa.tar.gz |
XPS interpreter - Undo CTM scaling when preserving Tr 2
The scaling of the stroke width when rendering text in mode 2 (fill and
then stroke) works for rendering but when preserving the text rendering
mode for high level devices it ends up scaling the width too much.
By applying the horizontal scaling from the CTM, when preserving the text
rendering mode, we return the width to a reasonable value without
affecting rendering.
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xpsglyphs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xps/xpsglyphs.c b/xps/xpsglyphs.c index d15c0c25e..5e2b6e77d 100644 --- a/xps/xpsglyphs.c +++ b/xps/xpsglyphs.c @@ -776,8 +776,12 @@ xps_parse_glyphs(xps_context_t *ctx, if (sim_bold) { - /* widening strokes by 1% of em size */ - gs_setlinewidth(ctx->pgs, font_size * 0.02); + if (!ctx->preserve_tr_mode) + /* widening strokes by 1% of em size */ + gs_setlinewidth(ctx->pgs, font_size * 0.02); + else + /* Undo CTM scaling */ + gs_setlinewidth(ctx->pgs, font_size * 0.02 * fabs(ctx->pgs->ctm.xx)); gs_settextrenderingmode(ctx->pgs, 2); } |