mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Fix the horizontal scaling of texts with SVG backend. #10988
This commit is contained in:
parent
d60c1f68b7
commit
d6b67cd28a
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue