From 1fbdd27fd4832645b44c726778817118d891d66f Mon Sep 17 00:00:00 2001 From: Roozbeh Pournader Date: Thu, 24 Jul 2014 19:10:48 -0700 Subject: Use the recommended way to access glyf table in force_ymin_ymax. --- scripts/force_yminmax.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/force_yminmax.py') diff --git a/scripts/force_yminmax.py b/scripts/force_yminmax.py index 5644fe4..bfee9f4 100755 --- a/scripts/force_yminmax.py +++ b/scripts/force_yminmax.py @@ -9,8 +9,9 @@ from fontTools import ttLib def output_protruding_glyphs(font, ymin, ymax, file_name): """Outputs all glyphs going outside the specified vertical range.""" protruding_glyphs = [] - glyph_dict = font['glyf'].glyphs - for glyph_name, glyph in glyph_dict.items(): + glyf_table = font['glyf'] + for glyph_name in glyf_table.keys(): + glyph = glyf_table[glyph_name] if glyph.numberOfContours == 0: continue if glyph.yMin < ymin or glyph.yMax > ymax: -- cgit v1.2.3