Page 1 of 1

How to get a custom font working. [Tutorial] (FAQ)

Posted: Tue Dec 27, 2011 3:08 pm
by Cerfon Rournes
The subject says it all. In this I will show you how to get your custom font working and ingame for SWBF2.

1. Go to BF2_ModTools/ToolsFL/bin/Fontedit.exe.

2. Open the program.

3. Click "Font", then "Capture". From there, select your font options.(Press "Show more fonts" to see all of the pre-installed windows fonts. In this way, you can install custom fonts and load them from the same "Show more fonts" window.) You should make sure you take the stock sizes as references.* See below for size refs.

4. After you have selected your options, press "Ok." You will now see the screen load all of the letters, numbers, and symbols. This may take a while depending on how big the font was.

5. Hit file, save. Save your new font in: data_***/Common/fonts. Make sure you save it as a Bitmap Font File(.FFF). Example: Newepicfont.FFF

6. Close the font program. Go to the folder where you saved the font to. (Should be data_***/Common/fonts). Copy one of the .fff.option files that was relative to your font's size and rename it to yours.*See below for size refs.

7. Now your font is ready for using! To load it for any use, go to data_***/common/core.req.
Add this line.

Code: Select all

REQN
{
"font"
"newfontthatyoujustmade"
"ifyoumadeanotheroneaddithere"
"anotherone..."
}
And so on.

8. Now, you can reference your font in certain files and scripts. For example, I loaded my custom font in the HUD files.
Example of that.
Text("player1weapon1name")
{
TextBox(0.328125, 0.000000)
TextBreak("Word")
TextFont("tfu_med")
Hidden/Spoiler:
Image
That's it! I hope that somebody finds this useful in the future. :)
*Here are a list of the stock battlefront text sizes and formats.
Hidden/Spoiler:
starwars_small = Aurabesh, regular, size = 10, antialias 1
gamefont_large = BattlefontShell, regular, size = 27, antialias 4
gamefont_medium = BattlefontShell, regular, size = 22, antialias 4
gamefont_small = BattlefontShell, regular, size = 20, antialias 4
gamefont_tiny = BattlefontShelltiny, regular, size = 17, antialias 4
This information can be found in the "readme" file, data_***/Common/fonts.

Re: Tutorial-How to get a custom font working.

Posted: Tue Dec 27, 2011 3:48 pm
by Teancum
Nice! :thumbs:

By the way, I love that you're taking a stab at redesigning the HUD.

Re: Tutorial-How to get a custom font working.

Posted: Tue Dec 27, 2011 3:57 pm
by Cerfon Rournes
Thanks Tean.
Offtopic. Here is my most recent HUD update. :)
Hidden/Spoiler:
Image

Re: Tutorial-How to get a custom font working.

Posted: Tue Dec 27, 2011 4:03 pm
by Teancum
If I had to critique I'd say make the reticule more translucent and move the health/stamina and map up a bit, but other than that I really like it! :thumbs:

Re: Tutorial-How to get a custom font working.

Posted: Tue Dec 27, 2011 4:05 pm
by Cerfon Rournes
Thanks for the comment and tip. :)

Re: Tutorial-How to get a custom font working.

Posted: Tue Dec 27, 2011 4:09 pm
by Eggman
I never even thought about changing the fonts in the game. I don't know that I would ever bother doing so, but it's cool nonetheless that you've posted a tutorial.

As for your custom HUD, it's looking better all the time! I especially like what you're trying out with the weapon display in the most recent update. My only complaint is that everything is bunched over on the left side of the screen. It isn't cluttered by any means, but it does look a little unbalanced. Then again, I'm a big fan of symmetry. :P

Re: Tutorial-How to get a custom font working.

Posted: Tue Dec 27, 2011 4:12 pm
by Marth8880
Argh, this still isn't working for the shell; everything still looks like random, gibberish symbols! :runaway: I'll post screenshots of that screwed up stuff soon, after I re-implement the font...

Re: Tutorial-How to get a custom font working.

Posted: Tue Dec 27, 2011 4:13 pm
by Cerfon Rournes
Thanks for the comment Eggman!
Here is my main ref for the HUD changes.
Hidden/Spoiler:
Image
@Marth8880: Hmm. Again, I'm not sure why that is. Did this happen with every font that you tried?

Re: Tutorial-How to get a custom font working.

Posted: Thu Mar 01, 2012 7:33 pm
by DarthXeon
Cerfon Rournes wrote:Thanks Tean.
Offtopic. Here is my most recent HUD update. :)
Hidden/Spoiler:
Image
Saints Row Hud FTW
Edit: With The Weapons Yea But Not Really The Health

Re: How to get a custom font working. [Tutorial] (FAQ)

Posted: Thu Mar 01, 2012 8:48 pm
by Marth8880
That's a replica of the TFU HUD, not the Saint's Row HUD.

Re: How to get a custom font working. [Tutorial] (FAQ)

Posted: Fri Jan 03, 2014 10:27 am
by Anakin
So after everybody told me text disable on HUD is not possible, i played a lot around and now i found a way.

The problem with this is, that i also disabled most of the menu text :D So my mod kills the text from everywhere.

Maybe someone has an idea, but first my addition for this tutorial.

Download this font

and install it like the tutorial above. You need to name the font gamefont_large, gamefont_small,... just the way the stock ones are called. Besides some letters like ö, ä, ü,.. all are removed.

I haven't found out what font is for what thing, but i'm pretty sure it should be possible to remove just the hud textes and not the menu text.
BUT this can also affect other maps. haven't test it now.

With this methode you can remove text from the hud WITHOUT a global ingame.lvl

Re: How to get a custom font working. [Tutorial] (FAQ)

Posted: Fri Jan 03, 2014 11:33 am
by Cerfon Rournes
Neat discovery Anakin! That is something that is definitely worth a look; If I get some time I'll test it out.