fonttools/Scripts/RoboFabIntro/demo_CorrectDirection.py
Erik van Blokland 617945dcf1 The scripts folder for FontLab as they shipped with Fab 1.1.1.
git-svn-id: http://svn.robofab.com/trunk@22 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-16 08:14:00 +00:00

14 lines
353 B
Python

"""Correct contour direction for all glyphs in the font"""
from robofab.world import OpenFont
from robofab.interface.all.dialogs import ProgressBar
font = OpenFont()
bar = ProgressBar('Correcting contour direction...', len(font))
for glyph in font:
bar.label(glyph.name)
glyph.correctDirection()
glyph.update()
bar.tick()
font.update()
bar.close()