beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / splash / SplashFTFontFile.h
blobd642af0a0ab383563312d85c614a6592f7c377d9
1 //========================================================================
2 //
3 // SplashFTFontFile.h
4 //
5 //========================================================================
7 //========================================================================
8 //
9 // Modified under the Poppler project - http://poppler.freedesktop.org
11 // All changes made under the Poppler project to this file are licensed
12 // under GPL version 2 or later
14 // Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
16 // To see a description of the changes please see the Changelog file that
17 // came with your tarball or type make ChangeLog if you are building from git
19 //========================================================================
21 #ifndef SPLASHFTFONTFILE_H
22 #define SPLASHFTFONTFILE_H
24 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
26 #ifdef USE_GCC_PRAGMAS
27 #pragma interface
28 #endif
30 #include <ft2build.h>
31 #include FT_FREETYPE_H
32 #include "SplashFontFile.h"
34 class SplashFontFileID;
35 class SplashFTFontEngine;
37 //------------------------------------------------------------------------
38 // SplashFTFontFile
39 //------------------------------------------------------------------------
41 class SplashFTFontFile: public SplashFontFile {
42 public:
44 static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA,
45 SplashFontFileID *idA,
46 SplashFontSrc *src, const char **encA);
47 static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA,
48 SplashFontFileID *idA,
49 SplashFontSrc *src,
50 int *codeToCIDA, int codeToGIDLenA);
51 static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA,
52 SplashFontFileID *idA,
53 SplashFontSrc *src,
54 int *codeToGIDA,
55 int codeToGIDLenA,
56 int faceIndexA=0);
58 virtual ~SplashFTFontFile();
60 // Create a new SplashFTFont, i.e., a scaled instance of this font
61 // file.
62 virtual SplashFont *makeFont(SplashCoord *mat,
63 SplashCoord *textMat);
65 private:
67 SplashFTFontFile(SplashFTFontEngine *engineA,
68 SplashFontFileID *idA,
69 SplashFontSrc *src,
70 FT_Face faceA,
71 int *codeToGIDA, int codeToGIDLenA,
72 GBool trueTypeA, GBool type1A);
74 SplashFTFontEngine *engine;
75 FT_Face face;
76 int *codeToGID;
77 int codeToGIDLen;
78 GBool trueType;
79 GBool type1;
81 friend class SplashFTFont;
84 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
86 #endif