beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / fofi / FoFiType1.h
blobf4e29b4ef0b5864346ff8bcdd999d3a2c30e0c2f
1 //========================================================================
2 //
3 // FoFiType1.h
4 //
5 // Copyright 1999-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
9 #ifndef FOFITYPE1_H
10 #define FOFITYPE1_H
12 #ifdef USE_GCC_PRAGMAS
13 #pragma interface
14 #endif
16 #include "goo/gtypes.h"
17 #include "FoFiBase.h"
19 //------------------------------------------------------------------------
20 // FoFiType1
21 //------------------------------------------------------------------------
23 class FoFiType1: public FoFiBase {
24 public:
26 // Create a FoFiType1 object from a memory buffer.
27 static FoFiType1 *make(char *fileA, int lenA);
29 // Create a FoFiType1 object from a file on disk.
30 static FoFiType1 *load(char *fileName);
32 virtual ~FoFiType1();
34 // Return the font name.
35 char *getName();
37 // Return the encoding, as an array of 256 names (any of which may
38 // be NULL).
39 char **getEncoding();
41 // Return the font matrix as an array of six numbers.
42 void getFontMatrix(double *mat);
44 // Write a version of the Type 1 font file with a new encoding.
45 void writeEncoded(const char **newEncoding,
46 FoFiOutputFunc outputFunc, void *outputStream);
48 private:
50 FoFiType1(char *fileA, int lenA, GBool freeFileDataA);
52 char *getNextLine(char *line);
53 void parse();
54 void undoPFB();
56 char *name;
57 char **encoding;
58 double fontMatrix[6];
59 GBool parsed;
62 #endif