kerning issue?

Previous topic - Next topic

Qedo

I don't know if it has already been reported and if it is a bug but with the kerning to true of PRINT (PRINT, string$, 0,0, true) and LEN (string$, true) it does not work with background colors other than black or transparent.
Ciao

Qedo

has anyone verified?
Ciao

dreamerman

hm.. I'm using Print only for basic info like FPS counter, for in-game stuff using my own text drawing routines. Can You provide any small source / project to verify that fast?
Check my source code editor for GLBasic - link Update: 20.04.2020

Qedo

Try this:
Thank you.

string$="Computer 123456789Ww"
LOADFONT "arial32.png", 1
SETFONT 1
PRINT string$+" "+LEN(string$,TRUE), 10, 150 , TRUE
SHOWSCREEN
MOUSEWAIT
END

dreamerman

From what I understand, in such example it's working as it should, because font bitmap background is red so it's treated as part of a font, in order to change font transparent color (that will be omitted during drawing and such functions like LEN or rather when loading a font) use "SETTRANSPARENCY color%". Default transparent color for loaded font is black.
Check my source code editor for GLBasic - link Update: 20.04.2020

Qedo

according to my logic, but I can be wrong, kerning should analyze the forecolor and not the backgroung.
However I thank you for the analysis and the solution.
Ciao

Moru

A font can have any number of colors. In old times rainbow colors on the font was not uncommon :-) I guess you need to tell the computer what really is the background color if you aren't using a transparent image for the font (If that is possible even)