Debian Codegraph @

libs/xpdf/xpdf-src/fofi/FoFiType1.h

raw
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 #include "gtypes.h"
15 #include "FoFiBase.h"
16
17 //------------------------------------------------------------------------
18 // FoFiType1
19 //------------------------------------------------------------------------
20
21 class FoFiType1: public FoFiBase {
22 public:
23
24 // Create a FoFiType1 object from a memory buffer.
25 static FoFiType1 *make(char *fileA, int lenA);
26
27 // Create a FoFiType1 object from a file on disk.
28 static FoFiType1 *load(char *fileName);
29
30 virtual ~FoFiType1();
31
32 // Return the font name.
33 char *getName();
34
35 // Return the encoding, as an array of 256 names (any of which may
36 // be NULL).
37 char **getEncoding();
38
39 // Return the font matrix as an array of six numbers.
40 void getFontMatrix(double *mat);
41
42 // Write a version of the Type 1 font file with a new encoding.
43 void writeEncoded(const char **newEncoding,
44 FoFiOutputFunc outputFunc, void *outputStream);
45
46 private:
47
48 FoFiType1(char *fileA, int lenA, GBool freeFileDataA);
49
50 char *getNextLine(char *line);
51 void parse();
52 void undoPFB();
53
54 char *name;
55 char **encoding;
56 double fontMatrix[6];
57 GBool parsed;
58 };
59
60 #endif