def METHOD_NAME(ttf):
    try:
        glyph_count = len(ttf.getGlyphOrder())
        unicode_cmaps = (t.cmap.keys() for t in ttf['cmap'].tables if t.isUnicode())
        unique_codepoints = functools.reduce(lambda acc, u: acc | u, unicode_cmaps, set())
        return {
            'num_cmap_codepoints': len(unique_codepoints),
            'num_glyphs': glyph_count
        }
    except Exception:
        logging.exception('Error reading codepoint and glyph count')
    return None