Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ThaiLayoutEngine Class Reference

This class implements layout for the Thai script, using the ThaiShapingClass. More...

#include <ThaiLayoutEngine.h>

Inheritance diagram for ThaiLayoutEngine:

LayoutEngine List of all members.

Public Methods

 ThaiLayoutEngine (LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode)
 This constructs an instance of ThaiLayoutEngine for the given font, script and language. More...

virtual ~ThaiLayoutEngine ()
 The destructor, virtual for correct polymorphic invocation.


Protected Methods

virtual le_int32 computeGlyphs (const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphID *&glyphs, le_int32 *&charIndices)
 This method performs Thai layout. More...


Protected Attributes

le_uint8 fGlyphSet
 A small integer indicating which Thai encoding the font uses. More...

LEUnicode fErrorChar
 The character used as a base for vowels and tone marks that are out of sequence. More...


Detailed Description

This class implements layout for the Thai script, using the ThaiShapingClass.

All existing Thai fonts use an encoding which assigns character codes to all the variant forms needed to display accents and tone marks correctly in context. This class can deal with fonts using the Microsoft, Macintosh, and WorldType encodings.

Definition at line 24 of file ThaiLayoutEngine.h.


Constructor & Destructor Documentation

ThaiLayoutEngine::ThaiLayoutEngine ( LEFontInstance * fontInstance,
le_int32 scriptCode,
le_int32 languageCode )
 

This constructs an instance of ThaiLayoutEngine for the given font, script and language.

It examines the font, using LEFontInstance::canDisplay, to set fGlyphSet and fErrorChar. (see below)

Parameters:
fontInstance   - the font
scriptCode   - the script
languageCode   - the language

See also:
LEFontInstance , ScriptAndLanguageTags.h for script and language codes

ThaiLayoutEngine::~ThaiLayoutEngine ( ) [virtual]
 

The destructor, virtual for correct polymorphic invocation.


Member Function Documentation

le_int32 ThaiLayoutEngine::computeGlyphs ( const LEUnicode chars[],
le_int32 offset,
le_int32 count,
le_int32 max,
le_bool rightToLeft,
LEGlyphID *& glyphs,
le_int32 *& charIndices ) [protected, virtual]
 

This method performs Thai layout.

It calls ThaiShaping::compose to generate the correct contextual character codes, and then calls mapCharsToGlyphs to generate the glyph indices.

Input parameters:

Parameters:
chars   - the input character context
offset   - the index of the first character to process
count   - the number of characters to process
max   - the number of characters in the input context
rightToLeft   - true if the text is in a right to left directional run

Output parameters:
Parameters:
glyphs   - the glyph index array
charIndices   - the character index array

Returns:
the number of glyphs in the glyph index array

See also:
ThaiShaping

Reimplemented from LayoutEngine.


Member Data Documentation

LEUnicode ThaiLayoutEngine::fErrorChar [protected]
 

The character used as a base for vowels and tone marks that are out of sequence.

Usually this will be Unicode 0x25CC, if the font can display it.

See also:
ThaiShaping

Definition at line 63 of file ThaiLayoutEngine.h.

le_uint8 ThaiLayoutEngine::fGlyphSet [protected]
 

A small integer indicating which Thai encoding the font uses.

See also:
ThaiShaping

Definition at line 53 of file ThaiLayoutEngine.h.


The documentation for this class was generated from the following file:
Generated at Tue Dec 5 18:13:46 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000