Complex Text Layout Language Support in the Solaris Operating Environment

Chapter 2 Technical Considerations

This chapter outlines the implementation of CTL support in the Solaris operating environment.

2.1 Architecture

CTL 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 Support

Because 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 Management

The 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 Locales

The Solaris operating environment provides the following CTL locales.

Table 2-1 CTL Locales





Arabic: ar_AR 


Akhbar, Shayyal, Naskh (Regular and Bold) 

8859-6 <-> UTF-88859-6 <-> Win1256 

Hebrew: he_HE 


Arial, CourierNew, TimesNewRoman, LucidaSans (Regular, Bold, Italic, and BoldItalic) 

8859-8 <-> UTF-8 

Thai: th_TH 

iso8859-11 (TIS620.2533) 

AngsanaUPC, BrowaliaUPC, CordiaUPC, Lucida (Medium, Bold, Italic, and BoldItalic) 

8859-11 <-> UTF-8 


Unicode 3.0 

 All of the above UTF-8 <-> ISO 646(ASCII)UTF-8<->ISO 8859-1 ~ -11, -15UTF-8<->KOI8-R<->UCS-2UTF-8<->UTF-7UTF-8<->UTF-16<->UCS-4,UTF-8<->PCK(aka SJIS)UTF-8<->various euc encodingsUTF-8<->ISO-2022-JP ~ -TW, -KR, -CNUTF-8<->BIG5UTF-8<->GBKUTF-8<->IBM MBCS CP933, CP935, CP937

Note -

CTL locales must be installed before CTL applications can be used.