Page 1 of 1

Hi-res font issues part 2

PostPosted: Sat Oct 05, 2019 11:44 am
by theleo_ua
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

Re: Hi-res font issues part 2

PostPosted: Fri Dec 20, 2019 3:21 am
by Player701
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.

Re: Hi-res font issues part 2

PostPosted: Fri Dec 20, 2019 3:26 am
by Graf Zahl
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.

Re: Hi-res font issues part 2

PostPosted: Fri Dec 20, 2019 4:49 am
by theleo_ua
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?

Re: Hi-res font issues part 2

PostPosted: Fri Dec 20, 2019 5:31 am
by Graf Zahl
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.

Re: Hi-res font issues part 2

PostPosted: Sun Dec 22, 2019 5:42 am
by theleo_ua
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)