Font Pack Extractor
A tool for extracting and repacking PNG font files from .fnt format in DOKAPON! Sword of Fury.
Table of contents
- Overview
- Requirements
- Installation
- Usage
- Output Format
- Troubleshooting
- Technical Details
- Contributing
- License
Overview
Font Pack Extractor is a Python script that allows you to:
- Extract PNG files from the game’s proprietary .fnt format
- Repack modified PNG files back into .fnt format
- Analyze font file structure for modding purposes
Requirements
- Python 3.6 or higher
- DOKAPON! Sword of Fury (PC Version) installed
- Basic knowledge of using command line tools
Installation
- Download the
font_extract_repack.py
script - Place it in the same directory as your .fnt files (usually in the game’s installation directory)
Usage
Extracting PNG from FNT
python font_extract_repack.py extract input.fnt output.png
Importing PNG to FNT
python font_extract_repack.py import original.fnt modified.png output.fnt
The script will:
- Validate the input FNT file
- Extract/Import PNG data
- Maintain original file format integrity
Output Format
The extracted files will be:
- Format: PNG
- Original quality preserved
- Original image parameters maintained
You can edit the extracted PNG files using any image editing software.
Troubleshooting
Common Issues
- File Not Found Error
Error: Could not find file at [path]/file.fnt
- Make sure the script is in the same directory as your .fnt files
- Verify the file name is exact
- Invalid Format Error
No embedded PNG data found in the .fnt file
- Ensure you’re using a valid .fnt file from the game
- Check if the file isn’t corrupted
Size Warnings
When importing a modified PNG:
- If the new file is smaller, padding will be added
- If larger, it will be truncated to match the original size
Technical Details
FNT File Structure
The .fnt file format is a proprietary format used in DOKAPON! Sword of Fury to store font data:
Data Section (0x000 - EOF)
- Embedded PNG data
- Standard PNG signature
- Standard PNG ending
Extraction Process
- File Validation
if start_index != -1 and end_index != -1: png_data = fnt_data[start_index:end_index]
- PNG Processing
# Extract PNG data with open(output_png_path, 'wb') as png_file: png_file.write(png_data)
Memory Considerations
- Files are processed in streams
- Direct PNG extraction without conversion
- Efficient handling of large files
Contributing
Found a bug or want to improve the tool?
- Report issues on GitHub
- Submit pull requests with improvements
- Share your findings on our Discord
License
This tool is licensed under The Unlicense. This means:
- ✅ Use freely for any purpose
- ✅ Modify and distribute without restrictions
- ✅ No attribution required
- ✅ Dedicated to public domain
- ✅ No warranty provided
See the LICENSE file for full details.