Fix up bidi algorithm, and set direction of div to match text direction

This commit is contained in:
Adil Allawi 2012-02-13 02:10:41 +00:00
parent ffa0e082a4
commit 2bc708305d
3 changed files with 290 additions and 214 deletions

View file

@ -824,18 +824,15 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
text.str += shownText.str;
}
text.canvasWidth += shownText.canvasWidth;
text.length += e.length;
text.length += shownText.length;
}
} else {
malformed('TJ array element ' + e + ' is not string or num');
}
}
if (textSelection) {
if (isRTLRangeFor(text.str.charCodeAt(0))) //first char is rtl
text.str = bidi(null, text.str, 1);
if (textSelection)
this.textLayer.appendText(text, font.loadedName, fontSize);
}
},
nextLineShowText: function canvasGraphicsNextLineShowText(text) {
this.nextLine();