print errors to stderr

This commit is contained in:
reujab 2017-07-27 18:25:42 -04:00
parent f2b36427af
commit 8cdcf2ef02

View file

@ -71,8 +71,8 @@ actualVersion = int(fontforge.version())
# versions tested: 20150612, 20150824
if actualVersion < minimumVersion:
print("{}: You seem to be using an unsupported (old) version of fontforge: {}".format(projectName, actualVersion))
print("{}: Please use at least version: {}".format(projectName, minimumVersion))
sys.stderr.write("{}: You seem to be using an unsupported (old) version of fontforge: {}\n".format(projectName, actualVersion))
sys.stderr.write("{}: Please use at least version: {}\n".format(projectName, minimumVersion))
sys.exit(1)
verboseAdditionalFontNameSuffix = " " + projectNameSingular
@ -151,7 +151,7 @@ try:
# now we have the correct item:
subFamily = sourceFont.sfnt_names[subFamilyTupleIndex][sfntNamesStringIDIndex]
except IndexError:
print("{}: Could not find 'SubFamily' for given font, falling back to parsed fontname".format(projectName))
sys.stderr.write("{}: Could not find 'SubFamily' for given font, falling back to parsed fontname\n".format(projectName))
subFamily = fallbackStyle
# some fonts have inaccurate 'SubFamily', if it is Regular let us trust the filename more: