1 //========================================================================
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>
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
31 #include FT_FREETYPE_H
32 #include "SplashFontFile.h"
34 class SplashFontFileID
;
35 class SplashFTFontEngine
;
37 //------------------------------------------------------------------------
39 //------------------------------------------------------------------------
41 class SplashFTFontFile
: public SplashFontFile
{
44 static SplashFontFile
*loadType1Font(SplashFTFontEngine
*engineA
,
45 SplashFontFileID
*idA
,
46 SplashFontSrc
*src
, const char **encA
);
47 static SplashFontFile
*loadCIDFont(SplashFTFontEngine
*engineA
,
48 SplashFontFileID
*idA
,
50 int *codeToCIDA
, int codeToGIDLenA
);
51 static SplashFontFile
*loadTrueTypeFont(SplashFTFontEngine
*engineA
,
52 SplashFontFileID
*idA
,
58 virtual ~SplashFTFontFile();
60 // Create a new SplashFTFont, i.e., a scaled instance of this font
62 virtual SplashFont
*makeFont(SplashCoord
*mat
,
63 SplashCoord
*textMat
);
67 SplashFTFontFile(SplashFTFontEngine
*engineA
,
68 SplashFontFileID
*idA
,
71 int *codeToGIDA
, int codeToGIDLenA
,
72 GBool trueTypeA
, GBool type1A
);
74 SplashFTFontEngine
*engine
;
81 friend class SplashFTFont
;
84 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H