fix issue with misc/tools/fontinfo.py caused by the wonky FontBakery-enforced version format

This commit is contained in:
Rasmus Andersson 2019-03-31 19:38:23 -07:00
parent 4a575d2edc
commit b5153bc828
2 changed files with 4 additions and 1 deletions

View file

@ -118,6 +118,6 @@
"underlinePosition": -464,
"underlineThickness": 192
},
"version": "Version"
"version": "3.4"
}
]

View file

@ -298,6 +298,9 @@ def genFontInfo(fontpath, outputType, withGlyphs=True):
v = re.split(r'[\s;]+', version)
if v and len(v) > 0:
version = v[0]
if version.lower() == 'version':
version = v[1]
version = '.'.join([str(int(v)) for v in version.split('.')])
info['version'] = version
if outputType is not OUTPUT_TYPE_GLYPHLIST: