def process(self, processed, glyphRecords, featureTag):
        performedSub = False
        currentRecord = glyphRecords[0]
        currentGlyph = currentRecord.glyphName
        lookupFlag = self._lookup().LookupFlag
        if currentGlyph in self.Coverage:
            if not lookupFlag.coversGlyph(currentGlyph):
                while not performedSub:
                    coverageIndex = self.Coverage.index(currentGlyph)
                    ligatureSet = self.LigatureSet[coverageIndex]
                    for ligature in ligatureSet.Ligature:
                        component = ligature.Component
                        componentCount = ligature.CompCount
                        currentComponentIndex = 0
                        matchedRecordIndexes = set()
                        lastWasMatch = False
                        for index, glyphRecord in enumerate(glyphRecords[1:]):
                            glyphName = glyphRecord.glyphName
                            if not lookupFlag.coversGlyph(glyphName):
                                if not glyphName == component[currentComponentIndex]:
                                    lastWasMatch = False
                                    break
                                else:
                                    lastWasMatch = True
                                    matchedRecordIndexes.add(index)
                                    currentComponentIndex += 1
                                    if currentComponentIndex == componentCount - 1:
                                        break
                        if lastWasMatch and currentComponentIndex == componentCount - 1:
                            performedSub = True
                            currentRecord.saveState([currentGlyph] + ligature.Component)
                            currentRecord.glyphName = ligature.LigGlyph
                            currentRecord.ligatureComponents = [currentGlyph] + ligature.Component
                            processed.append(currentRecord)
                            glyphRecords = [record for index, record in enumerate(glyphRecords[1:]) if index not in matchedRecordIndexes]
                            break
                    break
        return processed, glyphRecords, performedSub
dataset/ETHPy150Open typesupply/compositor/Lib/compositor/subTablesGSUB.py/GSUBLookupType4.process/original