Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: zellfy on 2019-04-04 03:30:52

Title: About the font in the game
Post by: zellfy on 2019-04-04 03:30:52
hello, everyone. I am from chinese. I was doing the translation for FF7 from English to Chinese during the past days.
Now there is a problem. I made a png contains many Chinese characters with BitmapFontGenerator and tried to replace the usfont_X.tex file in menu_us.lgp with some tools which can change the file style between tex and png just like FF7TexImageTool.
But I can't find the file that sign the coordinate of the PNG(characters map) just like fnt. So is there someone can help to solve this problem?
Thanks a lot.
Title: Re: About the font in the game
Post by: Aavock on 2019-04-09 16:24:19
Hi zellfy,
So let me see if I understand this correctly. You want to replace the usfont_XX.tex files with chinese characters ? May I recomend you to use the old 1998 version ? Using it you can easily insert direct *.png files into the game (instead of *.tex files) plus, the resolution is 4 times higher.

In any case you need to extract the original usfont_XX.tex files and drag rulers for rows and columns on top for each character with either photoshop or gimp, and then draw or write your own characters.
Title: Re: About the font in the game
Post by: zellfy on 2019-04-13 15:13:17
Hi zellfy,
So let me see if I understand this correctly. You want to replace the usfont_XX.tex files with chinese characters ? May I recomend you to use the old 1998 version ? Using it you can easily insert direct *.png files into the game (instead of *.tex files) plus, the resolution is 4 times higher.

In any case you need to extract the original usfont_XX.tex files and drag rulers for rows and columns on top for each character with either photoshop or gimp, and then draw or write your own characters.

Thank you for your reply.
I understand what you mean. And do you know where to fill in the coordinates of the characters in the font texture so that the game can recognize and display them.
Thank you again.
Title: Re: About the font in the game
Post by: Aavock on 2019-04-13 18:08:11
You mean x,y coordinates for each characters ? Use the current ones, here's an example:

(https://i.imgur.com/Kr7Ci2M.png)
Title: Re: About the font in the game
Post by: Sebanisu on 2019-04-14 10:29:10


In any case you need to extract the original usfont_XX.tex files and drag rulers for rows and columns on top for each character with either photoshop or gimp, and then draw or write your own characters.

Gimp also has a grid. In ff8 textures I found a grid of 8x8 pixels works well for the of low res stuff. As most of the characters I have seen were either 8x8 or 8x16. If your doing a upres version you'd just scale your grid. Thought this might  save you time. You can also turn on snap to grid to help stay in the lines.

Sent from my Pixel XL using Tapatalk

Title: Re: About the font in the game
Post by: zellfy on 2019-04-14 13:11:19
You mean x,y coordinates for each characters ? Use the current ones, here's an example:

(https://i.imgur.com/Kr7Ci2M.png)

Thank you for your reply again.
Do you mean I just need to replace the usfoot.tex with the png which contains all the characters and I don't need to type the coordinates in some file.
But if I don't do that how the game can recognize the characters.
Title: Re: About the font in the game
Post by: nfitc1 on 2019-04-14 13:16:12
DLPB knows. If he doesn’t reply to this thread you should send him a private message.

Though from what I recall there is only a list of widths for each character. The height and maximum width a character can be are fixed
Title: Re: About the font in the game
Post by: Aavock on 2019-04-14 16:23:43
Do you mean I just need to replace the usfoot.tex with the png which contains all the characters and I don't need to type the coordinates in some file.
But if I don't do that how the game can recognize the characters.

You need to use *.bmp file format then re convert it to *.tex (a single *.tex file for all different palettes/colors) if your're using the steam/2012 version. If you're playing the 1998 version you can insert multiple *.png files for each colors (4 times higher resolution). This last option is highly recommended.

Also, as NFITC1 says, the height of each character is fixed but you can manually edit the length of each character modifying the windows.bin file.
Title: Re: About the font in the game
Post by: zellfy on 2019-04-17 02:52:23
You need to use *.bmp file format then re convert it to *.tex (a single *.tex file for all different palettes/colors) if your're using the steam/2012 version. If you're playing the 1998 version you can insert multiple *.png files for each colors (4 times higher resolution). This last option is highly recommended.

Also, as NFITC1 says, the height of each character is fixed but you can manually edit the length of each character modifying the windows.bin file.

Actully, I was trying to translate the nintendo switch version of FF7. I found the font texture in two places: menu_us.lgp and window.bin. So which is the main file to modify? Or I have to edit both of them.
Title: Re: About the font in the game
Post by: Aavock on 2019-04-17 15:21:14
The displayed font textures in-game are the ones in the menu_us.lgp.

Before starting your project are you sure there's no chinese translation already done for PC? If so, you just need a few tweaks to make it work with the Switch version.
Title: Re: About the font in the game
Post by: zellfy on 2019-04-18 04:48:09
The displayed font textures in-game are the ones in the menu_us.lgp.

Before starting your project are you sure there's no chinese translation already done for PC? If so, you just need a few tweaks to make it work with the Switch version.

It seems that there are some differences between PC version and switch version. So I have to remake the font.
But the problem comes again, where is the code sheet.
Just like this: "char id=19968 x=1231  y=706   width=25    height=3     xoffset=0     yoffset=15    xadvance=25    page=0  chnl=15"
Title: Re: About the font in the game
Post by: Agahnim on 2019-05-20 18:27:14
http://forums.qhimm.com/index.php?topic=14328.msg209550

Ff7 in chinese language has already translated by fans.

Can you give us a link to your project ? May I include it in my topic ?