Page 1 of 1

Font is showed in dark colors

Posted: Sat May 12, 2018 7:49 am
by FFFFRRRR
I have a problem with a custom font I made. The font-graphics are truecolor pngs, here are 3 examples:
Image Image Image
(I have attached the rest of the graphics in the zip).

Ingame, when used with HUDMESSAGE and the colors CR_White and CR_Cyan, they look like this:
Image
White is a bit lighter, so colors do seem to make a difference.

My FONTDEFS:
Spoiler:
I have used TEXTURES to scale them down a bit. There, these graphcis have the FRNUMx names.

Does anybody know what that could be?

Re: Font is showed in dark colors

Posted: Mon May 14, 2018 6:47 am
by Blue Shadow
I think the issue is that the graphics consist of a single color. [wiki=HudMessage#Parameters]Each color provided by GZDoom is defined as a range, from darkest to lightest[/wiki]. From what I observed* during testing is that when the engine applies the color translation, it appears to start from the darkest shade of the chosen color to the lightest, and since your font graphics consist of only a single color, they get the darkest shade applied to them, and thus appear dark in the game.

[wiki=TEXTCOLO]You can solve this by creating your own font colors to go with your font[/wiki].
Spoiler: *

Re: Font is showed in dark colors

Posted: Thu May 17, 2018 2:19 am
by Graf Zahl
If you use FONTDEFS to define the font, add 'DONTTRANSLATE'. That will cause the font renderer to use the color normally used for console texts to colorize it instead of building a custom translation.

Re: Font is showed in dark colors

Posted: Sat May 19, 2018 8:25 am
by FFFFRRRR
Thanks for the help! DONTTRANSLATE worked.