2011-02-03 03:36:54 -06:00
|
|
|
--- misc/icu/source/layout/LookupProcessor.h 2011-02-03 09:20:27.657005678 +0000
|
|
|
|
+++ misc/build/icu/source/layout/LookupProcessor.h 2011-02-03 09:25:34.498396208 +0000
|
2011-03-11 03:03:27 -06:00
|
|
|
@@ -65,6 +65,7 @@
|
2011-02-03 03:36:54 -06:00
|
|
|
const FeatureListTable *featureListTable;
|
|
|
|
|
|
|
|
FeatureMask *lookupSelectArray;
|
|
|
|
+ le_uint32 lookupSelectCount;
|
|
|
|
|
|
|
|
le_uint16 *lookupOrderArray;
|
|
|
|
le_uint32 lookupOrderCount;
|
2011-02-02 06:48:07 -06:00
|
|
|
--- misc/icu/source/layout/LookupProcessor.cpp 2011-02-02 12:29:54.369077099 +0000
|
|
|
|
+++ misc/build/icu/source/layout/LookupProcessor.cpp 2011-02-02 12:31:54.215503036 +0000
|
2011-03-09 18:19:57 -06:00
|
|
|
@@ -70,6 +70,10 @@
|
2011-02-02 06:48:07 -06:00
|
|
|
|
|
|
|
if (selectMask != 0) {
|
|
|
|
const LookupTable *lookupTable = lookupListTable->getLookupTable(lookup);
|
|
|
|
+
|
|
|
|
+ if (!lookupTable)
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
le_uint16 lookupFlags = SWAPW(lookupTable->lookupFlags);
|
|
|
|
|
|
|
|
glyphIterator.reset(lookupFlags, selectMask);
|
2011-03-09 18:19:57 -06:00
|
|
|
@@ -111,6 +115,9 @@
|
2011-02-03 03:36:54 -06:00
|
|
|
for (le_uint16 lookup = 0; lookup < lookupCount; lookup += 1) {
|
|
|
|
le_uint16 lookupListIndex = SWAPW(featureTable->lookupListIndexArray[lookup]);
|
|
|
|
|
|
|
|
+ if (lookupListIndex >= lookupSelectCount)
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
lookupSelectArray[lookupListIndex] |= featureMask;
|
|
|
|
lookupOrderArray[store++] = lookupListIndex;
|
|
|
|
}
|
2011-03-11 03:03:27 -06:00
|
|
|
@@ -122,7 +129,7 @@
|
|
|
|
Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
|
|
|
|
LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures,
|
2011-03-04 06:55:17 -06:00
|
|
|
LEErrorCode& success)
|
2011-02-03 03:36:54 -06:00
|
|
|
- : lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL),
|
|
|
|
+ : lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL), lookupSelectCount(0),
|
|
|
|
lookupOrderArray(NULL), lookupOrderCount(0)
|
|
|
|
{
|
|
|
|
const ScriptListTable *scriptListTable = NULL;
|
2011-03-04 06:55:17 -06:00
|
|
|
@@ -170,6 +177,8 @@
|
2011-02-03 03:36:54 -06:00
|
|
|
lookupSelectArray[i] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ lookupSelectCount = lookupListCount;
|
|
|
|
+
|
|
|
|
le_int32 count, order = 0;
|
|
|
|
le_int32 featureReferences = 0;
|
|
|
|
const FeatureTable *featureTable = NULL;
|
2011-03-11 03:03:27 -06:00
|
|
|
@@ -186,6 +195,10 @@
|
2011-02-11 02:59:57 -06:00
|
|
|
le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]);
|
|
|
|
|
|
|
|
featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag);
|
|
|
|
+
|
|
|
|
+ if (!featureTable)
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
featureReferences += SWAPW(featureTable->lookupCount);
|
|
|
|
}
|
|
|
|
|