/*-------------------------------------------------------------------------- ----- File: type1afm.c ----- Author: Rainer Menzner (Rainer.Menzner@web.de) ----- Date: 2002-11-27 ----- Description: This file is part of t1lib. The program type1afm extracts metrics information from Type 1 font files and dumps it to afm files. ----- Copyright: t1lib is copyrighted (c) Rainer Menzner, 1996-2002. As of version 0.5, t1lib is distributed under the GNU General Public Library Lincense. The conditions can be found in the files LICENSE and LGPL, which should reside in the toplevel directory of the distribution. Please note that there are parts of t1lib that are subject to other licenses: The parseAFM-package is copyrighted by Adobe Systems Inc. The type1 rasterizer is copyrighted by IBM and the X11-consortium. ----- Warranties: Of course, there's NO WARRANTY OF ANY KIND :-) ----- Credits: I want to thank IBM and the X11-consortium for making their rasterizer freely available. Also thanks to Piet Tutelaers for his ps2pk, from which I took the rasterizer sources in a format independent from X11. Thanks to all people who make free software living! --------------------------------------------------------------------------*/ #include #include /* Note: We include t1lib.h from lib/t1lib. That way the objectfile does only need to be rebuild when the header itself changes and not each time the library has been recompiled */ #include "../lib/t1lib/t1lib.h" void printusage( void); int main(int argc, char *argv[]) { int i, j, result; int rasterflags=0; if (argc==1){ printusage(); return(0); } /* If we want to log anything, then log all */ T1_SetLogLevel(T1LOG_DEBUG); /* Check whether logfile is requested */ if (strcmp( argv[1], "-l")==0){ if (argc==2){ printusage(); return(0); } j=2; if ((T1_InitLib( LOGFILE | IGNORE_CONFIGFILE | IGNORE_FONTDATABASE)==NULL)){ fprintf(stderr, "Initialization of t1lib failed\n"); return(1); } } else{ j=1; if ((T1_InitLib( NO_LOGFILE | IGNORE_CONFIGFILE | IGNORE_FONTDATABASE)==NULL)){ fprintf(stderr, "Initialization of t1lib failed\n"); return(1); } } /* First, build font data base */ for (i=j; i [ ...]\n"); fprintf(stdout, "\n"); fprintf(stdout, "Generate afm-file from Adobe Type 1 font file (T1lib-%s)!\n", T1_GetLibIdent()); fprintf(stdout, "Options: -l Write a log-file t1lib.log\n"); }