Handle newlines in the text.
If there's a newline in the text (top text or bottom text or both), then just split that text into lines and do the positioning loop for each line, so that each line gets rendered centered and placed text-height farther down than the previous line.