diff options
author | Rasmus Andersson <rasmus@notion.se> | 2018-09-04 02:59:23 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2018-09-04 02:59:23 +0300 |
commit | 11435926ba33c024670acbfdc7bb35d1991ef614 (patch) | |
tree | cb600c712b26c92a52a2128fcea65ed0b5217390 | |
parent | 4cba11837bf7e36d4565d0a9089a498532e6e5a5 (diff) | |
download | inter-11435926ba33c024670acbfdc7bb35d1991ef614.tar.xz |
upgrade misc/tools/fontinfo.py
-rwxr-xr-x | misc/tools/fontinfo.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/misc/tools/fontinfo.py b/misc/tools/fontinfo.py index 0f406a14d..5accc5498 100755 --- a/misc/tools/fontinfo.py +++ b/misc/tools/fontinfo.py @@ -3,8 +3,13 @@ # # Generates JSON-encoded information about fonts # -import os -import sys +from __future__ import print_function + +import os, sys +from os.path import dirname, basename, abspath, relpath, join as pjoin +sys.path.append(abspath(pjoin(dirname(__file__), 'tools'))) +import common # for the side effeects + import argparse import json import re @@ -272,7 +277,7 @@ def genFontInfo(fontpath, outputType, withGlyphs=True): } # for tableName in tt.keys(): - # print 'table', tableName + # print('table', tableName) nameDict = {} if 'name' in tt: @@ -394,7 +399,7 @@ def genFontInfo(fontpath, outputType, withGlyphs=True): addCFFFontInfo(tt, info, cffTable) elif glyphsType is GLYPHS_TYPE_TT: glyphsTable = tt["glyf"] - # print 'glyphs type:', glyphsType, 'flavor:', tt.flavor, 'sfntVersion:', tt.sfntVersion + # print('glyphs type:', glyphsType, 'flavor:', tt.flavor, 'sfntVersion:', tt.sfntVersion) if (withGlyphs is not False or outputType is OUTPUT_TYPE_GLYPHLIST) and withGlyphs is not '': info['glyphs'] = genGlyphsInfo(tt, outputType, glyphsType, glyphsTable, withGlyphs) |