Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ndstextgen-1.7.3.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page