Skip to content

Commit

Permalink
Fix the horizontal scaling of texts with SVG backend. #10988
Browse files Browse the repository at this point in the history
  • Loading branch information
tamuratak committed Feb 3, 2020
1 parent d6754d1 commit b0e16ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/display/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
// might actually map to a different glyph.
continue;
}
current.xcoords.push(current.x + x * textHScale);
current.xcoords.push(current.x + x);
current.tspan.textContent += character;
x += charWidth;
}
Expand Down Expand Up @@ -892,7 +892,7 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
current.txtElement.setAttributeNS(
null,
"transform",
`${pm(textMatrix)} scale(1, -1)`
`${pm(textMatrix)} scale(${pf(textHScale)}, -1)`
);
current.txtElement.setAttributeNS(XML_NS, "xml:space", "preserve");
current.txtElement.appendChild(current.tspan);
Expand Down

0 comments on commit b0e16ce

Please sign in to comment.