Page 1 of 1

Font Format

Posted: Thu Jan 17, 2008 8:22 am
by Juryiel
I wasn't sure where to ask this so I'll post it here.

I was looking to make a font that is full of colorful little pictures instead of letters, so that I can use them as icons in my menu. In that vein, what is the format of the font pictures? I opened them and they're all different sized, so how are they set up? Is it the proportion of each box that matters or what? Thanks in advance ;)

Posted: Thu Jan 17, 2008 10:32 am
by Allanon
Taken from the fonts.htm file located in the RF docs folder:
Bitmapped Fonts


Reality Factory uses bitmapped fonts to display text in the menu and during the game. They can be defined in the menu.ini file. You can use 29 different fonts (FONT1 to FONT29). Some entities and script commands make use of these fonts and you have to specify a font number: In this case Font1 corresponds to 0, Font2 to 1 and so on.

Entity Font #
Font Name

0
FONT1

1
FONT2

2
FONT3

3
FONT4

...
28
FONT29


To add custom fonts that can be used in the menu or in entities you first must create the necessary bitmaps and data files using the TTF2Font program. Run the program and select the font type, size and color. The height of the font in pixels is shown so you can get the size correct. Then export the font to the media\bitmaps\fonts directory. Next, open menu.ini in your editor (NotePad will work) and add a line to the list of fonts. If your font was saved as Times.dat then the line would look like:

font=FONT15 Times

assuming you wish to define FONT15 (#14) as your new font. Your new font is now available for use in your level entities or in the menu.

Note: FONT10 is used during weapon positioning in-game, so make sure this font is defined in the menu.ini file if you wish to use this feature
So you can use a font editor and create a new font that has your pictures then use TT2Font to convert it to a bitmap. Or use TT2Font to create a bitmap then add your pictures by editing that bitmap.

Posted: Thu Jan 17, 2008 7:10 pm
by Juryiel
Font editors cost money :(

That's why I was trying to see what the exact pixel size or pixel height/width ratio of each letter is in the bitmap but it's hard to figure out from the bitmaps themselves.

But now that I think about it I won't be able to make a .dat file by myself anyway so the only way to do it would be to get some type of Font Editor. Any of you guys know of any free ones? :)

Posted: Thu Jan 17, 2008 8:34 pm
by Allanon
Here is a link to a free online font editor:

http://www.pentacom.jp/soft/ex/font/edit.html