Logo Search packages:      
Sourcecode: icu version File versions  Download package

void LayoutEngine::mapCharsToGlyphs ( const LEUnicode  chars[],
le_int32  offset,
le_int32  count,
le_bool  reverse,
le_bool  mirror,
LEGlyphStorage glyphStorage,
LEErrorCode success 
) [protected, virtual, inherited]

This method does character to glyph mapping. The default implementation uses the font instance to do the mapping. It will allocate the glyph and character index arrays if they're not already allocated. If it allocates the character index array, it will fill it it.

This method supports right to left text with the ability to store the glyphs in reverse order, and by supporting character mirroring, which will replace a character which has a left and right form, such as parens, with the opposite form before mapping it to a glyph index.

Input parameters:

chars - the input character context
offset - the offset of the first character to be mapped
count - the number of characters to be mapped
reverse - if TRUE, the output will be in reverse order
mirror - if TRUE, do character mirroring
glyphStorage - the object which holds the per-glyph storage. The glyph and char indices arrays will be filled in.
success - set to an error code if the operation fails
See also:

For internal use only.

Reimplemented in UnicodeArabicOpenTypeLayoutEngine.

Definition at line 464 of file LayoutEngine.cpp.

References LEGlyphStorage::allocateGlyphArray(), LayoutEngine::fFilterZeroWidth, LayoutEngine::fFontInstance, LE_FAILURE, LEFontInstance::mapCharsToGlyphs(), and TRUE.

Referenced by ThaiLayoutEngine::computeGlyphs(), LayoutEngine::computeGlyphs(), GXLayoutEngine::computeGlyphs(), UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(), and OpenTypeLayoutEngine::glyphProcessing().

    if (LE_FAILURE(success)) {

    glyphStorage.allocateGlyphArray(count, reverse, success);

    DefaultCharMapper charMapper(TRUE, mirror);

    fFontInstance->mapCharsToGlyphs(chars, offset, count, reverse, &charMapper, fFilterZeroWidth, glyphStorage);

Generated by  Doxygen 1.6.0   Back to index