An introduction to the Thai language

Layout transformations

Thai characters are stored in a computer's memory buffer differently than they are presented onscreen and in print. Therefore, it is necessary to perform layout transformations between buffer text and onscreen text. The main purpose of the layout transformation is to provide better quality in presentation and desktop publishing environments.

Examples of layout transformation

Baseline characters that have a descender in the lower position remove their descenders in presentation when they are followed by a lower vowel.


Thai layout transformation baseline

The horizontal position of an above vowel or tone mark is dependent on the base character. If the base character has an ascender in the upper position, the above vowel or tone mark is shifted to the left horizontally.


Thai layout transformation example

The vertical position of a tone mark is dependent on the presence of an upper vowel. If an upper vowel does not exist, the tone mark is moved to the upper vowel level.


Thai layout transformation

The character SARA AM is a special baseline vowel that overlaps with the associated previous consonant. It is used to represent a pair of Thai characters: NIKHAHIT and SARA AA. In the Thai computer and typewriter systems, users frequently substitute SARA AM for the combination of NIKHAHIT and SARA AA. SARA AM is stored in buffer as one character (U+0E33), but when rendered onscreen or in print, it is split into the character NIKHAHIT (U+0E4D) positioned above the associated previous consonant and SARA AA (U+0E32) positioned to the right.


Thai layout transformation

In Thai, there is no one-to-one correspondence between Thai characters and font glyphs. This means that some Thai characters, such as upper vowels and tone marks, may have more than one font glyph in Thai fonts. These additional glyphs are used for presentation purposes only.

Layout transformations are already supported by operating systems such as Windows Thai, so it is not necessary for application developers to implement transformations at the application level.