3  * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved 
   8 #include "LEGlyphFilter.h" 
   9 #include "LEFontInstance.h" 
  10 #include "OpenTypeTables.h" 
  11 #include "ICUFeatures.h" 
  13 #include "ScriptAndLanguage.h" 
  14 #include "GlyphDefinitionTables.h" 
  15 #include "GlyphSubstitutionTables.h" 
  16 #include "SingleSubstitutionSubtables.h" 
  17 #include "MultipleSubstSubtables.h" 
  18 #include "AlternateSubstSubtables.h" 
  19 #include "LigatureSubstSubtables.h" 
  20 #include "ContextualSubstSubtables.h" 
  21 #include "ExtensionSubtables.h" 
  22 #include "LookupProcessor.h" 
  23 #include "GlyphSubstLookupProc.h" 
  28 GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor( 
  29         const GlyphSubstitutionTableHeader 
*glyphSubstitutionTableHeader
, 
  32         const LEGlyphFilter 
*filter
,  
  33         const FeatureMap 
*featureMap
,  
  34         le_int32 featureMapCount
,  
  38                       (char *) glyphSubstitutionTableHeader
, 
  39                       SWAPW(glyphSubstitutionTableHeader
->scriptListOffset
), 
  40                       SWAPW(glyphSubstitutionTableHeader
->featureListOffset
), 
  41                       SWAPW(glyphSubstitutionTableHeader
->lookupListOffset
), 
  42                       scriptTag
, languageTag
, featureMap
, featureMapCount
, featureOrder
, success
), fFilter(filter
) 
  47 GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor() 
  51 le_uint32 
GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable 
*lookupSubtable
, le_uint16 lookupType
, 
  52                                                        GlyphIterator 
*glyphIterator
, const LEFontInstance 
*fontInstance
, LEErrorCode
& success
) const 
  54     if (LE_FAILURE(success
)) { 
  67         const SingleSubstitutionSubtable 
*subtable 
= (const SingleSubstitutionSubtable 
*) lookupSubtable
; 
  69         delta 
= subtable
->process(glyphIterator
, fFilter
); 
  75         const MultipleSubstitutionSubtable 
*subtable 
= (const MultipleSubstitutionSubtable 
*) lookupSubtable
; 
  77         delta 
= subtable
->process(glyphIterator
, success
, fFilter
); 
  83         const AlternateSubstitutionSubtable 
*subtable 
= (const AlternateSubstitutionSubtable 
*) lookupSubtable
; 
  85         delta 
= subtable
->process(glyphIterator
, fFilter
); 
  91         const LigatureSubstitutionSubtable 
*subtable 
= (const LigatureSubstitutionSubtable 
*) lookupSubtable
; 
  93         delta 
= subtable
->process(glyphIterator
, fFilter
); 
  99         const ContextualSubstitutionSubtable 
*subtable 
= (const ContextualSubstitutionSubtable 
*) lookupSubtable
; 
 101         delta 
= subtable
->process(this, glyphIterator
, fontInstance
, success
); 
 105     case gsstChainingContext
: 
 107         const ChainingContextualSubstitutionSubtable 
*subtable 
= (const ChainingContextualSubstitutionSubtable 
*) lookupSubtable
; 
 109         delta 
= subtable
->process(this, glyphIterator
, fontInstance
, success
); 
 115         const ExtensionSubtable 
*subtable 
= (const ExtensionSubtable 
*) lookupSubtable
; 
 117         delta 
= subtable
->process(this, lookupType
, glyphIterator
, fontInstance
, success
); 
 128 GlyphSubstitutionLookupProcessor::~GlyphSubstitutionLookupProcessor()