1. A method of detecting a layout of a bi-directional text, comprising: determining a shaping attribute of said text based on scanning said text to detect at least one character of a specific shape; determining a text type attribute of said text from said shaping attribute; and determining an orientation attribute of said text from the determined text type attribute.