georgwaechter's picture

Rendering underlined text problem


when rendering underlined text the white spaces between the characters are not underlined. The question is whether this is the expeceted behaviour or not ... i think the white spaces should be underlined too.

Picture of the text (if you zoom in you even see differences on the line within a word):



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
objarni's picture

This is a bug to me.. If I underline a sentence in Wordpad.exe for example, it underlines the spaces too.

the Fiddler's picture

This is not an OpenTK bug in and on itself, but rather a side-effect of the current implementation.

OpenTK currently calls System.Drawing.Graphics.DrawString to draw individual glyphs. It looks like this method does not underline spaces, when they are not inside a larger string.

Text rendering will be greatly improved post-0.9.1 (relevant discussion), so you can expect this to be fixed or, at least, worked around.