Add option ignoreGlyphsWithoutContours to AdjustWidth.py RF script
This commit is contained in:
parent
f5859654a9
commit
ded5391359
1 changed files with 5 additions and 3 deletions
|
|
@ -7,6 +7,7 @@ from math import ceil, floor
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
font = CurrentFont()
|
font = CurrentFont()
|
||||||
|
ignoreGlyphsWithoutContours = True # like spaces
|
||||||
print "Resizing glyph margins for %r" % font
|
print "Resizing glyph margins for %r" % font
|
||||||
|
|
||||||
# how much to add or remove from each glyph's margin
|
# how much to add or remove from each glyph's margin
|
||||||
|
|
@ -24,9 +25,10 @@ if __name__ == "__main__":
|
||||||
ignored.append((g.name, 'zero-width'))
|
ignored.append((g.name, 'zero-width'))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# if g.box is None:
|
if ignoreGlyphsWithoutContours and g.box is None:
|
||||||
# print '"%s": ["ignore", "empty"],' % (g.name)
|
# print '"%s": ["ignore", "empty"],' % (g.name)
|
||||||
# continue
|
ignored.append((g.name, 'empty'))
|
||||||
|
continue
|
||||||
|
|
||||||
# skip glyphs
|
# skip glyphs
|
||||||
#if g.name in ('c', 'e', 'o', 'r', 'j'):
|
#if g.name in ('c', 'e', 'o', 'r', 'j'):
|
||||||
|
|
|
||||||
Reference in a new issue