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.
83 class AFM(object):
116 raise error("syntax error in AFM file: " + repr(line))
135 raise error("syntax error in AFM file: " + repr(rest))
147 raise error("syntax error in AFM file: " + repr(rest))
172 raise error("syntax error in AFM file: " + repr(rest))
180 raise error("syntax error in AFM file: " + repr(rest))
288 # all attrs *not* starting with "_" are consider to be AFM keywords
295 # all attrs *not* starting with "_" are consider to be AFM keywords
333 return '<AFM object for %s>' % self.FullName
335 return '<AFM object at %x>' % id(self)
362 afm = AFM(path)
364 if afm.has_char(char):
365 print(afm[char]) # print charnum, width and boundingbox
367 if afm.has_kernpair(pair):
368 print(afm[pair]) # print kerning value for pair
369 print(afm.Version) # various other afm entries have become attributes
370 print(afm.Weight)
371 # afm.comments() returns a list of all Comment lines found in the AFM
372 print(afm.comments())
373 #print afm.chars()
374 #print afm.kernpairs()
375 print(afm)
376 afm.write(path + ".muck")