def indirect_font(font, fonts, text):
    """
    Check input font for indirect modes.

    :param font: input font
    :type font : str
    :param fonts: fonts list
    :type fonts : list
    :param text: input text
    :type text:str
    :return: font as str
    """
    if font == "rnd-small" or font == "random-small" or font == "rand-small":
        font = random.choice(RND_SIZE_DICT["small_list"])
        return font
    if font == "rnd-medium" or font == "random-medium" or font == "rand-medium":
        font = random.choice(RND_SIZE_DICT["medium_list"])
        return font
    if font == "rnd-large" or font == "random-large" or font == "rand-large":
        font = random.choice(RND_SIZE_DICT["large_list"])
        return font
    if font == "rnd-xlarge" or font == "random-xlarge" or font == "rand-xlarge":
        font = random.choice(RND_SIZE_DICT["xlarge_list"])
        return font
    if font == "random" or font == "rand" or font == "rnd":
        filtered_fonts = list(set(fonts) - set(RANDOM_FILTERED_FONTS))
        font = random.choice(filtered_fonts)
        return font
    if font == "wizard" or font == "wiz" or font == "magic":
        font = wizard_font(text)
        return font
    if font == "rnd-na" or font == "random-na" or font == "rand-na":
        font = random.choice(TEST_FILTERED_FONTS)
        return font
    if font not in FONT_MAP.keys():
        distance_list = list(map(lambda x: distance_calc(font, x), fonts))
        font = fonts[distance_list.index(min(distance_list))]
    return font
def indirect_font ( font , fonts , text ) : if font == "rnd-small" or font == "random-small" or font == "rand-small" : font = random . choice ( RND_SIZE_DICT [ "small_list" ] ) return font if font == "rnd-medium" or font == "random-medium" or font == "rand-medium" : font = random . choice ( RND_SIZE_DICT [ "medium_list" ] ) return font if font == "rnd-large" or font == "random-large" or font == "rand-large" : font = random . choice ( RND_SIZE_DICT [ "large_list" ] ) return font if font == "rnd-xlarge" or font == "random-xlarge" or font == "rand-xlarge" : font = random . choice ( RND_SIZE_DICT [ "xlarge_list" ] ) return font if font == "random" or font == "rand" or font == "rnd" : filtered_fonts = list ( set ( fonts ) - set ( RANDOM_FILTERED_FONTS ) ) font = random . choice ( filtered_fonts ) return font if font == "wizard" or font == "wiz" or font == "magic" : font = wizard_font ( text ) return font if font == "rnd-na" or font == "random-na" or font == "rand-na" : font = random . choice ( TEST_FILTERED_FONTS ) return font if font not in FONT_MAP . keys ( ) : distance_list = list ( map ( lambda x : distance_calc ( font , x ) , fonts ) ) font = fonts [ distance_list . index ( min ( distance_list ) ) ] return font
Check input font for indirect modes.

    :param font: input font
    :type font : str
    :param fonts: fonts list
    :type fonts : list
    :param text: input text
    :type text:str
    :return: font as str