Parts of font disappearing when translated

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Parts of font disappearing when translated

Re: Parts of font disappearing when translated

by Graf Zahl » Fri Feb 22, 2019 11:17 am

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...

Re: Parts of font disappearing when translated

by Marisa the Magician » Fri Feb 22, 2019 2:09 am

I've seen this in both 3.7.2 and master.

Re: Parts of font disappearing when translated

by Graf Zahl » Fri Feb 22, 2019 1:15 am

3.7.2, master or localization? 3.7.2 had a font offsetting problem, so this may be related.

Parts of font disappearing when translated

by Marisa the Magician » Thu Feb 21, 2019 6: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).

Top