os/textandloc/fontservices/textshaperplugin/IcuSource/layout/GlyphPositioningTables.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2  *
     3  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
     4  *
     5  */
     6 
     7 #include "LETypes.h"
     8 #include "LEFontInstance.h"
     9 #include "OpenTypeTables.h"
    10 #include "Lookups.h"
    11 #include "GlyphDefinitionTables.h"
    12 #include "GlyphPositioningTables.h"
    13 #include "GlyphPosnLookupProc.h"
    14 #include "CursiveAttachmentSubtables.h"
    15 #include "LEGlyphStorage.h"
    16 #include "GlyphPositionAdjustments.h"
    17 
    18 U_NAMESPACE_BEGIN
    19 
    20 void GlyphPositioningTableHeader::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
    21                                           LETag scriptTag, LETag languageTag,
    22                                           const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
    23                                           LEErrorCode &success,
    24                                           const LEFontInstance *fontInstance, const LETag *featureOrder) const
    25 {
    26     if (LE_FAILURE(success)) {
    27         return;
    28     }
    29 
    30     GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureOrder);
    31 
    32     if (processor.isBogus()) {
    33         success = LE_MEMORY_ALLOCATION_ERROR;
    34     	return;
    35     }
    36 
    37     processor.process(glyphStorage, glyphPositionAdjustments, rightToLeft,
    38     	glyphDefinitionTableHeader, fontInstance, success);
    39 
    40     glyphPositionAdjustments->applyCursiveAdjustments(glyphStorage, rightToLeft, fontInstance);
    41 }
    42 
    43 U_NAMESPACE_END