Page 1 of 1

Weird Problem with a font

Posted: Thu Apr 24, 2008 8:14 pm
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).

Posted: Thu Apr 24, 2008 8:53 pm
by bitplane
Can you post links to the larger pictures please?

Posted: Thu Apr 24, 2008 9:35 pm
by Dorth
I have had this problem often, with characters like ''' or 'i' or 'l', etc. many fonts are generated with them invisible...

Posted: Thu Apr 24, 2008 10:05 pm
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.

Posted: Thu Apr 24, 2008 10:33 pm
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

Posted: Thu Apr 24, 2008 11:36 pm
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

Posted: Fri Apr 25, 2008 2:26 am
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 ;)

Posted: Fri Apr 25, 2008 12:35 pm
by bitplane
A working test case would help a lot more ;)