Last active
August 29, 2015 14:02
-
-
Save line0/e9eb1424c4366fb52632 to your computer and use it in GitHub Desktop.
Fontlab Macro: copy glyph selection into 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 | |
glyphs = fl.font.glyphs | |
sel = [] | |
for i in range(len(glyphs)): | |
if fl.Selected(i): | |
sel.append({'name':glyphs[i].name, 'unicode':glyphs[i].unicode}) | |
tk.withdraw() | |
tk.clipboard_clear() | |
tk.clipboard_append(json.dumps(sel)) | |
tk.destroy() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment