diff --git a/package.json b/package.json index d27ae10a99de7..092c92be6f89e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/core/evaluator.js b/src/core/evaluator.js index d15422273c9a0..19feb152c8d8a 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -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;