An application with simple text editing capabilities has to do several tasks. First of all, the application must get text input from the user. The application must be prepared to convert character sets in the event a user pastes text from a document created on another platform, the Internet, or from any document that uses a character set different from that of the application's default script .
As the user enters text, the text must be manipulated and stored. Text manipulation refers to system-level procedures used to sort and compare characters, determine line breaks, determine text directionality , and keep track of character properties, such as case. Calculating line breaks is a difficult text manipulation task for scripts that do not delineate words with spaces, such as the Thai script. Display order is complicated for scripts that are bidirectional , such as Hebrew. For example, in Hebrew, words are displayed right-to-left while Roman numerals are displayed left-to-right.
Characters are stored as codes to facilitate searching and other text manipulation tasks. Before text can be displayed, characters must be rendered. Character rendering is the process of properly preparing the characters for display, taking into account line direction , contextual rules, and character reordering. For example, the formation of ligatures and diphthongs occurs during the display of text.
Once text is displayed, an application needs to provide ways for the user to edit the text. The user may want to change the font, add or delete text, or change font attributes such as size, color, and style . Users may also want to align text, set tabs, or change other attributes that affect text layout.