Font is showed in dark colors

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
FFFFRRRR
Posts: 99
Joined: Sat Nov 04, 2017 3:33 am

Font is showed in dark colors

Post 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?
Attachments
FRFONT.zip
(2.33 KiB) Downloaded 88 times
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Font is showed in dark colors

Post 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: *
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Font is showed in dark colors

Post 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.
User avatar
FFFFRRRR
Posts: 99
Joined: Sat Nov 04, 2017 3:33 am

Re: Font is showed in dark colors

Post by FFFFRRRR »

Thanks for the help! DONTTRANSLATE worked.
Post Reply

Return to “Assets (and other stuff)”