Home | History | Annotate | Download | only in fontTools

Lines Matching refs:afm

1 """Module for reading and writing AFM files."""
3 # XXX reads AFM's generated by Fog, not tested with much else.
5 # File Format Specification). Still, it should read most "common" AFM files.
84 class AFM(object):
117 raise error("syntax error in AFM file: " + repr(line))
136 raise error("syntax error in AFM file: " + repr(rest))
148 raise error("syntax error in AFM file: " + repr(rest))
173 raise error("syntax error in AFM file: " + repr(rest))
181 raise error("syntax error in AFM file: " + repr(rest))
289 # all attrs *not* starting with "_" are consider to be AFM keywords
296 # all attrs *not* starting with "_" are consider to be AFM keywords
334 return '<AFM object for %s>' % self.FullName
336 return '<AFM object at %x>' % id(self)
353 afm = AFM(path)
355 if afm.has_char(char):
356 print(afm[char]) # print charnum, width and boundingbox
358 if afm.has_kernpair(pair):
359 print(afm[pair]) # print kerning value for pair
360 print(afm.Version) # various other afm entries have become attributes
361 print(afm.Weight)
362 # afm.comments() returns a list of all Comment lines found in the AFM
363 print(afm.comments())
364 #print afm.chars()
365 #print afm.kernpairs()
366 print(afm)
367 afm.write(path + ".muck")