BMF Bitmap font support

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: BMF Bitmap font support

Re: BMF Bitmap font support

by Ceeb » Wed Mar 03, 2010 12:21 am

Well, my project is GZDoom only, I'll focus on other stuff until Graf updates.

Re: BMF Bitmap font support

by Gez » Wed Mar 03, 2010 12:15 am

Ceeb wrote:I commented out my FONTDEFS definition of the previous TIMEFONT and tried to launch GZDoom.
BMF support has not been ported to GZDoom yet. Try it in ZDoom for the time being. (GZDoom 742 is up-to-date with ZDoom r2169; BMF was added in r2180, with bug fixes in the following two revisions.)

Re: BMF Bitmap font support

by Ceeb » Tue Mar 02, 2010 11:14 pm

So, mmm, any clear instructions on how to use these then?

I tried slapping the font of my choice into my PK3, with the name TIMEFONT.bmf (TIMEFONT being a font I had made myself, and was defined.)

I commented out my FONTDEFS definition of the previous TIMEFONT and tried to launch GZDoom. Upon running a script that uses TIMEFONT, I got the standard small font.

Some wiki documentation would be tops.

Re: BMF Bitmap font support

by randi » Mon Mar 01, 2010 8:01 pm

Gez wrote:Here.
Enjay wrote:r2181 - Here's confont crash from me too:
The problem is not the font (exactly). The problem is that you are both using the alt hud, and it assumed that it could get any character it wanted from the font. With the standard console font, this was the case. With your substitute, this was not so.

Re: BMF Bitmap font support

by Jimmy » Sat Feb 27, 2010 8:15 am

Randy: Hmm. After some testing, it didn't look as though the problem was with ZDoom. Then I redownloaded the font and it worked fine. :?

Re: BMF Bitmap font support

by Enjay » Sat Feb 27, 2010 4:17 am

r2181 - Here's confont crash from me too:
CrashReport.zip
Otherwise, however:
Image
Works like a charm. :)

Re: BMF Bitmap font support

by Gez » Fri Feb 26, 2010 5:38 pm

randy wrote:
Gez wrote:What can I say? It crashed for me.
Crash log where?
Here.

Map file is here.

Re: BMF Bitmap font support

by randi » Fri Feb 26, 2010 5:28 pm

Gez wrote:My method is simply right-click -> send to -> ZDoom
Okay, then. Loading files without -file only checks for a few select extensions. Currently, that's .wad, .zip, .pk3, and .txt. Anything else requires -file.
Gez wrote:What can I say? It crashed for me.
Crash log where?
jimmy91 wrote:Certain glyphs appear as huge spaces, resulting in total messes on the HUD.
Screenshot? Looks fine to me with Enjay's test script in place.

Re: BMF Bitmap font support

by Jimmy » Fri Feb 26, 2010 3:50 pm

This font, when loaded as a SMALLFNT, DBIGFONT or CONFONT, causes problems. Certain glyphs appear as huge spaces, resulting in total messes on the HUD.

Re: BMF Bitmap font support

by Gez » Fri Feb 26, 2010 2:57 pm

1. By not even added, I mean that it was not listed after "W_Init: Init WADfiles." on the console log. As for calling it DOOMFONT, I thought that was the name. The only sources of info for fonts on wiki are [wiki]FONTDEFS[/wiki] and [wiki]SetFont[/wiki]. (A generic [wiki]Fonts[/wiki] page would be quite useful.) Loading it as DBIGFONT works (except, of course, in the places where Doom uses a graphic instead).

2. Loading single-files as lumps work just fine for most things (e.g., text files named decorate.wad or mapinfo.wad). My method is simply right-click -> send to -> ZDoom

3. What can I say? It crashed for me.

Re: BMF Bitmap font support

by randi » Fri Feb 26, 2010 2:12 pm

Gez wrote:I renamed it as DOOMFONT.BMF; the outcome was that it was not even added.
What do you mean not even added? ZDoom doesn't use anything called "DOOMFONT". Do you mean "DBIGFONT" instead?
Gez wrote:I renamed it as DOOMFONT.WAD; then it was added but didn't do anything.
Why would you name it a wad when it isn't one? How are you trying to "add" it?
Gez wrote:I renamed it as CONFONT.WAD; it was added and produced a crash (Access Violation - tried to read address 00000006) when starting a new game.
Doesn't crash for me. However, I believe the console still assumes fixed size character cells. It might even still assume 8x8 characters in places. I fixed this up for my Duke port, but I don't remember if I ever ported it back to ZDoom.
Gez wrote:Verdict: doesn't work at all for big fonts, provokes crashes with console fonts, can therefore only be used for small fonts.
Works absolutely fine for me. I did test this before committing it.
Enjay wrote:It works fine with the built-in fonts and other imagetool created fonts but the BMFs simply get ignored.
Oh, poo. Another place to check the font header! In my defense, my testing just consisted of replacing DBIGFONT and CONFONT, since those were existing fonts that I could replace and test without having to do up a map.

Re: BMF Bitmap font support

by Graf Zahl » Fri Feb 26, 2010 9:21 am

The entire font code is in dire need of a major cleanup. It's currently all single lump font types mashed together in one big ugly class.

This really needs the same treatment I gave to the texture and resource management code, i.e. splitting it up into one class per font type. I'm just too short on time right now or I'd do it immediately.

Re: BMF Bitmap font support

by Enjay » Fri Feb 26, 2010 8:59 am

Which, IMO, is a severe limitation because I'd primarily want it as an extra font, not a replacement for existing ones. Presumably, however, this is a bug?

(btw, I can now get the small font working. That was my mistake, not Zdoom's.)

Re: BMF Bitmap font support

by Gez » Fri Feb 26, 2010 8:26 am

I downloaded a random font from the website in the first post. I think it was blusteal. It is not a very legible font.

I renamed it as DOOMFONT.BMF; the outcome was that it was not even added.

I renamed it as DOOMFONT.WAD; then it was added but didn't do anything.

I renamed it as CONFONT.WAD; it was added and produced a crash (Access Violation - tried to read address 00000006) when starting a new game. It worked in the console, though, as long as you stayed in the menu. (Of course, this particular font is absolutely horrible as a console font, far too large and quite unreadable.)
Image

I finally renamed it as SMALLFNT.WAD and then it worked without a hitch.
ImageImage

Verdict: doesn't work at all for big fonts, provokes crashes with console fonts, can therefore only be used for small fonts.

Re: BMF Bitmap font support

by Enjay » Fri Feb 26, 2010 7:51 am

Can't get it to work myself. I've downloaded and tried 3 different fonts. I've tried them in a WAD, in a zip and merely added to the command line. I always just see the message in the standard smallfont

I've tried with extensions on the file names, without and I have also tried specifying "smallfont" and "bigfont" then renaming the bmf lump accordingly but I still got the appropriate default font. When I tried the same with confont, I got a crash instead.

I'm using this script:

Code: Select all

script 1 OPEN
{
	SetHUDSize (640, 480, 1);
	SetFont("insert_font_name_here");

	print (s:"Super High Impact
	\n!#$%&'()*+,-./
	\n0123456789:;<=>?@
	\n ABCDEFGHIJKLMNOPQRSTUVWXYZ
	\n [ \ ]^_`y \n ÄÅÖÜØß
	\n the quick brown fox jumps over the lazy dog.");
}
It works fine with the built-in fonts and other imagetool created fonts but the BMFs simply get ignored.

I am using revision 2180

These are the fonts that I have tried:
http://bmf.wz.cz/bmf03.php?filename=sof ... 20BY%20CRS

http://bmf.wz.cz/bmf03.php?filename=shi ... %28MAME%29

http://bmf.wz.cz/bmf03.php?filename=ari ... 4pt%20bold

Top