diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2006-12-06 17:29:15 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2006-12-06 17:29:15 +0000 |
commit | e908059c852606dc94864e34c963f682da27e67b (patch) | |
tree | 627f62320c0c51fd1125ae98b2bf3e2c84ca9f1c /Build/source/libs | |
parent | 62dfc6d9588e7c3aa6a85b06b53479697b272243 (diff) |
xetex updates for version 0.996
git-svn-id: svn://tug.org/texlive/trunk@2602 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
13 files changed, 115 insertions, 41 deletions
diff --git a/Build/source/libs/icu-xetex/layout/AlternateSubstSubtables.cpp b/Build/source/libs/icu-xetex/layout/AlternateSubstSubtables.cpp index 81989cdd0f1..ffe65b320fe 100644 --- a/Build/source/libs/icu-xetex/layout/AlternateSubstSubtables.cpp +++ b/Build/source/libs/icu-xetex/layout/AlternateSubstSubtables.cpp @@ -27,13 +27,20 @@ le_uint32 AlternateSubstitutionSubtable::process(GlyphIterator *glyphIterator, c Offset alternateSetTableOffset = SWAPW(alternateSetTableOffsetArray[coverageIndex]); const AlternateSetTable *alternateSetTable = (const AlternateSetTable *) ((char *) this + alternateSetTableOffset); - TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]); + le_int32 altIndex = glyphIterator->getFeatureParam(); - if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) { - glyphIterator->setCurrGlyphID(SWAPW(alternateSetTable->alternateArray[0])); + if (altIndex < SWAPW(alternateSetTable->glyphCount)) { + TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[altIndex]); + + if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) { + glyphIterator->setCurrGlyphID(alternate); + } + + return 1; } - - return 1; + + // feature param was out of range for the glyph + return 0; } // XXXX If we get here, the table's mal-formed... diff --git a/Build/source/libs/icu-xetex/layout/ArabicShaping.cpp b/Build/source/libs/icu-xetex/layout/ArabicShaping.cpp index 0ea6cdbfe0c..36cfd679aa9 100644 --- a/Build/source/libs/icu-xetex/layout/ArabicShaping.cpp +++ b/Build/source/libs/icu-xetex/layout/ArabicShaping.cpp @@ -167,7 +167,7 @@ void ArabicShaping::adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphS LEErrorCode success = LE_NO_ERROR; const LETag *glyphTags = (const LETag *) glyphStorage.getAuxData(outIndex, success); - glyphStorage.setAuxData(outIndex, (void *) &glyphTags[TAGS_PER_GLYPH * shapeOffset], success); + glyphStorage.setAuxData(outIndex, (void *) &glyphTags[TAGS_PER_GLYPH * shapeOffset], NULL, success); } void ArabicShaping::shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount, le_int32 charMax, @@ -232,7 +232,7 @@ void ArabicShaping::shape(const LEUnicode *chars, le_int32 offset, le_int32 char LEUnicode c = chars[in]; ShapeType t = getShapeType(c); - glyphStorage.setAuxData(out, (void *) tagArray, success); + glyphStorage.setAuxData(out, (void *) tagArray, NULL, success); if ((t & MASK_TRANSPARENT) != 0) { continue; diff --git a/Build/source/libs/icu-xetex/layout/GlyphIterator.cpp b/Build/source/libs/icu-xetex/layout/GlyphIterator.cpp index 2c96853ecc8..a68233c21d6 100644 --- a/Build/source/libs/icu-xetex/layout/GlyphIterator.cpp +++ b/Build/source/libs/icu-xetex/layout/GlyphIterator.cpp @@ -19,7 +19,7 @@ GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjus const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader) : direction(1), position(-1), nextLimit(-1), prevLimit(-1), glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments), - srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureTag(theFeatureTag), + srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureTag(theFeatureTag), featureParam(0), glyphClassDefinitionTable(NULL), markAttachClassDefinitionTable(NULL) { @@ -53,11 +53,12 @@ GlyphIterator::GlyphIterator(GlyphIterator &that) destIndex = that.destIndex; lookupFlags = that.lookupFlags; featureTag = that.featureTag; + featureParam = that.featureParam; glyphClassDefinitionTable = that.glyphClassDefinitionTable; markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; } -GlyphIterator::GlyphIterator(GlyphIterator &that, LETag newFeatureTag) +GlyphIterator::GlyphIterator(GlyphIterator &that, LETag newFeatureTag, le_int32 newFeatureParam) : glyphStorage(that.glyphStorage) { direction = that.direction; @@ -70,6 +71,7 @@ GlyphIterator::GlyphIterator(GlyphIterator &that, LETag newFeatureTag) destIndex = that.destIndex; lookupFlags = that.lookupFlags; featureTag = newFeatureTag; + featureParam = newFeatureParam; glyphClassDefinitionTable = that.glyphClassDefinitionTable; markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; } @@ -87,6 +89,7 @@ GlyphIterator::GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags) destIndex = that.destIndex; lookupFlags = newLookupFlags; featureTag = that.featureTag; + featureParam = that.featureParam; glyphClassDefinitionTable = that.glyphClassDefinitionTable; markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; } @@ -100,6 +103,7 @@ void GlyphIterator::reset(le_uint16 newLookupFlags, LETag newFeatureTag) { position = prevLimit; featureTag = newFeatureTag; + featureParam = 0; lookupFlags = newLookupFlags; } @@ -126,6 +130,11 @@ le_int32 GlyphIterator::getCurrStreamPosition() const return position; } +le_int32 GlyphIterator::getFeatureParam() const +{ + return featureParam; +} + le_bool GlyphIterator::isRightToLeft() const { return direction < 0; @@ -369,9 +378,10 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) const static const LETag emptyTag = 0; static const LETag defaultTag = 0xFFFFFFFF; -le_bool GlyphIterator::hasFeatureTag() const +le_bool GlyphIterator::hasFeatureTag() { if (featureTag == defaultTag || featureTag == emptyTag) { + featureParam = 0; return TRUE; } @@ -381,6 +391,11 @@ le_bool GlyphIterator::hasFeatureTag() const if (tagList != NULL) { for (le_int32 tag = 0; tagList[tag] != emptyTag; tag += 1) { if (tagList[tag] == featureTag) { + const le_int32 *paramList = (const le_int32 *) glyphStorage.getAuxData2(position, success); + if (paramList != NULL) + featureParam = paramList[tag]; + else + featureParam = 0; return TRUE; } } diff --git a/Build/source/libs/icu-xetex/layout/GlyphIterator.h b/Build/source/libs/icu-xetex/layout/GlyphIterator.h index 93863308d1f..677a0fe6ecb 100644 --- a/Build/source/libs/icu-xetex/layout/GlyphIterator.h +++ b/Build/source/libs/icu-xetex/layout/GlyphIterator.h @@ -28,7 +28,7 @@ public: GlyphIterator(GlyphIterator &that); - GlyphIterator(GlyphIterator &that, LETag newFeatureTag); + GlyphIterator(GlyphIterator &that, LETag newFeatureTag, le_int32 featureParam = 0); GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags); @@ -51,6 +51,8 @@ public: le_int32 getMarkComponent(le_int32 markPosition) const; le_bool findMark2Glyph(); + le_int32 getFeatureParam() const; + void getCursiveEntryPoint(LEPoint &entryPoint) const; void getCursiveExitPoint(LEPoint &exitPoint) const; @@ -72,7 +74,7 @@ public: private: le_bool filterGlyph(le_uint32 index) const; - le_bool hasFeatureTag() const; + le_bool hasFeatureTag(); le_bool nextInternal(le_uint32 delta = 1); le_bool prevInternal(le_uint32 delta = 1); @@ -87,6 +89,7 @@ private: le_int32 destIndex; le_uint16 lookupFlags; LETag featureTag; + le_int32 featureParam; const GlyphClassDefinitionTable *glyphClassDefinitionTable; const MarkAttachClassDefinitionTable *markAttachClassDefinitionTable; diff --git a/Build/source/libs/icu-xetex/layout/HanLayoutEngine.cpp b/Build/source/libs/icu-xetex/layout/HanLayoutEngine.cpp index 23b4a0b28dd..0344f35450a 100644 --- a/Build/source/libs/icu-xetex/layout/HanLayoutEngine.cpp +++ b/Build/source/libs/icu-xetex/layout/HanLayoutEngine.cpp @@ -62,7 +62,7 @@ le_int32 HanOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], l // flag from the language tag lookups, so we can use these features // with the default LangSys... for (le_int32 i = 0; i < count; i += 1) { - glyphStorage.setAuxData(i, (void *) features, success); + glyphStorage.setAuxData(i, (void *) features, NULL, success); } return count; diff --git a/Build/source/libs/icu-xetex/layout/IndicReordering.cpp b/Build/source/libs/icu-xetex/layout/IndicReordering.cpp index 663abc00545..7bae77ecb80 100644 --- a/Build/source/libs/icu-xetex/layout/IndicReordering.cpp +++ b/Build/source/libs/icu-xetex/layout/IndicReordering.cpp @@ -118,7 +118,7 @@ public: fOutChars[fOutIndex] = ch; fGlyphStorage.setCharIndex(fOutIndex, charIndex, success); - fGlyphStorage.setAuxData(fOutIndex, (void *) charTags, success); + fGlyphStorage.setAuxData(fOutIndex, (void *) charTags, NULL, success); fOutIndex += 1; } diff --git a/Build/source/libs/icu-xetex/layout/KhmerReordering.cpp b/Build/source/libs/icu-xetex/layout/KhmerReordering.cpp index 41c56322594..8d1045569a2 100644 --- a/Build/source/libs/icu-xetex/layout/KhmerReordering.cpp +++ b/Build/source/libs/icu-xetex/layout/KhmerReordering.cpp @@ -150,7 +150,7 @@ public: fOutChars[fOutIndex] = ch; fGlyphStorage.setCharIndex(fOutIndex, charIndex, success); - fGlyphStorage.setAuxData(fOutIndex, (void *) charTags, success); + fGlyphStorage.setAuxData(fOutIndex, (void *) charTags, NULL, success); fOutIndex += 1; } diff --git a/Build/source/libs/icu-xetex/layout/LEGlyphStorage.cpp b/Build/source/libs/icu-xetex/layout/LEGlyphStorage.cpp index 7cffc732216..55cbbbfcb21 100644 --- a/Build/source/libs/icu-xetex/layout/LEGlyphStorage.cpp +++ b/Build/source/libs/icu-xetex/layout/LEGlyphStorage.cpp @@ -15,7 +15,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEGlyphStorage) LEGlyphStorage::LEGlyphStorage() : fGlyphCount(0), fGlyphs(NULL), fCharIndices(NULL), fPositions(NULL), - fAuxData(NULL), fInsertionList(NULL), fSrcIndex(0), fDestIndex(0) + fAuxData(NULL), fAuxParam(NULL), fInsertionList(NULL), fSrcIndex(0), fDestIndex(0) { // nothing else to do! } @@ -38,6 +38,10 @@ void LEGlyphStorage::reset() LE_DELETE_ARRAY(fAuxData); fAuxData = NULL; } + if (fAuxParam != NULL) { + LE_DELETE_ARRAY(fAuxParam); + fAuxParam = NULL; + } if (fInsertionList != NULL) { delete fInsertionList; @@ -136,8 +140,9 @@ le_int32 LEGlyphStorage::allocateAuxData(LEErrorCode &success) } fAuxData = LE_NEW_ARRAY(void *, fGlyphCount); + fAuxParam = LE_NEW_ARRAY(void *, fGlyphCount); - if (fAuxData == NULL) { + if (fAuxData == NULL || fAuxParam == NULL) { success = LE_MEMORY_ALLOCATION_ERROR; return -1; } @@ -344,13 +349,32 @@ void *LEGlyphStorage::getAuxData(le_int32 glyphIndex, LEErrorCode &success) cons return fAuxData[glyphIndex]; } -void LEGlyphStorage::setAuxData(le_int32 glyphIndex, void *auxData, LEErrorCode &success) +void *LEGlyphStorage::getAuxData2(le_int32 glyphIndex, LEErrorCode &success) const +{ + if (LE_FAILURE(success)) { + return NULL; + } + + if (fAuxParam == NULL) { + success = LE_NO_LAYOUT_ERROR; + return NULL; + } + + if (glyphIndex < 0 || glyphIndex >= fGlyphCount) { + success = LE_INDEX_OUT_OF_BOUNDS_ERROR; + return NULL; + } + + return fAuxParam[glyphIndex]; +} + +void LEGlyphStorage::setAuxData(le_int32 glyphIndex, void *auxData, void *auxParam, LEErrorCode &success) { if (LE_FAILURE(success)) { return; } - if (fAuxData == NULL) { + if (fAuxData == NULL || fAuxParam == NULL) { success = LE_NO_LAYOUT_ERROR; return; } @@ -361,6 +385,7 @@ void LEGlyphStorage::setAuxData(le_int32 glyphIndex, void *auxData, LEErrorCode } fAuxData[glyphIndex] = auxData; + fAuxParam[glyphIndex] = auxParam; } void LEGlyphStorage::getGlyphPositions(float positions[], LEErrorCode &success) const @@ -469,14 +494,19 @@ void LEGlyphStorage::adoptPositionArray(LEGlyphStorage &from) from.fPositions = NULL; } -void LEGlyphStorage::adoptAuxDataArray(LEGlyphStorage &from) +void LEGlyphStorage::adoptAuxDataArrays(LEGlyphStorage &from) { if (fAuxData != NULL) { LE_DELETE_ARRAY(fAuxData); } + if (fAuxParam != NULL) { + LE_DELETE_ARRAY(fAuxParam); + } fAuxData = from.fAuxData; from.fAuxData = NULL; + fAuxParam = from.fAuxParam; + from.fAuxParam = NULL; } void LEGlyphStorage::adoptGlyphCount(LEGlyphStorage &from) @@ -511,6 +541,9 @@ le_int32 LEGlyphStorage::applyInsertions() if (fAuxData != NULL) { fAuxData = (void **) LE_GROW_ARRAY(fAuxData, newGlyphCount); } + if (fAuxParam != NULL) { + fAuxParam = (void **) LE_GROW_ARRAY(fAuxParam, newGlyphCount); + } fSrcIndex = fGlyphCount - 1; fDestIndex = newGlyphCount - 1; @@ -564,6 +597,18 @@ le_bool LEGlyphStorage::applyInsertion(le_int32 atPosition, le_int32 count, LEGl } } + if (fAuxParam != NULL) { + le_int32 src = fSrcIndex, dest = fDestIndex; + + while (src > atPosition) { + fAuxParam[dest--] = fAuxParam[src--]; + } + + for (le_int32 i = count - 1; i >= 0; i -= 1) { + fAuxParam[dest--] = fAuxParam[atPosition]; + } + } + while (fSrcIndex > atPosition) { fGlyphs[fDestIndex] = fGlyphs[fSrcIndex]; fCharIndices[fDestIndex] = fCharIndices[fSrcIndex]; diff --git a/Build/source/libs/icu-xetex/layout/LEGlyphStorage.h b/Build/source/libs/icu-xetex/layout/LEGlyphStorage.h index 845ff12146f..34e3f3df93b 100644 --- a/Build/source/libs/icu-xetex/layout/LEGlyphStorage.h +++ b/Build/source/libs/icu-xetex/layout/LEGlyphStorage.h @@ -63,11 +63,12 @@ private: float *fPositions; /** - * The auxillary data array. + * The auxiliary data arrays. * * @internal */ void **fAuxData; + void **fAuxParam; /** @@ -295,6 +296,7 @@ public: * @draft ICU 3.0 */ void *getAuxData(le_int32 glyphIndex, LEErrorCode &success) const; + void *getAuxData2(le_int32 glyphIndex, LEErrorCode &success) const; /** * This operator allows direct access to the glyph array @@ -387,15 +389,16 @@ public: void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust, LEErrorCode &success); /** - * Set the auxillary data for a particular glyph. + * Set the auxiliary data for a particular glyph. * * @param glyphIndex the index of the glyph - * @param auxData the new auxillary data - * @param success will be set to an error code if the auxillary data cannot be set. + * @param auxData the new auxiliary data + * @param auxParam the new secondary auxiliary data (parameter) + * @param success will be set to an error code if the auxiliary data cannot be set. * * @draft ICU 3.0 */ - void setAuxData(le_int32 glyphIndex, void *auxData, LEErrorCode &success); + void setAuxData(le_int32 glyphIndex, void *auxData, void *auxParam, LEErrorCode &success); /** * Delete the glyph array and replace it with the one @@ -443,7 +446,7 @@ public: * * @draft ICU 3.0 */ - void adoptAuxDataArray(LEGlyphStorage &from); + void adoptAuxDataArrays(LEGlyphStorage &from); /** * Change the glyph count of this object to be the same diff --git a/Build/source/libs/icu-xetex/layout/LayoutEngine.cpp b/Build/source/libs/icu-xetex/layout/LayoutEngine.cpp index eff598cf280..3bfb6c9d96b 100644 --- a/Build/source/libs/icu-xetex/layout/LayoutEngine.cpp +++ b/Build/source/libs/icu-xetex/layout/LayoutEngine.cpp @@ -211,7 +211,7 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off for (i = 0; i < count; i += 1, out += dir) { glyphStorage[out] = (LEGlyphID) inChars[i]; - glyphStorage.setAuxData(out, (void *) canonFeatures, success); + glyphStorage.setAuxData(out, (void *) canonFeatures, NULL, success); } if (reordered != NULL) { diff --git a/Build/source/libs/icu-xetex/layout/OpenTypeLayoutEngine.cpp b/Build/source/libs/icu-xetex/layout/OpenTypeLayoutEngine.cpp index 6df05c19312..2d1e3dde84a 100644 --- a/Build/source/libs/icu-xetex/layout/OpenTypeLayoutEngine.cpp +++ b/Build/source/libs/icu-xetex/layout/OpenTypeLayoutEngine.cpp @@ -57,7 +57,8 @@ static const LETag kernAndLigaFeatures[] = {ccmpFeatureTag, loclFeatureTag, liga OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable) - : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags), fFeatureList(minimalFeatures), fFeatureOrder(NULL), + : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags), + fFeatureList(minimalFeatures), fFeatureParamList(NULL), fFeatureOrder(NULL), fGSUBTable(gsubTable), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL) { static const le_uint32 gdefTableTag = LE_GDEF_TABLE_TAG; @@ -148,9 +149,8 @@ le_int32 OpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_i glyphStorage.allocateGlyphArray(outCharCount, rightToLeft, success); glyphStorage.allocateAuxData(success); - for (le_int32 i = 0; i < outCharCount; i += 1) { - glyphStorage.setAuxData(i, (void *) fFeatureList, success); + glyphStorage.setAuxData(i, (void *) fFeatureList, (void *) fFeatureParamList, success); } return outCharCount; @@ -191,7 +191,7 @@ le_int32 OpenTypeLayoutEngine::glyphPostProcessing(LEGlyphStorage &tempGlyphStor glyphStorage.adoptGlyphArray(tempGlyphStorage); glyphStorage.adoptCharIndicesArray(tempGlyphStorage); - glyphStorage.adoptAuxDataArray(tempGlyphStorage); + glyphStorage.adoptAuxDataArrays(tempGlyphStorage); glyphStorage.adoptGlyphCount(tempGlyphStorage); return glyphStorage.getGlyphCount(); diff --git a/Build/source/libs/icu-xetex/layout/OpenTypeLayoutEngine.h b/Build/source/libs/icu-xetex/layout/OpenTypeLayoutEngine.h index fd6dfac2b23..6f9d4839f5b 100644 --- a/Build/source/libs/icu-xetex/layout/OpenTypeLayoutEngine.h +++ b/Build/source/libs/icu-xetex/layout/OpenTypeLayoutEngine.h @@ -151,6 +151,7 @@ protected: * @internal */ const LETag *fFeatureList; + const le_int32 *fFeatureParamList; /** * A list of tags in the order in which the features in diff --git a/Build/source/libs/icu-xetex/layout/PairPositioningSubtables.cpp b/Build/source/libs/icu-xetex/layout/PairPositioningSubtables.cpp index 6994b9aeace..e9b2c7c76b0 100644 --- a/Build/source/libs/icu-xetex/layout/PairPositioningSubtables.cpp +++ b/Build/source/libs/icu-xetex/layout/PairPositioningSubtables.cpp @@ -48,14 +48,14 @@ le_uint32 PairPositioningFormat1Subtable::process(GlyphIterator *glyphIterator, le_int32 coverageIndex = getGlyphCoverage(firstGlyph); GlyphIterator tempIterator(*glyphIterator); - if (coverageIndex >= 0 && glyphIterator->next()) { + if (coverageIndex >= 0 && tempIterator.next()) { Offset pairSetTableOffset = SWAPW(pairSetTableOffsetArray[coverageIndex]); PairSetTable *pairSetTable = (PairSetTable *) ((char *) this + pairSetTableOffset); le_uint16 pairValueCount = SWAPW(pairSetTable->pairValueCount); le_int16 valueRecord1Size = ValueRecord::getSize(SWAPW(valueFormat1)); le_int16 valueRecord2Size = ValueRecord::getSize(SWAPW(valueFormat2)); le_int16 recordSize = sizeof(PairValueRecord) - sizeof(ValueRecord) + valueRecord1Size + valueRecord2Size; - LEGlyphID secondGlyph = glyphIterator->getCurrGlyphID(); + LEGlyphID secondGlyph = tempIterator.getCurrGlyphID(); const PairValueRecord *pairValueRecord = NULL; if (pairValueCount != 0) { @@ -67,16 +67,16 @@ le_uint32 PairPositioningFormat1Subtable::process(GlyphIterator *glyphIterator, } if (valueFormat1 != 0) { - pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance); + pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, *glyphIterator, fontInstance); } if (valueFormat2 != 0) { const ValueRecord *valueRecord2 = (const ValueRecord *) ((char *) &pairValueRecord->valueRecord1 + valueRecord1Size); - valueRecord2->adjustPosition(SWAPW(valueFormat2), (char *) this, *glyphIterator, fontInstance); + valueRecord2->adjustPosition(SWAPW(valueFormat2), (char *) this, tempIterator, fontInstance); } - return 0; + return 1; } return 0; @@ -88,8 +88,8 @@ le_uint32 PairPositioningFormat2Subtable::process(GlyphIterator *glyphIterator, le_int32 coverageIndex = getGlyphCoverage(firstGlyph); GlyphIterator tempIterator(*glyphIterator); - if (coverageIndex >= 0 && glyphIterator->next()) { - LEGlyphID secondGlyph = glyphIterator->getCurrGlyphID(); + if (coverageIndex >= 0 && tempIterator.next()) { + LEGlyphID secondGlyph = tempIterator.getCurrGlyphID(); const ClassDefinitionTable *classDef1 = (const ClassDefinitionTable *) ((char *) this + SWAPW(classDef1Offset)); const ClassDefinitionTable *classDef2 = (const ClassDefinitionTable *) ((char *) this + SWAPW(classDef2Offset)); le_int32 class1 = classDef1->getGlyphClass(firstGlyph); @@ -103,16 +103,16 @@ le_uint32 PairPositioningFormat2Subtable::process(GlyphIterator *glyphIterator, if (valueFormat1 != 0) { - class2Record->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance); + class2Record->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, *glyphIterator, fontInstance); } if (valueFormat2 != 0) { const ValueRecord *valueRecord2 = (const ValueRecord *) ((char *) &class2Record->valueRecord1 + valueRecord1Size); - valueRecord2->adjustPosition(SWAPW(valueFormat2), (const char *) this, *glyphIterator, fontInstance); + valueRecord2->adjustPosition(SWAPW(valueFormat2), (const char *) this, tempIterator, fontInstance); } - return 0; + return 1; } return 0; |