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