mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Fix up bidi algorithm, and set direction of div to match text direction
This commit is contained in:
parent
ffa0e082a4
commit
2bc708305d
3 changed files with 290 additions and 214 deletions
|
@ -1084,7 +1084,8 @@ var TextLayerBuilder = function textLayerBuilder(textLayerDiv) {
|
|||
textDiv.style.fontSize = fontHeight + 'px';
|
||||
textDiv.style.left = text.geom.x + 'px';
|
||||
textDiv.style.top = (text.geom.y - fontHeight) + 'px';
|
||||
textDiv.textContent = text.str;
|
||||
textDiv.textContent = bidi(text, -1);
|
||||
textDiv.dir = text.direction;
|
||||
textDiv.dataset.textLength = text.length;
|
||||
this.textDivs.push(textDiv);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue