Erik van Blokland 3646055ea2 initial import
git-svn-id: http://svn.robofab.com/trunk@1 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-07 17:40:34 +00:00

20 lines
489 B
Python
Executable File

from robofab.world import CurrentFont
myFont = CurrentFont()
myflFont = fl.font
myEncoding = myflFont.encoding
myList = [""] * len(myEncoding)
print ""
for myGlyph in myFont:
myGlyphname = myGlyph.name
myIndex = myEncoding.FindName(myGlyphname)
if myIndex is not -1:
myList[myIndex] = myGlyph.unicode
for myItem in range (0, len(myList)):
if myList[myItem] is not "":
myHex = hex(myItem)[-2:]
myHex = myHex.replace("x", "0")
print "\u" + str(myList[myItem]) + "\\'" + myHex