upgrade to xpdf 3.00.
[swftools.git] / pdf2swf / xpdf / FoFiType1.h
1 //========================================================================
2 //
3 // FoFiType1.h
4 //
5 // Copyright 1999-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
8
9 #ifndef FOFITYPE1_H
10 #define FOFITYPE1_H
11
12 #include <aconf.h>
13
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
17
18 #include "gtypes.h"
19 #include "FoFiBase.h"
20
21 //------------------------------------------------------------------------
22 // FoFiType1
23 //------------------------------------------------------------------------
24
25 class FoFiType1: public FoFiBase {
26 public:
27
28   // Create a FoFiType1 object from a memory buffer.
29   static FoFiType1 *make(char *fileA, int lenA);
30
31   // Create a FoFiType1 object from a file on disk.
32   static FoFiType1 *load(char *fileName);
33
34   virtual ~FoFiType1();
35
36   // Return the font name.
37   char *getName();
38
39   // Return the encoding, as an array of 256 names (any of which may
40   // be NULL).
41   char **getEncoding();
42
43   // Write a version of the Type 1 font file with a new encoding.
44   void writeEncoded(char **newEncoding,
45                     FoFiOutputFunc outputFunc, void *outputStream);
46
47 private:
48
49   FoFiType1(char *fileA, int lenA, GBool freeFileDataA);
50
51   char *getNextLine(char *line);
52   void parse();
53
54   char *name;
55   char **encoding;
56   GBool parsed;
57 };
58
59 #endif