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

GXLayoutEngine Class Reference

This class implements layout for QuickDraw GX or Apple Advanced Typograyph (AAT) fonts. More...

#include <GXLayoutEngine.h>

Inheritance diagram for GXLayoutEngine::

LayoutEngine UObject UMemory List of all members.

Public Methods

 GXLayoutEngine (const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable)
 This is the main constructor. More...

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

virtual UClassID getDynamicClassID () const
 ICU "poor man's RTTI", returns a UClassID for the actual class. More...


Static Public Methods

UClassID getStaticClassID ()
 ICU "poor man's RTTI", returns a UClassID for this class. More...


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, LEErrorCode &success)
 This method does GX layout using the font's 'mort' table. More...

virtual void adjustGlyphPositions (const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success)
 This method adjusts the glyph positions using the font's 'kern', 'trak', 'bsln', 'opbd' and 'just' tables. More...


Protected Attributes

const MorphTableHeader * fMorphTable
 The address of the 'mort' table. More...


Static Private Attributes

const char fgClassID
 The address of this static class variable serves as this class's ID for ICU "poor man's RTTI". More...


Detailed Description

This class implements layout for QuickDraw GX or Apple Advanced Typograyph (AAT) fonts.

A font is a GX or AAT font if it contains a 'mort' table. See Apple's TrueType Reference Manual (http://fonts.apple.com/TTRefMan/index.html) for details. Information about 'mort' tables is in the chapter titled "Font Files."

Internal:
For internal use only.

Definition at line 29 of file GXLayoutEngine.h.


Constructor & Destructor Documentation

GXLayoutEngine::GXLayoutEngine const LEFontInstance   fontInstance,
le_int32    scriptCode,
le_int32    languageCode,
const MorphTableHeader *    morphTable
 

This is the main constructor.

It constructs an instance of GXLayoutEngine for a particular font, script and language. It takes the 'mort' table as a parameter since LayoutEngine::layoutEngineFactory has to read the 'mort' table to know that it has a GX font.

Note: GX and AAT fonts don't contain any script and language specific tables, so the script and language are ignored.

Parameters:
fontInstance  - the font
scriptCode  - the script
langaugeCode  - the language
morphTable  - the 'mort' table
See also:
LayoutEngine::layoutEngineFactory , ScriptAndLangaugeTags.h for script and language codes
Internal:
For internal use only.

virtual GXLayoutEngine::~GXLayoutEngine   [virtual]
 

The destructor, virtual for correct polymorphic invocation.

Internal:
For internal use only.


Member Function Documentation

virtual void GXLayoutEngine::adjustGlyphPositions const LEUnicode    chars[],
le_int32    offset,
le_int32    count,
le_bool    reverse,
LEGlyphID    glyphs[],
le_int32    glyphCount,
float    positions[],
LEErrorCode   success
[protected, virtual]
 

This method adjusts the glyph positions using the font's 'kern', 'trak', 'bsln', 'opbd' and 'just' tables.

Input parameters:

Parameters:
glyphs  - the input glyph array
glyphCount  - the number of glyphs in the glyph array
x  - the starting X position
y  - the starting Y position
Output parameters:
Parameters:
positions  - the output X and Y positions (two entries per glyph)
success  - set to an error code if the operation fails
Internal:
For internal use only.

Reimplemented from LayoutEngine.

virtual le_int32 GXLayoutEngine::computeGlyphs const LEUnicode    chars[],
le_int32    offset,
le_int32    count,
le_int32    max,
le_bool    rightToLeft,
LEGlyphID *&    glyphs,
le_int32 *&    charIndices,
LEErrorCode   success
[protected, virtual]
 

This method does GX layout using the font's 'mort' table.

It converts the input character codes to glyph indices using mapCharsToGlyphs, and then applies the 'mort' table.

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
success  - set to an error code if the operation fails
Returns:
the number of glyphs in the glyph index array
Internal:
For internal use only.

Reimplemented from LayoutEngine.

virtual UClassID GXLayoutEngine::getDynamicClassID void    const [inline, virtual]
 

ICU "poor man's RTTI", returns a UClassID for the actual class.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Reimplemented from LayoutEngine.

Definition at line 65 of file GXLayoutEngine.h.

UClassID GXLayoutEngine::getStaticClassID void    [inline, static]
 

ICU "poor man's RTTI", returns a UClassID for this class.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Reimplemented from LayoutEngine.

Definition at line 72 of file GXLayoutEngine.h.


Member Data Documentation

const MorphTableHeader* GXLayoutEngine::fMorphTable [protected]
 

The address of the 'mort' table.

Internal:
For internal use only.

Definition at line 81 of file GXLayoutEngine.h.

const char GXLayoutEngine::fgClassID [static, private]
 

The address of this static class variable serves as this class's ID for ICU "poor man's RTTI".

Reimplemented from LayoutEngine.

Definition at line 132 of file GXLayoutEngine.h.


The documentation for this class was generated from the following file:
Generated on Mon Nov 24 14:36:34 2003 for ICU 2.8 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001