table of contents
CUBE2FONT(1) | cube2font Manual | CUBE2FONT(1) |
NAME¶
cube2font - Utility program designed to create font bitmaps for Cube Engine games
SYNOPSIS¶
cube2font infile outfile outborder[:inborder] pad offset advance charwidth charheight texwidth texheight [spacewidth spaceheight texdir]
DESCRIPTION¶
cube2font is a utility program designed to create font bitmaps for Cube Engine games, it works by taking a Truetype font and building it into a set of coordinates in an image. cube2font is an improved version of the previous TTF2Font, supporting a much larger range of characters.
The program outputs one or more PNG images containing a grid of characters, so-called "texes", and an accompanying config file in plaintext, which lists the character coordinates in the images.
PARAMETERS¶
- infile
-
Path to input file in truetype format. - outfile
- Sets the font name in the config file, and is also used as an output filename template: A number and the .png extension will be appended to the texes, and a .cfg extension to the coordinate file.
- outborder
-
Size of black outside border around each character on the texes. - inborder
-
Size of black border between the elements inside each character. - pad
-
Added padding around characters on the texes, to prevent them "bleeding" into neighbouring characters. - offset
-
Added spacing to the left of each character when they are rendered ingame. If exaggerated it would look something like this:
- | A| B|
- advance
-
Added spacing to the right of each character when they are rendered ingame. If exaggerated it would look something like this:
- |A |B |
- charwidth
-
Width of generated characters on the texes. - charheight
-
Height of generated characters on the texes. - texwidth
-
Width of generated texes. - texheight
-
Height of generated texes. - spacewidth
-
Width of the standard space character size when rendered ingame, defaults to a third of spaceheight if omitted or set to 0. - spaceheight
-
Height of the vertical character separation when rendered ingame, defaults to the maximum vertical character range if omitted or set to 0. This value is normally larger than charheight, since it takes into account characters extending outside the 'em' box. This value will make the rendered characters scale to fit. - texdir
-
Sets the font directory path in the config file.
EXAMPLES¶
cube2font Play-Bold.ttf play 4 15 1 1 54 54 512 512 0 0 fonts/
This would normally generate the files
play.cfg
play0.png
play1.png
play2.png
The above values are used for the base font.
cube2font default.ttf default 3 19 1 1 49 49 512 512 32 64 packages/fonts/
AUTHORS¶
cube2font was created by Lee "eihrul" Salzman.
This manual page was written by Martin Erik Werner
<martinerikwerner@gmail.com>
2012-07-16 | cube2font 1.3 |