As far as I know underline is not part of the font but a possible attribute of an NSAttributedString. So, as long as you cannot output such one, yes, emulation sounds like the way to go.
I have one iOS app where Underlined Text is an option, and I use a method I wrote similar to drawText in Xojo
Since UL is not a direct font attribute, I had to calculate the bounding rectangle for the text, adjust for the font acender and draw a line