| 1 |
.TH CUBE2FONT 1 2012-07-16 "cube2font 1.3" "cube2font Manual" |
| 2 |
.SH NAME |
| 3 |
cube2font \- Utility program designed to create font bitmaps for Cube Engine games |
| 4 |
.SH SYNOPSIS |
| 5 |
.nh |
| 6 |
.B cube2font |
| 7 |
.I infile outfile |
| 8 |
.IR outborder [: inborder ] |
| 9 |
.I pad offset advance charwidth charheight texwidth texheight |
| 10 |
.RI [ spacewidth |
| 11 |
.I spaceheight |
| 12 |
.IR texdir] |
| 13 |
.hy |
| 14 |
.SH DESCRIPTION |
| 15 |
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. |
| 16 |
.PP |
| 17 |
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. |
| 18 |
.SH PARAMETERS |
| 19 |
.TP |
| 20 |
.I infile |
| 21 |
.br |
| 22 |
Path to input file in truetype format. |
| 23 |
.TP |
| 24 |
.I outfile |
| 25 |
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. |
| 26 |
.TP |
| 27 |
.I outborder |
| 28 |
.br |
| 29 |
Size of black outside border around each character on the texes. |
| 30 |
.TP |
| 31 |
.I inborder |
| 32 |
.br |
| 33 |
Size of black border between the elements inside each character. |
| 34 |
.TP |
| 35 |
.I pad |
| 36 |
.br |
| 37 |
Added padding around characters on the texes, to prevent them "bleeding" into neighbouring characters. |
| 38 |
.TP |
| 39 |
.I offset |
| 40 |
.br |
| 41 |
Added spacing to the left of each character when they are rendered ingame. If exaggerated it would look something like this: |
| 42 |
.br |
| 43 |
.IP |
| 44 |
| A| B| |
| 45 |
.TP |
| 46 |
.I advance |
| 47 |
.br |
| 48 |
Added spacing to the right of each character when they are rendered ingame. If exaggerated it would look something like this: |
| 49 |
.br |
| 50 |
.IP |
| 51 |
|A |B | |
| 52 |
.TP |
| 53 |
.I charwidth |
| 54 |
.br |
| 55 |
Width of generated characters on the texes. |
| 56 |
.TP |
| 57 |
.I charheight |
| 58 |
.br |
| 59 |
Height of generated characters on the texes. |
| 60 |
.TP |
| 61 |
.I texwidth |
| 62 |
.br |
| 63 |
Width of generated texes. |
| 64 |
.TP |
| 65 |
.I texheight |
| 66 |
.br |
| 67 |
Height of generated texes. |
| 68 |
.TP |
| 69 |
.I spacewidth |
| 70 |
.br |
| 71 |
Width of the standard space character size when rendered ingame, defaults to a third of |
| 72 |
.I spaceheight |
| 73 |
if omitted or set to 0. |
| 74 |
.TP |
| 75 |
.I spaceheight |
| 76 |
.br |
| 77 |
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 |
| 78 |
.IR charheight , |
| 79 |
since it takes into account characters extending outside the 'em' box. This value will make the rendered characters scale to fit. |
| 80 |
.TP |
| 81 |
.I texdir |
| 82 |
.br |
| 83 |
Sets the font directory path in the config file. |
| 84 |
.SH EXAMPLES |
| 85 |
.nf |
| 86 |
.B cube2font Play-Bold.ttf play 4 15 1 1 54 54 512 512 0 0 fonts/ |
| 87 |
.fi |
| 88 |
.RS 4 |
| 89 |
Generates a font named |
| 90 |
.B play |
| 91 |
with a 4 pixel black border, an additional 15 pixels of space around characters, one pixel of extra spacing at both sides when displayed ingame, a character size of 54x54 pixels, a tex size of 512x512 pixels, a 23 pixels wide standard space character, a 71 pixels high standard vertical line separation, and the font path set as |
| 92 |
.B fonts/ |
| 93 |
.PP |
| 94 |
This would normally generate the files |
| 95 |
.br |
| 96 |
.B play.cfg |
| 97 |
.br |
| 98 |
.B play0.png |
| 99 |
.br |
| 100 |
.B play1.png |
| 101 |
.br |
| 102 |
.B play2.png |
| 103 |
.PP |
| 104 |
The above values are used for the base font. |
| 105 |
.RE |
| 106 |
.PP |
| 107 |
.nf |
| 108 |
.B cube2font default.ttf default 3 19 1 1 49 49 512 512 32 64 packages/fonts/ |
| 109 |
.fi |
| 110 |
.RS 4 |
| 111 |
This generates the default font for the cube2 game Sauerbraten. |
| 112 |
.SH AUTHORS |
| 113 |
cube2font was created by Lee "eihrul" Salzman. |
| 114 |
.PP |
| 115 |
This manual page was written by Martin Erik Werner |
| 116 |
.br |
| 117 |
<[email protected]> |