forked from ienorand/TTF2Font
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
134 lines (107 loc) · 4.19 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
TTF2Font 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. It was created by Quinton "quin" Reeves and
Lee "eihrul" Salzman, to assist Joshua L. "verbalshadow" Blocher in his
creation of content for Blood Frontier.
Contents
* 1 Download
* 2 Usage
o 2.1 -?
o 2.2 -hS
o 2.3 -fS
o 2.4 -nS
o 2.5 -iN
o 2.6 -sN
o 2.7 -pN
o 2.8 -dN
o 2.9 -oN
o 2.10 -gN
o 2.11 -qN
o 2.12 -cN
* 3 Changes
o 3.1 v0.1
o 3.2 v0.2
o 3.3 v0.3
* 4 Licenses
o 4.1 Source Code License
o 4.2 Font License
Download
Please see https://sourceforge.net/projects/bloodfrontier/files/Vault/TTF2Font/ for download original upstream 0.3 version.
Later improvements are available in https://github.com/ienorand/TTF2Font repository and its fork: https://github.com/aurhat/TTF2Font .
Usage
The program will create two files upon proper execution, based on the
name of the font you provide it. Should you wish to use this as your
default font in game, you will need to rename the config file "font.cfg"
(and optionally, rename the image "font.png") and then update the config
file accordingly. The font will not work in the game as output by the
program, you must edit it.
Below are the command line parameters that allow control over the
operation of the program.
-?
Shows the usage help for the program.
-hS
Sets the home directory to S, which defaults to the current directory
(".")
This is an alternative location in which to look for files, and also
output the files the program creates.
-fS
Specifies the path to the Truetype font to use. This argument is
required for proper operation.
-nS
Provides the name of the output as S, which defaults to "default". The
file names, and "font name" will be named with this.
-iN
Sets the initial dimensions for the generated image to N, which defaults
to "512". If the program exceeds this size it will increase this value
until it is able to produce a working image. Images may only be powers
of two in size, if it is not, the program will adjust it automatically.
-sN
Defines the point size of the font to use to N, which defaults to "56".
-tN
Adds N pixels of white outline around each character (range: 0..5),
defaults to "0". This outline has the same color as character and is
blited to it, what increases thickness of generated characters. This works
only if quality is set to "2".
-pN
Adds N pixels of padding around each character, which defaults to "1".
This is useful if pixels "bleed" into the characters around it. The
generated dimensions of each character will not include this space when
displayed in game.
-dN
Create a shadow behind each character with an offset of N, which
defaults to "2". This helps make characters more readable when the
background is bright, while also creating a nice depth effect.
-oN
Use an outline around the entire character for a shadow if N, which
defaults to "1". This uses the depth shadow argument to determine its
size.
-gN
Sets the game which you are making the font for to N (range: 0..2),
which defaults to "0" (no game). Valid values are:
* 0: No game, neutral file output which must be edited
* 1: Sauerbraten (and derivatives)
* 2: AssaultCube
* 3: Blood Frontier
-qN
Makes Truetype fonts render with quality N (range: 0..2), which defaults
to "2". A value of "2" will antialias characters it renders, "1" will do
a simple blend on them, while "0" will not enhance them at all.
-cN
Compresses the generated PNG image at level N (range: 0..9), which
defaults to "1" (or "Best Speed"). Higher values will compress the image
more at the expense of longer loading times.
Changes
v0.1
* initial release
v0.2
* alpha blending fixes
* -w arg to supress win32 msg boxes
v0.3
* -o arg to use an outline around the glyph
* -g arg to set output game format
* -n arg to set the name of the output
v0.3.1 UNRELEASED
* GitHub repo
* Copyright clarification & cleanup
* Manpage
* -t arg to increase char thickness