Created
May 30, 2014 18:13
-
-
Save line0/d7008b2f31cef3610ea7 to your computer and use it in GitHub Desktop.
Fontlab Macro: paste glyph selection from clipboard
This file contains hidden or 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
from Tkinter import Tk | |
tk = Tk() | |
import json | |
tk.withdraw() | |
sel = json.loads(tk.clipboard_get()) | |
tk.destroy() | |
glyphs = fl.font.glyphs | |
fl.Unselect() | |
for glyph in filter(lambda x: x.name in (y["name"] for y in sel) or | |
(x.unicode is not None and any(uni in x.unicodes for uni in (y["unicode"] for y in sel))), | |
glyphs): | |
fl.Select(glyph.index, True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment