Alpha-translucency in fonts doesn't work

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Alpha-translucency in fonts doesn't work

Post by wildweasel »

I'm having some trouble implementing DoomNukem's new visor status bar for "Accessories to Murder." He's kindly provided some very nice, 32-bit alpha transparent PNG fonts for use on the bars that make things very smooth and sexy-looking. Unfortunately, they don't seem to work correctly in game.

Here is what it SHOULD look like:
Image

And here's what it ACTUALLY looks like:
Image

Relevant SBARINFO code:

Code: Select all

height 0;

statusbar normal, forcescaled
{
	// basic layout
	DrawImage "PLAYSCRN", -55, 0;
	Alpha 0.5
	DrawImage "HEADSUP", -55, 0;
	
	// health and armor bars
	Alpha 0.75
	DrawBar "HealthFu", "HealthEm", Health, horizontal, interpolate(8), 22, 159;
	Alpha 0.75
	DrawNumber 3, DIGIFONT_SMALL, Untranslated, Health, Alignment(right), fillzeros, 68, 168;
	DrawBar "ArmorFul", "ArmorEmp", Armor, horizontal, interpolate(8), 21, 174;
	Alpha 0.75
	DrawNumber 3, DIGIFONT_SMALL, Untranslated, Armor, Alignment(right), fillzeros, 71, 179;
	
	// ammo bar
	IsSelected DNChaingun
	{
		Alpha 0.75
		DrawNumber 4, DIGIFONT_SMALL, Untranslated, Ammo1, Alignment(left), fillzeros, 278, 178;
	}
	Else
	{
		Alpha 0.75
		DrawNumber 2, DIGIFONT_LARGE, Untranslated, Ammo1, Alignment(right), fillzeros, 272, 172;
		Alpha 0.75
		DrawNumber 2, DIGIFONT_SMALL, Untranslated, Ammo2, Alignment(left), fillzeros, 278, 178;
	}

	// level stats
	Alpha 0.75
	drawnumber 4, AMMOFONT, Untranslated, kills, 73, 24;
	Alpha 0.75
	drawnumber 4, AMMOFONT, Untranslated, monsters, Alignment(left), 81, 24;
	Alpha 0.75
	drawnumber 3, AMMOFONT, Untranslated, items, 73, 31;
	Alpha 0.75
	drawnumber 3, AMMOFONT, Untranslated, totalitems, Alignment(left), 81, 31;
	Alpha 0.75
	drawnumber 2, AMMOFONT, Untranslated, secrets, 79, 38;
	Alpha 0.75
	drawnumber 2, AMMOFONT, Untranslated, totalsecrets, Alignment(left), 86, 38;
	
	// keys
	DrawKeyBar 1, horizontal, 9, 252, 32, 0;
	DrawKeyBar 1, horizontal, 9, 259, 31, 1;
	DrawKeyBar 1, horizontal, 9, 266, 30, 2;
	DrawKeyBar 1, horizontal, 9, 273, 29, 3;
	DrawKeyBar 1, horizontal, 9, 280, 28, 4;
	DrawKeyBar 1, horizontal, 9, 287, 27, 5;
	
	// hud face :)
	drawmugshot 5, 180, 10;
}
How can I make the health/ammo fonts maintain their 32-bit alpha translucency? Clearly something's going on here, presumably with the font translation system, but I've specified Untranslated for the graphics, which I had assumed meant that the translator should NOT touch the graphics in any way whatsoever.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Alpha-translucency in fonts doesn't work

Post by Nash »

Having this problem with my high res fonts too. :( Leaves ugly pixels behind.

No way am I editing all 200+ glyphs of a generated font just to clean up the pixels...
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: Alpha-translucency in fonts doesn't work

Post by Blue Shadow »

Here is what Graf had to say about this:

http://forum.zdoom.org/viewtopic.php?p=693034#p693034
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Alpha-translucency in fonts doesn't work

Post by wildweasel »

Well, that's a shame, then, because this means the font is going to need to be redone.
Locked

Return to “Editing (Archive)”