ImageTool refuses to extract Strife’s bigfont file

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

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 Reply
User avatar
Kostov
 
 
Posts: 2020
Joined: Thu Dec 26, 2013 3:26 pm
Location: Sweden
Contact:

ImageTool refuses to extract Strife’s bigfont file

Post by Kostov »

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.
User avatar
Kappes Buur
 
 
Posts: 4114
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: ImageTool refuses to extract Strife’s bigfont file

Post by Kappes Buur »

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.
User avatar
Kostov
 
 
Posts: 2020
Joined: Thu Dec 26, 2013 3:26 pm
Location: Sweden
Contact:

Re: ImageTool refuses to extract Strife’s bigfont file

Post by Kostov »

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
User avatar
Kostov
 
 
Posts: 2020
Joined: Thu Dec 26, 2013 3:26 pm
Location: Sweden
Contact:

Re: ImageTool refuses to extract Strife’s bigfont file

Post by Kostov »

The case is closed. More info here.
Post Reply

Return to “Assets (and other stuff)”