haymo's picture

Font missing spaces

I'm sure I miss something here: On _some_ (or most) fonts, the OpenTK TextRenderer seems to leave out the blank spaces (see attachment). For "Times New Roman" it is ok. For "Arial" its not. (Both labels get the same text in the 2nd line).

Also, in the picture, one can see those strange artefacts like ugly tiny lines disturbing the letters (some, but not all 'e', even 2 through the 'm' of 'Roman'). What is causing those?

The problems do not depend on the font size.

Yes, I cache the glyphs using TextRenderer.Prepare(). Running on Windows XP (.NET2.0). OpenTK Version 0.9.0. Using a fairly cheap onboard graphic. Newest OpenGL hardware vendor drivers installed.

fontMissSpaces.PNG98.89 KB


Comment viewing options

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

Looks like the same problem talked about here.

Suggestion seems to be: get the graphics card driver and OS versions, post those here, update the graphics driver and see if that helps.

haymo's picture

Unfortunately it does not help. Also, I already have noticed those artefacts on other hardware as well. :|

The screenshot was made on:
Card: Intel Mobile 915GM
Driver: vers. 6.14.10 (most recent on 03.2008)
OS: WinXP, SP2


Stevo14's picture

Could you post the specs of the other hardware on which you noticed these artifacts? It might be possible to see some sort of pattern. eg. integrated graphics cards, older graphics cards, or maybe even WinXP SP2.

the Fiddler's picture

Can you please check with the latest version from SVN? I've improved whitespace calculation, and it could be that the problem has been fixed.

(if you don't have an SVN client, PM me your email so I can send you a build)

haymo's picture

ok thanks, I've co'ed the current version from svn (it's the one in /trunk, right?). Unfortunately I once run into the same GLContol issue as described here. My implementation of my own GLControl is still based on v0.9.0 - with some modifications, so I'd rather wait for the public WindowInfo and will report back any success than. (Maybe this will also fix the artefacts? Hm..)

the Fiddler's picture

I'm not sure what the cause of the artifacts is. I haven't been able to reproduce these on any test machine (ati, nvidia and s3 cards, plus software rendering through mesa). I'm guessing it's either a driver issue affecting alpha-only textures, or a driver a texture filtering artifact.

I'm planning to do some internal changes to font rendering in the near future to improve quality/flexibility, so the problem might go away on its own.

haymo's picture

The current svn version made the 'missing spaces problem' disappear. This is good now! :) Thanks! The artefacts are still there. I remember, when I once installed the vendor driver the first time, they seemed to have gone away. But only a couple of runs - than they came back. Dont know, if it makes a difference: I run on Win XP Pro - Tablet PC edition ?

the Fiddler's picture

The current svn version made the 'missing spaces problem' disappear.
Glad to hear! Forgive the self-advertisment, but 0.9.1 is shaping up as a very strong release. :)

The corruption problem is more difficult to fix though, especially since it seems to affect certain hardware only. The Tablet PC version of XP shouldn't matter, unless it ships with a different version of gdiplus.dll, which is unlikely. I will cook up a simple test application that will help gather more information on the problem (will mainly test for corruption on different texture formats).

If you have a few minutes to spare can you please try the following? Head to http://sourceforge.net/project/showfiles.php?group_id=3 and download the latest version of Mesa (7.0.2 as of now). Mesa is a software implementation of OpenGL, and will help locate whether the problem lies in the OpenGL stack or .Net. It's easy to use: unzip it, use the visual studio solution to build it and copy the three .dll files to your application's directory (no installation is needed)

Your application should start up and run normally, albeit a lot slower. Does the corruption still occur?

haymo's picture

Unfortunately the mesa driver is not working at all. All GL rendering has disappeared. Not even the backbuffer could be cleared. Therefore I cannot tell ... :( Thanks anyway!

the Fiddler's picture

Argh, mesa tends to bug out when its dll is loaded dynamically. Anyway, if you can live with the corruption for a little while, I'll hopefully manage to fix it during the next round of OpenTK.Font updates.