Homebrew [Release] NFTR Editor, a tool for editing nftr font files

Pk11

A catgirl with a DSi
OP
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,896
Country
United States
Looking for a way to edit or preview an NFTR format font in your relatively modern browser? Well you're in luck ^_^

:arrow: Simply head on over to pk11.us/nftr-editor :yay:
:download: Want to check out the mess of JavaScript that runs this thing? Got that on GitHub! it really is a total mess, I need to clean it up

Preview: (Note: these screenshots are a bit outdated)
light.png dark.png

What's an NFTR file?

NFTR (Nitro FonT Resource) is a font format used in some DS games and for the DSi's shared fonts, also pkmn-chest and TWiLight Menu++ use it and since I've had to add characters for some of the languages they support and its a pain to add them in manually, so I figured I'd make a tool to make editing them easier.

If you want details on the format then check out the info on GBATEK. Though do note that not everything uses them the same and some weird variants aren't documented there, let me know if a font isn't working and I can try fix it.

What's this useful for?

NFTR is a pretty nice font format for using on the DS so if you want to use NFTR files for homebrew this'll probably be nice, otherwise you might be able to use it to make a font edit romhack ¯\_(ツ)_/¯

I also plan to add font generation later so you can just generate DS fonts from existing fonts, that's not a feature yet, though.

What can this do?

Once you load up an nftr file you can type things in the top box on the left and it'll mirror to the bottom box rendered with the NFTR's font, complete with customizable palettes!

You can also enter any character in the font into the text box on the right and it'll show you an enlarged version of the character that you can then draw on with the selected color from the Brush color boxes to the right of that. You can also adjust the kerning of that letter and save it back into the font and it'll update your preview.

You can generate new graphics for your entire font with the 'Generate from font' button, this will automatically generate new graphics for every character currently in the font and automatically kern them. It will not add any new characters to the font however, so add them first as described below. This will use the current palette, but is (currently) best left to a black on white grayscale when generating as other palettes will cause the generation to not work correctly.

You can even add new characters to the font simply by clicking the "Add characters" button and entering all the characters you want to add! All duplicates and characters already in the font will be filtered out automatically so you don't even need to worry about that :ha:

You can also remove characters, adjust the kerning if the game adds an extra pixel or so, resize the font, and maybe even a few other things. Basically just anything I've felt the desire to do / have been asked to add, so let me know if there's anything missing and if it's not too hard I'll try add it.

Changelog: (last update 2021-02-07)
2021-02-07:
  • Add support for Shift-JIS, 1bpp, and fonts that don't have total widths (note: 1bpp is bugged when editing, will fix soon™)
  • Add kerning adjustment to the preview
  • Add viewing/editing letters by hex (put 0x#### in the "Letter" box)
2021-01-15:
  • Add font resizing
2021-01-08:
  • Change default palette to the one used for TWiLight Menu++
  • Add option to not regenerate the special chars (like the A button and such)
  • Fix whitespace and RTL generation in not-Safari
  • Use � instead of ? for missing char if in the font (actually on Jan 6)
2020-08-08:
  • Added an option to not regenerate existing characters to save time or when using a special font for some, but not all
2020-06-09:
  • Added proper tile map generation
  • Added removing characters
2020-04-15:
  • Changed the site to be hosted as a submodule of https://pk11.us instead of a separate GitHub Pages
  • Because of this the style now matches the rest of my site, and it has a dark mode! ;P
2020-04-09:
  • Added importing / exporting sizes and images
2020-04-08:
  • Fixed adding multiple characters to the font at a once
2020-04-06:
  • Added generating from an existing font
2020-03-30:
  • Show a confirm message before leaving the page
2020-03-19:
  • Improved color selection and added keyboard shortcuts
2020-03-18:
  • Created the site


Let me know if anything's broken in here and I'll try to fix it soon, I mainly only tested in Safari so its likely other browsers may have minor problems :unsure:[/list]
 
Last edited by Pk11, , Reason: Update changelog and the description a bit (take 3, bbcode is a pain)

Pk11

A catgirl with a DSi
OP
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,896
Country
United States
I've added generating from an existing font, for now its fairly limited as it will simply replace all characters currently in the NFTR with ones from the chosen font. I'll probably add the ability to automatically create new characters (ex. add Korean to a font) and to only generate specific characters later. Its still pretty nice if you want to generate a DS font from a computer one though :ha:
スクリーンショット 2020-04-06 1.59.12.png
It doesn't kern everything exactly right as it has to round to an integer so like with the E in this image it goes 1 pixel over and sometimes things will be 1px under, it generally looks about right though.

Edit: Also should mention: Non-grayscale palettes will break the generation currently as I compare the opacity of the RGB character image to just the red of the palette right now. I'll probably fix this later, it works fine for grayscale though so I was lazy
 
Last edited by Pk11, , Reason: Non-grayscale palette generation gets weird

sandwichwater

Active Member
Newcomer
Joined
Apr 13, 2021
Messages
38
Trophies
0
Age
22
XP
338
Country
United States
when i import an image it says "wrong size image" is there any way to load the file ¿ the main reason im trying to edit a file like this is to increase the font size as the original size is too small to really edit anything and have it come out differently
 

Pk11

A catgirl with a DSi
OP
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,896
Country
United States
when i import an image it says "wrong size image" is there any way to load the file ¿ the main reason im trying to edit a file like this is to increase the font size as the original size is too small to really edit anything and have it come out differently
Are you changing the font size first? You need to click the "Resize font" button and tell it the new size before you can import an image of a different size
 
  • Like
Reactions: banjo2

sandwichwater

Active Member
Newcomer
Joined
Apr 13, 2021
Messages
38
Trophies
0
Age
22
XP
338
Country
United States
Are you changing the font size first? You need to click the "Resize font" button and tell it the new size before you can import an image of a different size
ah yes that worked thankyou ! , is there a way that i can export as a .nftr file ¿ or is it image only ¿
 

Pk11

A catgirl with a DSi
OP
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
pk11.us
XP
3,896
Country
United States
hmm.. thats not seeming to export anything :( the only options i have are to export as png , is that the only option ¿
The one in the top right? It should download the NFTR file when you click it... If it's not working maybe try another browser. It works for me in Safari, Firefox, and Microsoft Edge (all on macOS)...

(this button)
スクリーンショット 2021-04-13 21.42.54.png
 
  • Like
Reactions: banjo2

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: 10 tabs open on chrome and no slow downs suck it low ram ple bs lol