1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #11540 from tamuratak/charspacing

Fix text spacing with vertical fonts. #7687 and #11526.
This commit is contained in:
Tim van der Meij 2020-02-26 22:26:27 +01:00 committed by GitHub
commit 965ebe63fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View file

@ -1719,7 +1719,12 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
}
}
var charWidth = width * widthAdvanceScale + spacing * fontDirection;
var charWidth;
if (vertical) {
charWidth = width * widthAdvanceScale - spacing * fontDirection;
} else {
charWidth = width * widthAdvanceScale + spacing * fontDirection;
}
x += charWidth;
if (restoreNeeded) {