Weird Problem with a font

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
radical-dev
Posts: 45
Joined: Thu Apr 24, 2008 7:54 pm
Location: Wickede, Germany

Weird Problem with a font

Post by radical-dev »

Hi out there !

I have a problem with a font created by the Fonttool. Some Characters are only sometimes visible. Here 2 Images of the Problem:

Image

Here the Character "i" is missing from "Direct3D" and "16 Bit". If i select one of these Entries, everything is ok:

Image

I'm a little bit confused. Here the Code is use:

Code: Select all

m_irLauncherFont = m_irGUIEnv->getFont("Fonts/Lucida10px.xml");
...
m_irLauncherSkin->setFont(m_irLauncherFont, EGDF_DEFAULT);
m_irGUIEnv->setSkin(m_irLauncherSkin);
I don't know if this is a known bug, searching don't give me any results.

Greetings

radical

EDIT: Sorry, commented the links to the images out :oops: . Should now go.

EDIT2: I've tested to draw the font with IGUIFont->draw()...same problem. It seems to be that characters with just 1 px width dont get drawed (at the l and the : the same).
Last edited by radical-dev on Thu Apr 24, 2008 9:38 pm, edited 2 times in total.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Can you post links to the larger pictures please?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

I have had this problem often, with characters like ''' or 'i' or 'l', etc. many fonts are generated with them invisible...
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

I can't recreate this, I tried a couple of different lucidas at 10px and they work okay for me in all the video drivers I tried at a 400x300 screen.
Can you please upload the offending font xml and texture, and I'll look at it in-depth.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
radical-dev
Posts: 45
Joined: Thu Apr 24, 2008 7:54 pm
Location: Wickede, Germany

Post by radical-dev »

Hi bitplane!

I've send u a PM. The Font i used is Lucida Sans Unicode, texturedimensions 512 x 512 px, BMP-Font

I tried do generate the font on smaller textures and other formats...no change.

Thanks in advnce

radical
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

as said in PM-
Your window size and driver size are probably out by one pixel on the width, as you're using a borderless window in software mode, so the canvas is resized causing the 1-pixel wide letters to be less than a pixel wide.
This would explain why the letter is drawn when there's lots of contrast between it and the background, but otherwise be ignored, and why I can't recreate the problem. I would guess it happens for all graphics on the canvas and not just fonts
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Heh, I do see weird artefacts for things only a few pixel width. The thing is it happens also in fullscreen. Also, I use OpenGL, failed to mention, think it might help ;)
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

A working test case would help a lot more ;)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply