Posted: Thu Jul 16, 2015 7:37 pm Post subject: Help with displaying images with custom fonts.
I've been wracking my brain over this for a couple days now.
Currently, it's possible to display images using SetFont() along with a custom font in FON2 format. I've seen this done in several wads, and would like to use this feature for myself.
I have a Doom-palette indexed bitmap here with my custom graphic. Index color 0 from the palette is being used for transparency, and index 255 is the color used for the box that surrounds my graphic.
The script I use for ImageTool is as follows:
This does not raise any errors, and ImageTool tells me so-and-so pixels were processed.
In my ACS, I am using the following:
Slade3 recognizes the file as a FON2 font, and I even inserted a custom font that was used in someone else's wad, just as a control test. I cannot get any of these custom fonts to display. I've used the HudMessage() function as well, but the results are the same. Am I just not printing the correct characters or am I doing something fundamentally wrong here? I don't have access to the scripts in wads where this is actually used successfully.
I really don't know where to obtain any more information...
For anyone reading this, Krawa helped me figure it out.
All fonts, regardless of format can contain up to 256 characters. Each of those character slots can have a graphic. The CONFONT format (FON1) automatically splits these up into 256 slots, but with the BIGFONT format (FON2), you have to define the slots yourself by surrounding each character graphic in a box using color index 255.
My problem was that I only had one slot defined: one graphic with one box around it. The first character slot is not printable as I discovered, but the next slot is (which corresponds to "!"). It looks like an empty space character (" "), but it seems to be some null character instead. Krawa remedied this by putting a blank character (surrounded by it's own box) just before my graphic's box.
Also, instead of using a script with ImageTool, I just used the command line instead:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum