From ded53913598880d8cb957430cd719ae290d94d73 Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Fri, 16 Feb 2018 22:44:20 -0800 Subject: Add option ignoreGlyphsWithoutContours to AdjustWidth.py RF script --- misc/rf-scripts/AdjustWidth.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'misc') diff --git a/misc/rf-scripts/AdjustWidth.py b/misc/rf-scripts/AdjustWidth.py index fdb188c8f..beee877c8 100644 --- a/misc/rf-scripts/AdjustWidth.py +++ b/misc/rf-scripts/AdjustWidth.py @@ -7,6 +7,7 @@ from math import ceil, floor if __name__ == "__main__": font = CurrentFont() + ignoreGlyphsWithoutContours = True # like spaces print "Resizing glyph margins for %r" % font # how much to add or remove from each glyph's margin @@ -24,9 +25,10 @@ if __name__ == "__main__": ignored.append((g.name, 'zero-width')) continue - # if g.box is None: - # print '"%s": ["ignore", "empty"],' % (g.name) - # continue + if ignoreGlyphsWithoutContours and g.box is None: + # print '"%s": ["ignore", "empty"],' % (g.name) + ignored.append((g.name, 'empty')) + continue # skip glyphs #if g.name in ('c', 'e', 'o', 'r', 'j'): -- cgit v1.2.3