Previous section.
Portable Layout Services: Context-dependent and Directional Text
Portable Layout Services:
Context-dependent and Directional Text
Copyright © 1997 The Open Group
Introduction
This chapter covers the scope of this document
and introduces several important concepts.
For definitions of unfamiliar terms, refer to the glossary.
Scope
This document describes a set of portable functions for handling
context-dependent and bidirectional text transformations.
It is a logical extension to the existing POSIX locale model.
Complex-Text Languages - An Overview
provides a detailed overview of the writing system aspects of
complex-text languages, including the bidirectional languages,1
Korean and Thai.
If you are familiar with complex-text languages and the
problems associated with their processing and presentation,
you need not read
Complex-Text Languages - An Overview
.
This document introduces the concepts of
complex-text languages and layout transformations. It defines a
locale-associated object called LayoutObject to handle layout
transformations. The layout object may contain an additional locale
category, LO_LTYPE, containing character classifications and mappings for
layout transformations.
This document also defines a standard set of layout values containing
layout text descriptors and layout action indicators, and a set of
Application Programming Interfaces (APIs) to facilitate layout
transformations for complex-text languages.
This document addresses the need to enhance the existing XPG locale model.
It provides support for the transformations between the layout of text during
processing and the layout of text during presentation of complex-text
languages, as an addition to the existing support for the basic locale
services (parsing, tokenising, and so on).
Though the proposed concepts are not constrained to systems with a
C-language implementation only, C-language bindings are provided for the
APIs, and C-language examples are used.
Example
An example of the need for layout transformations is the implementation of
the support for bidirectional text in Motif. This implementation involves
transformations of a logical stream of bidirectional text into a
physical stream presented on a display, with segment inversions
and some character shaping using an intermediary
explicit type of text (see
Layout Transformations in Motif
).
For a detailed explanation of the different terms used here, see
Complex-Text Languages - An Overview
.
Figure: Layout Transformations in Motif
The transformations transform the logical data to an internal explicit
layout (T1), and then prepare it for presentation by inverting directional
segments (T2) and shaping the national characters, symbolically represented
here by lower-case letters (T3).
Target Audience
This extension benefits:
-
developers of operating system services or toolkits (such as Motif, terminal
emulators, printer filters) that want to provide support for complex-text
layout transformation functions in a standard, portable way
-
developers of application programs, using presentation services or toolkits,
in an environment that supports the layout transformation functions,
as follows:
-
to modify the system defaults of layout values, when using the
layout services provided by the operating system
-
to use the layout functions for transforming
a complex text that has a peculiar layout
-
to have direct control on the complex-text language presented
on a screen or on a printer
-
application developers in an environment that does not provide
layout transformation services for complex-text languages, who
are willing to implement the proposed APIs.
Existing applications, using internationalised functions (ISO C, XPG4,
POSIX, Motif and X), that are performing logical processing without the need
for layout transformations, may not be affected by this extension.
The vast majority of applications that use the standard presentation
services (Motif, curses, and so on) or the layout presentation services that
may be provided by the operating system, with the standard defaults,
should not be affected.
Approach
The set of layout functions address transformation between the layouts of
text during processing and the layouts of text during presentation with
appropriate APIs. The associated standard set of character classifications,
mapping and text layout attributes are defined; the framework for grouping,
storing and modifying these attributes is also defined.
Possible implementation examples, as well as some components of
the Layout Services (such as some specific values of the layout
values), have been marked in the document by shading and the letters
"OP" in the margin to indicate that they are not mandatory.
Footnotes
- 1.
- The term bidirectional languages is used throughout this document
instead of "languages with a bidirectional script". The latter is the
correct form, but is more cumbersome.
Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy
of this publication.