beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / splash / SplashFTFontEngine.h
blob11bbea74a8058b7addfda46dbfccb99327ebe65e
1 //========================================================================
2 //
3 // SplashFTFontEngine.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>
15 // Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
16 // Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
17 // Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
18 // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
20 // To see a description of the changes please see the Changelog file that
21 // came with your tarball or type make ChangeLog if you are building from git
23 //========================================================================
25 #ifndef SPLASHFTFONTENGINE_H
26 #define SPLASHFTFONTENGINE_H
28 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
30 #ifdef USE_GCC_PRAGMAS
31 #pragma interface
32 #endif
34 #include <ft2build.h>
35 #include FT_FREETYPE_H
36 #include "goo/gtypes.h"
38 class SplashFontFile;
39 class SplashFontFileID;
40 class SplashFontSrc;
42 //------------------------------------------------------------------------
43 // SplashFTFontEngine
44 //------------------------------------------------------------------------
46 class SplashFTFontEngine {
47 public:
49 static SplashFTFontEngine *init(GBool aaA, GBool enableFreeTypeHintingA, GBool enableSlightHinting);
51 ~SplashFTFontEngine();
53 // Load fonts.
54 SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
55 SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
56 SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc);
57 SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src);
58 SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src,
59 int *codeToGID, int codeToGIDLen);
60 SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src,
61 int *codeToGID, int codeToGIDLen, int faceIndex = 0);
62 GBool getAA() { return aa; }
63 void setAA(GBool aaA) { aa = aaA; }
65 private:
67 SplashFTFontEngine(GBool aaA, GBool enableFreeTypeHintingA, GBool enableSlightHintingA, FT_Library libA);
69 GBool aa;
70 GBool enableFreeTypeHinting;
71 GBool enableSlightHinting;
72 FT_Library lib;
73 GBool useCIDs;
75 friend class SplashFTFontFile;
76 friend class SplashFTFont;
79 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
81 #endif