Merge pull request #11540 from tamuratak/charspacing
Fix text spacing with vertical fonts. #7687 and #11526.
This commit is contained in:
commit
965ebe63fd
@ -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…
x
Reference in New Issue
Block a user