Computers & Writing Systems
Guidelines for Writing System Support: Technical Details: Smart Rendering: Part 1
UNESCO project Initiative B@bel
A complete index of all SIL's contributions to UNESCO‘s project Initiative B@bel can be found here.
Guidelines Table of Contents
For most of the history of computing the relationship between encoding and rendering has been relatively simple. Each codepoint has a glyph associated with it, and using whichever rendering technology is available, that glyph will be displayed on the output media. But with the advent of Unicode, and the need to be able to use an encoding which is linguistically motivated rather than visually motivated, the rendering process has become more complicated. In this section we will examine the rendering process from the viewpoint of modern rendering requirements.
Technical Details: Characters, Codepoints, Glyphs should be read before this section.
9.1 The Rendering Process
The basic process is that an encoded string of characters, stored in the computer, is converted to a glyph string. This glyph string is then processed in some way to arrive at a sequence of positioned glyphs which are then rendered to the output media.
Rendering is an ambiguous word, and we will use the term glyph rendering to describe the process of making the electronic equivalent of marks on a page, and rendering to describe the whole process as shown below.
Figure1: Rendering process overview
This section will concentrate entirely on TrueType based fonts. But the concepts presented here can be easily applied to other technologies.
9.1.1 Glyph identification
The first step in the rendering process is to convert an encoded string to a string of glyph references. This conversion is a simple one-to-one correspondence. For every codepoint there is one corresponding glyph. Thus the number of glyphs in the glyph string will be the same as the number of codepoints in the encoded string. Each font contains a table (called the cmap) that specifies the exact correspondence.
9.1.2 Glyph processing
In the glyph processing phase the string of glyph references (also called glyph IDs) is converted to another string of glyph IDs. In the case of simple rendering (with ‘dumb’ fonts) this transformation is simple—there is no conversion. In more complex systems, sophisticated routines can transform this string. This can be useful for diacritic positioning, forming ligatures, and other linguistic transformations. It is also where glyph positioning is begun. This step contains the most flexibility for WSI developers, and will be explained in more detail after mentioning glyph rendering.
9.1.3 Glyph rendering
At the end of the process is the actual action of putting marks on paper or displaying shapes on the screen. This involves taking the glyph outlines for each glyph and displaying them at the position indicated for that glyph. Therefore the renderer requires not only the glyph ID, but also the position of the glyph on the screen. The renderer also needs to know such things as how large to render the glyph, using what color and other stylistic information.
9.1.4 User interaction
Although not technically part of the rendering process, user interaction must be considered. In an editing environment, after the glyphs have been rendered, users need to be able to interact with the text as represented by the visual glyphs. This includes actions such as text selection and cursor movement.
(c) Copyright 2003 UNESCO and SIL International Inc.
Note: If you want to add a response to this article, you need to enable cookies in your browser, and then restart your browser.
Note: the opinions expressed in submitted contributions below do not necessarily reflect the opinions of our website.
© 2003-2019 SIL International, all rights reserved, unless otherwise noted elsewhere on this page.