HOME

TheInfoList



OR:

Complex text layout (CTL) or complex text rendering is the typesetting of writing systems in which the shape or positioning of a grapheme depends on its relation to other graphemes. The term is used in the field of software internationalization, where each grapheme is a
character Character or Characters may refer to: Arts, entertainment, and media Literature * ''Character'' (novel), a 1936 Dutch novel by Ferdinand Bordewijk * ''Characters'' (Theophrastus), a classical Greek set of character sketches attributed to The ...
. Scripts which require CTL for proper display may be known as complex scripts. Examples include the Arabic alphabet and scripts of the Brahmic family, such as Devanagari, Khmer script or the Thai alphabet. Many scripts do not require CTL. For instance, the Latin alphabet or Chinese characters can be typeset by simply displaying each character one after another in straight rows or columns. However, even these scripts have alternate forms or optional features (such as
cursive Cursive (also known as script, among other names) is any style of penmanship in which characters are written joined in a flowing manner, generally for the purpose of making writing faster, in contrast to block letters. It varies in functionalit ...
writing) which require CTL to produce on computers.


Characteristics requiring CTL

The main characteristics of CTL complexity are: * Bi-directional text, where characters may be written from either right-to-left or left-to-right direction. * Context-sensitive shaping and ligatures, where a character may change its shape, dependent on its location and/or the surrounding characters. For example, a character in
Arabic script The Arabic script is the writing system used for Arabic and several other languages of Asia and Africa. It is the second-most widely used writing system in the world by number of countries using it or a script directly derived from it, and the ...
can have as many as four different shape-forms, depending on context. * Ordering, where the displayed order of the characters is not the same as the logical order. For example, in Devanagari, which is written from left to right, the grapheme for "short i" appears to the left of ("before") the consonant that it follows: in ''ki'', the ''-i'' should render on the left, its bow reaching until above the ''k-'' to the right. Not all occurrences of these characteristics require CTL. For example, the Greek alphabet has context-sensitive shaping of the letter
sigma Sigma (; uppercase Σ, lowercase σ, lowercase in word-final position ς; grc-gre, σίγμα) is the eighteenth letter of the Greek alphabet. In the system of Greek numerals, it has a value of 200. In general mathematics, uppercase Σ is used as ...
, which appears as ς at the end of a word and σ elsewhere. However, these two forms are normally stored as different characters; for instance, Unicode has both and , and does not treat them as equivalent. For collation and comparison purposes, software should consider the string "δῖος Ἀχιλλεύς" equivalent to "δῖοσ Ἀχιλλεύσ", but for typesetting purposes they are distinct and CTL is not required to choose the correct form.


Implementations

Most text-rendering software that is capable of CTL will include information about specific scripts, and so will be able to render them correctly without font files needing to supply instructions on how to lay out characters. Such software is usually provided in a library; examples include: *
Core Text Core Text is a Core Foundation style API in macOS, first introduced in Mac OS X v10.4, Mac OS X 10.4 Tiger, made public in Mac OS X v10.5, Mac OS X 10.5 Leopard, and introduced for the iPad with iPhone SDK 3.2. Exposing a C (programming language), ...
for macOS *
Uniscribe Uniscribe is the Microsoft Windows set of services for rendering Unicode-encoded text, supporting complex text layout. It is implemented in the dynamic link library . Uniscribe has been released with Windows 2000 and Internet Explorer 5.0. In addi ...
(with Universal Shaping Engine) and DirectWrite for
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
*
HarfBuzz HarfBuzz (loose transliteration of Persian calque ''harf-bāz'', literally "open type") is a software development library for text shaping, which is the process of converting Unicode text to glyph indices and positions. The newer version, ''Ne ...
, a cross-platform library * Pango, a cross-platform library which nowadays incorporates
HarfBuzz HarfBuzz (loose transliteration of Persian calque ''harf-bāz'', literally "open type") is a software development library for text shaping, which is the process of converting Unicode text to glyph indices and positions. The newer version, ''Ne ...
However, such software is unable to properly render any script for which it lacks instructions, which can include many minority scripts. The alternative approach is to include the rendering instructions in the font file itself. Rendering software still needs to be capable of reading and following the instructions, but this is relatively simple. Examples of this latter approach include
Apple Advanced Typography Apple Advanced Typography (AAT) is Apple Inc.'s computer technology for advanced font rendering, supporting internationalization and complex features for typographers, a successor to Apple's little-used QuickDraw GX font technology of the mid-19 ...
(AAT) and Graphite. Both of these names encompass both the instruction format and the software supporting it; AAT is included on Apple operating systems, while Graphite is available for
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
and Linux-based systems. The OpenType format is primarily intended for systems using the first approach (layout knowledge in the renderer, not the font), but it has a few features that assist with CTL, such as contextual ligatures. AAT and Graphite instructions can be embedded in OpenType font files.


See also

* Typography * Unicode * Writing systems which require complex text layout: ** Arabic alphabet ** Most of the Brahmic family of scripts ** N'Ko script ** Tengwar (diacritics and numbers)


References

{{Reflist


External links


Examples of complex rendering
SIL international SIL International (formerly known as the Summer Institute of Linguistics) is an evangelical Christian non-profit organization whose main purpose is to study, develop and document languages, especially those that are lesser-known, in order to ex ...
's examples of complex writing systems around the world
Complex Text Layout
The Open Group's Desktop Technologies
Supporting Indic Scripts in Mozilla
— also other CTL scripts
Project SILA
Graphite and Mozilla integration project
CTL Architecture in Solaris
— Solaris Globalization Whitepapers
Complex Scripts
— Microsoft Global Development and Computing Portal
Theppitak's Homepage
— information about Thai language processing
HarfBuzz's page
at
Freedesktop.org freedesktop.org (fd.o) is a project to work on interoperability and shared base technology for Free software, free-software desktop environments for the X Window System (X11) and Wayland (display server protocol), Wayland on Linux and other Uni ...

D-Type Unicode Text Module — Portable software library for complex text

BidiRenderer
— An application that illustrates the shaping and layout of complex text in bidirectional paragraphs using FriBidi, FreeType, and HarfBuzz
Tehreer-Android
— A library that gives full control over text related technologies such as bidirectional algorithm, open type shaping, text typesetting and text rendering
Tehreer-Cocoa
— Standalone font/text engine for iOS Typesetting Indic computing Natural language and computing