def output_protruding_glyphs(font, ymin, ymax):
 protruding_glyphs = []
 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)):
   protruding_glyphs.append(glyph_name)
 if protruding_glyphs:
  print ('Protruding glyphs in %s:' % font_data.font_name(font)),
  print ', '.join(sorted(protruding_glyphs))

def output_protruding_glyphs ( font , ymin , ymax ) : protruding_glyphs = [ ] 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 ) ) : protruding_glyphs . append ( glyph_name ) if protruding_glyphs : print ( 'Protruding glyphs in %s:' % font_data . font_name ( font ) ) , print ', ' . join ( sorted ( protruding_glyphs ) )
outputs all glyphs going outside the specified vertical range .