Package pyscript :: Module afm :: Class ConvertAFM
[show private | hide private]
[frames | no frames]

Class ConvertAFM


Convert Adobe Font Metrics
Method Summary
  __init__(self, filename)
Initialisation of object
  parse(self, path)
Parse the afm file
  parseattr(self, word, rest)
Parse an attribute
  parsechar(self, rest)
Parse a character
  parsecomposite(self, rest)
Parse a composite string/expression/thing
  parsekernpair(self, rest)
Parse a kerning pair
  write(self, filename)
Write the font file
  write2(self, filename)
Another version of writing the font file, uses the CPickle module

Class Variable Summary
list _keywords = ['StartFontMetrics', 'EndFontMetrics', 'Star...

Method Details

__init__(self, filename)
(Constructor)

Initialisation of object
Parameters:
filename - the name of the font file name
           (type=string)

parse(self, path)

Parse the afm file
Parameters:
path - path to the afm file
           (type=string)

parseattr(self, word, rest)

Parse an attribute
Parameters:
word - the kind of attribute to be parsed (?)
           (type=string)
rest - the attribute to parse
           (type=string)

parsechar(self, rest)

Parse a character
Parameters:
rest - the character to parse
           (type=string)

parsecomposite(self, rest)

Parse a composite string/expression/thing
Parameters:
rest - the string to parse
           (type=string)

parsekernpair(self, rest)

Parse a kerning pair
Parameters:
rest - the kerning pair to parse
           (type=string)

write(self, filename)

Write the font file
Parameters:
filename - the name of the font file to write
           (type=string)

write2(self, filename)

Another version of writing the font file, uses the CPickle module
Parameters:
filename - the name of the font file to write
           (type=string)

Class Variable Details

_keywords

Type:
list
Value:
['StartFontMetrics',
 'EndFontMetrics',
 'StartCharMetrics',
 'EndCharMetrics',
 'StartKernData',
 'StartKernPairs',
 'EndKernPairs',
 'EndKernData',
...                                                                    

Generated by Epydoc 2.0 on Mon Apr 24 17:02:35 2006 http://epydoc.sf.net