Edit Font

I’m working on a project of hacking Fire Emblem on GBA. A member of the forum where I started this project doesn’t believe that my team is working on that project because all of the languages is English. So he wants us to add our native language to the game. Sadly, I haven’t done anything like this before and I don’t have any clue how to do that. A guy give me an idea that I don’t have to change the language, I just have to modify the font which is used in the game and add the character which is belonged to my native language. Because my native language is based on Latin. So I make this topic to ask you guys two question

  1. How to extract the font from Fire Emblem Rom and insert them into the Rom?
  2. How to modify the font? By any tool or program that be able to do that?
    Waiting for your answer.
    P/S: Basically, I do want to have my native language in the game. But I’ll also make an English version for the hacking project so I could share it to you.

I don’t know exactly how to edit the font, but i know how to import it.
The FE Roms has two Pointer Arrays that have pointers for each symbol, one for the text font and other for the menu font, these poiinters points to a 0x48 bytes of lenght block that are the symbol info, you need to import these blocks for the symbols that you want to add and point them to the new free space…
But this is only neccesary on the FE7 USA rom, the FE8 USA rom has the Spanish-Francais-Portuguese-Italian symbols in it

FE7 USA Menu Font Array - B896B0
FE7 USA Text Font Array - B8B5B0
FE7 EU(English-Italian-Spanish ver.) Menu Font Array - C4C90C
FE7 EU(English-Italian-Spanish ver.) Text Font Array - I think this one is in C4F704 but im not sure

they start with 31 empty slots because they follow the ASCII code so, this is the order
https://www.asciitable.com
In example, if you want the “Ñ”, you need go to the FE7 EU array, go to the slot 0xA5, follow the pointer, copy the 0x48 bytes block, put in a new space in the new rom, go to the 0xA5 slot of the FE7 USA array, an put the pointer of the 0x48 bytes block

PS: If you speak spanish i can explain more easily

1 Like

In FE8(U): if I want the “ñ” in “mantaña”, I’ll look it up on the character table (here: https://i.imgur.com/qUioDsl.png), then I’ll write “manta[0xF1]a” in my dialogue file.

There’s some info out there on modifying/making glyphs but I’m unfamiliar with how to work it, hopefully someone can shed some more light there.

1 Like
struct font
{
	void*	next_pointer;		//+0x0 Japanese ROM only. Otherwise it is null.
	byte	sjis2byte;			//+0x4 Japanese ROM only. Otherwise it is 0.
	byte	width;				//+0x5 The width of the font.
	byte	unk1;				//+0x6 Fixed 00.
	byte	unk2;				//+0x7 Fixed 00.
	byte	bitmap4color[64];	//+0x8 Bitmap 4 colors.
}; sizeof() == 72(0x48)

The fonts of FE8U(FE7U) and FE8J(FE7J) are FEBuilderGBA and can be edited.
You can export and import fonts as png images.
However, FEBuilderGBA does not support FE8EU(FE7EU).

The font Bitmap is a 16 * 16 uncompressed bitmap.
However, colors can only be used up to 4 colors.

0x00 Background color (transparent).
0x01 Gray
0x02 White
0x03 Black

Since it is 4 colors, information of 4 dots is stated in 1 byte.
(width:16 / 4) * height:16 == 64byte


I try scribbling on the font for testing.
It is correctly changed.

1 Like

One more question
I want to extend the font because my navite language is larger than the latin. Is there any thing I can do?

What is the native language you are using?
Does the language fall within the range of single byte (0-255) like English?
Or do you need multibyte like Japanese or Chinese?

If it falls within the single byte range, please use FE7U, FE8U font system space as MatonMx says.

When multibyte is necessary, it is quite troublesome.
I made a patch that displays Japanese on FE8U, FE7U. (DrawMultiByte Patch (Source code is in FEBuilderGBA))
However, I use Shift-JIS which is the old Japanese character encoding method. (Because FE8J, FE7J, FE6 are old games, ShiftSJIS is used.)
If you are using a multi-byte language, you need to extend this patch and remodel it so that you can draw the scope of your Native language.
How to extend depends on the multibyte encoding method of your Native language.

My native language is Vietnamese, based on Latin but cutted down some characters and added some, make it about 29 characters. But it’ll request more than just 255 byte to show all of the characters and their extra form.

I do not know anything about Vietnamese.
I do not know the specification of Vietnamese character string encoding.
So, I can not make Vietnamese DrawMultiByte.
It is necessary to make it by oneself, for example by modifying DrawMultiByte.

Ultimately, it may be that UTF-8 should be supported by FE.
Then, although there are some restrictions, you can display all the languages.
However, it requires a very big remodeling.

In the current situation, it is good to select and display some characters in a single byte range.

Vietnamese managed to fall within the 1 byte range.
However, the characters 0x02, 0x05, 0x06 ,0x80 are likely to conflict with the character string escape sequence used in FE.

Fortunately, 0x03, 0x10, 0x11 are free.(In FE, it is used for character feed, loading and erasing portrait.)
However, since 0x80 is being used, this is quite a serious problem.
In FE, 0x80 is used for special effects.
If 0x80 can not be used, there is considerable problem.

This is Vietnamese :slight_smile:

Chào người ae

hi mate

Tưởng mỗi mình t vn :grin:

I made FE8U and FE7U support UTF-8.
Bettramese can also be displayed. (Please use the latest version)

In the first version, there was a mistake, and it worked only in the code format having a completely different code format from LAT 1 like Japanese, Korean, Russian.
Currently, this bug has also been resolved.
We can use character codes all over the world.

1 Like

Chào đồng chí :v:

Anh chỉ em cách xóa skill em hông muốn dùng và thêm skill mới trong skillsystem được hông?