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) 2007-2009, 2011 Albert Astals Cid <aacid@kde.org>
15 // Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
16 // Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
18 // To see a description of the changes please see the Changelog file that
19 // came with your tarball or type make ChangeLog if you are building from git
21 //========================================================================
23 #ifndef SPLASHFTFONT_H
24 #define SPLASHFTFONT_H
26 #include "poppler-config.h"
28 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
30 #ifdef USE_GCC_PRAGMAS
35 #include FT_FREETYPE_H
36 #include "SplashFont.h"
38 class SplashFTFontFile
;
40 //------------------------------------------------------------------------
42 //------------------------------------------------------------------------
44 class SplashFTFont
: public SplashFont
{
47 SplashFTFont(SplashFTFontFile
*fontFileA
, SplashCoord
*matA
,
48 SplashCoord
*textMatA
);
50 virtual ~SplashFTFont();
52 // Munge xFrac and yFrac before calling SplashFont::getGlyph.
53 virtual GBool
getGlyph(int c
, int xFrac
, int yFrac
,
54 SplashGlyphBitmap
*bitmap
, int x0
, int y0
, SplashClip
*clip
, SplashClipResult
*clipRes
);
56 // Rasterize a glyph. The <xFrac> and <yFrac> values are the same
57 // as described for getGlyph.
58 virtual GBool
makeGlyph(int c
, int xFrac
, int yFrac
,
59 SplashGlyphBitmap
*bitmap
, int x0
, int y0
, SplashClip
*clip
, SplashClipResult
*clipRes
);
61 // Return the path for a glyph.
62 virtual SplashPath
*getGlyphPath(int c
);
64 // Return the advance of a glyph. (in 0..1 range)
65 virtual double getGlyphAdvance(int c
);
72 SplashCoord textScale
;
74 GBool enableFreeTypeHinting
;
75 GBool enableSlightHinting
;
78 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H