]> git.ipfire.org Git - thirdparty/cups.git/blob - pdftops/SplashFTFontFile.h
Load cups into easysw/current.
[thirdparty/cups.git] / pdftops / SplashFTFontFile.h
1 //========================================================================
2 //
3 // SplashFTFontFile.h
4 //
5 //========================================================================
6
7 #ifndef SPLASHFTFONTFILE_H
8 #define SPLASHFTFONTFILE_H
9
10 #include <config.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 <ft2build.h>
19 #include FT_FREETYPE_H
20 #include "SplashFontFile.h"
21
22 class SplashFontFileID;
23 class SplashFTFontEngine;
24
25 //------------------------------------------------------------------------
26 // SplashFTFontFile
27 //------------------------------------------------------------------------
28
29 class SplashFTFontFile: public SplashFontFile {
30 public:
31
32 static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA,
33 SplashFontFileID *idA, char *fileNameA,
34 GBool deleteFileA, char **encA);
35 static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA,
36 SplashFontFileID *idA, char *fileNameA,
37 GBool deleteFileA,
38 Gushort *codeToCIDA, int codeToGIDLenA);
39 static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA,
40 SplashFontFileID *idA,
41 char *fileNameA,
42 GBool deleteFileA,
43 Gushort *codeToGIDA,
44 int codeToGIDLenA);
45
46 virtual ~SplashFTFontFile();
47
48 // Create a new SplashFTFont, i.e., a scaled instance of this font
49 // file.
50 virtual SplashFont *makeFont(SplashCoord *mat);
51
52 private:
53
54 SplashFTFontFile(SplashFTFontEngine *engineA,
55 SplashFontFileID *idA,
56 char *fileNameA, GBool deleteFileA,
57 FT_Face faceA,
58 Gushort *codeToGIDA, int codeToGIDLenA);
59
60 SplashFTFontEngine *engine;
61 FT_Face face;
62 Gushort *codeToGID;
63 int codeToGIDLen;
64
65 friend class SplashFTFont;
66 };
67
68 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
69
70 #endif