Method summary
- __init__(self, fh)
- get_angle(self)
- get_bbox_char(self, c, isord = False)
- get_familyname(self)
- get_fontname(self)
- get_fullname(self)
- get_height_char(self, c, isord = False)
- get_kern_dist(self, c1, c2)
- get_name_char(self, c)
- get_str_bbox(self, s)
- get_weight(self)
- get_width_char(self, c, isord = False)
- string_width_height(self, s)
Methods
- __init__(self, fh)
Parse the AFM file in file object fh
- get_angle(self)
Return the fontangle as float
- get_bbox_char(self, c, isord = False)
- get_familyname(self)
Return the font family name, eg, Times
- get_fontname(self)
Return the font name, eg, Times-Roman
- get_fullname(self)
Return the font full name, eg, Times-Roman
- get_height_char(self, c, isord = False)
Get the height of character c from the bounding box. This is the ink height (space is 0)
- get_kern_dist(self, c1, c2)
Return the kerning pair distance (possibly 0) for chars c1 and c2
- get_name_char(self, c)
Get the name of the character, ie, ';' is 'semicolon'
- get_str_bbox(self, s)
Return the string bounding box
- get_weight(self)
Return the font weight, eg, 'Bold' or 'Roman'
- get_width_char(self, c, isord = False)
Get the width of the character from the character metric WX field
- string_width_height(self, s)
Return the string width (including kerning) and string height as a w,h tuple