Each line was drawn using the full message's length so the alignment was broken. I fixed it by adding the message length to get_message_width so every line has its own length for get_message_width.
This function can be used to get any message width, using the current font renderer driver.