Join also our Discord channel! Click here.

Electronic Arts Font File [FNTF] Plugin for Paint.NET

General game file tools that are useful for more than one game
Post Reply
User avatar
TopazTK
beginner
Posts: 20
Joined: Thu Mar 21, 2019 6:26 pm
Has thanked: 2 times
Been thanked: 10 times

Electronic Arts Font File [FNTF] Plugin for Paint.NET

Post by TopazTK » Fri May 08, 2020 5:31 am

Purpose:
This plugin allows for "*.ffn" files to be edited directly in Paint.NET. It was a request made by Rancher#1263 on Discord.

Format:
FNTF Files use an edited version of the infamous RAWBMP/2 Format which originates in the PS2. Funnliy enough, the font files are present and are eing used on PC games.

The most of the format is currently unknown territory. But this plugin works well enough to open, edit and save the image within the files. Currently, the known bits are:

Code: Select all

Int32 = Magic Header [FNTF]
Int32 = File Size - 0x10
0x14 = Unknown
Int32 = Image Location

// Skip to Image Location
Int32 = 0x7A
Int16 = Width
Int16 = Height
Int64 = Padding
[Width * Height / 2] = Image Data

Image Info:
Depth: 4BPP
RGB = 0xFFFFFF
Alpha = 4BPP Value

Image Structure Formula:
for (int i = 0; i < PixelData.Count; i++)
{
    byte b = PixelData[i];

    byte b2 = (byte)(b & 0xF);
    b = (byte)(b >> 4 & 0xF);

    Image.SetPixel(x, y, Color.FromArgb(16 * b, 255, 255, 255));
    Image.SetPixel(x + 1, y, Color.FromArgb(16 * b2, 255, 255, 255));

    x += 2;

    if (x >= 256)
    {
        x = 0;
        y += 1;
    }
}
Odds and Ends:
[*] This plugin is non-destructive, it will NOT hurt the possibly existent font data
[*] It does not care about color, only Alpha values
[*] Supports Transparency

Installation:
Extract the .DLL file inside the downloaded .ZIP file to C:/Program Files/paint.net/FileTypes.

Screenshots:
Image
Image
Image

Download:
Attached Below.

Please do not hesitate to report any bugs that occur.
Keep on Moddin'!

- TopazTK
You do not have the required permissions to view the files attached to this post.

macalok
ultra-n00b
Posts: 3
Joined: Sat Feb 10, 2018 10:02 am
Has thanked: 1 time

Re: Electronic Arts Font Fıle [FNTF] Plugin for Paint.NET

Post by macalok » Sun May 10, 2020 10:43 am

Can you adapt the plugin for paint.net version 3.5.11?

User avatar
TopazTK
beginner
Posts: 20
Joined: Thu Mar 21, 2019 6:26 pm
Has thanked: 2 times
Been thanked: 10 times

Re: Electronic Arts Font Fıle [FNTF] Plugin for Paint.NET

Post by TopazTK » Sat Aug 01, 2020 8:59 pm

macalok wrote:
Sun May 10, 2020 10:43 am
Can you adapt the plugin for paint.net version 3.5.11?
Sorry, I was away for a bit due to personal reasons. Does this plugin not work with PDN 3.5.11?
I will check this issue out.

macalok
ultra-n00b
Posts: 3
Joined: Sat Feb 10, 2018 10:02 am
Has thanked: 1 time

Re: Electronic Arts Font Fıle [FNTF] Plugin for Paint.NET

Post by macalok » Wed Aug 19, 2020 10:47 pm

TopazTK wrote:
Sat Aug 01, 2020 8:59 pm
macalok wrote:
Sun May 10, 2020 10:43 am
Can you adapt the plugin for paint.net version 3.5.11?
Sorry, I was away for a bit due to personal reasons. Does this plugin not work with PDN 3.5.11?
I will check this issue out.
No, for some reason, when investing fashion in the version 3.5.11, the mod does not work.

Post Reply