Patent Document ID: 9158742
Application ID: 13532690

Base Claim:
1. A computer-implemented method of detecting a layout of a bi-directional text, comprising using a processor of the computer for: scanning a bi-directional text to detect whether the bi-directional text contains at least one character of a predetermined shape; determining a shaping attribute for the text, responsive to a result of the scanning; using the shaping attribute to determine a text type attribute of the text, the text type attribute indicating how the text is stored; evaluating words of the text, in view of the text type attribute, to determine an orientation attribute of the text, the orientation comprising a left-to-right (“LTR”) value or a right-to-left (“RTL”) value; and associating the determined attributes with the text.

---

Claim 7:
7. The method of claim 1 , wherein the determining the orientation attribute further comprises determining if the text type attribute indicates an “as displayable” value and if so, determining the orientation attribute by dividing the text into a set of words, and for each of the words until determining that the orientation attribute has been set, identifying a shape of a first letter in the word and a shape of a last letter in the word.