def makeLongWordToLines(long_word, line_x, line_y, width, line_height, font, lines):
    if (not long_word):
        return line_y
    c = long_word[0]
    (char_width, char_height) = font.size(c)
    default_char_num_per_line = (width / char_width)
    while long_word:
        tmp_ln = long_word[:default_char_num_per_line]
        (w, h) = font.size(tmp_ln)
        l = len(tmp_ln)
        while ((w < width) and (l < len(long_word))):
            l += 1
            tmp_ln = long_word[:l]
            (w, h) = font.size(tmp_ln)
        while ((w > width) and (len(tmp_ln) > 1)):
            tmp_ln = tmp_ln[:(- 1)]
            (w, h) = font.size(tmp_ln)
        l = len(tmp_ln)
        long_word = long_word[l:]
        line = {'x': line_x, 'y': line_y, 'text': tmp_ln, 'font': font}
        line_y += line_height
        lines.append(line)
    return line_y
def makeLongWordToLines(long_word, line_x, line_y, width, line_height, font, lines):
    if (not long_word):
        return line_y
    c = long_word[0]
    (char_width, char_height) = font.size(c)
    default_char_num_per_line = (width / char_width)
    while long_word:
        tmp_ln = long_word[:default_char_num_per_line]
        (w, h) = font.size(tmp_ln)
        l = len(tmp_ln)
        while ((w < width) and (l < len(long_word))):
            l += 1
            tmp_ln = long_word[:l]
            (w, h) = font.size(tmp_ln)
        while ((w > width) and (len(tmp_ln) > 1)):
            tmp_ln = tmp_ln[:(- 1)]
            (w, h) = font.size(tmp_ln)
        l = len(tmp_ln)
        long_word = long_word[l:]
        line = {'x': line_x, 'y': line_y, 'text': tmp_ln, 'font': font}
        line_y += line_height
        lines.append(line)
    return line_y