- Online Community Forums » Programming Questions » [A5] OpenGL Font errors

This thread is locked; no one can reply to it. rss feed Print
[A5] OpenGL Font errors
Member #4,231
January 2004

While switching my program to OpenGL graphics some time ago, I noticed a bug in the ttf font drawing. Certain glyphs disappear or otherwise fail to load correctly, but only in my program.
I compiled the example_font.c (edited to use OpenGL) and made it use the different fonts my program uses, and the example runs perfectly. My program, however, has certain characters (DHaikn) disappear, but only using certain font/size combinations.
Some fonts run fine, some fonts only have problems at specific sizes.

Attached to this post is which contains screenshots of the fonts in action, as well as allegro.log files for both the example and MLPOnline, the program I'm working on. It also contains the fonts themselves in case you want to test it on your system.
Descriptions.txt explains which font and size is used in each image.

Also of note, setting the fonts to be loaded as memory bitmaps fixes this problem completely, but creates other problems as I'd need to do some special checking to prevent flicker and artifacts on the screen when it switches between allegro draws and opengl draws.

In my experience, NVidia graphics cards do not have this problem. ATI cards do.
Also, the stencil checker needs to be disabled, otherwise up to half the glyphs will be missing and will be randomly not included.

If you need the source code for the edited then I can provide it upon request, but I obviously can't provide the code for MLPOnline.

Thanks for any help in advance.

Member #11,410
October 2009

Seems a lot like my issue with D3D:

I wonder if it is related.

Member #4,231
January 2004

I saw you were having a similar problem with D3D and resizing, but figured this would require its own thread since it's OpenGL. If the problems are related then we can close the thread later.

Go to: