Skip to content

Instantly share code, notes, and snippets.

@ryanbugden
Last active July 23, 2020 20:27
Show Gist options
  • Save ryanbugden/9747cdb41a5f0e27b63f4df876ff16f7 to your computer and use it in GitHub Desktop.
Save ryanbugden/9747cdb41a5f0e27b63f4df876ff16f7 to your computer and use it in GitHub Desktop.
Add sample text into Space Center. Run this script. Any glyphs that don't exist in the font will be highlighted red. Draw them!
# menuTitle : Mark Undrawn Glyphs from SC Red
from mojo.UI import CurrentSpaceCenter
from glyphNameFormatter.tools import charToUnicode
f, csc = CurrentFont(), CurrentSpaceCenter()
text = csc.getRaw()
color = (1, 0, 0, 1) #red
for letter in text:
g_name = f.getCharacterMapping()[charToUnicode(letter)][0]
if g_name not in f:
f[g_name].markColor = color
elif f[g_name].contours == ():
if not "space" in g_name:
f[g_name].markColor = color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment