Пример #1
0
def font_description_to_dict(desc):
    from gi.repository.Pango import FontDescription, Style, Weight
    desc = FontDescription(desc)
    return {
        'name' : desc.get_family(),
        'size' : int(desc.get_size()/1024.0),
        'bold' : desc.get_weight() == Weight.BOLD,
        'italic' : desc.get_style() == Style.ITALIC,
        'underlined' : False
        # TODO
    }