Print with unicode names

How to print glyphs with unicode names? It will be very helpful for proofreading of scripts who has hundred or thousand of glyphs.

Do you mean print in the Macro Panel or print the characters themselves in an A4 (for instance)?

Either ways, here’s a small script that both prints in the macro panel and opens a new tab. Hope this is helpful.

# Cleaning the Macro Panel
Glyphs.clearLog()

# Font
f = Glyphs.font

# Empty string in which we are going to append the list of glyphs with Unicode
glyphsWithUnicode = ""

# Looping through the whole set of glyphs in the font
for glyph in f.glyphs:

    # Checking if that glyph has a Unicode value
    if glyph.unicode != None:
        # Printing the glyph with Unicode
        print(glyph.name, "has Unicode:", glyph.unicode)
        # Appending the glyph with Unicode
        glyphsWithUnicode += glyph.string

    # If it doesn't have Unicode
    else:
        print(glyph.name, "doesn't have Unicode")

# Opening a new tab in the font with the characters with Unicode values
f.newTab(glyphsWithUnicode)

Thanks Ricard.
I want to print selected glyphs with unicode named in PDF or through laser printer. How do I use your script?

Ok so, with your file open, copy the script in the Macro Panel (in the upper bar Window > Macro Panel) and click Run at bottom right. This will open a new tab with the characters in your file that have Unicode values.

From then, you could print the current tab or generate a .pdf out of it in the printing dialog.

Hope that helps!

It does not work. I can’t get a print with unicode names under every glyph. I want to have a print like below, but not using print screen…

Cmd-P in Font View does not work? Which version of macOS and the app do you have?

Thanks Rainer & Ricard, I have figure it out!

1 Like

非常棒!!!

1 Like