def calculate_text_size(text):
    """
    Simplistic function that calculate a size of a text based on the number and type of characters.
    It uses an averaged size for lower/upper-case, digits, spaces and underscores.
    It also assumes that the font is using latex "scriptsize" text size.
    """
    text_size = 0
    for c in str(text):
        if c.islower():
            text_size += 13
        elif c.isupper() or c.isdigit() or c == '_':
            text_size += 20
        elif c == ' ':
            text_size += 7
        else:
            text_size += 12
    return text_size/100