def get_name_records(font):
    name_table = font['name']
    names = {}
    for record in name_table.names:
        name_ids = (record.platformID, record.platEncID, record.langID)
        if name_ids != (3, 1, 0x409):
            continue
        names[record.nameID] = unicode(record.string, 'UTF-16BE')
    return names
Get a font's 'name' table records as a dictionary of Unicode strings.
dataset/ETHPy150Open googlei18n/nototools/nototools/font_data.py/get_name_records