2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
10 * $Logfile: /Freespace2/code/Fonttool/FontTool.cpp $
15 * Tool for creating/kerning fonts
18 * Revision 1.4 2003/01/30 20:03:48 relnev
19 * various files ported needed for fonttool. There is a bug where on exit it segfaults in SDL_GL_SwapBuffers, I'm probably missing something (don't know what) but it works fine otherwise (Taylor Richards)
21 * Revision 1.3 2002/06/09 04:41:16 relnev
22 * added copyright header
24 * Revision 1.2 2002/05/07 03:16:43 theoddone33
25 * The Great Newline Fix
27 * Revision 1.1.1.1 2002/05/03 03:28:08 root
31 * 2 10/24/98 5:15p Dave
33 * 1 10/24/98 4:58p Dave
35 * 4 10/30/97 4:56p John
36 * Fixed up font stuff to build. Fixed bug where it didn't show the last
37 * 3 characters in kerning table.
39 * 3 6/23/97 6:05p Hoffoss
40 * Added stubbs to fix linking errors.
42 * 2 6/05/97 4:53p John
43 * First rev of new antialiased font stuff.
45 * 1 6/02/97 4:04p John
68 static const char Usage[] = "Usage:\n" \
69 "\nFontTool x.pcx [y.vf]\n" \
70 "\n If you specify a PCX file, then a font will be\n" \
71 " created with the same base name. If you also\n" \
72 " specify a font file, then it will use the kerning\n" \
73 " data from that font file when it creates the new\n" \
74 " font from the PCX file.\n" \
76 "\n If you specify a font file by itself then it will\n" \
77 " allow you to interactively kern that font.\n" \
78 "\nFontTool x.vf y.vf\n" \
79 "\n If you specify two font files, then the kerning\n" \
80 " data from the first font will be copied into the\n" \
90 void demo_set_playback_filter() {}
91 float flFrametime = 0.0f;
93 void freespace_menu_background()
100 int main(int argc, char *argv[] )
107 if ( (argc < 1) || (argc>3) ) {
113 SDL_strlwr( argv[1] );
115 if ( strstr( argv[1], ".pcx" ) )
117 else if ( strstr( argv[1], ".vf" ) )
122 SDL_strlwr( argv[2] );
124 if ( strstr( argv[2], ".pcx" ) )
126 else if ( strstr( argv[2], ".vf" ) )
130 if ( (t1==PCX) && (t2==NONE) )
131 fonttool_create_font( argv[1], NULL );
132 else if ( (t1==PCX) && (t2==FONT) )
133 fonttool_create_font( argv[1], argv[2] );
134 else if ( (t1==FONT) && (t2==NONE) )
135 fonttool_edit_kerning( argv[1] );
136 else if ( (t1==FONT) && (t2==FONT) )
137 fonttool_kerning_copy( argv[1], argv[2] );