Ok. So I have been doing my research on this, and I am more confused than when I started. I don't follow the ZDoom wiki very well on this topic, and other threads have just made my head hurt...
So what I have at the moment is a Font Lump (pic here: http://img706.imageshack.us/img706/9171/dquafont.png ) and a fontdefs lump that has the following code in it
DQUAFONT
{
Template DQUA%02d
}
I should mention that I do not wish to overwrite Doom's default BIGFONT and SMALLFONT fonts, but to be able to use this quake font as a totally separate and new font in addition to the other default ones.
Now, in theory, shouldn't I be able to use this font by using the Setfont("DQUAFONT"); command in the map script? I am clearly missing something as this is not working.
So any suggestions/help would be hugely appreciated.
Thanks guys.
P.S. I also posted this same thread over at Doomworld.
Trouble defining a new font?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Re: Trouble defining a new font?
You have just one font lump, right? Not one lump per character?
The "template" keyword is for a [wiki]composite font[/wiki]. You use standard printf syntax to generate the lump names from the character code. So with "Template DQUA%02d", you're telling that character #65 (that's uppercase A, if you look at an ascii table) has an image in the lump named DQUA65.
Ultimately, the problem is that your font is not in a supported [wiki]font format[/wiki]. The simplest fix would probably be to cut your font image into individual lumps named according to their characters' ASCII value. They'd be DQUA32 (space) to DQUA96 (`).
Or you could use Randy's ImageTool to create a font lump in FON1 or FON2 format, but that'd require some work as well so I don't know if it'd be simpler.
The "template" keyword is for a [wiki]composite font[/wiki]. You use standard printf syntax to generate the lump names from the character code. So with "Template DQUA%02d", you're telling that character #65 (that's uppercase A, if you look at an ascii table) has an image in the lump named DQUA65.
Ultimately, the problem is that your font is not in a supported [wiki]font format[/wiki]. The simplest fix would probably be to cut your font image into individual lumps named according to their characters' ASCII value. They'd be DQUA32 (space) to DQUA96 (`).
Or you could use Randy's ImageTool to create a font lump in FON1 or FON2 format, but that'd require some work as well so I don't know if it'd be simpler.
Re: Trouble defining a new font?
Yes. I was using just a single font lump.
On Enjay's homepage, there is a download called "font.zip", about halfway down this page. In it, he has a pile of fonts, and each font is a single lump, not a lump for each symbol, which is why I thought that defining a new font was simpler than it seems to be. In Enjay's font.wad, there are three lumps - "SPLINT1, 2 and 3" and I have no idea what they are for.
Sorry Gez, I am still as confused as ever. Thanks for your reply, and for referencing that ASCII table. At least I can follow that table. Never done a days programming in my life, other than ACS scripting in my ZDoom mod, so I really don't even have a real grasp of syntax and whatnot, but that table is pretty self explanatory... The fontdefs on the ZDoom wiki, and the FON1 and FON2 pages were all pretty meaningless to me tho.
So if I was to cut the font up into its individual symbols and name them accordingly, (So far I follow you), then put all these lumps into my wad, what then? Is that it?, so I can just use the ACS "SetFont" command in the script for a level, or do I still have to define a fontdefs lump with the fontdef for each symbol/lump.
On Enjay's homepage, there is a download called "font.zip", about halfway down this page. In it, he has a pile of fonts, and each font is a single lump, not a lump for each symbol, which is why I thought that defining a new font was simpler than it seems to be. In Enjay's font.wad, there are three lumps - "SPLINT1, 2 and 3" and I have no idea what they are for.
Sorry Gez, I am still as confused as ever. Thanks for your reply, and for referencing that ASCII table. At least I can follow that table. Never done a days programming in my life, other than ACS scripting in my ZDoom mod, so I really don't even have a real grasp of syntax and whatnot, but that table is pretty self explanatory... The fontdefs on the ZDoom wiki, and the FON1 and FON2 pages were all pretty meaningless to me tho.
So if I was to cut the font up into its individual symbols and name them accordingly, (So far I follow you), then put all these lumps into my wad, what then? Is that it?, so I can just use the ACS "SetFont" command in the script for a level, or do I still have to define a fontdefs lump with the fontdef for each symbol/lump.
Re: Trouble defining a new font?
Those fonts are in the Zdoom internal font format crated by Randy's imagetool util.
http://zdoom.org/files/utils/imagetool.zip
http://zdoom.org/files/utils/imagetool.zip
Re: Trouble defining a new font?
Basically, the reason why an image cannot work is that ZDoom would have no way to know where a character glyph begins and end. Especially for a non-proportional font like this. So there needs to be something that helps it by telling it exactly where each character's graphic data begins and ends. The simplest way for that is to have each character in a separate image, but then you need a FONTDEF lump to "compile" together all these images into a single font.
Alternatively, you can use one of the existing bitmap font formats (FON1, FON2 or BMF), but then you need to use programs like ImageTool to convert your images into such fonts.
Note that if you look at these Enjay fonts you speak of with SLADE 3, they'll appear as a single image; but that's not what they are. The "type" column will tell you they are fonts. Displaying a composite image of all character glyphs is just a placeholder in SLADE until a proper font editor is implemented, if that ever happens.
Speaking of which, why don't you use the qfont from that page? It's already compiled as a single-lump font and would work.
Alternatively, you can use one of the existing bitmap font formats (FON1, FON2 or BMF), but then you need to use programs like ImageTool to convert your images into such fonts.
You already have a fontdef lump. If you cut the image into little bits and name them as I told you, this already-existing fontdef lump will do the rest of the work.Kyka wrote:So if I was to cut the font up into its individual symbols and name them accordingly, (So far I follow you), then put all these lumps into my wad, what then? Is that it?, so I can just use the ACS "SetFont" command in the script for a level, or do I still have to define a fontdefs lump with the fontdef for each symbol/lump.
Note that if you look at these Enjay fonts you speak of with SLADE 3, they'll appear as a single image; but that's not what they are. The "type" column will tell you they are fonts. Displaying a composite image of all character glyphs is just a placeholder in SLADE until a proper font editor is implemented, if that ever happens.
Speaking of which, why don't you use the qfont from that page? It's already compiled as a single-lump font and would work.
Re: Trouble defining a new font?
Thanks Gez and Enjay for the replies. I am starting to understand better now. And I am sure than in a couple of months time, I will look back, and wonder how I never got this. That happens whenever I chance to look back at some old editing questions that I asked in times past, and from my new and lofty heights of ZDoom wisdom, I wonder, "How did I not understand this? Is it even possible to not understand this...?" *Sigh*
Perhaps I should have clarified one thing better tho. That gif that I posted of the quake font is a gif of an actual FONT lump in Slade. It must be in the FONT format, because if I rename that particular lump to "BIGFONT", then it works really well and replaces all the text in my ZDoom mod from Doom font to Quake font. So the lump itself is obviously correct in the way it works and is in the right format.
The problem comes when I try to define that lump as a whole new font, which I can use in addition to the default Doom font itself. This is where I am still stuck, and do not seem to be able to manage.
Thanks again guys.
Perhaps I should have clarified one thing better tho. That gif that I posted of the quake font is a gif of an actual FONT lump in Slade. It must be in the FONT format, because if I rename that particular lump to "BIGFONT", then it works really well and replaces all the text in my ZDoom mod from Doom font to Quake font. So the lump itself is obviously correct in the way it works and is in the right format.
The problem comes when I try to define that lump as a whole new font, which I can use in addition to the default Doom font itself. This is where I am still stuck, and do not seem to be able to manage.
Thanks again guys.
Re: Trouble defining a new font?
Ah yeah. Then all you need to do is remove the FONTDEF lump, which is overriding your font with one made of non-existent images. 
FONTDEF is only useful to make fonts out of separate images. If you have something that's already in a font format, you shouldn't use FONTDEF for it.

FONTDEF is only useful to make fonts out of separate images. If you have something that's already in a font format, you shouldn't use FONTDEF for it.
Re: Trouble defining a new font?
You know what Gez.
It really was that simple.
Thanks again.
I will have to get that tool that you and Enjay suggested, for future reference, as it sure wasn't me who put this particular font lump together in the first place.
It really was that simple.
Thanks again.
I will have to get that tool that you and Enjay suggested, for future reference, as it sure wasn't me who put this particular font lump together in the first place.