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 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...


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...


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."

Definition at line 27 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

virtual GXLayoutEngine::~GXLayoutEngine   [virtual]
 

The destructor, virtual for correct polymorphic invocation.


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

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

Reimplemented from LayoutEngine.


Member Data Documentation

const MorphTableHeader* GXLayoutEngine::fMorphTable [protected]
 

The address of the 'mort' table.

Definition at line 59 of file GXLayoutEngine.h.


The documentation for this class was generated from the following file:
Generated on Mon Dec 3 19:00:52 2001 for ICU 2.0 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001