I started noticing that a font I use in a mod gets partially cut off when it's colored. I have no idea why this happens. I'm pretty sure it used to work fine in the past.
Minimal sample here. Draws a text multiple times using all colors. You should see that they're all cut off at the top except for the untranslated color (which I padded a bit so it's easier to see).
Parts of font disappearing when translated
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Parts of font disappearing when translated
3.7.2, master or localization? 3.7.2 had a font offsetting problem, so this may be related.
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Parts of font disappearing when translated
I've seen this in both 3.7.2 and master.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Parts of font disappearing when translated
This has got to be one of the most [censored word] bugs ever discovered in ZDoom code.
While analyzing the font's colors the font loader counted the number of pixels for each color used - and stored the result in a - BYTE ARRAY!.
Your font just hit the unlucky spot where the counter for the brightest color was a multiple of 256 - which made the loader consider it not present and mapped it to full translucency...
While analyzing the font's colors the font loader counted the number of pixels for each color used - and stored the result in a - BYTE ARRAY!.
Your font just hit the unlucky spot where the counter for the brightest color was a multiple of 256 - which made the loader consider it not present and mapped it to full translucency...