|
|
@ -919,10 +919,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
if (chunk !== '') { |
|
|
|
if (chunk !== '') { |
|
|
|
var bidiText = PDFJS.bidi(chunk, -1, font.vertical); |
|
|
|
var bidiText = PDFJS.bidi(chunk, -1, font.vertical); |
|
|
|
var renderParams = textState.calcRenderParams(); |
|
|
|
var renderParams = textState.calcRenderParams(); |
|
|
|
bidiText.x = renderParams.renderMatrix[4] - (textState.fontSize * |
|
|
|
var fontHeight = textState.fontSize * renderParams.vScale; |
|
|
|
renderParams.vScale * Math.sin(renderParams.angle)); |
|
|
|
var fontAscent = font.ascent ? font.ascent * fontHeight : |
|
|
|
bidiText.y = renderParams.renderMatrix[5] + (textState.fontSize * |
|
|
|
font.descent ? (1 + font.descent) * fontHeight : fontHeight; |
|
|
|
renderParams.vScale * Math.cos(renderParams.angle)); |
|
|
|
bidiText.x = renderParams.renderMatrix[4] - (fontAscent * |
|
|
|
|
|
|
|
Math.sin(renderParams.angle)); |
|
|
|
|
|
|
|
bidiText.y = renderParams.renderMatrix[5] + (fontAscent * |
|
|
|
|
|
|
|
Math.cos(renderParams.angle)); |
|
|
|
if (bidiText.dir == 'ttb') { |
|
|
|
if (bidiText.dir == 'ttb') { |
|
|
|
bidiText.x += renderParams.vScale / 2; |
|
|
|
bidiText.x += renderParams.vScale / 2; |
|
|
|
bidiText.y -= renderParams.vScale; |
|
|
|
bidiText.y -= renderParams.vScale; |
|
|
|