os/textandloc/fontservices/textshaperplugin/IcuSource/layout/GlyphSubstitutionTables.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2  *
     3  * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
     4  *
     5  */
     6 
     7 #include "LETypes.h"
     8 #include "LEGlyphFilter.h"
     9 #include "OpenTypeTables.h"
    10 #include "Lookups.h"
    11 #include "GlyphDefinitionTables.h"
    12 #include "GlyphSubstitutionTables.h"
    13 #include "GlyphSubstLookupProc.h"
    14 #include "ScriptAndLanguage.h"
    15 #include "LEGlyphStorage.h"
    16 #include "LESwaps.h"
    17 
    18 U_NAMESPACE_BEGIN
    19 
    20 le_int32 GlyphSubstitutionTableHeader::process(LEGlyphStorage &glyphStorage, le_bool rightToLeft, LETag scriptTag, LETag languageTag,
    21                                            const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
    22                                            LEErrorCode &success,
    23                                            const LEGlyphFilter *filter, const LETag *featureOrder) const
    24 {
    25     if (LE_FAILURE(success)) {
    26         return 0;
    27     }
    28 
    29     GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureOrder);
    30 
    31     if (processor.isBogus()) {
    32         success = LE_MEMORY_ALLOCATION_ERROR;
    33     	return 0;
    34     }
    35 
    36     return processor.process(glyphStorage, NULL, rightToLeft,
    37         glyphDefinitionTableHeader, NULL, success);
    38 }
    39 
    40 U_NAMESPACE_END