import unicodedata


def visual_length(text: str) -> int:
    """
    Given a string it returns the visual length of the string as opposed to the
    len function which returns the number of printable characters.
    """
    # See https://www.unicode.org/reports/tr11/ for how this dict in constructed
    visual_len = {
        "F": 1,
        "H": 1,
        "Na": 1,
        "N": 1,
        "W": 2,
        "A": 2,
    }
    return sum([visual_len[unicodedata.east_asian_width(char)] for char in text]) + 1