[DoomCRAP] ZDoom Font Generator

Any utility that assists in the creation of mods, assets, etc, go here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

[DoomCRAP] ZDoom Font Generator

Postby bagheadspidey » Sat Oct 20, 2007 10:36 pm

Notice:

this tool is now part of DoomCrap.

__________________________________

This tool is designed to work together with imagetool (and, optionally, image editing software of your choice) to create font lumps.

-- UPDATES --

Last version: 0.2.7

* Major bug fixes
* Project home page updated somewhat

link - http://doomfontgen.sf.net/ (old, please use DoomCrap link above)

-- OLD STUFF --

Last version: 0.2.6

* Conversion tools
* Documentation
* Bug fixes

Old version: 0.2.5

* Imagetool support!
* More crap I'm too lazy to write about. Check it out for yourself!

Old version: 0.2.4

* STCFN* save bug fixed
* User- configurable character templates
* Load / save character sets
* Added "zoom" feature
* Fixed palette when exporting bigfont

Old version: 0.2.3

* STCFN* font support - added option to save font as a folder full of images
* Fixed palette when exporting indexed console font (thanks, ImageMagick ;)
* Console font characters are now centered when using a variable width font
Last edited by bagheadspidey on Fri Aug 14, 2009 6:20 pm, edited 14 times in total.
User avatar
bagheadspidey
 
Joined: 21 Oct 2007

Postby wildweasel » Sat Oct 20, 2007 11:11 pm

This is something I've wanted for a while - any chance you could add an option to generate an STCFN* font too?
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 16 Jul 2003

Postby bagheadspidey » Sat Oct 20, 2007 11:38 pm

wildweasel wrote:This is something I've wanted for a while - any chance you could add an option to generate an STCFN* font too?


Can you link me to some info on STCFN* fonts? Don't know anything about it.
User avatar
bagheadspidey
 
Joined: 21 Oct 2007

Postby MDenham » Sat Oct 20, 2007 11:41 pm

bagheadspidey wrote:
wildweasel wrote:This is something I've wanted for a while - any chance you could add an option to generate an STCFN* font too?


Can you link me to some info on STCFN* fonts? Don't know anything about it.
They're the 8x8 HUD-message characters, typically in red (since that's what the color translations for them are set to work from).

If more information is needed, I can elaborate, but that should be enough for graphics purposes.
MDenham
There will be cake.
 
Joined: 14 Oct 2007

Postby bagheadspidey » Sat Oct 20, 2007 11:51 pm

from imagetool.txt:
confont
-------

This produces a file of type FON1.

The source image for a console font must have 256 characters of identical size arranged in a 16x16 grid. Palette entry 0 indicates transparency, palette entry 1 is the darkest color a character can have, and palette entry 255 is the lightest color. Values in between range between the two. The source image's palette is ignored when the font is created, so you should design the font with a palette like this to best visualize how it will appear in-game.

font
----
This produces a file of type FON2. Unlike FON1, this format supports custom palettes and characters of varying widths. You also don't need to supply a full 256 characters and, in fact, cannot do so without scripting.

The source image should have each character surrounded by a box made p of palette entry 255. Like confonts, palette entry 0 indicates transparency, but unlike confonts, all the other 254 colors in the source image's palette re used to colorize the font, so you can use any palette you want when esigning the font.

When converting with the command line, the first character must be a pace, and the box surrounding it must start in the upper-left corner of the ource image. These restrictions are relaxed if you use scripting, which I will discuss later.

You can use this font (or a confont) with a ZDoom hudmessage by executing the ACS command setfont("fontname") first. The fontname passed to setfont should be the same as the font's lump name inside a wad. If you use a hudmessage color of CR_UNTRANSLATED, then the font will use the palette you designed it with. Otherwise, it will be recolored to a single hue of differing shades.


Do STCFN* fonts not work like this? how do they work?
User avatar
bagheadspidey
 
Joined: 21 Oct 2007

Postby wildweasel » Sun Oct 21, 2007 12:09 am

The STCFN* fonts are just one individual graphic lump for each letter/number/symbol. It's used by ZDoom to display the pickup messages and obituaries, among other things. You can find the entire font in your Doom.wad.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 16 Jul 2003

Postby bagheadspidey » Sun Oct 21, 2007 12:18 am

wildweasel wrote:The STCFN* fonts are just one individual graphic lump for each letter/number/symbol. It's used by ZDoom to display the pickup messages and obituaries, among other things. You can find the entire font in your Doom.wad.


Ok, I see them - STCFN033 - STCFN121. That feature will be easy to add.
User avatar
bagheadspidey
 
Joined: 21 Oct 2007

Postby Graf Zahl » Sun Oct 21, 2007 2:01 am

But don't limit yourself to 33-121. ZDoom can handle the extra characters located at 192++.

MDenham wrote:They're the 8x8 HUD-message characters, typically in red (since that's what the color translations for them are set to work from).



There is no need to make the font red. To colorize a font ZDoom first desaturates the colors and then re-colorizes them with the new color. The Strife font is yellow, for example, the Quake font found in several mods is brown and the font in Hacx is blue but all of them are properly colorized.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Nash » Sun Oct 21, 2007 2:06 am

Finally! I was beginning to think this will never happen. :)

No more painstakingly long hours in Photoshop just to make new fonts...

(if this app will work with Windows, that is)
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Postby MDenham » Sun Oct 21, 2007 2:07 am

Graf Zahl wrote:But don't limit yourself to 33-121. ZDoom can handle the extra characters located at 192++.

MDenham wrote:They're the 8x8 HUD-message characters, typically in red (since that's what the color translations for them are set to work from).



There is no need to make the font red. To colorize a font ZDoom first desaturates the colors and then re-colorizes them with the new color. The Strife font is yellow, for example, the Quake font found in several mods is brown and the font in Hacx is blue but all of them are properly colorized.
That's good to know. Apologies for the incorrect information.
MDenham
There will be cake.
 
Joined: 14 Oct 2007

Postby Graf Zahl » Sun Oct 21, 2007 2:15 am

Well, unfortunately that doesn't look too good on Windows Vista. Apparently you try to output UTF-8 formatted text directly which Windows doesn't support. As a result all non-ASCII characters are completely garbled. Have a look at the screenshot I made.

Image

Also this program hogs 100% CPU power which even on my Core2 Quad system makes it quite unresponsive.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby bagheadspidey » Sun Oct 21, 2007 2:20 am

@Graf: Thanks for the info =)

@Nash: It should work under windows once we get a unicode build of wxLua. It is designed to run on either linux or windows. If you want to help, here's some links:

http://www.wxwidgets.org/wiki/index.php ... MSYS-MinGW

http://wxlua.sourceforge.net/docs/insta ... _makefiles
User avatar
bagheadspidey
 
Joined: 21 Oct 2007

Postby bagheadspidey » Sun Oct 21, 2007 2:21 am

graf: i am aware that the windows build is totally screwed, thus the notices all over the place ;) a unicode build of wxLua should clear that up - but unfortunately I am windows-boxless at the moment

edit - so windows graphics handling routines cannot handle unicode strings _at all_? How the hell do you handle unicode in windows then?
User avatar
bagheadspidey
 
Joined: 21 Oct 2007

Postby Graf Zahl » Sun Oct 21, 2007 2:42 am

Windows can handle Unicode, in fact it's its native text format. Unfortunately WxWidgets screws this up totally. Their ASCII build is utterly incapable of handling any kind of Unicode internally.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby bagheadspidey » Sun Oct 21, 2007 2:56 am

Graf Zahl wrote:Windows can handle Unicode, in fact it's its native text format. Unfortunately WxWidgets screws this up totally. Their ASCII build is utterly incapable of handling any kind of Unicode internally.


Well, it sounds like it should be easy enough to do a unicode build of wx on windows then. I don't know when i'll have access to a windows dev environment though... That's kind of the whole reason i used an interpreted language, so I wouldnt have to build anything on windows =/
User avatar
bagheadspidey
 
Joined: 21 Oct 2007

Next

Return to Editors / Asset Manipulation

Who is online

Users browsing this forum: No registered users and 0 guests