Debian Codegraph @

libs/xpdf/xpdf-src/splash/SplashFTFontFile.h

raw
1 //========================================================================
2 //
3 // SplashFTFontFile.h
4 //
5 // Copyright 2003-2013 Glyph & Cog, LLC
6 //
7 //========================================================================
8
9 #ifndef SPLASHFTFONTFILE_H
10 #define SPLASHFTFONTFILE_H
11
12 #include <aconf.h>
13
14 #if HAVE_FREETYPE_H
15
16 #include <ft2build.h>
17 #include FT_FREETYPE_H
18 #include "SplashFontFile.h"
19
20 class SplashFontFileID;
21 class SplashFTFontEngine;
22
23 //------------------------------------------------------------------------
24 // SplashFTFontFile
25 //------------------------------------------------------------------------
26
27 class SplashFTFontFile: public SplashFontFile {
28 public:
29
30 static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA,
31 SplashFontFileID *idA,
32 SplashFontType fontTypeA,
33 #if LOAD_FONTS_FROM_MEM
34 GString *fontBufA,
35 #else
36 char *fileNameA, GBool deleteFileA,
37 #endif
38 const char **encA);
39 static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA,
40 SplashFontFileID *idA,
41 SplashFontType fontTypeA,
42 #if LOAD_FONTS_FROM_MEM
43 GString *fontBufA,
44 #else
45 char *fileNameA, GBool deleteFileA,
46 #endif
47 int *codeToGIDA, int codeToGIDLenA);
48 static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA,
49 SplashFontFileID *idA,
50 SplashFontType fontTypeA,
51 #if LOAD_FONTS_FROM_MEM
52 GString *fontBufA,
53 #else
54 char *fileNameA,
55 GBool deleteFileA,
56 #endif
57 int fontNum,
58 int *codeToGIDA,
59 int codeToGIDLenA);
60
61 virtual ~SplashFTFontFile();
62
63 // Create a new SplashFTFont, i.e., a scaled instance of this font
64 // file.
65 virtual SplashFont *makeFont(SplashCoord *mat,
66 SplashCoord *textMat);
67
68 private:
69
70 SplashFTFontFile(SplashFTFontEngine *engineA,
71 SplashFontFileID *idA,
72 SplashFontType fontTypeA,
73 #if LOAD_FONTS_FROM_MEM
74 GString *fontBufA,
75 #else
76 char *fileNameA, GBool deleteFileA,
77 #endif
78 FT_Face faceA,
79 int *codeToGIDA, int codeToGIDLenA);
80
81 SplashFTFontEngine *engine;
82 FT_Face face;
83 int *codeToGID;
84 int codeToGIDLen;
85
86 friend class SplashFTFont;
87 };
88
89 #endif // HAVE_FREETYPE_H
90
91 #endif