]> www.fi.muni.cz Git - evince.git/blob - pdf/splash/SplashFTFontFile.h
522d055284497998aeb9b7c63fd32060e1a9cec8
[evince.git] / pdf / splash / SplashFTFontFile.h
1 //========================================================================
2 //
3 // SplashFTFontFile.h
4 //
5 //========================================================================
6
7 #ifndef SPLASHFTFONTFILE_H
8 #define SPLASHFTFONTFILE_H
9
10 #include <aconf.h>
11
12 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
13
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
17
18 #include <freetype/freetype.h>
19 #include "SplashFontFile.h"
20
21 class SplashFontFileID;
22 class SplashFTFontEngine;
23
24 //------------------------------------------------------------------------
25 // SplashFTFontFile
26 //------------------------------------------------------------------------
27
28 class SplashFTFontFile: public SplashFontFile {
29 public:
30
31   static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA,
32                                        SplashFontFileID *idA, char *fileNameA,
33                                        GBool deleteFileA, char **encA);
34   static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA,
35                                      SplashFontFileID *idA, char *fileNameA,
36                                      GBool deleteFileA,
37                                      Gushort *codeToCIDA, int codeToGIDLenA);
38   static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA,
39                                           SplashFontFileID *idA,
40                                           char *fileNameA,
41                                           GBool deleteFileA,
42                                           Gushort *codeToGIDA,
43                                           int codeToGIDLenA);
44
45   virtual ~SplashFTFontFile();
46
47   // Create a new SplashFTFont, i.e., a scaled instance of this font
48   // file.
49   virtual SplashFont *makeFont(SplashCoord *mat);
50
51 private:
52
53   SplashFTFontFile(SplashFTFontEngine *engineA,
54                    SplashFontFileID *idA,
55                    char *fileNameA, GBool deleteFileA,
56                    FT_Face faceA,
57                    Gushort *codeToGIDA, int codeToGIDLenA);
58
59   SplashFTFontEngine *engine;
60   FT_Face face;
61   Gushort *codeToGID;
62   int codeToGIDLen;
63
64   friend class SplashFTFont;
65 };
66
67 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
68
69 #endif