]> www.fi.muni.cz Git - evince.git/blob - pdf/splash/SplashFontFile.h
added.
[evince.git] / pdf / splash / SplashFontFile.h
1 //========================================================================
2 //
3 // SplashFontFile.h
4 //
5 //========================================================================
6
7 #ifndef SPLASHFONTFILE_H
8 #define SPLASHFONTFILE_H
9
10 #include <aconf.h>
11
12 #ifdef USE_GCC_PRAGMAS
13 #pragma interface
14 #endif
15
16 #include "gtypes.h"
17 #include "SplashTypes.h"
18
19 class GString;
20 class SplashFontEngine;
21 class SplashFont;
22 class SplashFontFileID;
23
24 //------------------------------------------------------------------------
25 // SplashFontFile
26 //------------------------------------------------------------------------
27
28 class SplashFontFile {
29 public:
30
31   virtual ~SplashFontFile();
32
33   // Create a new SplashFont, i.e., a scaled instance of this font
34   // file.
35   virtual SplashFont *makeFont(SplashCoord *mat) = 0;
36
37   // Get the font file ID.
38   SplashFontFileID *getID() { return id; }
39
40   // Increment the reference count.
41   void incRefCnt();
42
43   // Decrement the reference count.  If the new value is zero, delete
44   // the SplashFontFile object.
45   void decRefCnt();
46
47 protected:
48
49   SplashFontFile(SplashFontFileID *idA, char *fileNameA,
50                  GBool deleteFileA);
51
52   SplashFontFileID *id;
53   GString *fileName;
54   GBool deleteFile;
55   int refCnt;
56
57   friend class SplashFontEngine;
58 };
59
60 #endif