Jump to content
Sign in to follow this  
mash6

[Tutorial] Import Font on Arma 3

Recommended Posts

Hey,

Today I'm gonna tell you how to import a font to Arma 3. This tutorial is Windows only. First of all sorry for the mistakes in English, I'm french.

Because I am a kid, i'll take a kid font for demonstration.

Here is the demonstration font : http://www.dafont.com/fr/soymilk.font

First of all, download it. Then you'll find a .ttf (In this case, Denne-Soymilk.ttf). Open it and you'll see something like this (Sorry, french screen) :

1427508576-screenshot.png

Have a look on the yellow part, the name of the font, Soymilk. Write it somewhere, it's gonna be useful. Now click on Install.

Now, download BI Tools 2.5.1 and install at least the FontToTGA and TexView 2

Done ? Well !

Go in your BI Tools installation directory (By default : C:\Program Files (x86)\Bohemia Interactive\Tools) and you'll find the FontToTga folder.

Go in !

Here we are, right click on generateFontFamily.bat and then "Modifiy"

You'll have something like this :

call generateOneSize Arial 06
call generateOneSize Arial 07
call generateOneSize Arial 08
call generateOneSize Arial 09
call generateOneSize Arial 10
call generateOneSize Arial 11

But there is a problem with it... First, we don't want the Arial font, but Soymilk font, so replace Arial by Soymilk

And, we want more sizes of font than 6 to 11. So here is what I have :

call generateOneSize Soymilk 06
call generateOneSize Soymilk 07
call generateOneSize Soymilk 08
call generateOneSize Soymilk 09
call generateOneSize Soymilk 10
call generateOneSize Soymilk 11
call generateOneSize Soymilk 12
call generateOneSize Soymilk 13
call generateOneSize Soymilk 14
call generateOneSize Soymilk 15
call generateOneSize Soymilk 16
call generateOneSize Soymilk 17
call generateOneSize Soymilk 18
call generateOneSize Soymilk 19
call generateOneSize Soymilk 20
call generateOneSize Soymilk 21
call generateOneSize Soymilk 22
call generateOneSize Soymilk 23
call generateOneSize Soymilk 24
call generateOneSize Soymilk 25
call generateOneSize Soymilk 26
call generateOneSize Soymilk 27
call generateOneSize Soymilk 28
call generateOneSize Soymilk 29
call generateOneSize Soymilk 30
call generateOneSize Soymilk 31
call generateOneSize Soymilk 32
call generateOneSize Soymilk 33
call generateOneSize Soymilk 34
call generateOneSize Soymilk 35
call generateOneSize Soymilk 36
call generateOneSize Soymilk 37
call generateOneSize Soymilk 38
call generateOneSize Soymilk 39
call generateOneSize Soymilk 40

I'm going to size 40. It's enough for me.

Now, run the file we just modified, it will create a folder Fonts with 175 files. I won't explain what are these files, cause it's only a functionnal tutorial and not an explanation about how it works.

We now want to convert the .tga files to.paa

Run CMD and go to your TexView2 folder inside of the CMD.

Now, you must type the line to convert your files.

Here is mine (Check your own path) :

Pal2PacE C:\Program Files (x86)\Bohemia Interactive\Tools\FontToTga\Fonts

Now you can delete all hte TGA files and keep only the PAA and FXY files.

You must now create an addon.

Create a folder where you want and name it "fontTest". Ok ? Well go inside and create a config.cpp file.

Here is my config for example :

class CfgPatches {
class fontTest {
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {};
};
};

class CfgFontFamilies {
class Soymilk {
	fonts[] = {"\fontTest\Soymilk\Soymilk06","\fontTest\Soymilk\Soymilk07","\fontTest\Soymilk\Soymilk08","\fontTest\Soymilk\Soymilk09","\fontTest\Soymilk\Soymilk10","\fontTest\Soymilk\Soymilk11","\fontTest\Soymilk\Soymilk12","\fontTest\Soymilk\Soymilk13","\fontTest\Soymilk\Soymilk14","\fontTest\Soymilk\Soymilk15","\fontTest\Soymilk\Soymilk16","\fontTest\Soymilk\Soymilk17","\fontTest\Soymilk\Soymilk18","\fontTest\Soymilk\Soymilk19","\fontTest\Soymilk\Soymilk20","\fontTest\Soymilk\Soymilk21","\fontTest\Soymilk\Soymilk22","\fontTest\Soymilk\Soymilk23","\fontTest\Soymilk\Soymilk24","\fontTest\Soymilk\Soymilk25","\fontTest\Soymilk\Soymilk26","\fontTest\Soymilk\Soymilk27","\fontTest\Soymilk\Soymilk28","\fontTest\Soymilk\Soymilk29","\fontTest\Soymilk\Soymilk30","\fontTest\Soymilk\Soymilk31","\fontTest\Soymilk\Soymilk32","\fontTest\Soymilk\Soymilk33","\fontTest\Soymilk\Soymilk34","\fontTest\Soymilk\Soymilk35","\fontTest\Soymilk\Soymilk36","\fontTest\Soymilk\Soymilk37","\fontTest\Soymilk\Soymilk38","\fontTest\Soymilk\Soymilk39","\fontTest\Soymilk\Soymilk40"};
	spaceWidth = 0.7;
	spacing = 0.13;
};
};

Create a Soymilk folder in your addon and place all PAA and FXY files.

Pack it into a PBO, put in a modfolder, and run your game, then test it. It's done.

Have fun !

  • Like 2

Share this post


Link to post
Share on other sites

Hi mash6, Iver like this tutorial, I have a qustion want to ask you.

 

Can we set the font size?

 

Like config.cpp ( spaceWidth = 0.7;spacing = 0.13; ) there add size=24. Because my custom font look  too small in-game.

 

Can we modifier this?

Share this post


Link to post
Share on other sites

You should just export bigger sizes from the font ;) Then change the sizeEx value in your dialog

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×