Содержащиеся вНайти другие документыРесурсы поддержки | Загрузить это руководство в формате PDF (189 КБ)
Chapter 2 Technical ConsiderationsThis chapter outlines the implementation of CTL support in the Solaris operating environment.
2.1 ArchitectureCTL language support in the Solaris operating environment comprises a set of extensions supporting transformations between text input and text output. The CTL language engines enable the CDE/Motif drawing and measurement API for character shaping, such as ligatures and diacritics, the transformation of static and dynamic text widgets, and right-to-left and left-to-right text alignment and tabbing. Because text rendering is handled through the rendition layer, other widget libraries can be extended to support CTL. The new CTL features require the Portable Layout Services (PLS) library and the appropriate language engine. CTL uses PLS as the interface to the language engines to transform text before rendering. Note - 1. There are no changes to the Motif public APIs. A few resources have been added, but all old resources still work. 2. Existing applications can inherit CTL support by adding the resources without changing any source code. Figure 2-1 CTL language architecture
Desktop and Motif applications, at the top of the stack, use Motif functionality to render text. Motif interfaces with the language engines using PLS. PLS needs to know the current locale only when calling the appropriate language engine. The language engines perform character transformations for shaping and reordering text. The character stream can come from keyboard input, an application's text strings, or a file. Note - Because the CTL architecture easily supports new languages, Sun may develop new language engines in future.
2.2 Multiscript SupportBecause of the CTL framework, Unicode characters and CTL features can easily be presented together in a Unicode locale. The UTF-8 locales use the Universal Multiscript Language Engine (UMLE). UMLE is controlled by the utility genlayouttbl(1) which can be used to add/customize the script layout. For more information about this utility and the Universal Multiscript Language Engine, see the genlayouttbl(1) man pages. Figure 2-2 shows a sample multiscript e-mail in dtmail (en_US.UTF-8 locale). Figure 2-2 Multiscript e-mail in dtmail (en_US.UTF-8 locale)
2.3 Representation ManagementThe various components of the CTL stack manage different functions of the string, processing, and display of CTL language characters and symbols. The language engines are responsible for all aspects of character formation and rendering in the appropriate language. The language engines support the following shaping and reordering features:
The language engine algorithms apply language-specific rules to the input stream and return the appropriate glyphs for rendering by the X11 rendition layer. Motif is responsible for all on screen text manipulations, including:
Motif also manages the flow of the character input stream so that the language engine receives only CTL characters for processing. The application manages the physical layout of text, including alignment, justification, word demarcation, and other page-formatting features. The application also manages the collation of CTL text, non-processed text, and locale-specific information. For example, when displaying currency strings, the application collates the processed number stream and the current locale's monetary format and currency symbol. 2.4 CTL LocalesThe Solaris operating environment provides the following CTL locales. Table 2-1 CTL Locales
Note - CTL locales must be installed before CTL applications can be used. |
||||||||||||||||||||