Skip to content

doches/FontTool

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

FontTool.py

FontTool.py is a tool for creating textures and textures atlases from TrueType font files. It uses PyGame (SDL) to render individual characters into a .png, and outputs a texture atlas containing the position and size of each glyph within the texture. Texture atlases can be output in either a simple flat text format or as an iOS-friendly property list.

Usage

Options: -h, --help show this help message and exit -f FONT, --font=FONT (REQUIRED) Name of the font to load (looks for .ttf in the working directory) -s SIZE, --size=SIZE Desired font size (in points). Defaults to 64. --surface=SURFACE_SIZE Size of the surface into which to render, of the form WIDTHxHEIGHT). Defaults to 512x512. -c COLOR, --color=COLOR Color to render, of the form RRR,GGG,BBB. Defaults to 255,255,255. --chars=CHARACTERS List of characters to include. Defaults to a reasonable list of mixed case alphanumerics and punctuation. --plist Flag indicating that we want the font information in Apple plist format (for loading with NSDictionary). --no-aa Disable anti-aliasing

About

Turn TrueType fonts into OpenGL-friendly textures and texture atlases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages