Don't read GlyphConstructions.txt but rather robofab.tools.glyphConstruction.
git-svn-id: http://svn.robofab.com/trunk@65 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
parent
8bd5dcb7e7
commit
b849ad8d8e
@ -41,13 +41,10 @@ def setFoundrySetting(key, value, dstPath):
|
||||
writeFoundrySettings(d, dstPath)
|
||||
|
||||
def readGlyphConstructions():
|
||||
"""read GlyphConstruction.txt and turn it into a dict"""
|
||||
dataDir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(robofab.__file__))), 'Data')
|
||||
glyphConstructions={}
|
||||
filePath = os.path.join(dataDir, 'GlyphConstruction.txt')
|
||||
f = open(filePath, 'rb')
|
||||
data = f.read().replace('\r', '\n').split('\n')
|
||||
f.close()
|
||||
"""read GlyphConstruction and turn it into a dict"""
|
||||
from robofab.tools.glyphConstruction import _glyphConstruction
|
||||
data = _glyphConstruction.split("\n")
|
||||
glyphConstructions = {}
|
||||
for i in data:
|
||||
if len(i) == 0: continue
|
||||
if i[0] != '#':
|
||||
@ -166,3 +163,8 @@ def fontToUFO(src, dst, fileType=None):
|
||||
elif fileType == "Type 1":
|
||||
info = extractT1FontInfo(font)
|
||||
ufoWriter.writeInfo(info)
|
||||
|
||||
if __name__ == "__main__":
|
||||
print readGlyphConstructions()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user