Hi-res font issues part 2

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Hi-res font issues part 2

Postby theleo_ua » Sat Oct 05, 2019 11:44 am

GZDoom 4.2.1 x64
Windows 7 Ultimate x64

1) English-only hires fonts make influence on russian non-hires fonts, breaking their color
2) Hires fonts are still aligned to top

https://my.pcloud.com/publink/show?code ... 3AD8D3Jpjy


Steps to reproduce:

1) Download and unpack test mod: https://my.pcloud.com/publink/show?code ... hgLB0aGROy

2) Copy GZDoom 4.2.1 x64 and doom2.wad to testmod folder

3) Launch TESTMOD.BAT
or
"gzdoom.exe -config gzdoom-testmod.ini -iwad doom2.wad -file _FILES\russian.pk3 _FILES\HIRES_FONTS.pk3"

NOTE: it's important to use gzdoom-testmod.ini as config file

4) Start any map

5) Click IDKFA

Expected result: top left message has correct colors

Actual result: top left message has incorrect colors

https://my.pcloud.com/publink/show?code ... 3AD8D3Jpjy

6) Change weapon to supershotgun

Expected result 1: bottom center message has correct colors

Actual result 1: bottom center message has incorrect colors

Expected result 2: bottom center message has correct align of "-" character

Actual result 2: bottom center message has incorrect align of "-" character

https://my.pcloud.com/publink/show?code ... 3AD8D3Jpjy


NOTE 2: similar issue was reported and fixed some time ago, but it was only about alignment: viewtopic.php?f=2&t=63667 . For some unknown reasons, it reproduced again
User avatar
theleo_ua
Global Moderator
 
Joined: 07 Feb 2016

Re: Hi-res font issues part 2

Postby Player701 » Fri Dec 20, 2019 3:21 am

The first issue is probably not a bug but a feature. As far as I'm aware, if a font is replaced, GZDoom will try to force all non-replaced characters to mimic the color range of the new characters so that the overall look is consistent. Whether or not it is a good thing in case of hi-res replacements, I am not sure.

The second issue looks like a bug to me. It appears that offsets are handled incorrectly for hi-res character replacements. The replacement graphics do not have any offsets themselves, so the original ones must be used instead. For example, the "-" character (STCFN045) has an offset of -2 but the hi-res version looks like it has an offset of -1 instead. The "_" character (STCFN095) is also affected: the original offset is -4 but the hi-res version seems to have -3 instead.
User avatar
Player701
Global Moderator
 
Joined: 13 May 2009
Location: Russian Federation
Discord: Player701#8214
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Hi-res font issues part 2

Postby Graf Zahl » Fri Dec 20, 2019 3:26 am

Player701 wrote:The first issue is probably not a bug but a feature. As far as I'm aware, if a font is replaced, GZDoom will try to force all non-replaced characters to mimic the color range of the new characters so that the overall look is consistent. Whether or not it is a good thing in case of hi-res replacements, I am not sure.


This is caused by how the font calculates its color range. When mixing fonts, all bets are off and there is no good way to deal with it. It's most certainly not fixable.

2) is a direct consequence of the other thing we were talking about. The scaling cannot be hidden properly and causes secondary issues like this one.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Hi-res font issues part 2

Postby theleo_ua » Fri Dec 20, 2019 4:49 am

Player701 wrote:The first issue is probably not a bug but a feature. As far as I'm aware, if a font is replaced, GZDoom will try to force all non-replaced characters to mimic the color range of the new characters so that the overall look is consistent. Whether or not it is a good thing in case of hi-res replacements, I am not sure.


Graf Zahl wrote:This is caused by how the font calculates its color range. When mixing fonts, all bets are off and there is no good way to deal with it. It's most certainly not fixable.


1) Then, why this issue is not reproduced in heretic and hexen? If you need testmods for heretic/hexen, I can upload them

Maybe, if heretic and hexen has correct behavior, they can show the idea how to fix this for Doom?

2) In worst case, is it possible to implement options or config values, which will allow user so select, should engine "mimic the color range of the new characters" or not ?

3) If I convert all non-hires fonts to truecolor, can this fix the problem? Or file format/settings doesn't matter?
User avatar
theleo_ua
Global Moderator
 
Joined: 07 Feb 2016

Re: Hi-res font issues part 2

Postby Graf Zahl » Fri Dec 20, 2019 5:31 am

1) depends on the font. The shading depends on the colors used in the font and if the newly added characters move outside the range of the original font the colors may no longer match. This is an unfortunate limitation of how the system works. It was never designed for mixing fonts.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Hi-res font issues part 2

Postby theleo_ua » Sun Dec 22, 2019 5:42 am

Graf Zahl wrote:1) depends on the font. The shading depends on the colors used in the font and if the newly added characters move outside the range of the original font the colors may no longer match. This is an unfortunate limitation of how the system works. It was never designed for mixing fonts.


I found temporary workaround how to fix this for doom: before hires_fonts.pk3 I load fixes.pk3, which contains all fonts from iwad. This trick somehow made all Russian characters readable (with correct colors)
User avatar
theleo_ua
Global Moderator
 
Joined: 07 Feb 2016


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest