summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'psi/zchar42.c')
-rw-r--r--psi/zchar42.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/psi/zchar42.c b/psi/zchar42.c
index cb635827..5e4cf4d5 100644
--- a/psi/zchar42.c
+++ b/psi/zchar42.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2020 Artifex Software, Inc.
+/* Copyright (C) 2001-2021 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -144,10 +144,18 @@ zchar42_set_cache(i_ctx_t *i_ctx_p, gs_font_base *pbfont, ref *cnref,
which stretch subglyphs. Uniting with FontBBox helps.
In same time, FontBBox with no glyph bbox
doesn't work for 34_all.PS page 4. */
- bbox.p.x = min(sbw_bbox[4], pbfont->FontBBox.p.y);
- bbox.p.y = min(sbw_bbox[5], pbfont->FontBBox.p.y);
- bbox.q.x = max(sbw_bbox[6], pbfont->FontBBox.q.x);
- bbox.q.y = max(sbw_bbox[7], pbfont->FontBBox.q.y);
+ /* Previously we used to expand the bbox to the maximum/minimum
+ * of the glyph and font bounding boxes combined, as noted above.
+ * However this causes incorrect output (bug #703697) for vertical
+ * writing fonts with pdfwrite. Since we no longer use this code
+ * for rendering, and pdfwrite doesn't use the metrics for clipping,
+ * but does for positioning, we've removed this code.
+ */
+
+ bbox.p.x = sbw_bbox[4];
+ bbox.p.y = sbw_bbox[5];
+ bbox.q.x = sbw_bbox[6];
+ bbox.q.y = sbw_bbox[7];
return zchar_set_cache(i_ctx_p, pbfont, cnref,
NULL,
w, &bbox,