def font_style(font):
    """ Return a string for the font style of a given font.

        fixme: Shouldn't the backends handle this?
    """
    if font.style == 'italic' and font.weight == 'bold':
        style = 'bold italic'
    elif font.style == 'italic':
        style = 'italic'
    elif font.weight == 'bold':
        style = 'bold'
    elif font.style in [0, 'regular', 'normal']:
        style = 'regular'
    else:
        print(
            "Font style '%s' and weight: '%s' not known. Using style='regular'"
             % (font.style, font.weight))
        style = 'regular'
    return style
