1
0
mirror of https://github.com/google/fonts.git synced 2024-11-24 01:37:48 +03:00

Minor tools updates

This commit is contained in:
Rod Sheeter 2016-04-08 07:50:24 -07:00
parent 4a99a06496
commit 86327873b9
3 changed files with 5 additions and 4 deletions

View File

@ -24,6 +24,7 @@ flags.DEFINE_integer('min_pct_ext', 10,
def _FileFamilyStyleWeights(fontdir):
"""Extracts file, family, style, weight 4-tuples for each font in dir.

View File

@ -296,13 +296,13 @@ def _CheckFontOS2Values(path, font, ttf):
font_file, expected_style, expected_weight, marked_oblique),
full_font_file, _FixFsSelectionBit('OBLIQUE', expect_oblique)))
# For weight < 300, just confirm 250<weight<300
# For weight < 300, just confirm weight [250, 300)
# TODO(user): we should also verify ordering is correct
weight_ok = expected_weight == actual_weight
weight_msg = str(expected_weight)
if expected_weight < 300:
weight_ok = actual_weight > 250 and actual_weight < 300
weight_msg = '(250, 300)'
weight_ok = actual_weight >= 250 and actual_weight < 300
weight_msg = '[250, 300)'
results.append(ResultMessageTuple(
weight_ok,

View File

@ -8,7 +8,6 @@ import gflags as flags
FLAGS = flags.FLAGS
flags.DEFINE_string('nam_file', None, 'Location of nam file')
flags.MarkFlagAsRequired('nam_file')
def main(_):
@ -26,4 +25,5 @@ def _ReformatLine(line):
return line
if __name__ == '__main__':
flags.MarkFlagAsRequired('nam_file')
app.run()