diff -r e9e65ce0013a -r 6a36b1ebc620 jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp --- a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp Sun Dec 05 15:51:31 2010 +0300 +++ b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp Mon Dec 06 16:10:01 2010 -0800 @@ -33,7 +33,7 @@ #include "LEGlyphFilter.h" #include "LEFontInstance.h" #include "OpenTypeTables.h" -#include "Features.h" +#include "ICUFeatures.h" #include "Lookups.h" #include "ScriptAndLanguage.h" #include "GlyphDefinitionTables.h" @@ -52,13 +52,19 @@ GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor( const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader, - LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) + LETag scriptTag, + LETag languageTag, + const LEGlyphFilter *filter, + const FeatureMap *featureMap, + le_int32 featureMapCount, + le_bool featureOrder, + LEErrorCode& success) : LookupProcessor( (char *) glyphSubstitutionTableHeader, SWAPW(glyphSubstitutionTableHeader->scriptListOffset), SWAPW(glyphSubstitutionTableHeader->featureListOffset), SWAPW(glyphSubstitutionTableHeader->lookupListOffset), - scriptTag, languageTag, featureMap, featureMapCount, featureOrder), fFilter(filter) + scriptTag, languageTag, featureMap, featureMapCount, featureOrder, success), fFilter(filter) { // anything? } @@ -68,8 +74,12 @@ } le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType, - GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const + GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const { + if (LE_FAILURE(success)) { + return 0; + } + le_uint32 delta = 0; switch(lookupType) @@ -89,7 +99,7 @@ { const MultipleSubstitutionSubtable *subtable = (const MultipleSubstitutionSubtable *) lookupSubtable; - delta = subtable->process(glyphIterator, fFilter); + delta = subtable->process(glyphIterator, success, fFilter); break; } @@ -113,7 +123,7 @@ { const ContextualSubstitutionSubtable *subtable = (const ContextualSubstitutionSubtable *) lookupSubtable; - delta = subtable->process(this, glyphIterator, fontInstance); + delta = subtable->process(this, glyphIterator, fontInstance, success); break; } @@ -121,7 +131,7 @@ { const ChainingContextualSubstitutionSubtable *subtable = (const ChainingContextualSubstitutionSubtable *) lookupSubtable; - delta = subtable->process(this, glyphIterator, fontInstance); + delta = subtable->process(this, glyphIterator, fontInstance, success); break; } @@ -129,7 +139,7 @@ { const ExtensionSubtable *subtable = (const ExtensionSubtable *) lookupSubtable; - delta = subtable->process(this, lookupType, glyphIterator, fontInstance); + delta = subtable->process(this, lookupType, glyphIterator, fontInstance, success); break; }