|
![]() |
Commonly used scripts such as Latin, Greek or Cyrillic are easy to display. All you need to do is render their characters in a simple linear progression from left to right and the resulting text is correctly displayed. Unfortunately, not all world's scripts are that simple. Many scripts, just to be displayed correctly, require special processing such as character reordering, contextual shaping, ligatures, positioning adjustments etc. These scripts are also known as complex scripts. Arabic, Indic and Thai are among those scripts. And even Latin scripts often use ligatures and various types of positioning adjustments (e.g. kerning) to enhance the appearance of displayed text. The Unicode Standard alone does not help software developers with the task of laying out text. Unicode deals with the units of textual content (characters) and provides a good solution for the computer representation, storage and interchange of text. However, Unicode does not deal with the units of textual display (glyphs) and does not provide a solution to the problem of actual text layout, shaping and advanced typography. Obviously, a global, efficient and portable Unicode based text layout/shaping engine is necessary to help developers with this quite challenging task.[1] To better understand the problems that layout/shaping engines must overcome, here are just some of the complications associated with the display of various world's scripts:
D-Type Text Layout Extension thanks to the underlying ICU LayoutEngine solves all of these problems in a simple and straightforward way. All complex script rendering is done in a uniform and consistent manner. The application is responsible for supplying to the Text Layout Extension an array of Unicode character codes in reading or logical order while the extension returns an array of glyphs to display in the correct visual order along with the coordinates necessary to properly position those glyphs and, additionally, character indices to map each glyph back to the input text array. Then, these positioned glyphs can be very easily rendered using D-Type Font Engine. The benefit of this approach is that software developers do not have to be familiar with various complex scripts or any of the shaping rules that might be applicable to each script. Regardless of the script, the Text Layout Extension is always utilized in the same consistent way. It is only important to be aware of the following basic concepts:
As mentioned above, D-Type Text Layout Extension internally relies on the ICU LayoutEngine, a popular open source portable and platform independent layout engine capable of shaping many complex Unicode scripts including Arabic, Bengali, Devanagari, Gujarati, Gurmukhi, Han, Hebrew, Kannada, Malayalam, Oriya, Tamil, Telugu and Thai. The ICU LayoutEngine uses layout tables found in font files and the knowledge of generic script shaping rules to lay out complex scripts. The ICU LayoutEngine supports complex scripts in the following ways:
For more information about the ICU LayoutEngine, please visit the ICU LayoutEngine web site and take a look at the applicable documentation. The ICU LayoutEngine itself, however, does not provide an interface to access the necessary layout tables in the font files. Depending on how the fonts are accessed, this interface must be written by the client (developer). In other words, the developer is responsible for opening, closing and managing the actual fonts (e.g. from file or memory), accessing and, optionally, caching their layout tables and supplying those tables to the ICU LayoutEngine when requested. In the past, this was the only way for software developers to use the ICU LayoutEngine in conjunction with D-Type Font Engine. With D-Type Text Layout Extension, fortunately, this is no longer necessary. D-Type Text Layout Extension takes care of all the font specific tasks and interaction with the ICU LayoutEngine. Software developers can now use one simple extension to display all supported complex scripts without the need to write their own font access interfaces. D-Type Text Layout Extension is an extension of D-Type Font Engine that makes it possible to easily render complex scripts, hiding from the developer all the complexity associated with this process and the need to interface with the ICU LayoutEngine directly. For software developers who use or plan to use D-Type rendering technology, D-Type Text Layout Extension brings the following benefits:
The most recent D-Type Text Layout Extension includes the ICU LayoutEngine that was released on September 17, 2007 (ICU 3.8 release). As new ICU releases become available, the Text Layout Extension will be updated to support the most recent version of the ICU LayoutEngine.
________________
[1] On Windows 2000 and XP, application developers can use the Win32 Text APIs or Uniscribe to display the complex scripts that are supported by Windows. One problem with this approach, however, is that the solution works only on Windows. Software developers who write cross-platform software have no way of porting their code to other platforms (e.g. Linux or Mac). [2] In reality the situation is actually a little bit more complicated. Arabic is a cursive script in which letters in a word are often connected to each other. The initial form indicates that no letter is attached to the letter from the right (i.e. there is no attaching character before it, but there is one following the character). But the initial form does not necessarily mean that the character in at the beginning of a word; it only indicates that the character is not at the end of the word. [3] Detecting word boundaries is not always a trivial task. Although most scripts use a space character as a word separator, there are scripts in which words appear without a space between them. Thai is probably the best example of such a script. [4] There are exceptions however. For historical reasons (older software did not have contextual text shaping capabilities), the Unicode standard encodes the initial, medial, final and isolated forms of Arabic letters separately in the U+Fxxx range, called Arabic Presentation Forms. The use of such presentation forms is deprecated but not uncommon. For the same historical reasons, even certain Latin ligatures have a defined Unicode code point. [5] The size of the extension varies depending on the platform. Additionally, the size is expected to grow as the size of the ICU LayoutEngine grows. Copyright © 1996-2009 D-Type Solutions. All scalable images on this web site are rendered by D-Type Font Engine, D-Type Rasterizer and/or D-Type PowerDoc Engine. Reproduction, copying, or redistribution for commercial purposes of any materials, images or design elements of this website is prohibited without the prior written consent of D-Type Solutions. All trademarks are the property of their respective holders and are mentioned for identification purposes only. Last updated on August 1, 2010 |