gd201b - I'm seeing odd behavior with a particular font when rendering a string containing spaces using DrawText - anything after the first space is not rendered and an error code is returned (GDERR_INVALIDRECT)
This happens regardless of the code path that's using the font, but here's one example:
If I remove the spaces from the string then everything renders fine. Yes, there's lots of room on the surface.
The font bitmap is actually just a tinted version of the sample font depicted in the "THE ADVANCED FONT FORMAT" section of the GD docs. Other fonts work fine. I can't swear that this is new to GD2 since I'm not sure I actually used this font with spaces.
Any thoughts?
This happens regardless of the code path that's using the font, but here's one example:
- Code:
TCHAR str[128];
_stprintf(str, TEXT("[%.3f ms / %.3f fps]"), nActualFrameTime, nFrameRate);
hr = backbuffer.DrawText( 10, backbuffer.GetHeight() - m_gbfDialogFont.GetHeight(), str, &m_gbfDialogFont, GDDRAWTEXT_LEFT, 0, NULL, NULL );
Assert( SUCCEEDED(hr) );
If I remove the spaces from the string then everything renders fine. Yes, there's lots of room on the surface.
The font bitmap is actually just a tinted version of the sample font depicted in the "THE ADVANCED FONT FORMAT" section of the GD docs. Other fonts work fine. I can't swear that this is new to GD2 since I'm not sure I actually used this font with spaces.
Any thoughts?