def _testHeaderTotalSFNTSize(data, reporter):
    header = unpackHeader(data)
    directory = unpackDirectory(data)
    totalSfntSize = header["totalSfntSize"]
    isValid = True
    if totalSfntSize % 4:
        reporter.logError(message="The total sfnt size (%d) is not a multiple of four." % totalSfntSize)
        isValid = False
    else:
        numTables = header["numTables"]
        requiredSize = sfntHeaderSize + (numTables * sfntDirectoryEntrySize)
        for table in directory:
            origLength = table["origLength"]
            if origLength % 4:
                origLength += 4 - (origLength % 4)
            requiredSize += origLength
        if totalSfntSize != requiredSize:
            reporter.logError(message="The total sfnt size (%d) does not match the required sfnt size (%d)." % (totalSfntSize, requiredSize))
            isValid = False
    if isValid:
        reporter.logPass(message="The total sfnt size is valid.")
Registers the listener for the Widget.onmousemove event.
dataset/ETHPy150Open typesupply/woffTools/Lib/woffTools/tools/validate.py/_testHeaderTotalSFNTSize--crossover with--dataset/ETHPy150Open dddomodossola/remi/remi/gui.py/Widget.set_on_mousemove_listener