How to use the afdko.ufotools.checkHashMaps function in afdko

To help you get started, we’ve selected a few afdko examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adobe-type-tools / afdko / python / afdko / makeotf.py View on Github external
needsConversion = False
    needsSEACRemoval = False
    isTextPS = False

    input_font_format = fdkutils.get_font_format(filePath)

    if not input_font_format:
        print("makeotf [Error] Unknown input font format '%s'" % filePath)
        raise MakeOTFRunError

    if input_font_format == 'UFO':
        needsConversion = True
        makeOTFParams.srcIsUFO = 1

        allMatch, msgList = ufotools.checkHashMaps(filePath, False)
        if not allMatch:
            for msg in msgList:
                print(msg)
            raise MakeOTFShellError

    elif input_font_format == 'OTF':
        needsConversion = True

    elif input_font_format == 'TTF':
        needsConversion = True
        makeOTFParams.srcIsTTF = 1

    # it's a PostScript font
    else:
        try:
            with open(filePath, "rb") as fp: