From cf683fa5ed4a85d35f6db21ccd34fd2d8bfa22bf Mon Sep 17 00:00:00 2001 From: Jason Crain Date: Fri, 23 Feb 2018 23:21:03 -0600 Subject: [PATCH] TextPage: Add horizontal scaling to font matrix Drawing the text selection sometimes draws text reversed or expanded. This is because the while the current font transformation matrix is saved, the horizontal scaling is not. Include the effect of the horizontal scaling in the transformation matrix. https://bugs.freedesktop.org/show_bug.cgi?id=105259 --- poppler/TextOutputDev.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc index b4cdaf50..5b406dd5 100644 --- a/poppler/TextOutputDev.cc +++ b/poppler/TextOutputDev.cc @@ -2618,6 +2618,8 @@ void TextPage::addChar(GfxState *state, double x, double y, } state->getFontTransMat(&mat.m[0], &mat.m[1], &mat.m[2], &mat.m[3]); + mat.m[0] *= state->getHorizScaling(); + mat.m[1] *= state->getHorizScaling(); mat.m[4] = x1; mat.m[5] = y1; -- 2.16.2