summaryrefslogtreecommitdiff
path: root/gs
diff options
context:
space:
mode:
authorL Peter Deutsch <lpd@ghostscript.com>2002-05-09 06:28:27 +0000
committerL Peter Deutsch <lpd@ghostscript.com>2002-05-09 06:28:27 +0000
commitef7ab576470c50db4fe7df234e64fcded617aa59 (patch)
treebdf6094d0426758c1275f08b0ac6ce45bf60792e /gs
parent7ea96067d9b702ef400720fc9522b6e209357e3c (diff)
Fix: If a Type 1 font had an initial FontMatrix other than [0.001 0 0 0.001
0 0] and also had a Metrics entry, pdfwrite would produce incorrect character spacing. Fixes SourceForge #551077. (Similar to SourceForge #535401.) git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@2630 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs')
-rw-r--r--gs/src/gdevpdfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gs/src/gdevpdfs.c b/gs/src/gdevpdfs.c
index 6332d0437..bb19a512c 100644
--- a/gs/src/gdevpdfs.c
+++ b/gs/src/gdevpdfs.c
@@ -1535,7 +1535,8 @@ process_text_add_width(gs_text_enum_t *pte, gs_font *font,
{
gx_device_pdf *const pdev = (gx_device_pdf *)pte->dev;
int i, w;
- double scale = (font->FontType == ft_TrueType ? 0.001 : 1.0);
+ gs_matrix smat;
+ double scale;
gs_point dpt;
gs_matrix tmat;
int space_char =
@@ -1544,6 +1545,8 @@ process_text_add_width(gs_text_enum_t *pte, gs_font *font,
int code = 0;
bool move = false;
+ pdf_font_orig_matrix(font, &smat);
+ scale = 0.001 / smat.xx;
dpt.x = dpt.y = 0;
tmat = ppts->text_matrix;
for (i = *pindex, w = 0; i < pstr->size; ++i) {