1 /**
2 ** font2c.c ---- convert a font to C source code
3 **
4 ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221
5 ** [e-mail: csaba@vuse.vanderbilt.edu]
6 **
7 ** This file is part of the GRX graphics library.
8 **
9 ** The GRX graphics library is free software; you can redistribute it
10 ** and/or modify it under some conditions; see the "copying.grx" file
11 ** for details.
12 **
13 ** This library is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 **
17 **/
18
19 #include <stdio.h>
20 #include "grx20.h"
21
main(int argc,char ** argv)22 int main(int argc,char **argv)
23 {
24 GrFont *f;
25 if(argc < 4) {
26 fprintf(
27 stderr,
28 "%s: too few arguments\n"
29 "usage: font2c fontFile outputFile CfontSymbolName\n",
30 argv[0]
31 );
32 return(1);
33 }
34 f = GrLoadFont(argv[1]);
35 if(!f) {
36 fprintf(
37 stderr,
38 "%s: could not load font \"%s\"\n",
39 argv[0],
40 argv[1]
41 );
42 return(1);
43 }
44 GrDumpFont(f,argv[3],argv[2]);
45 return(0);
46 }
47
48