1 //========================================================================
3 // SplashFTFontEngine.h
5 //========================================================================
7 //========================================================================
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
35 #include FT_FREETYPE_H
36 #include "goo/gtypes.h"
39 class SplashFontFileID
;
42 //------------------------------------------------------------------------
44 //------------------------------------------------------------------------
46 class SplashFTFontEngine
{
49 static SplashFTFontEngine
*init(GBool aaA
, GBool enableFreeTypeHintingA
, GBool enableSlightHinting
);
51 ~SplashFTFontEngine();
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
; }
67 SplashFTFontEngine(GBool aaA
, GBool enableFreeTypeHintingA
, GBool enableSlightHintingA
, FT_Library libA
);
70 GBool enableFreeTypeHinting
;
71 GBool enableSlightHinting
;
75 friend class SplashFTFontFile
;
76 friend class SplashFTFont
;
79 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H