ImageTool refuses to extract Strife’s bigfont file

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: ImageTool refuses to extract Strife’s bigfont file

Re: ImageTool refuses to extract Strife’s bigfont file

by Kostov » Mon Jan 07, 2019 4:41 pm

The case is closed. More info here.

Re: ImageTool refuses to extract Strife’s bigfont file

by Kostov » Sun Jan 06, 2019 11:10 am

That would probably work if I wanted to edit the existing letters, but that’s not the case. I want to add new ones. Doesn’t seem to me like that can be done by just extracting the lump as a .png.

Here’s what makes me think that. This is the default dbigfont.lmp exported as a .png file.

Image

Now compare this to the bigfont file in a Russian translation of GZDoom that I’ve developed. (My goal is to make this kind of file for Strife.)

Image

Quite big. See how there’s no extra spacing between the newly added characters?

Now, this is what the source image looks like before being converted in ImageTool to a usable .lmp file:

Image

That large, beige-colored section in the middle of the image that leads up to the guillemets and the Cyrillic characters is a blank section in the file that results in no characters being used according to the Windows-1251 codepage that the translation is based on. If you look at the character table on the aforementioned Wikipedia page and compare it to this image, nothing gets used from characters 97–171, 173–186, and, lastly, 188–191. (GZDoom is technically based on ISO 8859-1, but the translation works around that.)

As I showed in the second image, exporting any .lmp bigfont file as a .png like this gets rid of all the extra blank spacing that’s crucial for ImageTool to recognize which characters might be unused, if any, which is necessary for the type of bigfont file that I want to make. The point I’m making with this large post is that I don’t want any of the original material and character placements to get lost in a .png extraction. Also, if I try to use Spidey’s ZDoom Font Generator’s “Create font lump from image” function, like you recommended—even with the original GZDoom bigfont source file that’s included with ImageTool—I get this error:

Image

It seems my only choice is to reverse engineer the .png Strife font into a new source file if I want to recompile it at all, and I don’t even know if that’s possible. Several of Strife’s bigfont characters are taller than 12px, and anything more than that breaks ImageTool’s ability to convert images into .lmp files:

Code: Select all

C:\Doom\imagetool>imagetool font bigfontstrife.pcx bigfontstrife.lmp
Dimensions: 180 x 180
Char #82 (R) has height 15 instead of 12
bigfontstrife.lmp: Nothing to save

Re: ImageTool refuses to extract Strife’s bigfont file

by Kappes Buur » Sun Jan 06, 2019 9:03 am

Can't you open zd_extra.pk3 in Slade3 and export sbigfont.lmp
Spoiler:
as a png graphic
Spoiler:
and edit that?

Then create a new font lump with BHS's Font Generator, which is a front end for Imagetool.

ImageTool refuses to extract Strife’s bigfont file

by Kostov » Sun Jan 06, 2019 1:49 am

If I try to use ImageTool to convert sbigfont.lmp (located in zd_extra.pk3) into a .pcx file so I can edit it in an image program, I get this error:

Code: Select all

Dimensions: 65537 x 49
sbigfont.lmp is too short
Looking at the file in SLADE and comparing it to dbigfont.lmp (Doom’s bigfont file), it is noticeably shorter, which, I assume, makes ImageTool think there’s something wrong with the file, as it’s not Doom-based. If the tool can’t extract the contents of the file, I’m not sure what can.

Top