def getFormats(self):
    formats = []
    if hasattr(self, 'fonts'):
        for font in self.fonts:
            if (font.format not in formats):
                formats.append(font.format)
    return formats
def getFormats(self):
    formats = []
    if hasattr(self, 'fonts'):
        for font in self.fonts:
            if (font.format not in formats):
                formats.append(font.format)
    return formats