Still one tiny issue with alpha in GUIs : dirty fonts on transparent background

Started by Monsieur OUXX, Tue 18/11/2014 18:18:39

Previous topic - Next topic

Monsieur OUXX

I know that 99% of GUI issues with alpha in GUIs have been fixed lately, for example since 3.3.0.

But I still found one tiny surviving issue:
- create a 32-bits game
- create a GUI. Use color 0 as background color, to make it fully transparent.
- Create a label onto it.
- Set the label's font to a font that has a few glitches.
  By "glitches", I mean a font where not all pixels are either fully white or fully black.
  Well, to be honest I'm not sure how this works in detail, but I'm certain the glitchy font has some dirty pixels -- whether not fully opaque, or they use a color other than B or W. I had that dirty font by importing a TTF font to a fixed size (you know, when AGS asks you what should be the height of the TTF-turned-pixels font). So as you see it's not an uncommon situation.

No, the interesting part:
- When the GUI background has a given color (e.g. yellow), the font is rendered properly
- When the GUI's transparent property is not 100%, everything still works fine.
- Only when the GUI has a transparent background color (pink or "0"), then the dirty pixels of the font are rendered fully opaque.

 

Crimson Wizard

If you mean TTF fonts, there was some anti-aliasing problem with them, but unfortunately it dwells inside TTF drawing library.

Here is a problem report by AGD2:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636469274#msg636469274
And few posts later a workaround I found:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636469376#msg636469376

E: Re-reading your post, I am no longer certain it is the same issue... maybe I was wrong.

Monsieur OUXX

I think it's the same issue, except AGD2 noticed the issue for GUI background sprites that have pixels of various transparency values (general case), when I noticed the issue for a background that is completely transparent (specific case). As he underlined, the more transparent the GUI pixels, the more jagged the font.

That's a weird issue, it's like some variable in the rendering code was inverted, and the more a pixel should be transparent, the more opaque it gets rendered.
 

Monsieur OUXX

Actually I'm confused as well. The workaround you describe here describes precisely my faulty situation: a label on a fully transparent GUI. All non-fully opaque pixels of the font get rendered fully opaque onto the merged label/gui.

Anyway now that I know you guys know there's an issue, I can klive with it. I just wanted to make sure it didn't go unnoticed.
 

SMF spam blocked by CleanTalk