Command line tool to render text from NDS .NFTR fonts.
Project description
NDS Text Generator
Command line tool to render text from NDS .NFTR fonts.
Run from pip
pip install ndstextgen
ndstextgen --help
Run from source
Install pipenv.
pipenv sync
pipenv run python ndstextgen --help
Command line usage
ndstextgen <options> FONT "TEXT"
Example: ndstextgen --color red font.NFTR "Print multiline\nred text."
FONT
: (Required) Filename of the font, .NFTR extension can be omitted.
TEXT
: (Required) Text to write. "\n" can be used for a line break. Can be the name of a UTF-8 file to read the text from.
--out <file>
: Output file, set empty to just return the image. Default: text.png
--vert <int>
: Vertical spacing between lines. Default: 2
--fw <int>
: Use a fixed width instead of the VWF values in the font.
--spacing <int>
: Additional horizontal spacing between characters.
--color <text>
: Color to apply to the font. Default: black
--bg <text>
: Background color. Default: transparent
--width <int>
: Set width for the generated image. Default: 256
--height <int>
: Set height for the generated image. Default: 256
--center
: Center each line.
--wwrap
: Automatic wordwrap.
--no-crop
: Don't crop the image before saving it.
--encoding <str>
: Encoding the font uses. See Python documentation.
Script usage
import ndstextgen
image = ndstextgen.gen("font.NFTR", "Print multiline\nred text.", color="red")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ndstextgen-1.7.3.tar.gz
.
File metadata
- Download URL: ndstextgen-1.7.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a54a158f98cf23b45a1dbebadcc1aacb690064af8bd56a1274f8157addf446d8 |
|
MD5 | cecff951c8b45ad6b85fc73a3d0607d1 |
|
BLAKE2b-256 | c4b491b375d2a30300636325d011c9d7846337196d25e1147abcbc4c01a3c46e |