[Fixed] Parts of font disappearing when translated

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Parts of font disappearing when translated

Postby Marisa Kirisame » Thu Feb 21, 2019 7:26 pm

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).
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Parts of font disappearing when translated

Postby Graf Zahl » Fri Feb 22, 2019 2:15 am

3.7.2, master or localization? 3.7.2 had a font offsetting problem, so this may be related.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Parts of font disappearing when translated

Postby Marisa Kirisame » Fri Feb 22, 2019 3:09 am

I've seen this in both 3.7.2 and master.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Parts of font disappearing when translated

Postby Graf Zahl » Fri Feb 22, 2019 12:17 pm

This has got to be one of the most retarded 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...
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: MSN [Bot], yura_111 and 1 guest