I am wondering if this is a bug. I saw a similar post from 2014 but not sure it was ever reported. LMK if this needs to be reported or if I am missing something. In a long string of text, it looks like the text is scrunching to all fit on one line, where it should wrap to the next. Xojo 2022 R3
Code in top canvas
g.FontSize = 19
dim longText as String = "This is a long text that includes the optional 4th parameter but does not wrap"
g.DrawText(longText, 10, 30, g.Width - 20)
Code in second canvas
g.FontSize = 19
dim longText as String = "This is a long text without the 4th parameter"
g.DrawText(longText, 10, 30)