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
@ -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) {
|
||||
|
1
test/pdfs/issue11526.pdf.link
Normal file
1
test/pdfs/issue11526.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
https://web.archive.org/web/20200210200830/https://www.nta.go.jp/taxes/tetsuzuki/shinsei/shinkoku/zoyo/yoshiki2019/pdf/006.pdf
|
@ -4376,5 +4376,13 @@
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue11526",
|
||||
"file": "pdfs/issue11526.pdf",
|
||||
"md5": "9babc771fc8792f43e4ada46b0daff8c",
|
||||
"rounds": 1,
|
||||
"lastPage": 1,
|
||||
"link": true,
|
||||
"type": "eq"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user