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:
commit
965ebe63fd
3 changed files with 15 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue