Created
July 20, 2020 21:24
-
-
Save ryanbugden/fafc973774496fdbfea46e92c3fbacc9 to your computer and use it in GitHub Desktop.
Script that goes through each glyph in the current font and—based on its unicode—sets its name according to AGL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# menuTitle : Make All Glyph Names Human Readable | |
from lib.tools.unicodeTools import GN2UV | |
def get_key(val, di): | |
for key, value in di.items(): | |
if val == value: | |
return key | |
f = CurrentFont() | |
for g in f: | |
if g.unicode in GN2UV.values(): | |
g.name = str(get_key(g.unicode, GN2UV)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment