Calling Context.DrawText with a TextBox containing a newline at the start of the text string, or multiple newlines in a row, results in a panic due to an index out of range error.
The offending line is here - apparently t.lines[j].spans ends up being nil here.
Calling
Context.DrawText
with aTextBox
containing a newline at the start of the text string, or multiple newlines in a row, results in a panic due to an index out of range error.The offending line is here - apparently
t.lines[j].spans
ends up beingnil
here.MWE:
Output: