Reverse engineered version of the Strife BIGFONT file

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
Post Reply
User avatar
Kostov
 
 
Posts: 2020
Joined: Thu Dec 26, 2013 3:26 pm
Location: Sweden
Contact:

Reverse engineered version of the Strife BIGFONT file

Post by Kostov »

Well, I spent the entire day busting my rear end on this, and it’s not 100% reliable, but I’ll share it here. And I also want to share some findings that I’ve made. It’s gonna be a long read, but I can’t leave out any details, because these resources are not fully reliable on their own without some of the info in this post.

I’ve been working with ImageTool for quite some time; pretty handy program that allows you to replace GZDoom’s BIGFONT files. It comes with a source file for GZDoom’s BIGFONT file for the Doom games (located in zd_extra.pk3 and named dbigfont.lmp). Strife uses the same system and has its own BIGFONT file located in the same .pk3 file under the name of sbigfont.lmp; however, it has no source file that comes with ImageTool like Doom. Which means tough luck for anyone who wants to edit the Strife font, since neither ImageTool nor Spidey’s ZDoom Font Generator can extract and convert GZDoom’s own BIGFONT files into editable formats for some reason.

Well, I’ve done my best to reverse engineer the Strife BIGFONT file by extracting it as a .png file in SLADE and putting all the characters in a .pcx file with GIMP, assembling everything to make it ready to be converted in ImageTool. So now the Strife BIGFONT can be edited by other people. Hooray! However, while 99% accurate to the current sbigfont.lmp file in zd-extra.pk3, it doesn’t behave exactly like it when converted. After converting the file and loading it in GZDoom, it somehow causes all characters to have have extra spacing between them (this applies to Doom too, even the original Doom BIGFONT source file that comes with ImageTool for some reason):

Original GZDoom
Reverse engineered BIGFONT

So, I wondered what I could do to eliminate this and make it more similar to the GZDoom file. Well, having looked closer at the original sbigfont.lmp file in GZDoom, I noticed that there is no initial space character in the very beginning of the file (7px wide). Which is weird. (This is visible in SLADE—there is no extra space on the very left side of the sbigfont.lmp file when you compare it to dbigfont.lmp, which has a 7px wide space character.) So I turned the space character in my reverse engineered file (appears at the very top left) into a blank no-width character instead and converted it to an .lmp file to try it out.

This leads to something interesting: obviously, you end up with no spaces between words. However, what you can do is use a hex editor or a file comparer of some sort to even out the differences between the reverse engineered .lmp and the GZDoom version. (Personally, I’ve used WinMerge to merge the only difference that appears at the very top of the file after turning it into an .lmp graphic. Just make sure both files are opened with the same codepage. Fast and simple.) And this causes spaces between words to work flawlessly while eliminating extra spaces between the characters as shown in the latter image above! It becomes 100% identical to the file that’s already that used to be in GZDoom.



So, after reverse engineering the file, I noticed that there are a couple of issues with GZDoom’s Strife BIGFONT file:
  • The letter W was created from scratch instead of being taken from the game’s own graphical assets, which is strange. Maybe someone missed it when making the bigfont file in the first place.
  • The number 9 and letter Y are affected by some strange pixel artifacting at the very bottom that goes outside of Strife’s color palette. Not noticeable ingame, but strange nonetheless.
    • When reverse engineering, I had to edit the palette of the .pcx file to accomodate these artifacts. If you want to edit a .pcx file that is accurate to Strife’s palette, the fixed version below provides that.
So I edited the file and made my own take on it, fixing the aforementioned problems and slightly altering the lighting on the digits. I also had to take a different approach to hex editing the file. In WinMerge, I changed this line:

Image

to this:

Image

Changing that “00” to “01 яя” removes the extra spacing in the file.

Here’s a comparison between the GZDoom file and my fixed version (.pcx versions of both files for ImageTool are provided in the .zip file below):

Image

Image

(I’d ask the individual who programmed ImageTool for help with all of this, but you know.)

Bottom line: I did my best to reverse engineer this file, and the results were quite hard to get, but I managed. And it is now in GZDoom!
Attachments
sbigfont_reverse_engineered.zip
(8.05 KiB) Downloaded 79 times
Last edited by Kostov on Fri Feb 01, 2019 4:33 pm, edited 8 times in total.
User avatar
Kostov
 
 
Posts: 2020
Joined: Thu Dec 26, 2013 3:26 pm
Location: Sweden
Contact:

Re: Reverse engineered version of the Strife BIGFONT file

Post by Kostov »

I’ve updated the post with better information and a positive conclusion (having finally figured out how to deal with the two, other problems I had earlier).
User avatar
theleo_ua
Posts: 162
Joined: Sun Feb 07, 2016 11:38 am
Operating System Version (Optional): Windows 10
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Ukraine
Contact:

Re: Reverse engineered version of the Strife BIGFONT file

Post by theleo_ua »

Strife Bigfont looks pretty nice in translated colors, especially red, sapphire and green: https://my.pcloud.com/publink/show?code ... 5A889K8J1y

Screenshot contains also doom, heretic and hexen for comparison
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Reverse engineered version of the Strife BIGFONT file

Post by Gez »

It seems "reddish brick" is a copy of "original" in these pictures, as evidenced by Doom's being white and Hexen's being green.
User avatar
theleo_ua
Posts: 162
Joined: Sun Feb 07, 2016 11:38 am
Operating System Version (Optional): Windows 10
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Ukraine
Contact:

Re: Reverse engineered version of the Strife BIGFONT file

Post by theleo_ua »

Gez wrote:It seems "reddish brick" is a copy of "original" in these pictures, as evidenced by Doom's being white and Hexen's being green.
You are the best! Now I got it why reddish brick doesn't work - because I used this https://zdoom.org/wiki/Print#Colors page as reference and copied "reddish brick" to \c[reddish brick] code, which is incorrect (correct code is \c[brick] (without reddish) )

Now it works
Post Reply

Return to “Resources”