mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 00:28:06 +02:00
When the writing mode is vertical, we have to reverse the sign of spacing since we are subtracting it from current.y. We have to add it to current.y. See 9.4.4 Text Space Details, https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G8.1694762
This commit is contained in:
parent
10be0997a7
commit
512dbe3060
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