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.5.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file ndstextgen-1.7.5.tar.gz.

File metadata

  • Download URL: ndstextgen-1.7.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ndstextgen-1.7.5.tar.gz
Algorithm Hash digest
SHA256 5529fecdf0dd37b500c136cd4879f812166cb036f4ed5603bb56dd3957c4cd11
MD5 844ce58c88db632ab1b2166c7d0ac089
BLAKE2b-256 5dc13874db4ebfdad6c52af2cfd55c833fa84c0f74efb4ebb08438b5aa3cebe7

See more details on using hashes here.

Supported by

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