Skip to content

Commit

Permalink
recalc textItems width or height; process 'font.vertical' cases
Browse files Browse the repository at this point in the history
  • Loading branch information
axlebedev committed Jan 14, 2019
1 parent e4d2a16 commit b8cd69c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pdf.js",
"version": "2.0.0",
"version": "2.0.0-issue8276",
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
Expand Down
10 changes: 8 additions & 2 deletions src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1507,8 +1507,14 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
}

// Do final text scaling
textContentItem.width *= textContentItem.textAdvanceScale;
textContentItem.height *= textContentItem.textAdvanceScale;
var font = textState.font;
if (font) {
if (font.vertical) {
textContentItem.height *= textContentItem.textAdvanceScale;
} else {
textContentItem.width *= textContentItem.textAdvanceScale;
}
}
textContent.items.push(runBidiTransform(textContentItem));

textContentItem.initialized = false;
Expand Down

0 comments on commit b8cd69c

Please sign in to comment.