Hi there, I’m trying to draw some source code (indented with tabs) using gl::TextureFont::drawStringWrapped()
, but it’s not respecting the tabs (tested on Windows). So I replaced the tabs by spaces, but it still seems to strip whitespace at the start of lines…
I think it’s the function TextBox::calculateLineBreaks()
that’s not calculating the glyphs correctly. Aha – I just found this comment in the function lineBreakUtf8()
:
// eat any spaces we'd start on on the next line
Any suggestions on how to avoid this behaviour? It’s pretty deeply ingrained in the glyph calculation code, and I don’t see a way to switch it off (e.g. using DrawOptions
).
Thanks,
Glen.