afmLib

Module for reading and writing AFM files.

exception fontTools.afmLib.error

Bases: exceptions.Exception

class fontTools.afmLib.AFM(path=None)
_keywords = ['StartFontMetrics', 'EndFontMetrics', 'StartCharMetrics', 'EndCharMetrics', 'StartKernData', 'StartKernPairs', 'EndKernPairs', 'EndKernData', 'StartComposites', 'EndComposites']
_attrs = None
read(path)
parsechar(rest)
parsekernpair(rest)
parseattr(word, rest)
parsecomposite(rest)
write(path, sep='\r')
has_kernpair(pair)
kernpairs()
has_char(char)
chars()
comments()
addComment(comment)
addComposite(glyphName, components)
fontTools.afmLib.readlines(path)
fontTools.afmLib.writelines(path, lines, sep='\r')