2. The method of claim 1 , further comprising: setting the swapping attribute to an OFF value if the orientation attribute is detected as LTR and the text type attribute is detected as visual; setting the swapping attribute to an ON value if the orientation attribute is detected as RTL and the text type attribute is detected as visual; and setting the swapping attribute to an ON value if the text type attribute is detected as logical.
1. A computer-implemented method of converting a source layout of a bi-directional text to a target layout of a bi-directional text, comprising using a processor of the computer for: detecting a shaping attribute of said text based on scanning said text to detect at least one character of a specific shape; detecting a text type attribute of said text from said shaping attribute; detecting an orientation attribute of said text from the detected text type attribute; detecting a swapping attribute of said text, using the detected text type attribute and the detected orientation attribute; and converting the source layout to the target layout, based on the detected attributes.