Back to index

tetex-bin  3.0
FoFiType1.h
Go to the documentation of this file.
00001 //========================================================================
00002 //
00003 // FoFiType1.h
00004 //
00005 // Copyright 1999-2003 Glyph & Cog, LLC
00006 //
00007 //========================================================================
00008 
00009 #ifndef FOFITYPE1_H
00010 #define FOFITYPE1_H
00011 
00012 #include <aconf.h>
00013 
00014 #ifdef USE_GCC_PRAGMAS
00015 #pragma interface
00016 #endif
00017 
00018 #include "gtypes.h"
00019 #include "FoFiBase.h"
00020 
00021 //------------------------------------------------------------------------
00022 // FoFiType1
00023 //------------------------------------------------------------------------
00024 
00025 class FoFiType1: public FoFiBase {
00026 public:
00027 
00028   // Create a FoFiType1 object from a memory buffer.
00029   static FoFiType1 *make(char *fileA, int lenA);
00030 
00031   // Create a FoFiType1 object from a file on disk.
00032   static FoFiType1 *load(char *fileName);
00033 
00034   virtual ~FoFiType1();
00035 
00036   // Return the font name.
00037   char *getName();
00038 
00039   // Return the encoding, as an array of 256 names (any of which may
00040   // be NULL).
00041   char **getEncoding();
00042 
00043   // Write a version of the Type 1 font file with a new encoding.
00044   void writeEncoded(char **newEncoding,
00045                   FoFiOutputFunc outputFunc, void *outputStream);
00046 
00047 private:
00048 
00049   FoFiType1(char *fileA, int lenA, GBool freeFileDataA);
00050 
00051   char *getNextLine(char *line);
00052   void parse();
00053 
00054   char *name;
00055   char **encoding;
00056   GBool parsed;
00057 };
00058 
00059 #endif